commit cc8f96e6e19ad3f56631f432e088590a8cf8535d (HEAD, refs/remotes/origin/master) Author: Stefan Monnier Date: Tue Jun 30 23:20:29 2015 -0400 * lisp/term/xterm.el (xterm--query): Avoid generating garbage (xterm-query-timeout): New var. (xterm--query): Use it. Fallback on async method if we timeout before getting the first byte of the reply (bug#12354). diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index f7f8007..350ab3c 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -688,6 +688,10 @@ string bytes that can be copied is 3/4 of this value." ;;(xterm--init-activate-get-selection) (xterm--init-activate-set-selection)))))) +(defvar xterm-query-timeout 2 + "Seconds to wait for an answer from the terminal. +Can be nil to mean \"no timeout\".") + (defun xterm--query (query handlers &optional no-async) "Send QUERY string to the terminal and watch for a response. HANDLERS is an alist with elements of the form (STRING . FUNCTION). @@ -696,35 +700,47 @@ We run the first FUNCTION whose STRING matches the input events." ;; rather annoying (bug#6758). Maybe we could always use the asynchronous ;; approach, but it's less tested. ;; FIXME: Merge the two branches. - (if (and (input-pending-p) (not no-async)) - (progn - (dolist (handler handlers) - (define-key input-decode-map (car handler) - (lambda (&optional _prompt) - ;; Unregister the handler, since we don't expect further answers. - (dolist (handler handlers) - (define-key input-decode-map (car handler) nil)) - (funcall (cdr handler)) - []))) - (send-string-to-terminal query)) - ;; Pending input can be mistakenly returned by the calls to - ;; read-event below. Discard it. - (send-string-to-terminal query) - (while handlers - (let ((handler (pop handlers)) - (i 0)) - (while (and (< i (length (car handler))) - (let ((evt (read-event nil nil 2))) - (or (eq evt (aref (car handler) i)) - (progn (if evt (push evt unread-command-events)) - nil)))) - (setq i (1+ i))) - (if (= i (length (car handler))) - (progn (setq handlers nil) - (funcall (cdr handler))) - (while (> i 0) - (push (aref (car handler) (setq i (1- i))) - unread-command-events))))))) + (let ((register + (lambda (handlers) + (dolist (handler handlers) + (define-key input-decode-map (car handler) + (lambda (&optional _prompt) + ;; Unregister the handler, since we don't expect + ;; further answers. + (dolist (handler handlers) + (define-key input-decode-map (car handler) nil)) + (funcall (cdr handler)) + [])))))) + (if (and (or (null xterm-query-timeout) (input-pending-p)) + (not no-async)) + (progn + (funcall register handlers) + (send-string-to-terminal query)) + ;; Pending input can be mistakenly returned by the calls to + ;; read-event below: discard it. + (discard-input) + (send-string-to-terminal query) + (while handlers + (let ((handler (pop handlers)) + (i 0)) + (while (and (< i (length (car handler))) + (let ((evt (read-event nil nil xterm-query-timeout))) + (if (and (null evt) (= i 0) (not no-async)) + ;; Timeout on the first event: fallback on async. + (progn + (funcall register (cons handler handlers)) + (setq handlers nil) + nil) + (or (eq evt (aref (car handler) i)) + (progn (if evt (push evt unread-command-events)) + nil)))) + (setq i (1+ i))) + (if (= i (length (car handler))) + (progn (setq handlers nil) + (funcall (cdr handler))) + (while (> i 0) + (push (aref (car handler) (setq i (1- i))) + unread-command-events))))))))) (defun xterm--push-map (map basemap) ;; Use inheritance to let the main keymaps override those defaults. commit cc7acdbd0e88d94d3e63d230c17894bb7bd74091 Author: Paul Eggert Date: Tue Jun 30 19:45:56 2015 -0700 Spelling fixes diff --git a/etc/NEWS b/etc/NEWS index 389de16..758d358 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -87,7 +87,7 @@ command line when `initial-buffer-choice' is non-nil. ** `isearch' and `query-replace' now perform character folding in matches. This is analogous to case-folding, but applies between Unicode characters and their ASCII counterparts. This means many characters -will match entire groups of charactes. +will match entire groups of characters. For instance, the " will match all variants of unicode double quotes (like “ and ”), and the letter a will match all of its accented diff --git a/lisp/character-fold.el b/lisp/character-fold.el index 1675e6e..fca13bf 100644 --- a/lisp/character-fold.el +++ b/lisp/character-fold.el @@ -1,4 +1,4 @@ -;;; character-fold.el --- matching unicode characters to their ascii similars -*- lexical-binding: t; -*- +;;; character-fold.el --- match unicode to similar ASCII -*- lexical-binding: t; -*- ;; Copyright (C) 2015 Free Software Foundation, Inc. @@ -26,7 +26,7 @@ ;;;###autoload (defvar character-fold-search t "Non-nil if searches should fold similar characters. -This means some characters will match entire groups of charactes. +This means some characters will match entire groups of characters. For instance, \" will match all variants of double quotes, and the letter a will match all of its accented versions (and then some).") @@ -49,7 +49,7 @@ some).") ;; Discard a possible formatting tag. (when (symbolp (car dec)) (setq dec (cdr dec))) - ;; Skip trivial cases lika ?a decomposing to (?a). + ;; Skip trivial cases like ?a decomposing to (?a). (unless (or (and (eq i (car dec)) (not (cdr dec)))) (let ((d dec) k found multiletter) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 7894aaf..3547333 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -2614,7 +2614,7 @@ to their archives." (defcustom package-hidden-regexps nil "List of regexps matching the name of packages to hide. If the name of a package matches any of these regexps it is -omited from the package menu. To toggle this, type \\[package-menu-toggle-hiding]. +omitted from the package menu. To toggle this, type \\[package-menu-toggle-hiding]. Values can be interactively added to this list by typing \\[package-menu-hide-package] on a package" diff --git a/src/ChangeLog.12 b/src/ChangeLog.12 index 78b903e..f29b175 100644 --- a/src/ChangeLog.12 +++ b/src/ChangeLog.12 @@ -5623,7 +5623,7 @@ 2012-09-17 Kenichi Handa * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may - not covert the last few charactes. + not convert the last few characters. 2012-09-16 Kenichi Handa commit 5f004117f5bcab9171eaddb2867393ed69ae49bf Author: Xue Fuqiao Date: Wed Jul 1 06:34:05 2015 +0800 * doc/emacs/frames.texi (Frame Commands): Typo fix. (Bug#20946) diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index de72d87..ad860fd 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -443,7 +443,7 @@ error if there is only one frame. @item C-z @kindex C-z @r{(X windows)} @findex suspend-frame -Minimize (or ``iconify) the selected Emacs frame +Minimize (or ``iconify'') the selected Emacs frame (@code{suspend-frame}). @xref{Exiting}. @item C-x 5 o commit 3213d7707026573ca425ba1c865b7fa1a8b46639 Author: Paul Eggert Date: Tue Jun 30 15:06:31 2015 -0700 In strings, prefer plain ` and ' to \` and \' * lisp/allout.el (allout-insert-listified): * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): * lisp/ls-lisp.el (ls-lisp-UCA-like-collation) (ls-lisp-string-lessp): * lisp/menu-bar.el (menu-bar-open): * lisp/obsolete/otodo-mode.el (todo-top-priorities): * lisp/progmodes/compile.el (compile): * lisp/progmodes/etags.el (tags-loop-scan): * lisp/progmodes/make-mode.el (makefile-browser-insert-continuation): * lisp/subr.el (posn-actual-col-row): * lisp/term/pc-win.el (x-list-fonts): * lisp/textmodes/texinfmt.el (texinfmt-version): * lisp/textmodes/texnfo-upd.el (texinfo-master-menu): * lisp/time.el (display-time-world-list): * lisp/tmm.el (tmm-menubar): * src/buffer.c (syms_of_buffer): * src/fileio.c (syms_of_fileio): Omit unnecessary and confusing backslash before quote. * lisp/erc/erc.el (erc-cmd-LASTLOG): * lisp/progmodes/flymake.el (flymake-fix-file-name): * lisp/progmodes/vhdl-mode.el (vhdl-in-extended-identifier-p): Fix string that was intended to escape a backslash and not a quote. diff --git a/lisp/allout.el b/lisp/allout.el index dcdd35e..db87cb1 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -5589,9 +5589,9 @@ Defaults: LISTIFIED is a list representing each topic header and body: - \`(depth prefix text)' + `(depth prefix text)' -or \`(depth prefix text bullet-plus)' +or `(depth prefix text bullet-plus)' If `bullet-plus' is specified, it is inserted just after the entire prefix." (setq listified (cdr listified)) diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index ed77ad7..eab22b6 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -411,7 +411,7 @@ otherwise, disable it. If called from Lisp, enable the mode if ARG is omitted or nil. %s is enabled in all buffers where -\`%s' would do it. +`%s' would do it. See `%s' for more information on %s." pretty-name pretty-global-name pretty-name turn-on mode pretty-name) diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 88732cb..460accd 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -1,4 +1,3 @@ - ;; erc.el --- An Emacs Internet Relay Chat client -*- lexical-binding:t -*- ;; Copyright (C) 1997-2015 Free Software Foundation, Inc. @@ -3260,7 +3259,7 @@ The lines are shown in a buffer named `*Occur*'. It serves as a menu to find any of the occurrences in this buffer. \\[describe-mode] in that buffer will explain how. -If LINE contains upper case characters (excluding those preceded by `\'), +If LINE contains upper case characters (excluding those preceded by ‘\\’), the matching is case-sensitive." (occur line) t) diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index d4b8905..70307f6 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el @@ -144,7 +144,7 @@ value to get similar behavior. When this option is non-nil, and `ls-lisp-use-string-collate' is also non-nil, the collation order produced on MS-Windows will ignore punctuation and symbol characters, which will, for example, place -\`.foo' near `foo'. See the documentation of `string-collate-lessp' +`.foo' near `foo'. See the documentation of `string-collate-lessp' and `w32-collate-ignore-punctuation' for more details. This option is ignored on platforms other than MS-Windows; to @@ -539,7 +539,7 @@ Responds to the window width as ls should but may not!" "Return t if string S1 should sort before string S2. Case is significant if `ls-lisp-ignore-case' is nil. Uses `string-collate-lessp' if `ls-lisp-use-string-collate' is non-nil, -\`compare-strings' otherwise. +`compare-strings' otherwise. On GNU/Linux systems, if the locale specifies UTF-8 as the codeset, the sorting order will place together file names that differ only by punctuation characters, like `.emacs' and `emacs'. To have a diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 65ed8d5..22a0b8f 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -2283,7 +2283,7 @@ This function decides which method to use to access the menu depending on FRAME's terminal device. On X displays, it calls `x-menu-bar-open'; on Windows, `w32-menu-bar-open'; otherwise it calls either `popup-menu' or `tmm-menubar' depending on whether -\`tty-menu-open-use-tmm' is nil or not. +`tty-menu-open-use-tmm' is nil or not. If FRAME is nil or not given, use the selected frame." (interactive) diff --git a/lisp/obsolete/otodo-mode.el b/lisp/obsolete/otodo-mode.el index 69364f6..04b8810 100644 --- a/lisp/obsolete/otodo-mode.el +++ b/lisp/obsolete/otodo-mode.el @@ -734,7 +734,7 @@ If point is on an empty line, insert the entry there." Number of entries for each category is given by NOF-PRIORITIES which defaults to `todo-show-priorities'. -If CATEGORY-PR-PAGE is non-nil, a page separator \'^L\' is inserted +If CATEGORY-PR-PAGE is non-nil, a page separator '^L' is inserted between each category. INTERACTIVE should be non-nil if this function is called interactively." diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index a58e393..37d3fe8 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -255,7 +255,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) ;; can be composed of any non-newline char, but it also rules out some ;; valid but unlikely cases, such as a trailing space or a space ;; followed by a -, or a colon followed by a space. - ;; + ;; ;; The "in \\|from " exception was added to handle messages from Ruby. ,(rx bol @@ -1461,9 +1461,9 @@ Additionally, with universal prefix arg, compilation buffer will be in comint mode, i.e. interactive. To run more than one compilation at once, start one then rename -the \`*compilation*' buffer to some other name with +the `*compilation*' buffer to some other name with \\[rename-buffer]. Then _switch buffers_ and start the new compilation. -It will create a new \`*compilation*' buffer. +It will create a new `*compilation*' buffer. On most systems, termination of the main compilation process kills its subprocesses. diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index bf57770..fc986f3 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -1772,7 +1772,7 @@ if the file was newly read in, the value is the filename." "No \\[tags-search] or \\[tags-query-replace] in progress")) "Form for `tags-loop-continue' to eval to scan one file. If it returns non-nil, this file needs processing by evalling -\`tags-loop-operate'. Otherwise, move on to the next file.") +`tags-loop-operate'. Otherwise, move on to the next file.") (defun tags-loop-eval (form) "Evaluate FORM and return its result. diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 696ab52..bb5ac63 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -287,7 +287,7 @@ Return its file name if found, or nil if not found." nil))))) (defun flymake-fix-file-name (name) - "Replace all occurrences of '\' with '/'." + "Replace all occurrences of ‘\\’ with ‘/’." (when name (setq name (expand-file-name name)) (setq name (abbreviate-file-name name)) diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index fc0be60..9abbf16 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -1455,7 +1455,7 @@ Fill comments, backslashed lines, and variable definitions specially." (defun makefile-browser-insert-continuation () "Insert a makefile continuation. -In the makefile buffer, go to (end-of-line), insert a \'\\\' +In the makefile buffer, go to (end-of-line), insert a ‘\\’ character, insert a new blank line, go to that line and indent by one TAB. This is most useful in the process of creating continued lines when copying large dependencies from the browser to the client buffer. diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index f85f4c4..5ed0ff0 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -5713,7 +5713,7 @@ the offset is simply returned." (t nil))))) (defun vhdl-in-extended-identifier-p () - "Determine if point is inside extended identifier (delimited by '\')." + "Determine if point is inside extended identifier (delimited by ‘\\’)." (save-match-data (and (save-excursion (re-search-backward "\\\\" (vhdl-point 'bol) t)) (save-excursion (re-search-forward "\\\\" (vhdl-point 'eol) t))))) diff --git a/lisp/subr.el b/lisp/subr.el index 535fa2d..5bd4bb4 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1213,14 +1213,14 @@ and `event-end' functions." "Return the window row number in POSITION and character number in that row. Return nil if POSITION does not contain the actual position; in that case -\`posn-col-row' can be used to get approximate values. +`posn-col-row' can be used to get approximate values. POSITION should be a list of the form returned by the `event-start' and `event-end' functions. This function does not account for the width on display, like the number of visual columns taken by a TAB or image. If you need the coordinates of POSITION in character units, you should use -\`posn-col-row', not this function." +`posn-col-row', not this function." (nth 6 position)) (defsubst posn-timestamp (position) diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el index b6c7222..e8aaa1a 100644 --- a/lisp/term/pc-win.el +++ b/lisp/term/pc-win.el @@ -177,7 +177,7 @@ contain wildcard characters: PATTERN is case-insensitive. The return value is a list of strings, suitable as arguments to -\`set-face-font'. +`set-face-font'. Fonts Emacs can't use may or may not be excluded even if they match PATTERN and FACE. diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el index cab4f77..e1259ff 100644 --- a/lisp/textmodes/texinfmt.el +++ b/lisp/textmodes/texinfmt.el @@ -34,7 +34,7 @@ If optional argument HERE is non-nil, insert info at point." (interactive "P") (let ((version-string - (format "Version of \`texinfmt.el\': %s" texinfmt-version))) + (format "Version of `texinfmt.el': %s" texinfmt-version))) (if here (insert version-string) (if (called-interactively-p 'interactive) diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el index df05b67..eefea1f 100644 --- a/lisp/textmodes/texnfo-upd.el +++ b/lisp/textmodes/texnfo-upd.el @@ -893,7 +893,7 @@ first update all existing menus in the buffer (incorporating descriptions from pre-existing menus) before it constructs the master menu. If the argument is numeric (e.g., \"C-u 2\"), update all existing nodes as well, by calling -\`texinfo-update-node' on the entire file. Warning: do NOT +`texinfo-update-node' on the entire file. Warning: do NOT invoke with a numeric argument if your Texinfo file uses @node lines without the `Next', `Previous', `Up' pointers, as the result could be an invalid Texinfo file! diff --git a/lisp/time.el b/lisp/time.el index 7c1e95e..ae0e598 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -176,7 +176,7 @@ LABEL is a string to display as the label of that TIMEZONE's time." Each element has the form (TIMEZONE LABEL). TIMEZONE should be in a format supported by your system. See the documentation of `zoneinfo-style-world-list' and -\`legacy-style-world-list' for two widely used formats. LABEL is +`legacy-style-world-list' for two widely used formats. LABEL is a string to display as the label of that TIMEZONE's time." :group 'display-time :type '(repeat (list string string)) diff --git a/lisp/tmm.el b/lisp/tmm.el index 2ddeeee..5d56cff 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -54,7 +54,7 @@ we make that menu bar item (the one at that position) the default choice. Note that \\[menu-bar-open] by default drops down TTY menus; if you want it to invoke `tmm-menubar' instead, customize the variable -\`tty-menu-open-use-tmm' to a non-nil value." +`tty-menu-open-use-tmm' to a non-nil value." (interactive) (run-hooks 'menu-bar-update-hook) ;; Obey menu-bar-final-items; put those items last. diff --git a/src/buffer.c b/src/buffer.c index e151e94..bd7c82c 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5730,7 +5730,7 @@ The values of `right-to-left' and `left-to-right' override that. Any other value is treated as nil. This variable has no effect unless the buffer's value of -\`bidi-display-reordering' is non-nil. */); +`bidi-display-reordering' is non-nil. */); DEFVAR_PER_BUFFER ("truncate-lines", &BVAR (current_buffer, truncate_lines), Qnil, doc: /* Non-nil means do not display continuation lines. diff --git a/src/fileio.c b/src/fileio.c index aad0270..905778e 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -5866,7 +5866,7 @@ syms_of_fileio (void) If it is nil, `default-file-name-coding-system' (which see) is used. On MS-Windows, the value of this variable is largely ignored if -\`w32-unicode-filenames' (which see) is non-nil. Emacs on Windows +`w32-unicode-filenames' (which see) is non-nil. Emacs on Windows behaves as if file names were encoded in `utf-8'. */); Vfile_name_coding_system = Qnil; @@ -5881,7 +5881,7 @@ instead use `file-name-coding-system' to get a constant encoding of file names regardless of the current language environment. On MS-Windows, the value of this variable is largely ignored if -\`w32-unicode-filenames' (which see) is non-nil. Emacs on Windows +`w32-unicode-filenames' (which see) is non-nil. Emacs on Windows behaves as if file names were encoded in `utf-8'. */); Vdefault_file_name_coding_system = Qnil; commit 5f9e4b2e11adce9933af2267425b80dc536c4239 Author: Glenn Morris Date: Tue Jun 30 16:20:39 2015 -0400 * leim/Makefile.in, lisp/Makefile.in: Add missing EXEEXT definition. diff --git a/leim/Makefile.in b/leim/Makefile.in index 2ec03db..e30895f 100644 --- a/leim/Makefile.in +++ b/leim/Makefile.in @@ -29,6 +29,8 @@ srcdir=@srcdir@ # Where the generated files go. leimdir = ${srcdir}/../lisp/leim +EXEEXT = @EXEEXT@ + # 'make' verbosity. AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ diff --git a/lisp/Makefile.in b/lisp/Makefile.in index e4c1ca1..8bcb2d6 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -23,6 +23,7 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ lisp = $(srcdir) VPATH = $(srcdir) +EXEEXT = @EXEEXT@ # Empty for all systems except MinGW, where xargs needs an explicit # limitation. commit 290acafd7e908b964fc8844f62f3309fca943a4b Author: Glenn Morris Date: Tue Jun 30 15:23:07 2015 -0400 * lisp/Makefile.in (MH_E_SRC, TRAMP_SRC, CAL_SRC): Replace hard-coded lists with wildcard + filter-out. diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 46de989..e4c1ca1 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -368,20 +368,8 @@ compile-one-process: $(LOADDEFS) compile-first # Update MH-E internal autoloads. These are not to be confused with # the autoloads for the MH-E entry points, which are already in loaddefs.el. MH_E_DIR = $(lisp)/mh-e -## MH_E_SRC avoids a circular dependency warning for mh-loaddefs.el. -MH_E_SRC = $(MH_E_DIR)/mh-acros.el $(MH_E_DIR)/mh-alias.el \ - $(MH_E_DIR)/mh-buffers.el $(MH_E_DIR)/mh-compat.el \ - $(MH_E_DIR)/mh-comp.el $(MH_E_DIR)/mh-e.el \ - $(MH_E_DIR)/mh-folder.el $(MH_E_DIR)/mh-funcs.el \ - $(MH_E_DIR)/mh-gnus.el $(MH_E_DIR)/mh-identity.el \ - $(MH_E_DIR)/mh-inc.el $(MH_E_DIR)/mh-junk.el \ - $(MH_E_DIR)/mh-letter.el $(MH_E_DIR)/mh-limit.el \ - $(MH_E_DIR)/mh-mime.el $(MH_E_DIR)/mh-print.el \ - $(MH_E_DIR)/mh-scan.el $(MH_E_DIR)/mh-search.el \ - $(MH_E_DIR)/mh-seq.el $(MH_E_DIR)/mh-show.el \ - $(MH_E_DIR)/mh-speed.el $(MH_E_DIR)/mh-thread.el \ - $(MH_E_DIR)/mh-tool-bar.el $(MH_E_DIR)/mh-utils.el \ - $(MH_E_DIR)/mh-xface.el +MH_E_SRC = $(sort $(wildcard ${MH_E_DIR}/mh*.el)) +MH_E_SRC := $(filter-out ${MH_E_DIR}/mh-loaddefs.el,${MH_E_SRC}) .PHONY: mh-autoloads mh-autoloads: $(MH_E_DIR)/mh-loaddefs.el @@ -395,12 +383,8 @@ $(MH_E_DIR)/mh-loaddefs.el: $(MH_E_SRC) # an own subdirectory. OTOH, it does not hurt to keep them in # lisp/net. TRAMP_DIR = $(lisp)/net -TRAMP_SRC = $(TRAMP_DIR)/tramp.el $(TRAMP_DIR)/tramp-adb.el \ - $(TRAMP_DIR)/tramp-cache.el $(TRAMP_DIR)/tramp-cmds.el \ - $(TRAMP_DIR)/tramp-compat.el $(TRAMP_DIR)/tramp-ftp.el \ - $(TRAMP_DIR)/tramp-gvfs.el $(TRAMP_DIR)/tramp-gw.el \ - $(TRAMP_DIR)/tramp-sh.el $(TRAMP_DIR)/tramp-smb.el \ - $(TRAMP_DIR)/tramp-uu.el $(TRAMP_DIR)/trampver.el +TRAMP_SRC = $(sort $(wildcard ${TRAMP_DIR}/tramp*.el)) +TRAMP_SRC := $(filter-out ${TRAMP_DIR}/tramp-loaddefs.el,${TRAMP_SRC}) $(TRAMP_DIR)/tramp-loaddefs.el: $(TRAMP_SRC) $(AM_V_GEN)$(emacs) -l autoload \ @@ -410,18 +394,9 @@ $(TRAMP_DIR)/tramp-loaddefs.el: $(TRAMP_SRC) CAL_DIR = $(lisp)/calendar ## Those files that may contain internal calendar autoload cookies. -## Avoids circular dependency warning for *-loaddefs.el. -CAL_SRC = $(CAL_DIR)/cal-bahai.el $(CAL_DIR)/cal-china.el \ - $(CAL_DIR)/cal-coptic.el $(CAL_DIR)/cal-dst.el \ - $(CAL_DIR)/cal-french.el $(CAL_DIR)/cal-hebrew.el \ - $(CAL_DIR)/cal-html.el $(CAL_DIR)/cal-islam.el \ - $(CAL_DIR)/cal-iso.el $(CAL_DIR)/cal-julian.el \ - $(CAL_DIR)/cal-mayan.el $(CAL_DIR)/cal-menu.el \ - $(CAL_DIR)/cal-move.el $(CAL_DIR)/cal-persia.el \ - $(CAL_DIR)/cal-tex.el $(CAL_DIR)/cal-x.el \ - $(CAL_DIR)/calendar.el $(CAL_DIR)/diary-lib.el \ - $(CAL_DIR)/holidays.el $(CAL_DIR)/lunar.el \ - $(CAL_DIR)/solar.el +CAL_SRC = $(addprefix ${CAL_DIR}/,diary-lib.el holidays.el lunar.el solar.el) +CAL_SRC := $(sort ${CAL_SRC} $(wildcard ${CAL_DIR}/cal*.el)) +CAL_SRC := $(filter-out ${CAL_DIR}/cal-loaddefs.el,${CAL_SRC}) $(CAL_DIR)/cal-loaddefs.el: $(CAL_SRC) $(AM_V_GEN)$(emacs) -l autoload \ commit 9ae0d76c3b4cb82ef3107638b89cfa2c9781d59d Author: Glenn Morris Date: Tue Jun 30 15:01:18 2015 -0400 * configure.ac (system-configuration-features): Add X11, NS. diff --git a/configure.ac b/configure.ac index 60d4bab..b58c7de 100644 --- a/configure.ac +++ b/configure.ac @@ -5151,7 +5151,7 @@ optsep= emacs_config_features= for opt in XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO IMAGEMAGICK SOUND GPM DBUS \ GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT \ - LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS X_TOOLKIT; do + LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS X_TOOLKIT X11 NS; do case $opt in NOTIFY|ACL) eval val=\${${opt}_SUMMARY} ;; commit 5200c2baefbc855d36c07e2d6a9c1adeb693a542 Author: Glenn Morris Date: Tue Jun 30 14:59:04 2015 -0400 Improve reproducibility of generated loaddefs file. * lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads): Make the return value the modtime of the input file (if no autoloads). (update-directory-autoloads): In the "no autoloads" section, use "most recent modtime" rather than "current time". ; http://lists.gnu.org/archive/html/emacs-devel/2015-06/msg00688.html diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index a6fefeb..9d1abdd 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -522,116 +522,119 @@ If OUTFILE is non-nil and FILE specifies a `generated-autoload-file' different from OUTFILE, then OUTBUF is ignored. Return non-nil if and only if FILE adds no autoloads to OUTFILE -\(or OUTBUF if OUTFILE is nil)." - (catch 'done - (let (load-name - (print-length nil) - (print-level nil) - (print-readably t) ; This does something in Lucid Emacs. - (float-output-format nil) - (visited (get-file-buffer file)) - (otherbuf nil) - (absfile (expand-file-name file)) - ;; nil until we found a cookie. - output-start) - (with-current-buffer (or visited - ;; It is faster to avoid visiting the file. - (autoload-find-file file)) - ;; Obey the no-update-autoloads file local variable. - (unless no-update-autoloads - (or noninteractive (message "Generating autoloads for %s..." file)) - (setq load-name - (if (stringp generated-autoload-load-name) - generated-autoload-load-name - (autoload-file-load-name absfile))) - ;; FIXME? Comparing file-names for equality with just equal - ;; is fragile, eg if one has an automounter prefix and one - ;; does not, but both refer to the same physical file. - (when (and outfile - (not - (if (memq system-type '(ms-dos windows-nt)) - (equal (downcase outfile) - (downcase (autoload-generated-file))) - (equal outfile (autoload-generated-file))))) - (setq otherbuf t)) - (save-excursion - (save-restriction - (widen) - (when autoload-builtin-package-versions - (let ((version (lm-header "version")) - package) - (and version - (setq version (ignore-errors (version-to-list version))) - (setq package (or (lm-header "package") - (file-name-sans-extension - (file-name-nondirectory file)))) - (setq output-start (autoload--setup-output - otherbuf outbuf absfile load-name)) - (let ((standard-output (marker-buffer output-start)) - (print-quoted t)) - (princ `(push (purecopy - ',(cons (intern package) version)) - package--builtin-versions)) - (princ "\n"))))) - - (goto-char (point-min)) - (while (not (eobp)) - (skip-chars-forward " \t\n\f") - (cond - ((looking-at (regexp-quote generate-autoload-cookie)) - ;; If not done yet, figure out where to insert this text. - (unless output-start - (setq output-start (autoload--setup-output - otherbuf outbuf absfile load-name))) - (autoload--print-cookie-text output-start load-name file)) - ((looking-at ";") - ;; Don't read the comment. - (forward-line 1)) - (t - (forward-sexp 1) - (forward-line 1)))))) - - (when output-start - (let ((secondary-autoloads-file-buf - (if otherbuf (current-buffer)))) - (with-current-buffer (marker-buffer output-start) - (save-excursion - ;; Insert the section-header line which lists the file name - ;; and which functions are in it, etc. - (goto-char output-start) - (let ((relfile (file-relative-name absfile))) - (autoload-insert-section-header - (marker-buffer output-start) - () load-name relfile - (if secondary-autoloads-file-buf - ;; MD5 checksums are much better because they do not - ;; change unless the file changes (so they'll be - ;; equal on two different systems and will change - ;; less often than time-stamps, thus leading to fewer - ;; unneeded changes causing spurious conflicts), but - ;; using time-stamps is a very useful optimization, - ;; so we use time-stamps for the main autoloads file - ;; (loaddefs.el) where we have special ways to - ;; circumvent the "random change problem", and MD5 - ;; checksum in secondary autoload files where we do - ;; not need the time-stamp optimization because it is - ;; already provided by the primary autoloads file. - (md5 secondary-autoloads-file-buf - ;; We'd really want to just use - ;; `emacs-internal' instead. - nil nil 'emacs-mule-unix) - (nth 5 (file-attributes relfile)))) - (insert ";;; Generated autoloads from " relfile "\n"))) - (insert generate-autoload-section-trailer)))) - (or noninteractive - (message "Generating autoloads for %s...done" file))) - (or visited - ;; We created this buffer, so we should kill it. - (kill-buffer (current-buffer)))) - (or (not output-start) - ;; If the entries were added to some other buffer, then the file - ;; doesn't add entries to OUTFILE. - otherbuf)))) +\(or OUTBUF if OUTFILE is nil). The actual return value is +FILE's modification time." + (let (load-name + (print-length nil) + (print-level nil) + (print-readably t) ; This does something in Lucid Emacs. + (float-output-format nil) + (visited (get-file-buffer file)) + (otherbuf nil) + (absfile (expand-file-name file)) + ;; nil until we found a cookie. + output-start) + (when + (catch 'done + (with-current-buffer (or visited + ;; It is faster to avoid visiting the file. + (autoload-find-file file)) + ;; Obey the no-update-autoloads file local variable. + (unless no-update-autoloads + (or noninteractive (message "Generating autoloads for %s..." file)) + (setq load-name + (if (stringp generated-autoload-load-name) + generated-autoload-load-name + (autoload-file-load-name absfile))) + ;; FIXME? Comparing file-names for equality with just equal + ;; is fragile, eg if one has an automounter prefix and one + ;; does not, but both refer to the same physical file. + (when (and outfile + (not + (if (memq system-type '(ms-dos windows-nt)) + (equal (downcase outfile) + (downcase (autoload-generated-file))) + (equal outfile (autoload-generated-file))))) + (setq otherbuf t)) + (save-excursion + (save-restriction + (widen) + (when autoload-builtin-package-versions + (let ((version (lm-header "version")) + package) + (and version + (setq version (ignore-errors (version-to-list version))) + (setq package (or (lm-header "package") + (file-name-sans-extension + (file-name-nondirectory file)))) + (setq output-start (autoload--setup-output + otherbuf outbuf absfile load-name)) + (let ((standard-output (marker-buffer output-start)) + (print-quoted t)) + (princ `(push (purecopy + ',(cons (intern package) version)) + package--builtin-versions)) + (princ "\n"))))) + + (goto-char (point-min)) + (while (not (eobp)) + (skip-chars-forward " \t\n\f") + (cond + ((looking-at (regexp-quote generate-autoload-cookie)) + ;; If not done yet, figure out where to insert this text. + (unless output-start + (setq output-start (autoload--setup-output + otherbuf outbuf absfile load-name))) + (autoload--print-cookie-text output-start load-name file)) + ((looking-at ";") + ;; Don't read the comment. + (forward-line 1)) + (t + (forward-sexp 1) + (forward-line 1)))))) + + (when output-start + (let ((secondary-autoloads-file-buf + (if otherbuf (current-buffer)))) + (with-current-buffer (marker-buffer output-start) + (save-excursion + ;; Insert the section-header line which lists the file name + ;; and which functions are in it, etc. + (goto-char output-start) + (let ((relfile (file-relative-name absfile))) + (autoload-insert-section-header + (marker-buffer output-start) + () load-name relfile + (if secondary-autoloads-file-buf + ;; MD5 checksums are much better because they do not + ;; change unless the file changes (so they'll be + ;; equal on two different systems and will change + ;; less often than time-stamps, thus leading to fewer + ;; unneeded changes causing spurious conflicts), but + ;; using time-stamps is a very useful optimization, + ;; so we use time-stamps for the main autoloads file + ;; (loaddefs.el) where we have special ways to + ;; circumvent the "random change problem", and MD5 + ;; checksum in secondary autoload files where we do + ;; not need the time-stamp optimization because it is + ;; already provided by the primary autoloads file. + (md5 secondary-autoloads-file-buf + ;; We'd really want to just use + ;; `emacs-internal' instead. + nil nil 'emacs-mule-unix) + (nth 5 (file-attributes relfile)))) + (insert ";;; Generated autoloads from " relfile "\n"))) + (insert generate-autoload-section-trailer)))) + (or noninteractive + (message "Generating autoloads for %s...done" file))) + (or visited + ;; We created this buffer, so we should kill it. + (kill-buffer (current-buffer)))) + (or (not output-start) + ;; If the entries were added to some other buffer, then the file + ;; doesn't add entries to OUTFILE. + otherbuf)) + (nth 5 (file-attributes absfile))))) (defun autoload-save-buffers () (while autoload-modified-buffers @@ -757,7 +760,7 @@ write its autoloads into the specified file instead." t files-re)) dirs))) (done ()) - (this-time (current-time)) + (last-time) ;; Files with no autoload cookies or whose autoloads go to other ;; files because of file-local autoload-generated-file settings. (no-autoloads nil) @@ -782,14 +785,14 @@ write its autoloads into the specified file instead." ;; There shouldn't be more than one such entry. ;; Remove the obsolete section. (autoload-remove-section (match-beginning 0)) - (let ((last-time (nth 4 form))) - (dolist (file file) - (let ((file-time (nth 5 (file-attributes file)))) - (when (and file-time - (not (time-less-p last-time file-time))) - ;; file unchanged - (push file no-autoloads) - (setq files (delete file files))))))) + (setq last-time (nth 4 form)) + (dolist (file file) + (let ((file-time (nth 5 (file-attributes file)))) + (when (and file-time + (not (time-less-p last-time file-time))) + ;; file unchanged + (push file no-autoloads) + (setq files (delete file files)))))) ((not (stringp file))) ((or (not (file-exists-p file)) ;; Remove duplicates as well, just in case. @@ -811,24 +814,28 @@ write its autoloads into the specified file instead." (push file done) (setq files (delete file files))))) ;; Elements remaining in FILES have no existing autoload sections yet. - (dolist (file files) - (cond - ((member (expand-file-name file) autoload-excludes) nil) - ;; Passing nil as second argument forces - ;; autoload-generate-file-autoloads to look for the right - ;; spot where to insert each autoloads section. - ((autoload-generate-file-autoloads file nil buffer-file-name) - (push file no-autoloads)))) - - (when no-autoloads - ;; Sort them for better readability. - (setq no-autoloads (sort no-autoloads 'string<)) - ;; Add the `no-autoloads' section. - (goto-char (point-max)) - (search-backward "\f" nil t) - (autoload-insert-section-header - (current-buffer) nil nil no-autoloads this-time) - (insert generate-autoload-section-trailer)) + (let ((no-autoloads-time (or last-time '(0 0 0 0))) file-time) + (dolist (file files) + (cond + ((member (expand-file-name file) autoload-excludes) nil) + ;; Passing nil as second argument forces + ;; autoload-generate-file-autoloads to look for the right + ;; spot where to insert each autoloads section. + ((setq file-time + (autoload-generate-file-autoloads file nil buffer-file-name)) + (push file no-autoloads) + (if (time-less-p no-autoloads-time file-time) + (setq no-autoloads-time file-time))))) + + (when no-autoloads + ;; Sort them for better readability. + (setq no-autoloads (sort no-autoloads 'string<)) + ;; Add the `no-autoloads' section. + (goto-char (point-max)) + (search-backward "\f" nil t) + (autoload-insert-section-header + (current-buffer) nil nil no-autoloads no-autoloads-time) + (insert generate-autoload-section-trailer))) (let ((version-control 'never)) (save-buffer)) commit 0dfea4562e19f5cc90c77ff5f9a96f9e94caf57c Author: Artur Malabarba Date: Tue Jun 30 19:19:30 2015 +0100 * lisp/emacs-lisp/package.el (package--remove-hidden): Fix logic (Bug#20930) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index a148783..7894aaf 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -2596,9 +2596,11 @@ to their archives." (out)) (while pkg-list (let ((p (pop pkg-list))) - (if (>= (package-desc-priority p) max-priority) + (let ((priority (package-desc-priority p))) + (if (< priority max-priority) + (setq pkg-list nil) (push p out) - (setq pkg-list nil)))) + (setq max-priority priority))))) (nreverse out))) (pkg-list (list (car pkg-list)))))) commit 79310d736c59d0fce1ad28e4a5f2d8996fefb210 Author: Eli Zaretskii Date: Tue Jun 30 20:13:35 2015 +0300 ; * src/doc.c: Add a 'coding' cookie. diff --git a/src/doc.c b/src/doc.c index 655b911..78a7815 100644 --- a/src/doc.c +++ b/src/doc.c @@ -1,4 +1,4 @@ -/* Record indices of function doc strings stored in a file. +/* Record indices of function doc strings stored in a file. -*- coding: utf-8 -*- Copyright (C) 1985-1986, 1993-1995, 1997-2015 Free Software Foundation, Inc. commit a30642f0652d1935b6e7dbb3d33c495389b6ddca Author: Nicolas Petton Date: Tue Jun 30 18:36:40 2015 +0200 * doc/lispref/sequences.texi: Add documentation for seq-min and seq-max. diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi index 72976b1..eb15228 100644 --- a/doc/lispref/sequences.texi +++ b/doc/lispref/sequences.texi @@ -790,6 +790,40 @@ of type @var{type}. @var{type} can be one of the following symbols: @end example @end defun +@defun seq-min sequence + This function returns the smallest element of +@var{sequence}. @var{sequence} must be a sequence of numbers or +markers. + +@example +@group +(seq-min [3 1 2]) +@result{} 1 +@end group +@group +(seq-min "Hello") +@result{} 72 +@end group +@end example +@end defun + +@defun seq-max sequence + This function returns the largest element of +@var{sequence}. @var{sequence} must be a sequence of numbers or +markers. + +@example +@group +(seq-max [1 3 2]) +@result{} 3 +@end group +@group +(seq-max "Hello") +@result{} 111 +@end group +@end example +@end defun + @defmac seq-doseq (var sequence) body@dots{} @cindex sequence iteration This macro is like @code{dolist}, except that @var{sequence} can be a list, commit b1047c3b422f5280a9de6c56b1ba77e5dbc185ee Author: Nicolas Petton Date: Tue Jun 30 18:29:32 2015 +0200 Add seq-min and seq-max Bump version number. * lisp/emacs-lisp/seq.el (seq-min, seq-max): New functions. * test/automated/seq-tests.el: Add tests for seq-min and seq-max. diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el index 2d20de6..68d40b9 100644 --- a/lisp/emacs-lisp/seq.el +++ b/lisp/emacs-lisp/seq.el @@ -4,7 +4,7 @@ ;; Author: Nicolas Petton ;; Keywords: sequences -;; Version: 1.7 +;; Version: 1.8 ;; Package: seq ;; Maintainer: emacs-devel@gnu.org @@ -325,6 +325,16 @@ TYPE can be one of the following symbols: vector, string or list." (`list (append seq nil)) (_ (error "Not a sequence type name: %S" type)))) +(defun seq-min (seq) + "Return the smallest element of SEQ. +SEQ must be a sequence of numbers or markers." + (apply #'min (seq-into seq 'list))) + +(defun seq-max (seq) + "Return the largest element of SEQ. +SEQ must be a sequence of numbers or markers." + (apply #'max (seq-into seq 'list))) + (defun seq--drop-list (list n) "Return a list from LIST without its first N elements. This is an optimization for lists in `seq-drop'." diff --git a/test/automated/seq-tests.el b/test/automated/seq-tests.el index ab46eb8..3643ce5 100644 --- a/test/automated/seq-tests.el +++ b/test/automated/seq-tests.el @@ -297,5 +297,10 @@ Evaluate BODY for each created sequence. (should (null b)) (should (null c))))) +(ert-deftest test-seq-min-max () + (with-test-sequences (seq '(4 5 3 2 0 4)) + (should (= (seq-min seq) 0)) + (should (= (seq-max seq) 5)))) + (provide 'seq-tests) ;;; seq-tests.el ends here commit 3bea77f65504ee7c4364c300fd1f7d699e2866ac Author: Eli Zaretskii Date: Tue Jun 30 19:09:02 2015 +0300 Make sure sleep-for always delays for as long as it's told * src/dispnew.c (Fsleep_for): Call wait_reading_process_output in a loop, to ensure we always wait exactly the required amount of time. (Bug#15990) diff --git a/src/dispnew.c b/src/dispnew.c index 1fc3cfe..7833fe3 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -5679,8 +5679,16 @@ additional wait period, in milliseconds; this is for backwards compatibility. if (duration > 0) { struct timespec t = dtotimespec (duration); - wait_reading_process_output (min (t.tv_sec, WAIT_READING_MAX), - t.tv_nsec, 0, 0, Qnil, NULL, 0); + struct timespec tend = timespec_add (current_timespec (), t); + + /* wait_reading_process_output returns as soon as it detects + output from any subprocess, so we wait in a loop until the + time expires. */ + do { + wait_reading_process_output (min (t.tv_sec, WAIT_READING_MAX), + t.tv_nsec, 0, 0, Qnil, NULL, 0); + t = timespec_sub (tend, current_timespec ()); + } while (timespec_sign (t) > 0); } return Qnil; commit 43593cb4173964a978a983e2eca4cbf86e01592a Author: Paul Eggert Date: Tue Jun 30 09:06:21 2015 -0700 Fix pointer signedness glitch * src/font.c (font_load_for_lface): Use SSDATA, not SDATA. diff --git a/src/font.c b/src/font.c index 575975c..50b966e 100644 --- a/src/font.c +++ b/src/font.c @@ -3346,7 +3346,7 @@ font_load_for_lface (struct frame *f, Lisp_Object *attrs, Lisp_Object spec) name = Ffont_get (spec, QCuser_spec); if (STRINGP (name)) { - char *p = SDATA (name), *q = strrchr (p, '-'); + char *p = SSDATA (name), *q = strrchr (p, '-'); if (q != NULL && c_isdigit (q[1])) { commit edd09381c618125d8aa23c9414034fbeee176305 Author: Eli Zaretskii Date: Tue Jun 30 18:59:21 2015 +0300 Don't block changes in mouse pointer inside 'track-mouse' * etc/NEWS: * doc/lispref/frames.texi (Mouse Tracking): Document the special effect of setting 'track-mouse' to 'dragging'. * lisp/textmodes/artist.el (artist-mouse-draw-continously): * lisp/ruler-mode.el (ruler-mode-mouse-drag-any-column-iteration): * lisp/mouse-drag.el (mouse-drag-throw): * lisp/mouse.el (mouse-drag-line): Set 'track-mouse' to 'dragging' to avoid changes in the shape of the mouse pointer. * src/xdisp.c (define_frame_cursor1): Don't change the mouse pointer shape when do_mouse_tracking has the value of 'dragging', not just any non-nil value. (Bug#20934) (syms_of_xdisp): DEFSYM 'dragging'. diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index ddf81f3..79b5172 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -2018,6 +2018,19 @@ The value of @code{track-mouse} is that of the last form in @var{body}. You should design @var{body} to return when it sees the up-event that indicates the release of the button, or whatever kind of event means it is time to stop tracking. + +The @code{track-mouse} form causes Emacs to generate mouse motion +events by binding the variable @code{mouse-tracking} to a +non-@code{nil} value. If that variable has the special value +@code{dragging}, it additionally instructs the display engine to +refrain from changing the shape of the mouse pointer. This is +desirable in Lisp programs that require mouse dragging across large +portions of Emacs display, which might otherwise cause the mouse +pointer to change its shape according to the display portion it hovers +on (@pxref{Pointer Shape}). Therefore, Lisp programs that need the +mouse pointer to retain its original shape during dragging should bind +@code{track-mouse} to the value @code{dragging} at the beginning of +their @var{body}. @end defspec The usual purpose of tracking mouse motion is to indicate on the screen diff --git a/etc/NEWS b/etc/NEWS index 1f8cbbc..389de16 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -815,6 +815,15 @@ This means that you can't use `make-local-variable' and expect them to ** `inhibit-point-motion-hooks' now defaults to t and is obsolete. ++++ +** `track-mouse' no longer freezes the shape of the mouse pointer. +The `track-mouse' form no longer refrains from changing the shape of +the mouse pointer for the entire time the body of that form is +executed. Lisp programs that use `track-mouse' for dragging across +large portions of the Emacs display, and want to avoid changes in the +pointer shape during dragging, should bind the variable `track-mouse' +to the special value `dragging' in the body of the form. + ** The optional `predicate' argument of `lisp-complete-symbol' no longer has any effect. (This change was made in Emacs 24.4 but was not advertised at the time.) diff --git a/lisp/mouse-drag.el b/lisp/mouse-drag.el index 88838ed..945c305 100644 --- a/lisp/mouse-drag.el +++ b/lisp/mouse-drag.el @@ -222,6 +222,8 @@ To test this function, evaluate: (col-scrolling-p (mouse-drag-should-do-col-scrolling))) (select-window start-window) (track-mouse + ;; Don't change the mouse pointer shape while we drag. + (setq track-mouse 'dragging) (while (progn (setq event (read-event) end (event-end event) diff --git a/lisp/mouse.el b/lisp/mouse.el index 7854d32..9bb00cb 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -468,8 +468,10 @@ must be one of the symbols `header', `mode', or `vertical'." (setq dragged t) (adjust-window-trailing-edge window growth nil t)) (setq last-position position)))))) - ;; Start tracking. - (setq track-mouse t) + ;; Start tracking. The special value 'dragging' signals the + ;; display engine to freeze the mouse pointer shape for as long + ;; as we drag. + (setq track-mouse 'dragging) ;; Loop reading events and sampling the position of the mouse. (setq exitfun (set-transient-map diff --git a/lisp/ruler-mode.el b/lisp/ruler-mode.el index f0b012e..4f68909 100644 --- a/lisp/ruler-mode.el +++ b/lisp/ruler-mode.el @@ -437,6 +437,8 @@ the mouse has been clicked." (let ((drags 0) event) (track-mouse + ;; Signal the display engine to freeze the mouse pointer shape. + (setq track-mouse 'dragging) (while (mouse-movement-p (setq event (read-event))) (setq drags (1+ drags)) (when (eq window (posn-window (event-end event))) diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index 14cf402..a29418e 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -4965,6 +4965,9 @@ The event, EV, is the mouse event." (artist-no-rb-set-point1 x1 y1)) (unwind-protect (track-mouse + ;; We don't want flickering of mouse pointer shape while we + ;; drag the mouse. + (setq track-mouse 'dragging) (while (or (mouse-movement-p ev) (member 'down (event-modifiers ev))) (setq ev-start-pos (artist-coord-win-to-buf diff --git a/src/xdisp.c b/src/xdisp.c index 25eed01..5bef44c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -29105,7 +29105,7 @@ static void define_frame_cursor1 (struct frame *f, Cursor cursor, Lisp_Object pointer) { /* Do not change cursor shape while dragging mouse. */ - if (!NILP (do_mouse_tracking)) + if (EQ (do_mouse_tracking, Qdragging)) return; if (!NILP (pointer)) @@ -30727,6 +30727,8 @@ They are still logged to the *Messages* buffer. */); DEFSYM (Qarrow, "arrow"); /* also Qtext */ + DEFSYM (Qdragging, "dragging"); + DEFSYM (Qinhibit_free_realized_faces, "inhibit-free-realized-faces"); list_of_error = list1 (list2 (Qerror, Qvoid_variable)); commit 881c4790266c42805ac1b9a5f1bbe13d3dd23478 Author: Artur Malabarba Date: Tue Jun 30 15:33:39 2015 +0100 * lisp/isearch.el (isearch-toggle-word): Fix toggle diff --git a/lisp/isearch.el b/lisp/isearch.el index 62899ab..a103c5a 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1500,7 +1500,7 @@ Use `isearch-exit' to quit without signaling." "Toggle word searching on or off." ;; The status stack is left unchanged. (interactive) - (setq isearch-word (not isearch-word)) + (setq isearch-word (if (eq isearch-word t) nil t)) (if isearch-word (setq isearch-regexp nil)) (setq isearch-success t isearch-adjusted t) (isearch-update)) commit 8d3b9102130dd7091803d96c94415b24fe8a5bbf Author: Artur Malabarba Date: Tue Jun 30 10:47:25 2015 +0100 * lisp/emacs-lisp/package.el (package-compute-transaction): Don't assume version sorting. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index e599e84..a148783 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1576,29 +1576,33 @@ SEEN is used internally to detect infinite recursion." (while (and pkg-descs (not found)) (let* ((pkg-desc (pop pkg-descs)) (version (package-desc-version pkg-desc)) - (disabled (package-disabled-p next-pkg version))) + (disabled (package-disabled-p next-pkg version)) + found-something) (cond ((version-list-< version next-version) - (error - "Need package `%s-%s', but only %s is available" - next-pkg (package-version-join next-version) - (package-version-join version))) + ;; pkg-descs is sorted by priority, not version, so + ;; don't error just yet. + (unless found-something + (setq found-something (package-version-join version)))) (disabled (unless problem (setq problem (if (stringp disabled) - (format "Package `%s' held at version %s, \ -but version %s required" + (format "Package `%s' held at version %s, but version %s required" next-pkg disabled (package-version-join next-version)) (format "Required package '%s' is disabled" next-pkg))))) (t (setq found pkg-desc))))) (unless found - (if problem - (error "%s" problem) - (error "Package `%s-%s' is unavailable" - next-pkg (package-version-join next-version)))) + (cond + (problem (error "%s" problem)) + (found-something + (error "Need package `%s-%s', but only %s is available" + next-pkg (package-version-join next-version) + found-something)) + (t (error "Package `%s-%s' is unavailable" + next-pkg (package-version-join next-version))))) (setq packages (package-compute-transaction (cons found packages) (package-desc-reqs found) commit d0a5162fd825acbbd863e61099e1fa1ce5975773 Author: Artur Malabarba Date: Tue Jun 30 10:17:55 2015 +0100 * lisp/emacs-lisp/package.el (package--save-selected-packages): Don't save before init time, to avoid overwriting configurations. (Bug#20855) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 9f56345..e599e84 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1620,12 +1620,14 @@ Used to populate `package-selected-packages'." unless (memq name dep-list) collect name))) -(defun package--save-selected-packages (value) +(defun package--save-selected-packages (&optional value) "Set and save `package-selected-packages' to VALUE." - (let ((save-silently inhibit-message)) - (customize-save-variable - 'package-selected-packages - (setq package-selected-packages value)))) + (when value + (setq package-selected-packages value)) + (if after-init-time + (let ((save-silently inhibit-message)) + (customize-save-variable 'package-selected-packages package-selected-packages)) + (add-hook 'after-init-hook #'package--save-selected-packages))) (defun package--user-selected-p (pkg) "Return non-nil if PKG is a package was installed by the user.