------------------------------------------------------------ revno: 116621 committer: Glenn Morris branch nick: trunk timestamp: Fri 2014-02-28 19:54:47 -0800 message: * lisp/subr.el (with-wrapper-hook): Tweak obsolescence message. * lisp/simple.el: Remove mistaken FIXME comment. * etc/NEWS: Markup. diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-03-01 02:54:08 +0000 +++ etc/NEWS 2014-03-01 03:54:47 +0000 @@ -1295,6 +1295,7 @@ *** `generic-make-keywords-list' *** `get-upcase-table' (use `case-table-get-table' instead). ++++ ** `with-wrapper-hook' is obsoleted by `add-function'. The few hooks that used with-wrapper-hook are replaced as follows: *** `abbrev-expand-function' obsoletes `abbrev-expand-functions'. === modified file 'lisp/simple.el' --- lisp/simple.el 2014-02-21 13:22:14 +0000 +++ lisp/simple.el 2014-03-01 03:54:47 +0000 @@ -3468,7 +3468,6 @@ be copied into other buffers." (funcall filter-buffer-substring-function beg end delete)) -;; FIXME: `with-wrapper-hook' is obsolete (defun buffer-substring--filter (beg end &optional delete) (with-wrapper-hook filter-buffer-substring-functions (beg end delete) (cond === modified file 'lisp/subr.el' --- lisp/subr.el 2014-02-27 14:21:28 +0000 +++ lisp/subr.el 2014-03-01 03:54:47 +0000 @@ -1461,7 +1461,7 @@ to the next hook function, if any. The last (or \"outermost\") FUN is then called once." (declare (indent 2) (debug (form sexp body)) - (obsolete "use a -function variable modified by add-function." + (obsolete "use a -function variable modified by `add-function'." "24.4")) ;; We need those two gensyms because CL's lexical scoping is not available ;; for function arguments :-( ------------------------------------------------------------ revno: 116620 committer: Glenn Morris branch nick: trunk timestamp: Fri 2014-02-28 18:54:08 -0800 message: * doc/lispref/display.texi (Forcing Redisplay): Mention pre-redisplay-function. * etc/NEWS: Related markup. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2014-02-28 10:31:26 +0000 +++ doc/lispref/ChangeLog 2014-03-01 02:54:08 +0000 @@ -1,3 +1,7 @@ +2014-03-01 Glenn Morris + + * display.texi (Forcing Redisplay): Mention pre-redisplay-function. + 2014-02-28 Xue Fuqiao * functions.texi (Advising Functions): === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2014-02-28 04:15:21 +0000 +++ doc/lispref/display.texi 2014-03-01 02:54:08 +0000 @@ -117,6 +117,11 @@ non-@code{nil} (the default). @end defvar +@defvar pre-redisplay-function +A function run just before redisplay. It is called with one argument, +the set of windows to redisplay. +@end defvar + Although @code{redisplay} tries immediately to redisplay, it does not change how Emacs decides which parts of its frame(s) to redisplay. By contrast, the following function adds certain windows to the === modified file 'etc/NEWS' --- etc/NEWS 2014-03-01 02:48:54 +0000 +++ etc/NEWS 2014-03-01 02:54:08 +0000 @@ -1240,6 +1240,7 @@ *** The hook `term-setup-hook' is obsolete. It is entirely equivalent to `emacs-startup-hook'. See also the new `tty-setup-hook'. ++++ ** New hook `pre-redisplay-function'. +++ ------------------------------------------------------------ revno: 116619 committer: Glenn Morris branch nick: trunk timestamp: Fri 2014-02-28 18:48:54 -0800 message: Some doc related to search-invisible and query replace * doc/emacs/search.texi (Query Replace): Mention search-invisible. * doc/emacs/text.texi (Outline Visibility): Mention search-invisible also affects query-replace. * lisp/isearch.el (search-invisible): Doc fix. * etc/NEWS: Related markup. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2014-02-28 03:02:50 +0000 +++ doc/emacs/ChangeLog 2014-03-01 02:48:54 +0000 @@ -1,10 +1,17 @@ +2014-03-01 Glenn Morris + + * search.texi (Query Replace): Mention search-invisible. + * text.texi (Outline Visibility): Mention search-invisible + also affects query-replace. + 2014-02-28 Xue Fuqiao * emacs.texi (Top): * programs.texi (Programs, Prettifying Symbols): Document `prettify-symbols-mode' and `global-prettify-symbols-mode'. - * misc.texi (Saving Emacs Sessions): Document some new desktop user options. + * misc.texi (Saving Emacs Sessions): + Document some new desktop user options. 2014-02-27 Xue Fuqiao === modified file 'doc/emacs/search.texi' --- doc/emacs/search.texi 2014-02-20 08:25:12 +0000 +++ doc/emacs/search.texi 2014-03-01 02:48:54 +0000 @@ -1393,6 +1393,10 @@ used the minibuffer to read its arguments. @xref{Repetition, C-x ESC ESC}. +@cindex invisible text, and query-replace + The option @code{search-invisible} determines how @code{query-replace} +treats invisible text. @xref{Outline Search}. + @xref{Operating on Files}, for the Dired @kbd{Q} command which performs query replace on selected files. See also @ref{Transforming File Names}, for Dired commands to rename, copy, or link files by === modified file 'doc/emacs/text.texi' --- doc/emacs/text.texi 2014-02-20 08:25:12 +0000 +++ doc/emacs/text.texi 2014-03-01 02:48:54 +0000 @@ -1132,9 +1132,10 @@ that position, the text remains visible. To toggle whether or not an active incremental search can match hidden text, type @kbd{M-s i}. To change the default for future searches, customize the option -@code{search-invisible}. You can also automatically make text visible -as you navigate in it by using Reveal mode (@kbd{M-x reveal-mode}), a -buffer-local minor mode. +@code{search-invisible}. (This option also affects how @code{query-replace} +and related functions treat hidden text, @pxref{Query Replace}.) +You can also automatically make text visible as you navigate in it by +using Reveal mode (@kbd{M-x reveal-mode}), a buffer-local minor mode. @node Outline Views @subsection Viewing One Outline in Multiple Views === modified file 'etc/NEWS' --- etc/NEWS 2014-02-28 19:44:32 +0000 +++ etc/NEWS 2014-03-01 02:48:54 +0000 @@ -851,6 +851,7 @@ +++ *** `M-s i' in Isearch mode toggles whether search matches invisible text. ++++ *** `query-replace' skips invisible text when `search-invisible' is nil, and opens overlays with hidden text when `search-invisible' is `open'. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-03-01 02:31:05 +0000 +++ lisp/ChangeLog 2014-03-01 02:48:54 +0000 @@ -1,5 +1,7 @@ 2014-03-01 Glenn Morris + * isearch.el (search-invisible): Doc fix. + * minibuffer.el (completion-hilit-commonality): Make `base-size' argument optional. Short-cut if `prefix-len' is 0. * comint.el (comint-dynamic-list-completions): Doc fix. === modified file 'lisp/isearch.el' --- lisp/isearch.el 2014-02-20 08:14:20 +0000 +++ lisp/isearch.el 2014-03-01 02:48:54 +0000 @@ -131,7 +131,7 @@ :version "24.3") (defcustom search-invisible 'open - "If t incremental search can match hidden text. + "If t incremental search/query-replace can match hidden text. A nil value means don't match invisible text. When the value is `open', if the text matched is made invisible by an overlay having an `invisible' property and that overlay has a property ------------------------------------------------------------ revno: 116618 committer: Glenn Morris branch nick: trunk timestamp: Fri 2014-02-28 18:31:05 -0800 message: Replace some uses of obsolete argument of display-completion-list * lisp/minibuffer.el (completion-hilit-commonality): Make `base-size' argument optional. Short-cut if `prefix-len' is 0. * lisp/comint.el (comint-dynamic-list-completions): Doc fix. * lisp/comint.el (comint-dynamic-list-completions): * lisp/filecache.el (file-cache-minibuffer-complete): * lisp/tempo.el (tempo-display-completions): * lisp/eshell/em-hist.el (eshell-list-history): Replace use of obsolete argument of display-completion-list. * lisp/tempo.el: Use utf-8 for author name. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-03-01 01:25:29 +0000 +++ lisp/ChangeLog 2014-03-01 02:31:05 +0000 @@ -1,3 +1,14 @@ +2014-03-01 Glenn Morris + + * minibuffer.el (completion-hilit-commonality): + Make `base-size' argument optional. Short-cut if `prefix-len' is 0. + * comint.el (comint-dynamic-list-completions): Doc fix. + * comint.el (comint-dynamic-list-completions): + * filecache.el (file-cache-minibuffer-complete): + * tempo.el (tempo-display-completions): + * eshell/em-hist.el (eshell-list-history): + Replace use of obsolete argument of display-completion-list. + 2014-03-01 Juanma Barranquero * icomplete.el (icomplete-completions): === modified file 'lisp/comint.el' --- lisp/comint.el 2014-02-10 01:34:22 +0000 +++ lisp/comint.el 2014-03-01 02:31:05 +0000 @@ -3274,8 +3274,12 @@ (defun comint-dynamic-list-completions (completions &optional common-substring) "Display a list of sorted COMPLETIONS. -The meaning of COMMON-SUBSTRING is the same as in `display-completion-list'. -Typing SPC flushes the completions buffer." +Typing SPC flushes the completions buffer. + +The optional argument COMMON-SUBSTRING, if non-nil, should be a string +specifying a common substring for adding the faces +`completions-first-difference' and `completions-common-part' to +the completions." (let ((window (get-buffer-window "*Completions*" 0))) (setq completions (sort completions 'string-lessp)) (if (and (eq last-command this-command) @@ -3306,7 +3310,8 @@ (setq comint-dynamic-list-completions-config (current-window-configuration)) (with-output-to-temp-buffer "*Completions*" - (display-completion-list completions common-substring)) + (display-completion-list + (completion-hilit-commonality completions (length common-substring)))) (if (window-minibuffer-p) (minibuffer-message "Type space to flush; repeat completion command to scroll") (message "Type space to flush; repeat completion command to scroll"))) === modified file 'lisp/eshell/em-hist.el' --- lisp/eshell/em-hist.el 2014-01-01 07:43:34 +0000 +++ lisp/eshell/em-hist.el 2014-03-01 02:31:05 +0000 @@ -509,7 +509,8 @@ ;; Change "completion" to "history reference" ;; to make the display accurate. (with-output-to-temp-buffer history-buffer - (display-completion-list history prefix) + (display-completion-list + (completion-hilit-commonality history (length prefix))) (set-buffer history-buffer) (forward-line 3) (while (search-backward "completion" nil 'move) === modified file 'lisp/filecache.el' --- lisp/filecache.el 2014-01-01 07:43:34 +0000 +++ lisp/filecache.el 2014-03-01 02:31:05 +0000 @@ -613,7 +613,9 @@ (append completion-setup-hook (list 'file-cache-completion-setup-function)))) (with-output-to-temp-buffer file-cache-completions-buffer - (display-completion-list completion-list string)))) + (display-completion-list + (completion-hilit-commonality completion-list + (length string)))))) (setq file-cache-string (file-cache-file-name completion-string)) (if (string= file-cache-string (minibuffer-contents)) (minibuffer-message file-cache-sole-match-message) === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2014-02-28 05:29:45 +0000 +++ lisp/minibuffer.el 2014-03-01 02:31:05 +0000 @@ -1586,7 +1586,7 @@ by contrast. See also the face `completions-first-difference'.") -(defun completion-hilit-commonality (completions prefix-len base-size) +(defun completion-hilit-commonality (completions prefix-len &optional base-size) "Apply font-lock highlighting to a list of completions, COMPLETIONS. PREFIX-LEN is an integer. BASE-SIZE is an integer or nil (meaning zero). @@ -1597,34 +1597,36 @@ It returns a list with font-lock properties applied to each element, and with BASE-SIZE appended as the last element." (when completions - (let ((com-str-len (- prefix-len (or base-size 0)))) - (nconc - (mapcar - (lambda (elem) - (let ((str - ;; Don't modify the string itself, but a copy, since the - ;; the string may be read-only or used for other purposes. - ;; Furthermore, since `completions' may come from - ;; display-completion-list, `elem' may be a list. - (if (consp elem) - (car (setq elem (cons (copy-sequence (car elem)) - (cdr elem)))) - (setq elem (copy-sequence elem))))) - (font-lock-prepend-text-property - 0 - ;; If completion-boundaries returns incorrect - ;; values, all-completions may return strings - ;; that don't contain the prefix. - (min com-str-len (length str)) - 'face 'completions-common-part str) - (if (> (length str) com-str-len) - (font-lock-prepend-text-property com-str-len (1+ com-str-len) - 'face - 'completions-first-difference - str))) - elem) - completions) - base-size)))) + (if (zerop prefix-len) + completions + (let ((com-str-len (- prefix-len (or base-size 0)))) + (nconc + (mapcar + (lambda (elem) + (let ((str + ;; Don't modify the string itself, but a copy, since the + ;; the string may be read-only or used for other purposes. + ;; Furthermore, since `completions' may come from + ;; display-completion-list, `elem' may be a list. + (if (consp elem) + (car (setq elem (cons (copy-sequence (car elem)) + (cdr elem)))) + (setq elem (copy-sequence elem))))) + (font-lock-prepend-text-property + 0 + ;; If completion-boundaries returns incorrect + ;; values, all-completions may return strings + ;; that don't contain the prefix. + (min com-str-len (length str)) + 'face 'completions-common-part str) + (if (> (length str) com-str-len) + (font-lock-prepend-text-property com-str-len (1+ com-str-len) + 'face + 'completions-first-difference + str))) + elem) + completions) + base-size))))) (defun display-completion-list (completions &optional common-substring) "Display the list of completions, COMPLETIONS, using `standard-output'. === modified file 'lisp/tempo.el' --- lisp/tempo.el 2014-01-01 07:43:34 +0000 +++ lisp/tempo.el 2014-03-01 02:31:05 +0000 @@ -2,9 +2,9 @@ ;; Copyright (C) 1994-1995, 2001-2014 Free Software Foundation, Inc. -;; Author: David K}gedal +;; Author: David Kågedal ;; Created: 16 Feb 1994 -;; K}gedal's last version number: 1.2.4 +;; Kågedal's last version number: 1.2.4 ;; Keywords: extensions, languages, tools ;; This file is part of GNU Emacs. @@ -723,13 +723,13 @@ (if tempo-leave-completion-buffer (with-output-to-temp-buffer "*Completions*" (display-completion-list - (all-completions string tag-list) - string)) + (completion-hilit-commonality (all-completions string tag-list) + (length string)))) (save-window-excursion (with-output-to-temp-buffer "*Completions*" (display-completion-list - (all-completions string tag-list) - string)) + (completion-hilit-commonality (all-completions string tag-list) + (length string)))) (sit-for 32767)))) ;;; @@ -763,3 +763,7 @@ (provide 'tempo) ;;; tempo.el ends here + +;; Local Variables: +;; coding: utf-8 +;; End: ------------------------------------------------------------ revno: 116617 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2014-03-01 02:32:42 +0100 message: lisp/frame.el: Remove a couple of obsolete FIXME comments. diff: === modified file 'lisp/frame.el' --- lisp/frame.el 2014-02-10 01:34:22 +0000 +++ lisp/frame.el 2014-03-01 01:32:42 +0000 @@ -610,7 +610,6 @@ (define-obsolete-function-alias 'new-frame 'make-frame "22.1") (defvar frame-inherited-parameters '() - ;; FIXME: Shouldn't we add `font' here as well? "Parameters `make-frame' copies from the `selected-frame' to the new frame.") (defvar x-display-name) @@ -1374,7 +1373,7 @@ (with-no-warnings (not (null dos-windows-version)))) ((memq frame-type '(x w32 ns)) - t) ;; FIXME? + t) (t nil)))) ------------------------------------------------------------ revno: 116616 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2014-03-01 02:25:29 +0100 message: lisp/icomplete.el: Use "..." when U+2026 cannot be displayed. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-28 20:00:12 +0000 +++ lisp/ChangeLog 2014-03-01 01:25:29 +0000 @@ -1,3 +1,8 @@ +2014-03-01 Juanma Barranquero + + * icomplete.el (icomplete-completions): + Revert back to using "..." when ?… cannot be displayed. + 2014-02-28 Juanma Barranquero * finder.el (finder-unload-function): New function. === modified file 'lisp/icomplete.el' --- lisp/icomplete.el 2014-02-12 08:27:27 +0000 +++ lisp/icomplete.el 2014-03-01 01:25:29 +0000 @@ -392,6 +392,7 @@ ;; a prefix of most, or something else. (compare (compare-strings name nil nil most nil nil completion-ignore-case)) + (ellipsis (if (char-displayable-p ?…) "…" "...")) (determ (unless (or (eq t compare) (eq t most-try) (= (setq compare (1- (abs compare))) (length most))) @@ -402,14 +403,14 @@ (substring most compare)) ;; Don't bother truncating if it doesn't gain ;; us at least 2 columns. - ((< compare 3) most) - (t (concat "…" (substring most compare)))) + ((< compare (+ 2 (length ellipsis))) most) + (t (concat ellipsis (substring most compare)))) close-bracket))) ;;"-prospects" - more than one candidate (prospects-len (+ (string-width (or determ (concat open-bracket close-bracket))) (string-width icomplete-separator) - 3 ;; take {…} into account + (+ 2 (length ellipsis)) ;; take {…} into account (string-width (buffer-string)))) (prospects-max ;; Max total length to use, including the minibuffer content. ------------------------------------------------------------ revno: 116615 author: Paul Eggert committer: Paul Eggert branch nick: trunk timestamp: Fri 2014-02-28 13:45:34 -0800 message: Fix a few crashes and leaks when cloning C strings. * alloc.c, lisp.h (dupstring): New function. * gtkutil.c (xg_get_font): * term.c (tty_default_color_capabilities): * xsettings.c (store_monospaced_changed) (store_font_name_changed, parse_settings) (read_and_apply_settings, init_gsettings, init_gconf): Use it. This avoids some unlikely crashes due to accessing freed storage, and avoids some minor memory leaks in the more-typical case. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-02-28 10:32:11 +0000 +++ src/ChangeLog 2014-02-28 21:45:34 +0000 @@ -1,3 +1,15 @@ +2014-02-28 Paul Eggert + + Fix a few crashes and leaks when cloning C strings. + * alloc.c, lisp.h (dupstring): New function. + * gtkutil.c (xg_get_font): + * term.c (tty_default_color_capabilities): + * xsettings.c (store_monospaced_changed) + (store_font_name_changed, parse_settings) + (read_and_apply_settings, init_gsettings, init_gconf): Use it. + This avoids some unlikely crashes due to accessing freed storage, + and avoids some minor memory leaks in the more-typical case. + 2014-02-28 Martin Rudalics * xdisp.c (note_mode_line_or_margin_highlight): Don't show drag === modified file 'src/alloc.c' --- src/alloc.c 2014-01-20 16:55:28 +0000 +++ src/alloc.c 2014-02-28 21:45:34 +0000 @@ -850,6 +850,20 @@ return memcpy (xmalloc (size), SSDATA (string), size); } +/* Assign to *PTR a copy of STRING, freeing any storage *PTR formerly + pointed to. If STRING is null, assign it without copying anything. + Allocate before freeing, to avoid a dangling pointer if allocation + fails. */ + +void +dupstring (char **ptr, char const *string) +{ + char *old = *ptr; + *ptr = string ? xstrdup (string) : 0; + xfree (old); +} + + /* Like putenv, but (1) use the equivalent of xmalloc and (2) the argument is a const pointer. */ === modified file 'src/gtkutil.c' --- src/gtkutil.c 2014-01-13 01:40:35 +0000 +++ src/gtkutil.c 2014-02-28 21:45:34 +0000 @@ -2106,8 +2106,7 @@ font = Ffont_spec (8, args); pango_font_description_free (desc); - xfree (x_last_font_name); - x_last_font_name = xstrdup (name); + dupstring (&x_last_font_name, name); } #else /* Use old font selector, which just returns the font name. */ === modified file 'src/lisp.h' --- src/lisp.h 2014-01-03 06:47:27 +0000 +++ src/lisp.h 2014-02-28 21:45:34 +0000 @@ -4398,6 +4398,7 @@ extern char *xstrdup (const char *); extern char *xlispstrdup (Lisp_Object); +extern void dupstring (char **, char const *); extern void xputenv (const char *); extern char *egetenv (const char *); === modified file 'src/term.c' --- src/term.c 2014-01-25 08:25:51 +0000 +++ src/term.c 2014-02-28 21:45:34 +0000 @@ -2052,17 +2052,9 @@ if (save) { - xfree (default_orig_pair); - default_orig_pair = tty->TS_orig_pair ? xstrdup (tty->TS_orig_pair) : NULL; - - xfree (default_set_foreground); - default_set_foreground = tty->TS_set_foreground ? xstrdup (tty->TS_set_foreground) - : NULL; - - xfree (default_set_background); - default_set_background = tty->TS_set_background ? xstrdup (tty->TS_set_background) - : NULL; - + dupstring (&default_orig_pair, tty->TS_orig_pair); + dupstring (&default_set_foreground, tty->TS_set_foreground); + dupstring (&default_set_background, tty->TS_set_background); default_max_colors = tty->TN_max_colors; default_max_pairs = tty->TN_max_pairs; default_no_color_video = tty->TN_no_color_video; === modified file 'src/xsettings.c' --- src/xsettings.c 2014-01-01 07:43:34 +0000 +++ src/xsettings.c 2014-02-28 21:45:34 +0000 @@ -91,8 +91,7 @@ if (current_mono_font != NULL && strcmp (newfont, current_mono_font) == 0) return; /* No change. */ - xfree (current_mono_font); - current_mono_font = xstrdup (newfont); + dupstring (¤t_mono_font, newfont); if (dpyinfo_valid (first_dpyinfo) && use_system_font) { @@ -111,8 +110,7 @@ if (current_font != NULL && strcmp (newfont, current_font) == 0) return; /* No change. */ - xfree (current_font); - current_font = xstrdup (newfont); + dupstring (¤t_font, newfont); if (dpyinfo_valid (first_dpyinfo)) { @@ -492,13 +490,13 @@ ++settings_seen; if (strcmp (name, XSETTINGS_TOOL_BAR_STYLE) == 0) { - settings->tb_style = xstrdup (sval); + dupstring (&settings->tb_style, sval); settings->seen |= SEEN_TB_STYLE; } #ifdef HAVE_XFT else if (strcmp (name, XSETTINGS_FONT_NAME) == 0) { - settings->font = xstrdup (sval); + dupstring (&settings->font, sval); settings->seen |= SEEN_FONT; } else if (strcmp (name, "Xft/Antialias") == 0) @@ -742,10 +740,7 @@ if (send_event_p) store_font_name_changed (settings.font); else - { - xfree (current_font); - current_font = xstrdup (settings.font); - } + dupstring (¤t_font, settings.font); xfree (settings.font); } #endif @@ -835,7 +830,7 @@ { g_variant_ref_sink (val); if (g_variant_is_of_type (val, G_VARIANT_TYPE_STRING)) - current_mono_font = xstrdup (g_variant_get_string (val, NULL)); + dupstring (¤t_mono_font, g_variant_get_string (val, NULL)); g_variant_unref (val); } @@ -844,7 +839,7 @@ { g_variant_ref_sink (val); if (g_variant_is_of_type (val, G_VARIANT_TYPE_STRING)) - current_font = xstrdup (g_variant_get_string (val, NULL)); + dupstring (¤t_font, g_variant_get_string (val, NULL)); g_variant_unref (val); } #endif /* HAVE_XFT */ @@ -886,13 +881,13 @@ s = gconf_client_get_string (gconf_client, GCONF_MONO_FONT, NULL); if (s) { - current_mono_font = xstrdup (s); + dupstring (¤t_mono_font, s); g_free (s); } s = gconf_client_get_string (gconf_client, GCONF_FONT_NAME, NULL); if (s) { - current_font = xstrdup (s); + dupstring (¤t_font, s); g_free (s); } gconf_client_add_dir (gconf_client, ------------------------------------------------------------ revno: 116614 committer: Glenn Morris branch nick: trunk timestamp: Fri 2014-02-28 15:00:12 -0500 message: Tweak earlier shr.el change diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-28 13:59:36 +0000 +++ lisp/ChangeLog 2014-02-28 20:00:12 +0000 @@ -21,9 +21,8 @@ 2014-02-28 Ivan Kanis - * net/shr.el (shr-put-image): Add custom variable - `shr-image-animate' to turn off image animation. It is so slow it - will render emacs unusable. + * net/shr.el (shr-image-animate): New option. + (shr-put-image): Respect shr-image-animate. 2014-02-28 Michael Albinus === modified file 'lisp/net/shr.el' --- lisp/net/shr.el 2014-02-28 08:49:59 +0000 +++ lisp/net/shr.el 2014-02-28 20:00:12 +0000 @@ -101,7 +101,7 @@ :type 'function) (defcustom shr-image-animate t - "If non nil image will be animated." + "Non nil means that images that can be animated will be." :version "24.4" :group 'shr :type 'boolean) ------------------------------------------------------------ revno: 116613 committer: Glenn Morris branch nick: trunk timestamp: Fri 2014-02-28 14:44:32 -0500 message: * etc/NEWS: Minor edits. diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-02-28 19:14:25 +0000 +++ etc/NEWS 2014-02-28 19:44:32 +0000 @@ -122,16 +122,17 @@ the *Messages* buffer should call the function `messages-buffer' to do so and set up the mode. ++++ ** Emacs can now support ACLs (access control lists). This requires a suitable support library to be found at build time. +On GNU/Linux, the POSIX ACL interface is used via libacl. +On MS-Windows, the NT Security APIs are used to emulate the POSIX interface. +++ *** Emacs preserves the ACL entries of files when backing up. +++ *** New functions `file-acl' and `set-file-acl' get and set the ACL -entries of a file. On GNU/Linux, the POSIX ACL interface is used via -libacl. On MS-Windows, the NT Security APIs are used to emulate the -POSIX ACL interfaces. +entries of a file. ** Multi-monitor support has been added. @@ -435,6 +436,7 @@ *** New Lisp debugger command `v' (`debugger-toggle-locals') toggles the display of local variables of the current stack frame. ++++ *** The Lisp debugger's `e' command (`debugger-eval-expression') now includes the lexical environment when evaluating the code in the context at point (and so allows you to access lexical variables). ------------------------------------------------------------ revno: 116612 committer: Glenn Morris branch nick: trunk timestamp: Fri 2014-02-28 14:14:25 -0500 message: * etc/NEWS: Minor edits diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-02-28 05:35:53 +0000 +++ etc/NEWS 2014-02-28 19:14:25 +0000 @@ -24,17 +24,24 @@ * Installation Changes in Emacs 24.4 +--- ** Emacs can now be compiled with ACL support. This happens by default if a suitable support library is found at build time, like libacl on GNU/Linux. To prevent this, use the -configure option `--disable-acl'. -FIXME? Should be --without-acl? +configure option `--disable-acl'. See below for related features. +--- ** Emacs can now be compiled with file notification support. This happens by default if a suitable system library is found at build time. To prevent this, use the configure option `--without-file-notification'. See below for file-notify features. -FIXME? This feature is not available for the Nextstep port. (?) +This feature is not available for the Nextstep port. + +--- +** Emacs can now be compiled with zlib support. +This happens by default if zlib is present, which it normally is. +To prevent this, use the configure option `--without-zlib'. +This provides the function `zlib-decompress-region'; see below for details. --- ** The configure option `--without-compress-info' has been generalized, @@ -49,14 +56,9 @@ ** Directories passed to configure option `--enable-locallisppath' are no longer created during installation. -** Emacs can be compiled with zlib support. -If this library is present (which it normally is on most systems), the -function `zlib-decompress-region' becomes available, which can -decompress gzip- and zlib-format compressed data. - --- ** Emacs for NS (Mac OS X, GNUstep) can be built with ImageMagick support. -This requires pkg-config to be available at configure time. +This requires pkg-config to be available at build time. * Startup Changes in Emacs 24.4 @@ -89,6 +91,9 @@ * Changes in Emacs 24.4 +** New function `zlib-decompress-region', which decompresses gzip- and +zlib-format compressed data using built-in zlib support, if available. + +++ ** New option `gnutls-verify-error', if non-nil, means that Emacs should reject SSL/TLS certificates that GnuTLS determines as invalid. @@ -117,7 +122,9 @@ the *Messages* buffer should call the function `messages-buffer' to do so and set up the mode. -** Emacs now supports ACLs (access control lists). +** Emacs can now support ACLs (access control lists). +This requires a suitable support library to be found at build time. + +++ *** Emacs preserves the ACL entries of files when backing up. +++ ------------------------------------------------------------ revno: 116611 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2014-02-28 14:59:36 +0100 message: lisp/finder.el (finder-unload-function): New function. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-28 13:19:06 +0000 +++ lisp/ChangeLog 2014-02-28 13:59:36 +0000 @@ -1,5 +1,9 @@ 2014-02-28 Juanma Barranquero + * finder.el (finder-unload-function): New function. + +2014-02-28 Juanma Barranquero + * dframe.el (dframe-detach): * find-dired.el (find-dired, find-name-dired): * finder.el (finder-mode-map, finder-mode-syntax-table) === modified file 'lisp/finder.el' --- lisp/finder.el 2014-02-28 13:19:06 +0000 +++ lisp/finder.el 2014-02-28 13:59:36 +0000 @@ -431,6 +431,12 @@ (let ((buf "*Finder*")) (and (get-buffer buf) (kill-buffer buf)))) +(defun finder-unload-function () + "Unload the Finder library." + (with-demoted-errors (unload-feature 'finder-inf t)) + ;; continue standard unloading + nil) + (provide 'finder) ------------------------------------------------------------ revno: 116610 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2014-02-28 14:19:06 +0100 message: Fix docstring typos. lisp/dframe.el (dframe-detach): lisp/find-dired.el (find-dired, find-name-dired): lisp/finder.el (finder-mode-map, finder-mode-syntax-table) (finder-headmark, finder-select, finder-mouse-select): Fix typos. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-28 09:10:55 +0000 +++ lisp/ChangeLog 2014-02-28 13:19:06 +0000 @@ -1,8 +1,16 @@ +2014-02-28 Juanma Barranquero + + * dframe.el (dframe-detach): + * find-dired.el (find-dired, find-name-dired): + * finder.el (finder-mode-map, finder-mode-syntax-table) + (finder-headmark, finder-select, finder-mouse-select): + Fix docstring typos. + 2014-02-28 Martin Rudalics Revert recent with-temp-buffer-window change (Bug#16816, Bug#16882). * window.el (with-temp-buffer-window): Revert change from - 2014-02-21. Suggested by Thierry Volpiatto + 2014-02-21. Suggested by Thierry Volpiatto. . Fix doc-string based on a suggestion by Nicolas Richard . * help.el (with-help-window): Fix doc-string. === modified file 'lisp/dframe.el' --- lisp/dframe.el 2014-01-01 07:43:34 +0000 +++ lisp/dframe.el 2014-02-28 13:19:06 +0000 @@ -530,7 +530,7 @@ (defun dframe-detach (frame-var cache-var buffer-var) "Detach the frame in symbol FRAME-VAR. -CACHE-VAR and BUFFER-VAR are symbols as in `dframe-frame-mode'" +CACHE-VAR and BUFFER-VAR are symbols as in `dframe-frame-mode'." (with-current-buffer (symbol-value buffer-var) (rename-buffer (buffer-name) t) (let ((oldframe (symbol-value frame-var))) === modified file 'lisp/find-dired.el' --- lisp/find-dired.el 2014-02-10 01:34:22 +0000 +++ lisp/find-dired.el 2014-02-28 13:19:06 +0000 @@ -30,7 +30,7 @@ (require 'dired) (defgroup find-dired nil - "Run a `find' command and dired the output." + "Run a `find' command and Dired the output." :group 'dired :prefix "find-") @@ -234,7 +234,7 @@ ;;;###autoload (defun find-name-dired (dir pattern) "Search DIR recursively for files matching the globbing pattern PATTERN, -and run dired on those files. +and run Dired on those files. PATTERN is a shell wildcard (not an Emacs regexp) and need not be quoted. The default command run (after changing into DIR) is === modified file 'lisp/finder.el' --- lisp/finder.el 2014-02-13 02:31:48 +0000 +++ lisp/finder.el 2014-02-28 13:19:06 +0000 @@ -105,20 +105,20 @@ '(menu-item "Select" finder-select :help "Select item on current line in a finder buffer")) map) - "Keymap used in `finder-mode'.") + "Keymap used in Finder mode.") (defvar finder-mode-syntax-table (let ((st (make-syntax-table emacs-lisp-mode-syntax-table))) (modify-syntax-entry ?\; ". " st) st) - "Syntax table used while in `finder-mode'.") + "Syntax table used while in Finder mode.") (defvar finder-font-lock-keywords '(("`\\([^'`]+\\)'" 1 font-lock-constant-face prepend)) "Font-lock keywords for Finder mode.") (defvar finder-headmark nil - "Internal finder-mode variable, local in finder buffer.") + "Internal Finder mode variable, local in Finder buffer.") ;;; Code for regenerating the keyword list. @@ -384,7 +384,7 @@ key))) (defun finder-select () - "Select item on current line in a finder buffer." + "Select item on current line in a Finder buffer." (interactive) (let ((key (finder-current-item))) (if (string-match "\\.el$" key) @@ -392,7 +392,7 @@ (finder-list-matches key)))) (defun finder-mouse-select (event) - "Select item in a finder buffer with the mouse." + "Select item in a Finder buffer with the mouse." (interactive "e") (with-current-buffer (window-buffer (posn-window (event-start event))) (goto-char (posn-point (event-start event))) ------------------------------------------------------------ revno: 116609 committer: martin rudalics branch nick: trunk timestamp: Fri 2014-02-28 11:32:11 +0100 message: Don't show drag cursor when modeline can't be dragged (Bug#16647). * xdisp.c (note_mode_line_or_margin_highlight): Don't show drag cursor when modeline can't be dragged (Bug#16647). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-02-28 02:00:17 +0000 +++ src/ChangeLog 2014-02-28 10:32:11 +0000 @@ -1,3 +1,8 @@ +2014-02-28 Martin Rudalics + + * xdisp.c (note_mode_line_or_margin_highlight): Don't show drag + cursor when modeline can't be dragged (Bug#16647). + 2014-02-28 Glenn Morris * doc.c (Fsnarf_documentation): Snarf not-yet-bound variables === modified file 'src/xdisp.c' --- src/xdisp.c 2014-02-27 19:22:10 +0000 +++ src/xdisp.c 2014-02-28 10:32:11 +0000 @@ -28449,6 +28449,10 @@ /* Change the mouse pointer according to what is under it. */ if (FRAME_WINDOW_P (f)) { + bool draggable = (! WINDOW_BOTTOMMOST_P (w) + || minibuf_level + || NILP (Vresize_mini_windows)); + dpyinfo = FRAME_DISPLAY_INFO (f); if (STRINGP (string)) { @@ -28465,11 +28469,11 @@ map = Fget_text_property (pos, Qlocal_map, string); if (!KEYMAPP (map)) map = Fget_text_property (pos, Qkeymap, string); - if (!KEYMAPP (map)) + if (!KEYMAPP (map) && draggable) cursor = dpyinfo->vertical_scroll_bar_cursor; } } - else + else if (draggable) /* Default mode-line pointer. */ cursor = FRAME_DISPLAY_INFO (f)->vertical_scroll_bar_cursor; } ------------------------------------------------------------ revno: 116608 committer: Xue Fuqiao branch nick: trunk timestamp: Fri 2014-02-28 18:31:26 +0800 message: Continuation of previous change. * doc/lispref/functions.texi (Advising Named Functions): Tweak markup. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2014-02-28 10:06:04 +0000 +++ doc/lispref/ChangeLog 2014-02-28 10:31:26 +0000 @@ -1,6 +1,7 @@ 2014-02-28 Xue Fuqiao - * functions.texi (Advising Functions): Tweak markup. + * functions.texi (Advising Functions): + (Advising Named Functions): Tweak markup. * display.texi (Defining Faces): Doc fix for `face-spec-set'. === modified file 'doc/lispref/functions.texi' --- doc/lispref/functions.texi 2014-02-28 10:06:04 +0000 +++ doc/lispref/functions.texi 2014-02-28 10:31:26 +0000 @@ -1344,9 +1344,9 @@ @subsection Advising Named Functions A common use of advice is for named functions and macros. -Since @var{add-function} does not know how to deal with macros and autoloaded -functions, Emacs provides a separate set of functions to manipulate pieces of -advice applied to named functions. +Since @code{add-function} does not know how to deal with macros and +autoloaded functions, Emacs provides a separate set of functions to +manipulate pieces of advice applied to named functions. Advice can be useful for altering the behavior of an existing function without having to redefine the whole function. However, it ------------------------------------------------------------ revno: 116607 committer: Xue Fuqiao branch nick: trunk timestamp: Fri 2014-02-28 18:06:04 +0800 message: * doc/lispref/functions.texi (Advising Functions): Tweak markup. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2014-02-28 04:15:21 +0000 +++ doc/lispref/ChangeLog 2014-02-28 10:06:04 +0000 @@ -1,5 +1,7 @@ 2014-02-28 Xue Fuqiao + * functions.texi (Advising Functions): Tweak markup. + * display.texi (Defining Faces): Doc fix for `face-spec-set'. * elisp.texi (Top): === modified file 'doc/lispref/functions.texi' --- doc/lispref/functions.texi 2014-02-22 03:46:18 +0000 +++ doc/lispref/functions.texi 2014-02-28 10:06:04 +0000 @@ -1170,9 +1170,9 @@ @emph{advice}. The function cell of a symbol can be manipulated similarly, but since it can -contain other things than a plain function, you have to use @var{advice-add} -and @var{advice-remove} instead, which -@c use @var{add-function} and @var{remove-function} internally, but +contain other things than a plain function, you have to use @code{advice-add} +and @code{advice-remove} instead, which +@c use @code{add-function} and @code{remove-function} internally, but know how to handle cases such as when the function cell holds a macro rather than function, or when the function is autoloaded so the advice's activation needs to be postponed. ------------------------------------------------------------ revno: 116606 committer: martin rudalics branch nick: trunk timestamp: Fri 2014-02-28 10:10:55 +0100 message: Revert recent with-temp-buffer-window change (Bug#16816, Bug#16882). * window.el (with-temp-buffer-window): Revert change from 2014-02-21. Suggested by Thierry Volpiatto . Fix doc-string based on a suggestion by Nicolas Richard . * help.el (with-help-window): Fix doc-string. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-28 08:49:59 +0000 +++ lisp/ChangeLog 2014-02-28 09:10:55 +0000 @@ -1,7 +1,16 @@ +2014-02-28 Martin Rudalics + + Revert recent with-temp-buffer-window change (Bug#16816, Bug#16882). + * window.el (with-temp-buffer-window): Revert change from + 2014-02-21. Suggested by Thierry Volpiatto + . Fix doc-string based on a + suggestion by Nicolas Richard . + * help.el (with-help-window): Fix doc-string. + 2014-02-28 Ivan Kanis - * net/shr.el (shr-put-image): add custom variable - `shr-image-animate' to turn off image animation. It is so slow it + * net/shr.el (shr-put-image): Add custom variable + `shr-image-animate' to turn off image animation. It is so slow it will render emacs unusable. 2014-02-28 Michael Albinus @@ -3304,7 +3313,8 @@ * emacs-lisp/debug.el (debug): Use window-total-height instead of window-total-size. * frame.el (tool-bar-lines-needed): Defalias to tool-bar-height. - * help.el (describe-bindings-internal): Call help-buffer + * help.el (describe-bindings-internal): Use help-buffer as + argument for with-help-window. (temp-buffer-max-width): New option. (resize-temp-buffer-window, help-window-setup) (with-help-window): Rewrite. === modified file 'lisp/help.el' --- lisp/help.el 2014-02-10 01:34:22 +0000 +++ lisp/help.el 2014-02-28 09:10:55 +0000 @@ -1194,9 +1194,14 @@ ;; Note: It's usually always wrong to use `help-print-return-message' in ;; the body of `with-help-window'. (defmacro with-help-window (buffer-name &rest body) - "Display buffer with name BUFFER-NAME in a help window evaluating BODY. -Select help window if the current value of the user option -`help-window-select' says so. Return last value in BODY." + "Display buffer with name BUFFER-NAME in a help window. +Evaluate the forms in BODY with the buffer specified by +BUFFER-NAME current, put that buffer in `help-mode', display the +buffer in a window (see `with-temp-buffer-window' for details) +and issue a message how to deal with that \"help\" window when +it's no more needed. Select the help window if the current value +of the user option `help-window-select' says so. Return last +value in BODY." (declare (indent 1) (debug t)) `(progn ;; Make `help-window-point-marker' point nowhere. The only place === modified file 'lisp/window.el' --- lisp/window.el 2014-02-21 11:04:27 +0000 +++ lisp/window.el 2014-02-28 09:10:55 +0000 @@ -142,28 +142,27 @@ ;; Return the window. window)))) -;; Doc is very similar to with-output-to-temp-buffer. (defmacro with-temp-buffer-window (buffer-or-name action quit-function &rest body) - "Bind `standard-output' to BUFFER-OR-NAME, eval BODY, show the buffer. -BUFFER-OR-NAME must specify either a live buffer, or the name of a -buffer (if it does not exist, this macro creates it). - -This construct makes buffer BUFFER-OR-NAME empty before running BODY. -It does not make the buffer current for BODY. -Instead it binds `standard-output' to that buffer, so that output -generated with `prin1' and similar functions in BODY goes into -the buffer. - -At the end of BODY, this marks the specified buffer unmodified and -read-only, and displays it in a window (but does not select it, or make -the buffer current). The display happens by calling `display-buffer' -with the ACTION argument. If `temp-buffer-resize-mode' is enabled, -the relevant window shrinks automatically. - -This returns the value returned by BODY, unless QUIT-FUNCTION specifies -a function. In that case, it runs the function with two arguments - + "Evaluate BODY in a buffer BUFFER-OR-NAME and show that buffer. +BUFFER-OR-NAME must specify either a live buffer, or the name of +a buffer (if it does not exist, this macro creates it). + +Make the buffer specified by BUFFER-OR-NAME empty before running +BODY and make that buffer current for running the forms in BODY. +In addition, bind `standard-output' to that buffer, so that +output generated with `prin1' and similar functions in BODY goes +into that buffer. + +At the end of BODY, mark the specified buffer unmodified and +read-only, and display it in a window (but do not select it). +The display happens by calling `display-buffer' passing it the +ACTION argument. If `temp-buffer-resize-mode' is enabled, the +corresponding window may shrink automatically. + +Return the value returned by BODY, unless QUIT-FUNCTION specifies +a function. In that case, run that function with two arguments - the window showing the specified buffer and the value returned by -BODY - and returns the value returned by that function. +BODY - and return the value returned by that function. If the buffer is displayed on a new frame, the window manager may decide to select that frame. In that case, it's usually a good @@ -172,16 +171,16 @@ asking a `yes-or-no-p' question. This runs the hook `temp-buffer-window-setup-hook' before BODY, -with the specified buffer temporarily current. It runs the -hook `temp-buffer-window-show-hook' after displaying the buffer, -with that buffer temporarily current, and the window that was used to +with the specified buffer temporarily current. It runs the hook +`temp-buffer-window-show-hook' after displaying the buffer, with +that buffer temporarily current, and the window that was used to display it temporarily selected. -This construct is similar to `with-output-to-temp-buffer', but -runs different hooks. In particular, it does not run -`temp-buffer-setup-hook', which usually puts the buffer in Help mode. -Also, it does not call `temp-buffer-show-function' (the ACTION -argument replaces this)." +This construct is similar to `with-output-to-temp-buffer' but, +unlike that, makes BUFFER-OR-NAME current when running BODY. +Also, it neither runs `temp-buffer-setup-hook' which usually puts +the buffer in Help mode, nor `temp-buffer-show-function' (the +ACTION argument replaces this)." (declare (debug t)) (let ((buffer (make-symbol "buffer")) (window (make-symbol "window")) @@ -189,8 +188,8 @@ `(let* ((,buffer (temp-buffer-window-setup ,buffer-or-name)) (standard-output ,buffer) ,window ,value) - (setq ,value (progn ,@body)) (with-current-buffer ,buffer + (setq ,value (progn ,@body)) (setq ,window (temp-buffer-window-show ,buffer ,action))) (if (functionp ,quit-function)