Commit 4d0108a1 authored by Fabián Ezequiel Gallina's avatar Fabián Ezequiel Gallina

Merge from origin/emacs-24

a3505cb3 doc/lispref/variables.texi (Creating Buffer-Local): Improve indexing (Bug#19608)
d132c7b6 erc-backend.el: Give hook-name a default value of nil and add-to-list unconditionally. Fixes debbugs:19363
61cc7bf8 Fix support of non-ASCII frame titles on MS-Windows  (Bug#19590)
1e5902ac * filenotify.el (file-notify--descriptor): Do not cons for remote files.
b1ea1607 Handle watching of several files in the same directory for inotify.
parents 32a2c916 a3505cb3
2015-01-15 Eli Zaretskii <eliz@gnu.org>
* variables.texi (Creating Buffer-Local): Improve indexing.
(Bug#19608)
2015-01-04 Eli Zaretskii <eliz@gnu.org>
* frames.texi (Display Feature Testing): Make the description of
......
......@@ -1403,6 +1403,7 @@ buffer-local variable interactively, just as it is useful to create
buffer-local variables interactively.
@end deffn
@cindex local variables, killed by major mode
@defun kill-all-local-variables
This function eliminates all the buffer-local variable bindings of the
current buffer except for variables marked as ``permanent'' and local
......
2015-01-13 Michael Albinus <michael.albinus@gmx.de>
* filenotify.el (file-notify-descriptors, file-notify-handle-event):
Adapt docstring.
(file-notify--descriptor): New defun.
(file-notify-callback, file-notify-add-watch, file-notify-rm-watch):
Adapt docstring. Handle multiple values for
`file-notify-descriptors' entries. (Bug#18880)
* net/tramp.el (tramp-handle-file-notify-rm-watch): Do not check
`file-notify-descriptors', the implementation has been changed.
2015-01-09 Eli Zaretskii <eliz@gnu.org>
* net/net-utils.el (net-utils-run-program, net-utils-run-simple):
......
2015-01-14 Dima Kogan <dima@secretsauce.net>
* erc-backend.el (define-erc-response-handler): Give hook-name
default value of nil and add-to-list (bug#19363)
2015-01-22 Paul Eggert <eggert@cs.ucla.edu>
Don't downcase system diagnostics' first letters
......
......@@ -1162,8 +1162,11 @@ add things to `%s' instead."
(cl-loop for alias in aliases
collect (intern (format "erc-server-%s-functions" alias)))))
`(prog2
;; Normal hook variable.
(defvar ,hook-name ',fn-name ,(format hook-doc name))
;; Normal hook variable. The variable may already have a
;; value at this point, so I default to nil, and (add-hook)
;; unconditionally
(defvar ,hook-name nil ,(format hook-doc name))
(add-to-list ',hook-name ',fn-name)
;; Handler function
(defun ,fn-name (proc parsed)
,fn-doc
......
This diff is collapsed.
......@@ -64,7 +64,6 @@
(defvar bkup-backup-directory-info)
(defvar directory-sep-char)
(defvar eshell-path-env)
(defvar file-notify-descriptors)
(defvar ls-lisp-use-insert-directory-program)
(defvar outline-regexp)
......@@ -3415,7 +3414,7 @@ of."
(defun tramp-handle-file-notify-rm-watch (proc)
"Like `file-notify-rm-watch' for Tramp files."
;; The descriptor must be a process object.
(unless (and (processp proc) (gethash proc file-notify-descriptors))
(unless (processp proc)
(tramp-error proc 'file-notify-error "Not a valid descriptor %S" proc))
(tramp-message proc 6 "Kill %S" proc)
(kill-process proc))
......
2015-01-14 Eli Zaretskii <eliz@gnu.org>
* w32fns.c (w32_set_title_bar_text): New function, including
support for titles with non-ASCII characters outside of the
current system codepage.
(x_set_name, x_set_title): Use it. (Bug#19590)
2015-01-10 Eli Zaretskii <eliz@gnu.org>
* indent.c (Fvertical_motion): Return zero if we started from ZV
......
......@@ -1759,6 +1759,50 @@ x_change_tool_bar_height (struct frame *f, int height)
x_clear_under_internal_border (f);
}
static void
w32_set_title_bar_text (struct frame *f, Lisp_Object name)
{
if (FRAME_W32_WINDOW (f))
{
block_input ();
#ifdef __CYGWIN__
GUI_FN (SetWindowText) (FRAME_W32_WINDOW (f),
GUI_SDATA (GUI_ENCODE_SYSTEM (name)));
#else
/* The frame's title many times shows the name of the file
visited in the selected window's buffer, so it makes sense to
support non-ASCII characters outside of the current system
codepage in the title. */
if (w32_unicode_filenames)
{
Lisp_Object encoded_title = ENCODE_UTF_8 (name);
wchar_t *title_w;
int tlen = pMultiByteToWideChar (CP_UTF8, 0, SSDATA (encoded_title),
-1, NULL, 0);
if (tlen > 0)
{
/* Windows truncates the title text beyond what fits on
a single line, so we can limit the length to some
reasonably large value, and use alloca. */
if (tlen > 10000)
tlen = 10000;
title_w = alloca ((tlen + 1) * sizeof (wchar_t));
pMultiByteToWideChar (CP_UTF8, 0, SSDATA (encoded_title), -1,
title_w, tlen);
title_w[tlen] = L'\0';
SetWindowTextW (FRAME_W32_WINDOW (f), title_w);
}
else /* Conversion to UTF-16 failed, so we punt. */
SetWindowTextA (FRAME_W32_WINDOW (f),
SSDATA (ENCODE_SYSTEM (name)));
}
else
SetWindowTextA (FRAME_W32_WINDOW (f), SSDATA (ENCODE_SYSTEM (name)));
#endif
unblock_input ();
}
}
/* Change the name of frame F to NAME. If NAME is nil, set F's name to
w32_id_name.
......@@ -1812,13 +1856,7 @@ x_set_name (struct frame *f, Lisp_Object name, bool explicit)
if (! NILP (f->title))
name = f->title;
if (FRAME_W32_WINDOW (f))
{
block_input ();
GUI_FN (SetWindowText) (FRAME_W32_WINDOW (f),
GUI_SDATA (GUI_ENCODE_SYSTEM (name)));
unblock_input ();
}
w32_set_title_bar_text (f, name);
}
/* This function should be called when the user's lisp code has
......@@ -1856,13 +1894,7 @@ x_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name)
if (NILP (name))
name = f->name;
if (FRAME_W32_WINDOW (f))
{
block_input ();
GUI_FN (SetWindowText) (FRAME_W32_WINDOW (f),
GUI_SDATA (GUI_ENCODE_SYSTEM (name)));
unblock_input ();
}
w32_set_title_bar_text (f, name);
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment