diff options
author | Glenn Morris <rgm@gnu.org> | 2014-06-01 17:18:22 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2014-06-01 17:18:22 -0700 |
commit | 953e106ac84587e765244995687b088969b5f6e1 (patch) | |
tree | a4d54b892e04b9123bc79ecffd69310f5807399e /lisp | |
parent | eed652d649d28e9dafdb01f9c7425d7d28899e0d (diff) | |
parent | afca0e759015ebc753b0c343ac45ac476dd31e9d (diff) | |
download | emacs-953e106ac84587e765244995687b088969b5f6e1.tar.gz |
Merge from emacs-24; up to 2014-05-29T17:16:00Z!dmantipov@yandex.ru
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 72 | ||||
-rw-r--r-- | lisp/abbrev.el | 13 | ||||
-rw-r--r-- | lisp/cus-start.el | 6 | ||||
-rw-r--r-- | lisp/emacs-lisp/byte-opt.el | 18 | ||||
-rw-r--r-- | lisp/emacs-lisp/gv.el | 17 | ||||
-rw-r--r-- | lisp/emacs-lisp/package.el | 4 | ||||
-rw-r--r-- | lisp/gnus/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/gnus/html2text.el | 2 | ||||
-rw-r--r-- | lisp/international/README | 39 | ||||
-rw-r--r-- | lisp/leim/quail/latin-pre.el | 2 | ||||
-rw-r--r-- | lisp/minibuffer.el | 33 | ||||
-rw-r--r-- | lisp/mouse.el | 5 | ||||
-rw-r--r-- | lisp/progmodes/js.el | 2 | ||||
-rw-r--r-- | lisp/simple.el | 72 | ||||
-rw-r--r-- | lisp/subr.el | 55 |
15 files changed, 212 insertions, 133 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f8652020920..d85aa1e31ab 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,75 @@ +2014-06-02 Eli Zaretskii <eliz@gnu.org> + + * simple.el (keyboard-quit): Force update of mode lines, to remove + the "Def" indicator, if we were defining a macro. (Bug#17615) + +2014-06-02 Stefan Monnier <monnier@iro.umontreal.ca> + + * minibuffer.el (minibuffer-force-complete-and-exit): + Obey minibuffer-default (bug#17545). + + * progmodes/js.el (js-indent-line): Don't mix columns and chars + (bug#17619). + + * subr.el (set-transient-map): Don't wait for some "nested" + transient-map to finish if we're only supposed to be active for + the next command (bug#17642). + +2014-06-02 Leo Liu <sdl.web@gmail.com> + + * emacs-lisp/gv.el (window-buffer, window-display-table) + (window-dedicated-p, window-hscroll, window-point, window-start): + Fix gv-expander. (Bug#17630) + +2014-06-02 Stefan Monnier <monnier@iro.umontreal.ca> + + * mouse.el (mouse-posn-property): Ignore posn-point for mode-line + clicks (bug#17633). + + * leim/quail/latin-pre.el ("latin-2-prefix"): Use ",," rather than ", " + for the single comma, since ", " is *very* common in normal French text + (bug#17643). + +2014-06-02 Glenn Morris <rgm@gnu.org> + + * emacs-lisp/package.el (package-check-signature) + (package-unsigned-archives): Fix :version. + +2014-06-02 Stefan Monnier <monnier@iro.umontreal.ca> + + * subr.el (sit-for): Don't run input-methods (bug#15614). + +2014-06-02 Glenn Morris <rgm@gnu.org> + + * cus-start.el: Fix some :version numbers. + +2014-06-02 Stefan Monnier <monnier@iro.umontreal.ca> + + * simple.el (deactivate-mark): Set mark-active to nil even if + deactivation is done via setting transient-mark-mode to nil, + since one is buffer-local and the other is global. + + * emacs-lisp/byte-opt.el (byte-optimize-binary-predicate): Don't assume + there can't be more than 2 arguments (bug#17584). + +2014-06-02 Glenn Morris <rgm@gnu.org> + + * simple.el (filter-buffer-substring-functions) + (filter-buffer-substring-function, buffer-substring-filters) + (filter-buffer-substring, buffer-substring--filter): Doc fixes. + + * minibuffer.el (completion-in-region-functions, completion-in-region) + (completion--in-region): Doc fixes. + + * abbrev.el (abbrev-expand-functions, abbrev-expand-function) + (expand-abbrev, abbrev--default-expand): Doc fixes. + +2014-06-02 Paul Eggert <eggert@cs.ucla.edu> + + Include sources used to create macuvs.h. + * international/README: Refer to the Unicode Terms of Use rather + than copying it bodily here, as that simplifies maintenance. + 2014-06-01 Glenn Morris <rgm@gnu.org> * loadup.el (load-prefer-newer): Set non-nil when dumping. (Bug#17629) diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 43b6a5583ee..9e11adadfc0 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -824,23 +824,28 @@ see `define-abbrev' for details." value)) (defvar abbrev-expand-functions nil - "Wrapper hook around `expand-abbrev'.") + "Wrapper hook around `abbrev--default-expand'.") (make-obsolete-variable 'abbrev-expand-functions 'abbrev-expand-function "24.4") (defvar abbrev-expand-function #'abbrev--default-expand - "Function to perform abbrev expansion. + "Function that `expand-abbrev' uses to perform abbrev expansion. Takes no argument and should return the abbrev symbol if expansion took place.") (defun expand-abbrev () "Expand the abbrev before point, if there is an abbrev there. Effective when explicitly called even when `abbrev-mode' is nil. -Returns the abbrev symbol, if expansion took place. (The actual -return value is that of `abbrev-insert'.)" +Before doing anything else, runs `pre-abbrev-expand-hook'. +Calls `abbrev-expand-function' with no argument to do the work, +and returns whatever it does. (This should be the abbrev symbol +if expansion occurred, else nil.)" (interactive) (run-hooks 'pre-abbrev-expand-hook) (funcall abbrev-expand-function)) (defun abbrev--default-expand () + "Default function to use for `abbrev-expand-function'. +This respects the wrapper hook `abbrev-expand-functions'. +Calls `abbrev-insert' to insert any expansion, and returns what it does." (with-wrapper-hook abbrev-expand-functions () (pcase-let ((`(,sym ,name ,wordstart ,wordend) (abbrev--before-point))) (when sym diff --git a/lisp/cus-start.el b/lisp/cus-start.el index ee09c433f33..b446a00bb8f 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -366,7 +366,7 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of left) (const control) (const meta) (const alt) (const hyper) - (const super)) "24.0") + (const super)) "24.1") (ns-command-modifier ns (choice (const :tag "No modifier" nil) @@ -380,7 +380,7 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of left) (const control) (const meta) (const alt) (const hyper) - (const super)) "24.0") + (const super)) "24.1") (ns-alternate-modifier ns (choice (const :tag "No modifier (work as alternate/option)" none) @@ -402,7 +402,7 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of (const alt) (const hyper) (const super)) "23.1") (ns-antialias-text ns boolean "23.1") - (ns-auto-hide-menu-bar ns boolean "24.0") + (ns-auto-hide-menu-bar ns boolean "24.1") (ns-use-native-fullscreen ns boolean "24.4") (ns-use-srgb-colorspace ns boolean "24.4") ;; process.c diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 90d1dd913e9..ee0a5a11c7b 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -859,14 +859,16 @@ (defun byte-optimize-binary-predicate (form) - (if (macroexp-const-p (nth 1 form)) - (if (macroexp-const-p (nth 2 form)) - (condition-case () - (list 'quote (eval form)) - (error form)) - ;; This can enable some lapcode optimizations. - (list (car form) (nth 2 form) (nth 1 form))) - form)) + (cond + ((or (not (macroexp-const-p (nth 1 form))) + (nthcdr 3 form)) ;; In case there are more than 2 args. + form) + ((macroexp-const-p (nth 2 form)) + (condition-case () + (list 'quote (eval form)) + (error form))) + (t ;; This can enable some lapcode optimizations. + (list (car form) (nth 2 form) (nth 1 form))))) (defun byte-optimize-predicate (form) (let ((ok t) diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el index 66241897536..692b76e8a36 100644 --- a/lisp/emacs-lisp/gv.el +++ b/lisp/emacs-lisp/gv.el @@ -340,13 +340,18 @@ The return value is the last VAL in the list. (gv-define-simple-setter process-filter set-process-filter) (gv-define-simple-setter process-sentinel set-process-sentinel) (gv-define-simple-setter process-get process-put) -(gv-define-simple-setter window-buffer set-window-buffer) -(gv-define-simple-setter window-display-table set-window-display-table 'fix) -(gv-define-simple-setter window-dedicated-p set-window-dedicated-p) -(gv-define-simple-setter window-hscroll set-window-hscroll) (gv-define-simple-setter window-parameter set-window-parameter) -(gv-define-simple-setter window-point set-window-point) -(gv-define-simple-setter window-start set-window-start) +(gv-define-setter window-buffer (v &optional w) + (macroexp-let2 nil v v + `(progn (set-window-buffer ,w ,v) ,v))) +(gv-define-setter window-display-table (v &optional w) + (macroexp-let2 nil v v + `(progn (set-window-display-table ,w ,v) ,v))) +(gv-define-setter window-dedicated-p (v &optional w) + `(set-window-dedicated-p ,w ,v)) +(gv-define-setter window-hscroll (v &optional w) `(set-window-hscroll ,w ,v)) +(gv-define-setter window-point (v &optional w) `(set-window-point ,w ,v)) +(gv-define-setter window-start (v &optional w) `(set-window-start ,w ,v)) (gv-define-setter buffer-local-value (val var buf) (macroexp-let2 nil v val diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index c49cace04e4..d65633282c9 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -291,14 +291,14 @@ contrast, `package-user-dir' contains packages for personal use." (const t :tag "Check always")) :risky t :group 'package - :version "24.1") + :version "24.4") (defcustom package-unsigned-archives nil "A list of archives which do not use package signature." :type '(repeat (string :tag "Archive name")) :risky t :group 'package - :version "24.1") + :version "24.4") (defvar package--default-summary "No description available.") diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 0f99bb9c4d5..3560260d7ae 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2014-06-02 Andreas Schwab <schwab@linux-m68k.org> + + * html2text.el (html2text-get-attr): Fix typo when splitting value from + attribute. (Bug#17613) + 2014-05-29 Stefan Monnier <monnier@iro.umontreal.ca> * mm-view.el (mm-display-inline-fontify): Use font-lock-ensure. diff --git a/lisp/gnus/html2text.el b/lisp/gnus/html2text.el index 85d40cc2bcd..78cecd92356 100644 --- a/lisp/gnus/html2text.el +++ b/lisp/gnus/html2text.el @@ -204,7 +204,7 @@ formatting, and then moved afterward.") ;; size=3 ((string-match "[^ ]=[^ ]" this) (let ((attr (nth 0 (split-string this "="))) - (value (substring prev (1+ (string-match "=" this))))) + (value (substring this (1+ (string-match "=" this))))) (setq attr-list (cons (list attr value) attr-list)))) ;; size =3 ((string-match "\\`=[^ ]" this) diff --git a/lisp/international/README b/lisp/international/README index 5d08e8ac324..92fc4a089ec 100644 --- a/lisp/international/README +++ b/lisp/international/README @@ -9,40 +9,5 @@ Data File at http://www.unicode.org/Public/UNIDATA/UnicodeData.txt: These files were generated from the version admin/unidata/UnicodeData.txt in the Emacs sources, using the file unidata-gen.el in the same directory. -The file UnicodeData.txt is used under the terms of the following -Copyright and Permission Notice: - - -Copyright (C) 1991-2013 Unicode, Inc. All rights reserved. Distributed -under the Terms of Use in http://www.unicode.org/copyright.html. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Unicode data files and any associated documentation (the -"Data Files") or Unicode software and any associated documentation -(the "Software") to deal in the Data Files or Software without -restriction, including without limitation the rights to use, copy, -modify, merge, publish, distribute, and/or sell copies of the Data -Files or Software, and to permit persons to whom the Data Files or -Software are furnished to do so, provided that (a) the above copyright -notice(s) and this permission notice appear with all copies of the -Data Files or Software, (b) both the above copyright notice(s) and -this permission notice appear in associated documentation, and (c) -there is clear notice in each modified Data File or in the Software as -well as in the documentation associated with the Data File(s) or -Software that the data or software has been modified. - -THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR -ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR -SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in these Data Files or Software without prior -written authorization of the copyright holder. +The file UnicodeData.txt is used under the Unicode Terms of Use, +contained in the file admin/unidata/copyright.html. diff --git a/lisp/leim/quail/latin-pre.el b/lisp/leim/quail/latin-pre.el index 8bf6ffe4725..6202b8901e5 100644 --- a/lisp/leim/quail/latin-pre.el +++ b/lisp/leim/quail/latin-pre.el @@ -306,7 +306,7 @@ Key translation rules are: ("~ " ?~) (",C" ?Ç) (",c" ?ç) - (", " ?,) + (",," ?,) ) (quail-define-package diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index cfff1533e48..7b252b4d46d 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -1224,12 +1224,16 @@ scroll the window of possible completions." (defun minibuffer-force-complete-and-exit () "Complete the minibuffer with first of the matches and exit." (interactive) - (minibuffer-force-complete) - (completion--complete-and-exit - (minibuffer-prompt-end) (point-max) #'exit-minibuffer - ;; If the previous completion completed to an element which fails - ;; test-completion, then we shouldn't exit, but that should be rare. - (lambda () (minibuffer-message "Incomplete")))) + (if (and (eq (minibuffer-prompt-end) (point-max)) + minibuffer-default) + ;; Use the provided default if there's one (bug#17545). + (minibuffer-complete-and-exit) + (minibuffer-force-complete) + (completion--complete-and-exit + (minibuffer-prompt-end) (point-max) #'exit-minibuffer + ;; If the previous completion completed to an element which fails + ;; test-completion, then we shouldn't exit, but that should be rare. + (lambda () (minibuffer-message "Incomplete"))))) (defun minibuffer-force-complete (&optional start end) "Complete the minibuffer to an exact match. @@ -1878,14 +1882,14 @@ variables.") (exit-minibuffer)) (defvar completion-in-region-functions nil - "Wrapper hook around `completion-in-region'.") + "Wrapper hook around `completion--in-region'.") (make-obsolete-variable 'completion-in-region-functions 'completion-in-region-function "24.4") (defvar completion-in-region-function #'completion--in-region "Function to perform the job of `completion-in-region'. The function is called with 4 arguments: START END COLLECTION PREDICATE. -The arguments and expected return value are like the ones of +The arguments and expected return value are as specified for `completion-in-region'.") (defvar completion-in-region--data nil) @@ -1903,10 +1907,12 @@ we entered `completion-in-region-mode'.") (defun completion-in-region (start end collection &optional predicate) "Complete the text between START and END using COLLECTION. -Return nil if there is no valid completion, else t. Point needs to be somewhere between START and END. -PREDICATE (a function called with no arguments) says when to -exit." +PREDICATE (a function called with no arguments) says when to exit. +This calls the function that `completion-in-region-function' specifies +\(passing the same four arguments that it received) to do the work, +and returns whatever it does. The return value should be nil +if there was no valid completion, else t." (cl-assert (<= start (point)) (<= (point) end)) (funcall completion-in-region-function start end collection predicate)) @@ -1918,6 +1924,9 @@ exit." :version "22.1") (defun completion--in-region (start end collection &optional predicate) + "Default function to use for `completion-in-region-function'. +Its arguments and return value are as specified for `completion-in-region'. +This respects the wrapper hook `completion-in-region-functions'." (with-wrapper-hook ;; FIXME: Maybe we should use this hook to provide a "display ;; completions" operation as well. @@ -1943,7 +1952,7 @@ exit." "Keymap activated during `completion-in-region'.") ;; It is difficult to know when to exit completion-in-region-mode (i.e. hide -;; the *Completions*). +;; the *Completions*). Here's how previous packages did it: ;; - lisp-mode: never. ;; - comint: only do it if you hit SPC at the right time. ;; - pcomplete: pop it down on SPC or after some time-delay. diff --git a/lisp/mouse.el b/lisp/mouse.el index d1ab6c24565..10358c91636 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -684,7 +684,10 @@ its value is returned." (str (posn-string pos))) (or (and str (get-text-property (cdr str) property (car str))) - (and pt + ;; FIXME: mouse clicks on the mode-line come with a position in + ;; (nth 5). Maybe we should change the C code instead so that + ;; mouse-clicks don't include a position there! + (and pt (not (memq (posn-area pos) '(mode-line header-line))) (get-char-property pt property w)))) (get-char-property pos property))) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 5be1373213e..a8f0d556ec4 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -1907,7 +1907,7 @@ In particular, return the buffer position of the first `for' kwd." (interactive) (let* ((parse-status (save-excursion (syntax-ppss (point-at-bol)))) - (offset (- (current-column) (current-indentation)))) + (offset (- (point) (save-excursion (back-to-indentation) (point))))) (indent-line-to (js--proper-indentation parse-status)) (when (> offset 0) (forward-char offset)))) diff --git a/lisp/simple.el b/lisp/simple.el index 7bc961b2051..cde169982cb 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3554,46 +3554,50 @@ These commands include \\[set-mark-command] and \\[start-kbd-macro]." (defvar filter-buffer-substring-functions nil - "This variable is a wrapper hook around `filter-buffer-substring'.") + "This variable is a wrapper hook around `buffer-substring--filter'.") (make-obsolete-variable 'filter-buffer-substring-functions 'filter-buffer-substring-function "24.4") (defvar filter-buffer-substring-function #'buffer-substring--filter "Function to perform the filtering in `filter-buffer-substring'. -The function is called with 3 arguments: -\(BEG END DELETE). The arguments BEG, END, and DELETE are the same -as those of `filter-buffer-substring' in each case. -It should return the buffer substring between BEG and END, after filtering.") +The function is called with the same 3 arguments (BEG END DELETE) +that `filter-buffer-substring' received. It should return the +buffer substring between BEG and END, after filtering. If DELETE is +non-nil, it should delete the text between BEG and END from the buffer.") (defvar buffer-substring-filters nil - "List of filter functions for `filter-buffer-substring'. -Each function must accept a single argument, a string, and return -a string. The buffer substring is passed to the first function -in the list, and the return value of each function is passed to -the next. + "List of filter functions for `buffer-substring--filter'. +Each function must accept a single argument, a string, and return a string. +The buffer substring is passed to the first function in the list, +and the return value of each function is passed to the next. As a special convention, point is set to the start of the buffer text -being operated on (i.e., the first argument of `filter-buffer-substring') +being operated on (i.e., the first argument of `buffer-substring--filter') before these functions are called.") (make-obsolete-variable 'buffer-substring-filters 'filter-buffer-substring-function "24.1") (defun filter-buffer-substring (beg end &optional delete) "Return the buffer substring between BEG and END, after filtering. -The hook `filter-buffer-substring-function' performs the actual filtering. -By default, no filtering is done. - -If DELETE is non-nil, the text between BEG and END is deleted -from the buffer. - -This function should be used instead of `buffer-substring', -`buffer-substring-no-properties', or `delete-and-extract-region' -when you want to allow filtering to take place. For example, -major or minor modes can use `filter-buffer-substring-function' to -extract characters that are special to a buffer, and should not -be copied into other buffers." +If DELETE is non-nil, delete the text between BEG and END from the buffer. + +This calls the function that `filter-buffer-substring-function' specifies +\(passing the same three arguments that it received) to do the work, +and returns whatever it does. The default function does no filtering, +unless a hook has been set. + +Use `filter-buffer-substring' instead of `buffer-substring', +`buffer-substring-no-properties', or `delete-and-extract-region' when +you want to allow filtering to take place. For example, major or minor +modes can use `filter-buffer-substring-function' to extract characters +that are special to a buffer, and should not be copied into other buffers." (funcall filter-buffer-substring-function beg end delete)) (defun buffer-substring--filter (beg end &optional delete) + "Default function to use for `filter-buffer-substring-function'. +Its arguments and return value are as specified for `filter-buffer-substring'. +This respects the wrapper hook `filter-buffer-substring-functions', +and the abnormal hook `buffer-substring-filters'. +No filtering is done unless a hook says to." (with-wrapper-hook filter-buffer-substring-functions (beg end delete) (cond ((or delete buffer-substring-filters) @@ -4496,17 +4500,13 @@ run `deactivate-mark-hook'." (x-set-selection 'PRIMARY (funcall region-extract-function nil))))) (when mark-active (force-mode-line-update)) ;Refresh toolbar (bug#16382). - (if (and (null force) - (or (eq transient-mark-mode 'lambda) - (and (eq (car-safe transient-mark-mode) 'only) - (null (cdr transient-mark-mode))))) - ;; When deactivating a temporary region, don't change - ;; `mark-active' or run `deactivate-mark-hook'. - (setq transient-mark-mode nil) - (if (eq (car-safe transient-mark-mode) 'only) - (setq transient-mark-mode (cdr transient-mark-mode))) - (setq mark-active nil) - (run-hooks 'deactivate-mark-hook)) + (cond + ((eq (car-safe transient-mark-mode) 'only) + (setq transient-mark-mode (cdr transient-mark-mode))) + ((eq transient-mark-mode 'lambda) + (setq transient-mark-mode nil))) + (setq mark-active nil) + (run-hooks 'deactivate-mark-hook) (redisplay--update-region-highlight (selected-window)))) (defun activate-mark (&optional no-tmm) @@ -6681,6 +6681,10 @@ At top-level, as an editor command, this simply beeps." (kmacro-keyboard-quit)) (when completion-in-region-mode (completion-in-region-mode -1)) + ;; Force the next redisplay cycle to remove the "Def" indicator from + ;; all the mode lines. + (if defining-kbd-macro + (force-mode-line-update t)) (setq defining-kbd-macro nil) (let ((debug-on-quit nil)) (signal 'quit nil))) diff --git a/lisp/subr.el b/lisp/subr.el index 282b85eb1e4..95d066ee6c2 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2161,6 +2161,10 @@ where the optional arg MILLISECONDS specifies an additional wait period, in milliseconds; this was useful when Emacs was built without floating point support." (declare (advertised-calling-convention (seconds &optional nodisp) "22.1")) + ;; This used to be implemented in C until the following discussion: + ;; http://lists.gnu.org/archive/html/emacs-devel/2006-07/msg00401.html + ;; Then it was moved to C using an implementation based on an idle timer, + ;; which was then replaced by the use of read-event. (if (numberp nodisp) (setq seconds (+ seconds (* 1e-3 nodisp)) nodisp obsolete) @@ -2178,7 +2182,12 @@ floating point support." ;; FIXME: we should not read-event here at all, because it's much too ;; difficult to reliably "undo" a read-event by pushing it onto ;; unread-command-events. - (let ((read (read-event nil t seconds))) + ;; For bug#14782, we need read-event to do the keyboard-coding-system + ;; decoding (hence non-nil as second arg under POSIX ttys). + ;; For bug#15614, we need read-event not to inherit-input-method. + ;; So we temporarily suspend input-method-function. + (let ((read (let ((input-method-function nil)) + (read-event nil t seconds)))) (or (null read) (progn ;; https://lists.gnu.org/archive/html/emacs-devel/2006-10/msg00394.html @@ -4318,28 +4327,28 @@ lookup sequence then continues." ;; in a cycle. (fset clearfun (suspicious-object - (lambda () - (with-demoted-errors "set-transient-map PCH: %S" - (unless (cond - ((not (eq map (cadr overriding-terminal-local-map))) - ;; There's presumably some other transient-map in - ;; effect. Wait for that one to terminate before we - ;; remove ourselves. - ;; For example, if isearch and C-u both use transient - ;; maps, then the lifetime of the C-u should be nested - ;; within isearch's, so the pre-command-hook of - ;; isearch should be suspended during the C-u one so - ;; we don't exit isearch just because we hit 1 after - ;; C-u and that 1 exits isearch whereas it doesn't - ;; exit C-u. - t) - ((null keep-pred) nil) - ((eq t keep-pred) - (eq this-command - (lookup-key map (this-command-keys-vector)))) - (t (funcall keep-pred))) - (internal-pop-keymap map 'overriding-terminal-local-map) - (remove-hook 'pre-command-hook clearfun) + (lambda () + (with-demoted-errors "set-transient-map PCH: %S" + (unless (cond + ((null keep-pred) nil) + ((not (eq map (cadr overriding-terminal-local-map))) + ;; There's presumably some other transient-map in + ;; effect. Wait for that one to terminate before we + ;; remove ourselves. + ;; For example, if isearch and C-u both use transient + ;; maps, then the lifetime of the C-u should be nested + ;; within isearch's, so the pre-command-hook of + ;; isearch should be suspended during the C-u one so + ;; we don't exit isearch just because we hit 1 after + ;; C-u and that 1 exits isearch whereas it doesn't + ;; exit C-u. + t) + ((eq t keep-pred) + (eq this-command + (lookup-key map (this-command-keys-vector)))) + (t (funcall keep-pred))) + (internal-pop-keymap map 'overriding-terminal-local-map) + (remove-hook 'pre-command-hook clearfun) (when on-exit (funcall on-exit)) ;; Comment out the fset if you want to debug the GC bug. ;;; (fset clearfun nil) |