commit 7195ea7532f4b2e05f168da823d9aed2401267cf (HEAD, refs/remotes/origin/master) Author: Mattias Engdegård Date: Fri Mar 13 19:51:02 2020 +0100 Avoid regexp stack overflow in GDB string matching (bug#22149) * lisp/progmodes/gdb-mi.el (gdb--string-regexp): Swap the or-clauses so that the rarely matching one comes first. This avoids a build-up of backtrack points on the regexp stack. diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index da5a2a503a..c262232796 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -1046,7 +1046,10 @@ no input, and GDB is waiting for input." (declare-function tooltip-show "tooltip" (text &optional use-echo-area)) -(defconst gdb--string-regexp "\"\\(?:[^\\\"]\\|\\\\.\\)*\"") +(defconst gdb--string-regexp (rx "\"" + (* (or (seq "\\" nonl) + (not (any "\"\\")))) + "\"")) (defun gdb-tooltip-print (expr) (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer) commit 6bdb561a3bafa0623da30e33b4a1dc291370218b Merge: 099520ec95 a2b07f9f11 Author: Glenn Morris Date: Fri Mar 13 07:50:33 2020 -0700 Merge from origin/emacs-27 a2b07f9f11 (origin/emacs-27) ; * etc/NEWS: Explain how to get back ol... b468b3d1ff Fix a recent documentation change 1ab766fd58 Fix last change ecfe633993 * lisp/tab-bar.el: Last-minute changes. c1ce9fa7f2 * lisp/subr.el (cancel-change-group): Fix bug#39680 ef5744a988 Improve docs for horizontal scrolling with mouse and touch... 1bc3fa0bd0 * lisp/emacs-lisp/package.el (package-install): Fix typo i... 4537976afd Port .gdbinit to clang with -gdwarf-4 0883c800a0 Simplify rx example in manual a695189248 ; * etc/NEWS: Fix typo. # Conflicts: # etc/NEWS commit a2b07f9f11474dbcedd7cce39d2fa795bb23f692 Author: Eli Zaretskii Date: Fri Mar 13 12:32:52 2020 +0200 ; * etc/NEWS: Explain how to get back old behavior with --eval. diff --git a/etc/NEWS b/etc/NEWS index c7cca9c4dd..6300319169 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -360,6 +360,14 @@ its '--eval' command-line option), as well as in 'lisp-interaction-mode' and 'ielm-mode', used in the "*scratch*" and "*ielm*" buffers. +We envision that most Lisp code is already either written with +lexical-binding in mind, or will work unchanged under +lexical-binding. If, for some reason, your code used in 'M-:' or +'--eval' doesn't work as result of this change, either modify the code +to work with lexical binding, or wrap it in an extra level of 'eval'. +For example, --eval FORM becomes --eval "(eval 'FORM)" (note the extra +quote in 'FORM). + --- ** The new user option 'tooltip-resize-echo-area' avoids truncating tooltip text on GUI frames when tooltips are displayed in the echo commit b468b3d1ffa9f22a8a421b1037f7e397903913c3 Author: Eli Zaretskii Date: Fri Mar 13 12:24:25 2020 +0200 Fix a recent documentation change * doc/emacs/frames.texi (Mouse Commands): More detailed description of how tilting the mouse-wheel works. * lisp/mwheel.el (mouse-wheel-tilt-scroll) (mouse-wheel-flip-direction): Fix the wording of doc strings. (Bug#39979) diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 16205e6e0c..7a583b96bb 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -217,11 +217,15 @@ default bound to scrolling with the @key{Ctrl} modifier. @vindex mouse-wheel-tilt-scroll @vindex mouse-wheel-flip-direction Emacs can also support horizontal scrolling if your mouse's wheel can -be tilted, or your touchpad supports it. This feature is off by -default; the variable @code{mouse-wheel-tilt-scroll} turns it on. If -you'd like to reverse the direction of horizontal scrolling, customize -the variable @code{mouse-wheel-flip-direction} to a non-@code{nil} -value. +be tilted, or if your touchpad supports it. This feature is off by +default; the variable @code{mouse-wheel-tilt-scroll} turns it on, if +you customize it to a non-@code{nil} value. By default, tilting the +mouse wheel scrolls the window's view horizontally in the direction of +the tilt: e.g., tilting to the right scrolls the window to the right, +so that the text displayed in the window moves horizontally to the +left. If you'd like to reverse the direction of horizontal scrolling, +customize the variable @code{mouse-wheel-flip-direction} to a +non-@code{nil} value. When the mouse pointer is over an image, scrolling the mouse wheel with the @key{Ctrl} modifier scales the image under the mouse pointer. diff --git a/lisp/mwheel.el b/lisp/mwheel.el index 79977ef864..317f2cd8ed 100644 --- a/lisp/mwheel.el +++ b/lisp/mwheel.el @@ -145,7 +145,7 @@ face height." ;;; For tilt-scroll ;;; (defcustom mouse-wheel-tilt-scroll nil - "Enable horizontal scrolling via mouse or touchpad. + "Enable horizontal scrolling by tilting mouse wheel or via touchpad. Also see `mouse-wheel-flip-direction'." :group 'mouse :type 'boolean @@ -153,8 +153,11 @@ Also see `mouse-wheel-flip-direction'." (defcustom mouse-wheel-flip-direction nil "Swap direction of `wheel-right' and `wheel-left'. -This inverts the direction of horizontal scrolling. Also see -`mouse-wheel-tilt-scroll'." +By default, `wheel-right' scrolls the text to the right, +and `wheel-left' scrolls in the other direction. +If this variable is non-nil, it inverts the direction of +horizontal scrolling by tilting the mouse wheel. +Also see `mouse-wheel-tilt-scroll'." :group 'mouse :type 'boolean :version "26.1") commit 099520ec95baad177f58a687d70818bc8f602703 Merge: f7e313956a caed687626 Author: Michael Albinus Date: Fri Mar 13 10:55:27 2020 +0100 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs commit f7e313956a3799da658b3a988e9645ee8a57bef3 Author: Michael Albinus Date: Fri Mar 13 10:54:56 2020 +0100 * lisp/net/tramp.el (tramp-accept-process-output): Propagate `quit' signal. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index c498f8c25e..3ce2225cb8 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -4195,18 +4195,21 @@ performed successfully. Any other value means an error." (defun tramp-accept-process-output (proc &optional timeout) "Like `accept-process-output' for Tramp processes. This is needed in order to hide `last-coding-system-used', which is set -for process communication also." +for process communication also. +If the user quits via `C-g', it is propagated up to `tramp-file-name-handler'." (with-current-buffer (process-buffer proc) (let ((inhibit-read-only t) last-coding-system-used result) - ;; JUST-THIS-ONE is set due to Bug#12145. - (tramp-message - proc 10 "%s %s %s %s\n%s" - proc timeout (process-status proc) - (with-local-quit - (setq result (accept-process-output proc timeout nil t))) - (buffer-string)) + ;; JUST-THIS-ONE is set due to Bug#12145. `with-local-quit' + ;; returns t in order to report success. + (if (with-local-quit + (setq result (accept-process-output proc timeout nil t)) t) + (tramp-message + proc 10 "%s %s %s %s\n%s" + proc timeout (process-status proc) result (buffer-string)) + ;; Propagate quit. + (keyboard-quit)) result))) (defun tramp-search-regexp (regexp) commit caed6876267e0370941a5286e78bd7b63c6c3f47 Author: Pieter van Oostrum Date: Tue Mar 3 16:27:21 2020 +0100 * lisp/emacs-lisp/package.el (package-menu--generate): Fix doc string. Add REMEMBER-POS to docstring (bug#39861). diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 43eb038a86..6d6b31f1f3 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -3042,6 +3042,7 @@ column in the header line." (defun package-menu--generate (remember-pos &optional packages keywords) "Populate and display the Package Menu. +If REMEMBER-POS is non-nil, keep point on the same entry. PACKAGES should be t, which means to display all known packages, or a list of package names (symbols) to display. commit 1ab766fd5814ee30d810fb82c0db6eb66320ec3d Author: Eli Zaretskii Date: Fri Mar 13 09:46:47 2020 +0200 Fix last change * lisp/tab-bar.el (tab-bar-new-button-show): Fix wording of the doc string. diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index e2ea11d2af..8c2027eb6a 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -266,7 +266,8 @@ before calling the command that adds a new tab." :version "27.1") (defcustom tab-bar-new-button-show t - "Defines whether to show the new tab button." + "If non-nil, show the \"New tab\" button in the tab bar. +When this is nil, you can create new tabs with \\[tab-new]." :type 'boolean :initialize 'custom-initialize-default :set (lambda (sym val) commit ecfe633993a12cc1475bb9282178e238e8025a13 Author: Juri Linkov Date: Fri Mar 13 02:10:55 2020 +0200 * lisp/tab-bar.el: Last-minute changes. * lisp/tab-bar.el (tab-bar-mode): Check for non-nil tab-bar-new-button and tab-bar-close-button. (tab-bar-new-button-show): New defcustom. (tab-bar-make-keymap-1): Check for tab-bar-new-button-show. (tab-bar-separator): Add docstring. diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index fac27f41ba..e2ea11d2af 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -123,7 +123,8 @@ Possible modifiers are `control', `meta', `shift', `hyper', `super' and (assq-delete-all 'tab-bar-lines default-frame-alist))))) - (when (and tab-bar-mode (not (get-text-property 0 'display tab-bar-new-button))) + (when (and tab-bar-mode tab-bar-new-button + (not (get-text-property 0 'display tab-bar-new-button))) ;; This file is pre-loaded so only here we can use the right data-directory: (add-text-properties 0 (length tab-bar-new-button) `(display (image :type xpm @@ -132,7 +133,8 @@ Possible modifiers are `control', `meta', `shift', `hyper', `super' and :ascent center)) tab-bar-new-button)) - (when (and tab-bar-mode (not (get-text-property 0 'display tab-bar-close-button))) + (when (and tab-bar-mode tab-bar-close-button + (not (get-text-property 0 'display tab-bar-close-button))) ;; This file is pre-loaded so only here we can use the right data-directory: (add-text-properties 0 (length tab-bar-close-button) `(display (image :type xpm @@ -263,6 +265,16 @@ before calling the command that adds a new tab." :group 'tab-bar :version "27.1") +(defcustom tab-bar-new-button-show t + "Defines whether to show the new tab button." + :type 'boolean + :initialize 'custom-initialize-default + :set (lambda (sym val) + (set-default sym val) + (force-mode-line-update)) + :group 'tab-bar + :version "27.1") + (defvar tab-bar-new-button " + " "Button for creating a new tab.") @@ -306,7 +318,8 @@ This helps to select the tab by its number using `tab-bar-select-tab'." :group 'tab-bar :version "27.1") -(defvar tab-bar-separator nil) +(defvar tab-bar-separator nil + "String that delimits tabs.") (defcustom tab-bar-tab-name-function #'tab-bar-tab-name-current @@ -464,9 +477,9 @@ Return its existing value or a new value." (interactive) (tab-bar-close-tab ,i))))))) tabs) - (when tab-bar-new-button - `((sep-add-tab menu-item ,separator ignore) - (add-tab menu-item ,tab-bar-new-button tab-bar-new-tab + `((sep-add-tab menu-item ,separator ignore)) + (when (and tab-bar-new-button-show tab-bar-new-button) + `((add-tab menu-item ,tab-bar-new-button tab-bar-new-tab :help "New tab")))))) commit c1ce9fa7f2b1d88637e8d8f03f08d8ddd2ff9e4a Author: Stefan Monnier Date: Thu Mar 12 10:01:54 2020 -0400 * lisp/subr.el (cancel-change-group): Fix bug#39680 Don't re-use an existing `pending-undo-list` even if (eq last-command 'undo) since there might have been changes to the buffer since that `undo` command and the `pending-undo-list` can hence be invalid for the current buffer contents. diff --git a/lisp/subr.el b/lisp/subr.el index 5b94343e49..a744cfddfd 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2964,13 +2964,18 @@ This finishes the change group by reverting all of its changes." ;; the body of `atomic-change-group' all changes can be undone. (widen) (let ((old-car (car-safe elt)) - (old-cdr (cdr-safe elt))) + (old-cdr (cdr-safe elt)) + ;; Use `pending-undo-list' temporarily since `undo-more' needs + ;; it, but restore it afterwards so as not to mess with an + ;; ongoing sequence of `undo's. + (pending-undo-list + ;; Use `buffer-undo-list' unconditionally (bug#39680). + buffer-undo-list)) (unwind-protect (progn ;; Temporarily truncate the undo log at ELT. (when (consp elt) (setcar elt nil) (setcdr elt nil)) - (unless (eq last-command 'undo) (undo-start)) ;; Make sure there's no confusion. (when (and (consp elt) (not (eq elt (last pending-undo-list)))) (error "Undoing to some unrelated state")) commit ef5744a988f299c1b8b4726ee0d5bf9c1c1074f5 Author: İ. Göktuğ Kayaalp Date: Sun Mar 8 00:15:01 2020 +0300 Improve docs for horizontal scrolling with mouse and touchpad (Bug#39979) * lisp/mwheel.el (mouse-wheel-tilt-scroll, mouse-wheel-flip-direction): Improve docstrings. * doc/emacs/frames.texi (Mouse Commands): Mention touchpads. diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 002297c259..16205e6e0c 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -217,10 +217,11 @@ default bound to scrolling with the @key{Ctrl} modifier. @vindex mouse-wheel-tilt-scroll @vindex mouse-wheel-flip-direction Emacs can also support horizontal scrolling if your mouse's wheel can -be tilted. This feature is off by default; the variable -@code{mouse-wheel-tilt-scroll} turns it on. If you'd like to reverse -the direction of horizontal scrolling, customize the variable -@code{mouse-wheel-flip-direction} to a non-@code{nil} value. +be tilted, or your touchpad supports it. This feature is off by +default; the variable @code{mouse-wheel-tilt-scroll} turns it on. If +you'd like to reverse the direction of horizontal scrolling, customize +the variable @code{mouse-wheel-flip-direction} to a non-@code{nil} +value. When the mouse pointer is over an image, scrolling the mouse wheel with the @key{Ctrl} modifier scales the image under the mouse pointer. diff --git a/lisp/mwheel.el b/lisp/mwheel.el index 56150c803f..79977ef864 100644 --- a/lisp/mwheel.el +++ b/lisp/mwheel.el @@ -145,13 +145,16 @@ face height." ;;; For tilt-scroll ;;; (defcustom mouse-wheel-tilt-scroll nil - "Enable scroll using tilting mouse wheel." + "Enable horizontal scrolling via mouse or touchpad. +Also see `mouse-wheel-flip-direction'." :group 'mouse :type 'boolean :version "26.1") (defcustom mouse-wheel-flip-direction nil - "Swap direction of `wheel-right' and `wheel-left'." + "Swap direction of `wheel-right' and `wheel-left'. +This inverts the direction of horizontal scrolling. Also see +`mouse-wheel-tilt-scroll'." :group 'mouse :type 'boolean :version "26.1") commit 1bc3fa0bd02cb167ae82b65fc56f95651d2bea16 Author: Juri Linkov Date: Tue Mar 10 01:41:15 2020 +0200 * lisp/emacs-lisp/package.el (package-install): Fix typo in docstring. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 10ce19525a..a55d6a3f62 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -2046,7 +2046,7 @@ Mark the installed package as selected by adding it to When called from Lisp and optional argument DONT-SELECT is non-nil, install the package but do not add it to -`package-select-packages'. +`package-selected-packages'. If PKG is a `package-desc' and it is already installed, don't try to install it but still mark it as selected." commit 4537976afda2dfe2d20f2f572ca64c71ec8425ec Author: Paul Eggert Date: Mon Mar 9 12:24:21 2020 -0700 Port .gdbinit to clang with -gdwarf-4 * src/.gdbinit (xgetsym): Port to clang with -gdwarf-4, which doesn’t output the type of lispsym anywhere other than emacs.o (Bug#39962). diff --git a/src/.gdbinit b/src/.gdbinit index 5dd0133715..30c7b055ce 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -72,7 +72,7 @@ end define xgetsym xgetptr $arg0 - set $ptr = ((struct Lisp_Symbol *) ((char *)lispsym + $ptr)) + set $ptr = ((struct Lisp_Symbol *) ((char *) &lispsym + $ptr)) end # Access the name of a symbol commit 0883c800a0bfa259aa5ef876722b839a9592dbe0 Author: Mattias Engdegård Date: Mon Mar 9 12:13:45 2020 +0100 Simplify rx example in manual * doc/lispref/searching.texi (Rx Notation): Use the 'not' shorthand introduced in Emacs 27. diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index 1a090ebe10..83c154938c 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi @@ -1021,8 +1021,8 @@ or, using shorter synonyms and written more compactly, @example @group (rx "/*" - (* (| (not (any "*")) - (: "*" (not (any "/"))))) + (* (| (not "*") + (: "*" (not "/")))) (+ "*") "/") @end group @end example commit a695189248504453639209580306ace72475b4a1 Author: Michael Albinus Date: Mon Mar 9 15:49:05 2020 +0100 ; * etc/NEWS: Fix typo. diff --git a/etc/NEWS b/etc/NEWS index 1eff926114..c7cca9c4dd 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -779,7 +779,7 @@ an offset to absolute line numbers. ** table +++ -*** 'table-generate-source' now supports wiki and mediawiki +*** 'table-generate-source' now supports wiki and mediawiki. This command can now output wiki and mediawiki format tables. ** telnet-mode