commit dfd76688beac1d99a9cdcfe375e0a125cb039b8f (HEAD, refs/remotes/origin/master) Author: Michael Albinus Date: Tue Feb 22 08:50:17 2022 +0100 * test/lisp/net/tramp-tests.el (tramp--test-check-files): Adapt test. diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 2ce7881543..4e74f2aa73 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -6533,8 +6533,8 @@ This requires restrictions of file name syntax." ;; processes in Emacs. That doesn't work ;; for tramp-adb.el. tramp-sshfs.el times ;; out for older Emacsen, reason unknown. - (or (not (tramp--test-adb-p)) - (not (tramp--test-sshfs-p)) + (or (and (not (tramp--test-adb-p)) + (not (tramp--test-sshfs-p))) (tramp--test-emacs27-p))) (let ((default-directory file1)) (dolist (this-shell-command commit 8d02624c0ec029ee99e0b1e410429c440bcc4499 Author: Po Lu Date: Tue Feb 22 14:10:29 2022 +0800 Fix duplicate wheel events on XI2 * src/xterm.c (handle_one_xevent): Don't generate wheel events on XI_ButtonPress. diff --git a/src/xterm.c b/src/xterm.c index 629a098b55..dce0bf306a 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -11393,22 +11393,25 @@ handle_one_xevent (struct x_display_info *dpyinfo, { if (xev->detail >= 4 && xev->detail <= 8) { - if (xev->detail <= 5) - inev.ie.kind = WHEEL_EVENT; - else - inev.ie.kind = HORIZ_WHEEL_EVENT; + if (xev->evtype == XI_ButtonRelease) + { + if (xev->detail <= 5) + inev.ie.kind = WHEEL_EVENT; + else + inev.ie.kind = HORIZ_WHEEL_EVENT; - inev.ie.timestamp = xev->time; + inev.ie.timestamp = xev->time; - XSETINT (inev.ie.x, lrint (xev->event_x)); - XSETINT (inev.ie.y, lrint (xev->event_y)); - XSETFRAME (inev.ie.frame_or_window, f); + XSETINT (inev.ie.x, lrint (xev->event_x)); + XSETINT (inev.ie.y, lrint (xev->event_y)); + XSETFRAME (inev.ie.frame_or_window, f); - inev.ie.modifiers - |= x_x_to_emacs_modifiers (dpyinfo, - xev->mods.effective); + inev.ie.modifiers + |= x_x_to_emacs_modifiers (dpyinfo, + xev->mods.effective); - inev.ie.modifiers |= xev->detail % 2 ? down_modifier : up_modifier; + inev.ie.modifiers |= xev->detail % 2 ? down_modifier : up_modifier; + } goto XI_OTHER; } commit 6d060a38ec46db05598d38e577980ec8dbf7b691 Author: Po Lu Date: Tue Feb 22 14:01:31 2022 +0800 Always send wheel events on XI2 * src/xterm.c (handle_one_xevent): Send emulated button events as wheel events when handling XI2 button events. diff --git a/src/xterm.c b/src/xterm.c index 6efefd0301..629a098b55 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -11391,6 +11391,28 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (f) { + if (xev->detail >= 4 && xev->detail <= 8) + { + if (xev->detail <= 5) + inev.ie.kind = WHEEL_EVENT; + else + inev.ie.kind = HORIZ_WHEEL_EVENT; + + inev.ie.timestamp = xev->time; + + XSETINT (inev.ie.x, lrint (xev->event_x)); + XSETINT (inev.ie.y, lrint (xev->event_y)); + XSETFRAME (inev.ie.frame_or_window, f); + + inev.ie.modifiers + |= x_x_to_emacs_modifiers (dpyinfo, + xev->mods.effective); + + inev.ie.modifiers |= xev->detail % 2 ? down_modifier : up_modifier; + + goto XI_OTHER; + } + /* Is this in the tab-bar? */ if (WINDOWP (f->tab_bar_window) && WINDOW_TOTAL_LINES (XWINDOW (f->tab_bar_window))) commit bee54495e92ddf5d75e3f68ac7e823b221306719 Merge: 6b0e23412d 666e40a109 Author: Stefan Kangas Date: Tue Feb 22 06:30:59 2022 +0100 Merge from origin/emacs-28 666e40a109 Fix 'display-line-numbers-mode' in hide-show buffers 68d134cf0f Don't check whether a deleted window is deletable (Bug#54028) b38223a844 A friendlier error message from image-mode in an empty buffer b7a651ba37 Update to Org 9.5.2-17-gea6b74 3a8c3f7abd ; Don't reference obsolete variables in edebug.el commit 6b0e23412d367a3b90db01de9456431158525938 Author: Po Lu Date: Tue Feb 22 11:35:27 2022 +0800 Improve momentum pixel scrolling on a non-selected window * lisp/pixel-scroll.el (pixel-scroll-kinetic-state): New argument `window'. (pixel-scroll-start-momentum): Don't select the window under the event when calculating velocity or redisplaying. diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el index 54724ca328..463e106c7a 100644 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el @@ -699,11 +699,12 @@ wheel." (message (error-message-string '(end-of-buffer)))))))))) (mwheel-scroll event nil)))) -(defun pixel-scroll-kinetic-state () - "Return the kinetic scroll state of the current window. +(defun pixel-scroll-kinetic-state (&optional window) + "Return the kinetic scroll state of WINDOW. +If WINDOW is nil, return the state of the current window. It is a vector of the form [ VELOCITY TIME SIGN ]." - (or (window-parameter nil 'kinetic-state) - (set-window-parameter nil 'kinetic-state + (or (window-parameter window 'kinetic-state) + (set-window-parameter window 'kinetic-state (vector (make-ring 30) nil nil)))) (defun pixel-scroll-accumulate-velocity (delta) @@ -737,53 +738,54 @@ It is a vector of the form [ VELOCITY TIME SIGN ]." (when pixel-scroll-precision-use-momentum (let ((window (mwheel-event-window event)) (state nil)) - (with-selected-window window - (setq state (pixel-scroll-kinetic-state)) - (when (and (aref state 1) - (listp (aref state 0))) - (condition-case nil - (while-no-input - (unwind-protect (progn - (aset state 0 (pixel-scroll-calculate-velocity state)) - (when (> (abs (aref state 0)) - pixel-scroll-precision-momentum-min-velocity) - (let* ((velocity (aref state 0)) - (original-velocity velocity) - (time-spent 0)) - (if (> velocity 0) - (while (and (> velocity 0) - (<= time-spent - pixel-scroll-precision-momentum-seconds)) - (when (> (round velocity) 0) - (pixel-scroll-precision-scroll-up (round velocity))) - (setq velocity (- velocity - (/ original-velocity - (/ pixel-scroll-precision-momentum-seconds - pixel-scroll-precision-momentum-tick)))) - (redisplay t) - (sit-for pixel-scroll-precision-momentum-tick) - (setq time-spent (+ time-spent - pixel-scroll-precision-momentum-tick)))) - (while (and (< velocity 0) - (<= time-spent - pixel-scroll-precision-momentum-seconds)) - (when (> (round (abs velocity)) 0) + (setq state (pixel-scroll-kinetic-state window)) + (when (and (aref state 1) + (listp (aref state 0))) + (condition-case nil + (while-no-input + (unwind-protect (progn + (aset state 0 (pixel-scroll-calculate-velocity state)) + (when (> (abs (aref state 0)) + pixel-scroll-precision-momentum-min-velocity) + (let* ((velocity (aref state 0)) + (original-velocity velocity) + (time-spent 0)) + (if (> velocity 0) + (while (and (> velocity 0) + (<= time-spent + pixel-scroll-precision-momentum-seconds)) + (when (> (round velocity) 0) + (with-selected-window window + (pixel-scroll-precision-scroll-up (round velocity)))) + (setq velocity (- velocity + (/ original-velocity + (/ pixel-scroll-precision-momentum-seconds + pixel-scroll-precision-momentum-tick)))) + (redisplay t) + (sit-for pixel-scroll-precision-momentum-tick) + (setq time-spent (+ time-spent + pixel-scroll-precision-momentum-tick)))) + (while (and (< velocity 0) + (<= time-spent + pixel-scroll-precision-momentum-seconds)) + (when (> (round (abs velocity)) 0) + (with-selected-window window (pixel-scroll-precision-scroll-down (round - (abs velocity)))) - (setq velocity (+ velocity - (/ (abs original-velocity) - (/ pixel-scroll-precision-momentum-seconds - pixel-scroll-precision-momentum-tick)))) - (redisplay t) - (sit-for pixel-scroll-precision-momentum-tick) - (setq time-spent (+ time-spent - pixel-scroll-precision-momentum-tick)))))) - (aset state 0 (make-ring 30)) - (aset state 1 nil))) - (beginning-of-buffer - (message (error-message-string '(beginning-of-buffer)))) - (end-of-buffer - (message (error-message-string '(end-of-buffer)))))))))) + (abs velocity))))) + (setq velocity (+ velocity + (/ (abs original-velocity) + (/ pixel-scroll-precision-momentum-seconds + pixel-scroll-precision-momentum-tick)))) + (redisplay t) + (sit-for pixel-scroll-precision-momentum-tick) + (setq time-spent (+ time-spent + pixel-scroll-precision-momentum-tick)))))) + (aset state 0 (make-ring 30)) + (aset state 1 nil))) + (beginning-of-buffer + (message (error-message-string '(beginning-of-buffer)))) + (end-of-buffer + (message (error-message-string '(end-of-buffer))))))))) (defun pixel-scroll-interpolate-down () "Interpolate a scroll downwards by one page." commit f654080513b757f37d829521a50aa62bd5904767 Author: Po Lu Date: Tue Feb 22 10:38:53 2022 +0800 Don't generate multibyte keystroke events if there is no actual text * src/xterm.c (handle_one_xevent): Don't generate MULTIBYTE_CHAR_KEYSTROKE_EVENTs if nbytes is zero. diff --git a/src/xterm.c b/src/xterm.c index ca74f6cbd9..6efefd0301 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -10127,11 +10127,14 @@ handle_one_xevent (struct x_display_info *dpyinfo, STORE_KEYSYM_FOR_DEBUG (copy_bufptr[i]); } - inev.ie.kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT; - inev.ie.arg = make_unibyte_string ((char *) copy_bufptr, nbytes); + if (nbytes) + { + inev.ie.kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT; + inev.ie.arg = make_unibyte_string ((char *) copy_bufptr, nbytes); - Fput_text_property (make_fixnum (0), make_fixnum (nbytes), - Qcoding, coding, inev.ie.arg); + Fput_text_property (make_fixnum (0), make_fixnum (nbytes), + Qcoding, coding, inev.ie.arg); + } if (keysym == NoSymbol) break; @@ -11842,11 +11845,14 @@ handle_one_xevent (struct x_display_info *dpyinfo, STORE_KEYSYM_FOR_DEBUG (copy_bufptr[i]); } - inev.ie.kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT; - inev.ie.arg = make_unibyte_string (copy_bufptr, nbytes); + if (nbytes) + { + inev.ie.kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT; + inev.ie.arg = make_unibyte_string (copy_bufptr, nbytes); - Fput_text_property (make_fixnum (0), make_fixnum (nbytes), - Qcoding, coding, inev.ie.arg); + Fput_text_property (make_fixnum (0), make_fixnum (nbytes), + Qcoding, coding, inev.ie.arg); + } goto xi_done_keysym; } commit 6f8f51db4d96e9b4ceea64aa6f49dd632e965a51 Author: Lars Ingebrigtsen Date: Tue Feb 22 03:32:52 2022 +0100 Add links to the vtable manual * doc/lispref/modes.texi (Tabulated List Mode): Mention vtables. * lisp/info-look.el (lambda): Link to vtables. diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 2ef7de066f..570ffe1726 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -1061,12 +1061,22 @@ very end of every properly-written major mode command. @cindex Tabulated List mode Tabulated List mode is a major mode for displaying tabulated data, -i.e., data consisting of @dfn{entries}, each entry occupying one row of -text with its contents divided into columns. Tabulated List mode +i.e., data consisting of @dfn{entries}, each entry occupying one row +of text with its contents divided into columns. Tabulated List mode provides facilities for pretty-printing rows and columns, and sorting the rows according to the values in each column. It is derived from Special mode (@pxref{Basic Major Modes}). +@findex make-vtable +@cindex variable pitch tables + Tabulated List mode is geared towards displaying text using +monospaced fonts, using a single font and text size. If you want to +display a table using variable pitch fonts or images, +@code{make-vtable} can be used instead. vtable also support having +more than a single table in a buffer, or having a buffer that contains +both a table and additional text in it. @ref{Introduction,,, vtable} +for more information. + Tabulated List mode is intended to be used as a parent mode by a more specialized major mode. Examples include Process Menu mode (@pxref{Process Information}) and Package Menu mode (@pxref{Package diff --git a/lisp/info-look.el b/lisp/info-look.el index 42e758360e..aa07c3f5e7 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -1074,6 +1074,7 @@ Return nil if there is nothing appropriate in the buffer near point." ("url" "Variable Index" "Function Index") ("vhdl" "(vhdl-mode)Variable Index" "(vhdl-mode)Command Index") ("viper" "Variable Index" "Function Index") + ("vtable" "Index") ("widget" "Index") ("wisent" "Index") ("woman" "Variable Index" "Command Index"))) commit 2312775928e556acc42b2b4fac2aced009533914 Author: Lars Ingebrigtsen Date: Tue Feb 22 03:18:13 2022 +0100 Remove the ELPA dependencies from test/Makefile.in * test/Makefile.in: Remove the ELPA dependencies, because it's pretty confusing when trying to debug things. * test/README (SELECTOR): Remove mention of the now-removed GNU_ELPA_DIRECTORY variable. * test/lisp/net/ntlm-tests.el (push): Add the ELPA dependencies here, which keeps it contained to one test file. This also fixes bug#53586, since the obsoletion of `body' came from web-server.el. diff --git a/test/Makefile.in b/test/Makefile.in index bc315ac4b3..708c4b2fb0 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -53,15 +53,6 @@ REPLACE_FREE = @REPLACE_FREE@ -include ${top_builddir}/src/verbose.mk -# Load any GNU ELPA dependencies that are present, for optional tests. -GNU_ELPA_DIRECTORY ?= $(srcdir)/../../elpa -# Keep elpa_dependencies dependency-ordered. -elpa_dependencies = \ - url-http-ntlm/url-http-ntlm.el \ - web-server/web-server.el -elpa_els = $(addprefix $(GNU_ELPA_DIRECTORY)/packages/,$(elpa_dependencies)) -elpa_opts = $(foreach el,$(elpa_els),$(and $(wildcard $(el)),-L $(dir $(el)) -l $(el))) - # We never change directory before running Emacs, so a relative file # name is fine, and makes life easier. If we need to change # directory, we can use emacs --chdir. @@ -72,7 +63,7 @@ EMACS_EXTRAOPT = # Command line flags for Emacs. # Apparently MSYS bash would convert "-L :" to "-L ;" anyway, # but we might as well be explicit. -EMACSOPT = --no-init-file --no-site-file --no-site-lisp -L "$(SEPCHAR)$(srcdir)" $(elpa_opts) $(EMACS_EXTRAOPT) +EMACSOPT = --no-init-file --no-site-file --no-site-lisp -L "$(SEPCHAR)$(srcdir)" $(EMACS_EXTRAOPT) # Prevent any settings in the user environment causing problems. unexport EMACSDATA EMACSDOC EMACSLOADPATH EMACSPATH GREP_OPTIONS XDG_CONFIG_HOME @@ -101,7 +92,7 @@ export TEST_LOAD_EL ?= \ $(if $(findstring $(MAKECMDGOALS), all check check-maybe),no,yes) # Additional settings for ert. -ert_opts += $(elpa_opts) +ert_opts = # Maximum length of lines in ert backtraces; nil for no limit. # (if empty, use the default ert-batch-backtrace-right-margin). diff --git a/test/README b/test/README index 2ab34ba20e..3d865de78b 100644 --- a/test/README +++ b/test/README @@ -126,12 +126,6 @@ to a suitable value in order to overwrite the default value: env REMOTE_TEMPORARY_FILE_DIRECTORY=/ssh:host:/tmp make ... -Some optional tests require packages from GNU ELPA. By default -../../elpa will be checked for these packages. If GNU ELPA is checked -out somewhere else, use - - make GNU_ELPA_DIRECTORY=/path/to/elpa ... - There are also continuous integration tests on (see diff --git a/test/lisp/net/ntlm-tests.el b/test/lisp/net/ntlm-tests.el index f740703232..a02d97f19a 100644 --- a/test/lisp/net/ntlm-tests.el +++ b/test/lisp/net/ntlm-tests.el @@ -234,8 +234,13 @@ This string will be returned from the NTLM server to the NTLM client." (declare-function ws-start nil) (declare-function ws-stop-all nil) -(require 'web-server nil t) -(require 'url-http-ntlm nil t) +(eval-and-compile + (push (expand-file-name "../elpa/packages/web-server/" source-directory) + load-path) + (require 'web-server nil t) + (push (expand-file-name "../elpa/packages/url-http-ntlm/" source-directory) + load-path) + (require 'url-http-ntlm nil t)) (defun ntlm-server-do-token (request _process) "Process an NTLM client's REQUEST. commit 993e8b010c98d017d74a7ba22c9fb9549a6d5d75 Author: Po Lu Date: Tue Feb 22 01:33:56 2022 +0000 Don't pass invalid keyboard modifiers to the event loop on Haiku * src/haikuterm.c (haiku_read_socket): Ensure validity of extra keyboard modifiers. diff --git a/src/haikuterm.c b/src/haikuterm.c index b5b61ec85f..c184501a20 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -2703,7 +2703,13 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit) inev.timestamp = b->time / 1000; inev.modifiers = (haiku_modifiers_to_emacs (b->modifiers) - | extra_keyboard_modifiers); + | (extra_keyboard_modifiers + & (meta_modifier + | hyper_modifier + | ctrl_modifier + | alt_modifier + | shift_modifier))); + XSETFRAME (inev.frame_or_window, f); break; } commit 8e90216389feafb7391c56f8d8441562eaa13c9d Author: Stefan Monnier Date: Mon Feb 21 18:53:05 2022 -0500 * lisp/vc/diff-mode.el (diff--font-lock-prettify): Recognize mode changes diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index c28321e473..511cc89778 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -2636,6 +2636,7 @@ fixed, visit it in a buffer." " and " file5 " \\(?7:differ\\)\n")) (horb (concat "\\(?:" header "\\|" binary "\\)"))) (concat "diff.*?\\(?: a/\\(.*?\\) b/\\(.*\\)\\)?\n" + "\\(?:\\(?:old\\|new\\) mode .*\n\\)*" "\\(?:" ;; For new/deleted files, there might be no ;; header (and no hunk) if the file is/was empty. @@ -2647,6 +2648,8 @@ fixed, visit it in a buffer." ;; or from the two header lines. Prefer the header line info if ;; available since the `diff' line is ambiguous in case the ;; file names include " b/" or " a/". + ;; FIXME: This prettification throws away all the information + ;; about file modes (and the index hashes). (let ((oldfile (or (match-string 4) (match-string 1))) (newfile (or (match-string 5) (match-string 2))) (kind (if (match-beginning 7) " BINARY" commit 89f399324be874d42747ff67ee3bcdbe0b6120d1 Author: Stefan Monnier Date: Mon Feb 21 17:22:38 2022 -0500 * lisp/vc/diff-mode.el (diff--font-lock-prettify): bug#54034 Handle Git's output when deleting and creating empty files, as well as when the diff is not shown because the file is considered as binary. diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index fb622bb6f9..c28321e473 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -2615,29 +2615,60 @@ fixed, visit it in a buffer." 'display spec))))) ;; Mimicks the output of Magit's diff. ;; FIXME: This has only been tested with Git's diff output. + ;; FIXME: Add support for Git's "rename from/to"? (while (re-search-forward "^diff " limit t) + ;; We split the regexp match into a search plus a looking-at because + ;; we want to use LIMIT for the search but we still want to match + ;; all the header's lines even if LIMIT falls in the middle of it. (when (save-excursion (forward-line 0) (looking-at (eval-when-compile - (concat "diff.*\n" - "\\(?:\\(?:new file\\|deleted\\).*\n\\)?" - "\\(?:index.*\n\\)?" - "--- \\(?:" null-device "\\|[ab]/\\(.*\\)\\)\n" - "\\+\\+\\+ \\(?:" null-device "\\|[ab]/\\(.*\\)\\)\n")))) - (add-text-properties - (match-beginning 0) (1- (match-end 0)) - (list 'display - (propertize - (cond - ((null (match-string 1)) - (concat "new file " (match-string 2))) - ((null (match-string 2)) - (concat "deleted " (match-string 1))) - (t - (concat "modified " (match-string 1)))) - 'face '(diff-file-header diff-header)) - 'font-lock-multiline t))))) + (let* ((index "\\(?:index.*\n\\)?") + (file4 (concat + "\\(?:" null-device "\\|[ab]/\\(?4:.*\\)\\)")) + (file5 (concat + "\\(?:" null-device "\\|[ab]/\\(?5:.*\\)\\)")) + (header (concat "--- " file4 "\n" + "\\+\\+\\+ " file5 "\n")) + (binary (concat + "Binary files " file4 + " and " file5 " \\(?7:differ\\)\n")) + (horb (concat "\\(?:" header "\\|" binary "\\)"))) + (concat "diff.*?\\(?: a/\\(.*?\\) b/\\(.*\\)\\)?\n" + "\\(?:" + ;; For new/deleted files, there might be no + ;; header (and no hunk) if the file is/was empty. + "\\(?3:new\\(?6:\\)\\|deleted\\) file.*\n" + index "\\(?:" horb "\\)?" + ;; Normal case. + "\\|" index horb "\\)"))))) + ;; The file names can be extracted either from the `diff' line + ;; or from the two header lines. Prefer the header line info if + ;; available since the `diff' line is ambiguous in case the + ;; file names include " b/" or " a/". + (let ((oldfile (or (match-string 4) (match-string 1))) + (newfile (or (match-string 5) (match-string 2))) + (kind (if (match-beginning 7) " BINARY" + (unless (or (match-beginning 4) (match-beginning 5)) + " empty")))) + (add-text-properties + (match-beginning 0) (1- (match-end 0)) + (list 'display + (propertize + (cond + ((match-beginning 3) + (concat (capitalize (match-string 3)) kind " file" + " " + (if (match-beginning 6) newfile oldfile))) + ((null (match-string 4)) + (concat "New" kind " file " newfile)) + ((null (match-string 2)) + (concat "Deleted" kind " file " oldfile)) + (t + (concat "Modified" kind " file " oldfile))) + 'face '(diff-file-header diff-header)) + 'font-lock-multiline t)))))) nil) ;;; Syntax highlighting from font-lock commit 666e40a109ea6c0079467e72c806bb04191ff4cc (refs/remotes/origin/emacs-28) Author: Eli Zaretskii Date: Mon Feb 21 22:12:57 2022 +0200 Fix 'display-line-numbers-mode' in hide-show buffers * src/xdisp.c (redisplay_internal): Disable redisplay optimizations that consider just the current line, when 'display-line-numbers-mode' is turned on in the buffer. (Bug#54091) diff --git a/src/xdisp.c b/src/xdisp.c index aa70b933f1..3f283d6732 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -15860,6 +15860,14 @@ redisplay_internal (void) /* Point must be on the line that we have info recorded about. */ && PT >= CHARPOS (tlbufpos) && PT <= Z - CHARPOS (tlendpos) + /* FIXME: The following condition is only needed when + significant parts of the buffer are hidden (e.g., under + hs-minor-mode), but there doesn't seem to be a simple way of + detecting that, so we always disable the one-line redisplay + optimizations whenever display-line-numbers-mode is turned on + in the buffer. */ + && (NILP (Vdisplay_line_numbers) + || EQ (Vdisplay_line_numbers, Qvisual)) /* All text outside that line, including its final newline, must be unchanged. */ && text_outside_line_unchanged_p (w, CHARPOS (tlbufpos), commit de003cb2b555719a005516b7791a6f6c3c11f9a3 Author: Lars Ingebrigtsen Date: Mon Feb 21 19:19:55 2022 +0100 Improve vtable :keymap handling * lisp/emacs-lisp/vtable.el (vtable-map, vtable--make-keymap): Don't alter keymaps passed in, and respect parent keymaps. diff --git a/lisp/emacs-lisp/vtable.el b/lisp/emacs-lisp/vtable.el index 0884986030..2c61996637 100644 --- a/lisp/emacs-lisp/vtable.el +++ b/lisp/emacs-lisp/vtable.el @@ -61,7 +61,6 @@ "A object to hold the data for a table.") (defvar-keymap vtable-map - :suppress t "S" #'vtable-sort-by-current-column "{" #'vtable-narrow-current-column "}" #'vtable-widen-current-column @@ -634,7 +633,15 @@ This also updates the displayed table." (setq actions (cddr actions)))) (if (vtable-keymap table) (progn - (set-keymap-parent (vtable-keymap table) map) + (setf (vtable-keymap table) + (copy-keymap (vtable-keymap table))) + ;; Respect any previously set parent keymaps. + (set-keymap-parent (vtable-keymap table) + (if (keymap-parent (vtable-keymap table)) + (append (ensure-list + (vtable-keymap table)) + (list map)) + map)) (vtable-keymap table)) map))) commit 9df5e3080066341d78489f0b18eabeeccac76b0c Author: Jim Porter Date: Tue Feb 1 19:16:00 2022 -0800 Send SIGPIPE to external Eshell processes if their output target closes * lisp/eshell/esh-io.el (eshell-pipe-broken): New error. (eshell-output-object-to-target): Signal 'eshell-pipe-broken' if the target is an exited/signaled process. * lisp/eshell/esh-proc.el (eshell-insertion-filter): Handle 'eshell-pipe-broken'. * test/lisp/eshell/esh-proc-tests.el: New test. diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el index fc1124561a..3644c1a18b 100644 --- a/lisp/eshell/esh-io.el +++ b/lisp/eshell/esh-io.el @@ -150,6 +150,8 @@ not be added to this variable." :risky t :group 'eshell-io) +(define-error 'eshell-pipe-broken "Pipe broken") + ;;; Internal Variables: (defvar eshell-current-handles nil) @@ -481,10 +483,12 @@ Returns what was actually sent, or nil if nothing was sent." (goto-char target)))))) ((eshell-processp target) - (when (eq (process-status target) 'run) - (unless (stringp object) - (setq object (eshell-stringify object))) - (process-send-string target object))) + (unless (stringp object) + (setq object (eshell-stringify object))) + (condition-case nil + (process-send-string target object) + ;; If `process-send-string' raises an error, treat it as a broken pipe. + (error (signal 'eshell-pipe-broken target)))) ((consp target) (apply (car target) object (cdr target)))) diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index bb2136c06c..ed37de85f7 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -386,8 +386,27 @@ output." (let ((data (nth 3 entry))) (setcar (nthcdr 3 entry) nil) (setcar (nthcdr 4 entry) t) - (eshell-output-object data nil (cadr entry)) - (setcar (nthcdr 4 entry) nil))))))))) + (unwind-protect + (condition-case nil + (eshell-output-object data nil (cadr entry)) + ;; FIXME: We want to send SIGPIPE to the process + ;; here. However, remote processes don't + ;; currently support that, and not all systems + ;; have SIGPIPE in the first place (e.g. MS + ;; Windows). In these cases, just delete the + ;; process; this is reasonably close to the + ;; right behavior, since the default action for + ;; SIGPIPE is to terminate the process. For use + ;; cases where SIGPIPE is truly needed, using an + ;; external pipe operator (`*|') may work + ;; instead (e.g. when working with remote + ;; processes). + (eshell-pipe-broken + (if (or (process-get proc 'remote-pid) + (eq system-type 'windows-nt)) + (delete-process proc) + (signal-process proc 'SIGPIPE)))) + (setcar (nthcdr 4 entry) nil)))))))))) (defun eshell-sentinel (proc string) "Generic sentinel for command processes. Reports only signals. @@ -416,8 +435,12 @@ PROC is the process that's exiting. STRING is the exit message." (lambda () (if (nth 4 entry) (run-at-time 0 nil finish-io) - (when str (eshell-output-object str nil handles)) - (eshell-close-handles status 'nil handles))))) + (unwind-protect + (when str + (eshell-output-object + str nil handles)) + (eshell-close-handles + status 'nil handles)))))) (funcall finish-io))))) (eshell-remove-process-entry entry)))) (eshell-kill-process-function proc string))))) diff --git a/test/lisp/eshell/esh-proc-tests.el b/test/lisp/eshell/esh-proc-tests.el new file mode 100644 index 0000000000..e7ea6c00d6 --- /dev/null +++ b/test/lisp/eshell/esh-proc-tests.el @@ -0,0 +1,45 @@ +;;; esh-proc-tests.el --- esh-proc test suite -*- lexical-binding:t -*- + +;; Copyright (C) 2022 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Code: + +(require 'ert) +(require 'esh-mode) +(require 'eshell) + +(require 'eshell-tests-helpers + (expand-file-name "eshell-tests-helpers" + (file-name-directory (or load-file-name + default-directory)))) + +(ert-deftest esh-proc-test/sigpipe-exits-process () + "Test that a SIGPIPE is properly sent to a process if a pipe closes" + (skip-unless (and (executable-find "sh") + (executable-find "echo") + (executable-find "sleep"))) + (with-temp-eshell + (eshell-command-result-p + ;; The first command is like `yes' but slower. This is to prevent + ;; it from taxing Emacs's process filter too much and causing a + ;; hang. + (concat "sh -c 'while true; do echo y; sleep 1; done' | " + "sh -c 'read NAME; echo ${NAME}'") + "y\n") + (eshell-wait-for-subprocess t) + (should (eq (process-list) nil)))) diff --git a/test/lisp/eshell/eshell-tests-helpers.el b/test/lisp/eshell/eshell-tests-helpers.el index 33cdd60113..f944194a2b 100644 --- a/test/lisp/eshell/eshell-tests-helpers.el +++ b/test/lisp/eshell/eshell-tests-helpers.el @@ -50,15 +50,18 @@ See `eshell-wait-for-subprocess'.") (let (kill-buffer-query-functions) (kill-buffer eshell-buffer)))))) -(defun eshell-wait-for-subprocess () +(defun eshell-wait-for-subprocess (&optional all) "Wait until there is no interactive subprocess running in Eshell. +If ALL is non-nil, wait until there are no Eshell subprocesses at +all running. + If this takes longer than `eshell-test--max-subprocess-time', raise an error." (let ((start (current-time))) - (while (eshell-interactive-process-p) + (while (if all eshell-process-list (eshell-interactive-process-p)) (when (> (float-time (time-since start)) eshell-test--max-subprocess-time) - (error "timed out waiting for subprocess")) + (error "timed out waiting for subprocess(es)")) (sit-for 0.1)))) (defun eshell-insert-command (text &optional func) commit 76429f4d1792b890c6fc69a5bd7a5cdef28d257a Author: Jim Porter Date: Wed Jan 19 21:57:38 2022 -0800 Ensure 'eshell-output-object' always returns nil for consistency This prevents functions like 'eshell-print' from writing doubled output when run in Eshell. Previously, the result would be: ~ $ eshell-print hi hihi * lisp/eshell/esh-io.el (eshell-output-object): Always return nil. diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el index e457f65c18..fc1124561a 100644 --- a/lisp/eshell/esh-io.el +++ b/lisp/eshell/esh-io.el @@ -491,14 +491,19 @@ Returns what was actually sent, or nil if nothing was sent." object) (defun eshell-output-object (object &optional handle-index handles) - "Insert OBJECT, using HANDLE-INDEX specifically)." + "Insert OBJECT, using HANDLE-INDEX specifically. +If HANDLE-INDEX is nil, output to `eshell-output-handle'. +HANDLES is the set of file handles to use; if nil, use +`eshell-current-handles'." (let ((target (car (aref (or handles eshell-current-handles) (or handle-index eshell-output-handle))))) - (if (and target (not (listp target))) - (eshell-output-object-to-target object target) - (while target - (eshell-output-object-to-target object (car target)) - (setq target (cdr target)))))) + (if (listp target) + (while target + (eshell-output-object-to-target object (car target)) + (setq target (cdr target))) + (eshell-output-object-to-target object target) + ;; Explicitly return nil to match the list case above. + nil))) (provide 'esh-io) ;;; esh-io.el ends here commit 76b91671a1403761d2bad999c69d24952898c04e Author: Jim Porter Date: Thu Jan 13 18:58:50 2022 -0800 Improve docstrings for 'eshell-exec-lisp' and functions that call it * lisp/eshell/esh-cmd.el (eshell-exec-lisp, eshell-apply*) (eshell-funcall*, eshell-eval*, eshell-apply, eshell-eval) (eshell-funcall, eshell-applyn, eshell-funcalln, eshell-evaln): Improve docstrings. diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index 5819506cc0..dceb061c8f 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -1292,8 +1292,9 @@ or an external command." (defun eshell-exec-lisp (printer errprint func-or-form args form-p) "Execute a Lisp FUNC-OR-FORM, maybe passing ARGS. PRINTER and ERRPRINT are functions to use for printing regular -messages, and errors. FORM-P should be non-nil if FUNC-OR-FORM -represent a Lisp form; ARGS will be ignored in that case." +messages and errors, respectively. FORM-P should be non-nil if +FUNC-OR-FORM represent a Lisp form; ARGS will be ignored in that +case." (eshell-condition-case err (let ((result (save-current-buffer @@ -1316,44 +1317,56 @@ represent a Lisp form; ARGS will be ignored in that case." (defsubst eshell-apply* (printer errprint func args) "Call FUNC, with ARGS, trapping errors and return them as output. PRINTER and ERRPRINT are functions to use for printing regular -messages, and errors." +messages and errors, respectively." (eshell-exec-lisp printer errprint func args nil)) (defsubst eshell-funcall* (printer errprint func &rest args) - "Call FUNC, with ARGS, trapping errors and return them as output." + "Call FUNC, with ARGS, trapping errors and return them as output. +PRINTER and ERRPRINT are functions to use for printing regular +messages and errors, respectively." (eshell-apply* printer errprint func args)) (defsubst eshell-eval* (printer errprint form) - "Evaluate FORM, trapping errors and returning them." + "Evaluate FORM, trapping errors and returning them. +PRINTER and ERRPRINT are functions to use for printing regular +messages and errors, respectively." (eshell-exec-lisp printer errprint form nil t)) (defsubst eshell-apply (func args) "Call FUNC, with ARGS, trapping errors and return them as output. -PRINTER and ERRPRINT are functions to use for printing regular -messages, and errors." - (eshell-apply* 'eshell-print 'eshell-error func args)) +Print the result using `eshell-print'; if an error occurs, print +it via `eshell-error'." + (eshell-apply* #'eshell-print #'eshell-error func args)) (defsubst eshell-funcall (func &rest args) - "Call FUNC, with ARGS, trapping errors and return them as output." + "Call FUNC, with ARGS, trapping errors and return them as output. +Print the result using `eshell-print'; if an error occurs, print +it via `eshell-error'." (eshell-apply func args)) (defsubst eshell-eval (form) - "Evaluate FORM, trapping errors and returning them." - (eshell-eval* 'eshell-print 'eshell-error form)) + "Evaluate FORM, trapping errors and returning them. +Print the result using `eshell-print'; if an error occurs, print +it via `eshell-error'." + (eshell-eval* #'eshell-print #'eshell-error form)) (defsubst eshell-applyn (func args) "Call FUNC, with ARGS, trapping errors and return them as output. -PRINTER and ERRPRINT are functions to use for printing regular -messages, and errors." - (eshell-apply* 'eshell-printn 'eshell-errorn func args)) +Print the result using `eshell-printn'; if an error occurs, print it +via `eshell-errorn'." + (eshell-apply* #'eshell-printn #'eshell-errorn func args)) (defsubst eshell-funcalln (func &rest args) - "Call FUNC, with ARGS, trapping errors and return them as output." + "Call FUNC, with ARGS, trapping errors and return them as output. +Print the result using `eshell-printn'; if an error occurs, print it +via `eshell-errorn'." (eshell-applyn func args)) (defsubst eshell-evaln (form) - "Evaluate FORM, trapping errors and returning them." - (eshell-eval* 'eshell-printn 'eshell-errorn form)) + "Evaluate FORM, trapping errors and returning them. +Print the result using `eshell-printn'; if an error occurs, print it +via `eshell-errorn'." + (eshell-eval* #'eshell-printn #'eshell-errorn form)) (defvar eshell-last-output-end) ;Defined in esh-mode.el. commit 7d6fa01ab8d56408320828a4ec212b7a9b13dd3f Author: Jim Porter Date: Sat Jan 29 17:28:23 2022 -0800 ; * lisp/eshell/esh-io.el (grep-null-device): Remove unused defvar. diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el index 8e6463eac2..e457f65c18 100644 --- a/lisp/eshell/esh-io.el +++ b/lisp/eshell/esh-io.el @@ -375,8 +375,6 @@ it defaults to `insert'." (error "Invalid redirection target: %s" (eshell-stringify target))))) -(defvar grep-null-device) - (defun eshell-set-output-handle (index mode &optional target) "Set handle INDEX, using MODE, to point to TARGET." (when target commit ce04647d4d19916a25f40615d7bf54539f92c222 Author: Eli Zaretskii Date: Mon Feb 21 19:01:14 2022 +0200 Revert "Remove PROBLEMS section on double-buffering" This reverts commit 366b2bc757d011f96693bd219877c5aa42fa3359. We cannot be sure this problem is no longer relevant, since its root cause was in software we don't control, and cannot tell whether any of the versions where that problem happened are still out in the wild. diff --git a/etc/PROBLEMS b/etc/PROBLEMS index f95564454c..4e4ec6d353 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -574,6 +574,21 @@ For example, simply moving through a file that contains hundreds of thousands of characters per line is slow, and consumes a lot of CPU. This is a known limitation of Emacs with no solution at this time. +*** Display artifacts on GUI frames on X-based systems. + +This is known to be caused by using double-buffering (which is enabled +by default in Emacs 26 and later). The artifacts typically appear +after commands that cause Emacs to scroll the display. + +You can disable double-buffering by evaluating the following form: + + (modify-all-frames-parameters '((inhibit-double-buffering . t))) + +To make this permanent, add it to your ~/.emacs init file. + +Note that disabling double-buffering will cause flickering of the +display in some situations. + *** Self-documentation messages are garbled. This means that the file 'etc/DOC' doesn't properly correspond commit 89b68c9d7ca9a645e40f179643d111737b7eff2e Author: Lars Ingebrigtsen Date: Mon Feb 21 17:16:44 2022 +0100 Clarify Special Isearch slightly * doc/emacs/search.texi (Special Isearch): Clarify slightly (bug#19924). (All the keys in this node is about what happens during isearch, but that information is quite a ways away at this point, so it doesn't hurt to repeat that info.) diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 982c7f4a2c..f2d82324e9 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -422,7 +422,7 @@ characters, that disables character folding during that search. search string. To search for non-@acronym{ASCII} characters, use one of the -following methods: +following methods during incremental search: @itemize @bullet @item commit 366b2bc757d011f96693bd219877c5aa42fa3359 Author: Lars Ingebrigtsen Date: Mon Feb 21 17:04:01 2022 +0100 Remove PROBLEMS section on double-buffering * etc/PROBLEMS: Remove section on problems with double-buffering, as apparently it's now no longer an issue (bug#30088). diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 4e4ec6d353..f95564454c 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -574,21 +574,6 @@ For example, simply moving through a file that contains hundreds of thousands of characters per line is slow, and consumes a lot of CPU. This is a known limitation of Emacs with no solution at this time. -*** Display artifacts on GUI frames on X-based systems. - -This is known to be caused by using double-buffering (which is enabled -by default in Emacs 26 and later). The artifacts typically appear -after commands that cause Emacs to scroll the display. - -You can disable double-buffering by evaluating the following form: - - (modify-all-frames-parameters '((inhibit-double-buffering . t))) - -To make this permanent, add it to your ~/.emacs init file. - -Note that disabling double-buffering will cause flickering of the -display in some situations. - *** Self-documentation messages are garbled. This means that the file 'etc/DOC' doesn't properly correspond commit 1f6b5ea54a5be8a18b6487a4776cef7fd9df9d1e Author: Lars Ingebrigtsen Date: Mon Feb 21 17:01:13 2022 +0100 Make 'ispell-change-dictionary' completion work better * lisp/textmodes/ispell.el (ispell--aspell-found-dictionaries): New variable (bug#24050). (ispell-find-aspell-dictionaries): Save the list of actually identified dictionary. (ispell-valid-dictionary-list): Use it to filter out non-installed dictionaries. diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 6382b402c0..b58514972a 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -797,6 +797,9 @@ See `ispell-buffer-with-debug' for an example of use." "An alist of parsed Aspell dicts and associated parameters. Internal use.") +(defvar ispell--aspell-found-dictionaries nil + "An alist of identified aspell dictionaries.") + (defun ispell-find-aspell-dictionaries () "Find Aspell's dictionaries, and record in `ispell-aspell-dictionary-alist'." (let* ((dictionaries @@ -810,7 +813,8 @@ Internal use.") (mapcar #'ispell-aspell-find-dictionary dictionaries)))) ;; Ensure aspell's alias dictionary will override standard ;; definitions. - (setq found (ispell-aspell-add-aliases found)) + (setq found (ispell-aspell-add-aliases found) + ispell--aspell-found-dictionaries (copy-sequence found)) ;; Merge into FOUND any elements from the standard ispell-dictionary-base-alist ;; which have no element in FOUND at all. (dolist (dict ispell-dictionary-base-alist) @@ -1378,9 +1382,11 @@ The variable `ispell-library-directory' defines their location." (if (and name (or ;; Include all for Aspell (we already know existing dicts) - ispell-really-aspell + (and ispell-really-aspell + (assoc name ispell--aspell-found-dictionaries)) ;; Include all if `ispell-library-directory' is nil (Hunspell) - (not ispell-library-directory) + (and (not ispell-really-aspell) + (not ispell-library-directory)) ;; If explicit (-d with an absolute path) and existing dict. (and dict-explt (file-name-absolute-p dict-explt) @@ -2986,8 +2992,7 @@ By just answering RET you can find out what the current dictionary is." (interactive (list (completing-read "Use new dictionary (RET for current, SPC to complete): " - (and (fboundp 'ispell-valid-dictionary-list) - (mapcar #'list (ispell-valid-dictionary-list))) + (mapcar #'list (ispell-valid-dictionary-list)) nil t) current-prefix-arg)) (ispell-set-spellchecker-params) ; Initialize variables and dicts alists commit 68d134cf0f784601e50cefc4056eb0ace510a982 Author: Martin Rudalics Date: Mon Feb 21 16:46:23 2022 +0100 Don't check whether a deleted window is deletable (Bug#54028) * lisp/window.el (window-state-put): Make sure window is live before calling 'window-deletable-p' on it (Bug#54028). diff --git a/lisp/window.el b/lisp/window.el index d9f36b9801..a47a1216d1 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -6410,7 +6410,11 @@ windows can get as small as `window-safe-min-height' and (window--state-put-2 ignore pixelwise)) (while window-state-put-stale-windows (let ((window (pop window-state-put-stale-windows))) - (when (eq (window-deletable-p window) t) + ;; Avoid that 'window-deletable-p' throws an error if window + ;; was already deleted when exiting 'with-temp-buffer' above + ;; (Bug#54028). + (when (and (window-valid-p window) + (eq (window-deletable-p window) t)) (delete-window window)))) (window--check frame)))) commit 69c3ae29692e031296ef0ef4f56808dba4c6c27d Author: Lars Ingebrigtsen Date: Mon Feb 21 15:42:59 2022 +0100 Make `next-buffer' order reflect command line file order * lisp/startup.el (command-line-1): Make `next-buffer' order reflect the command line file order (bug#21505). diff --git a/lisp/startup.el b/lisp/startup.el index 6b9b8234c7..9f0b23c904 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -2798,10 +2798,24 @@ nil default-directory" name) (nondisplayed-buffers-p nil)) (when (> displayable-buffers-len 0) (switch-to-buffer (car displayable-buffers))) - (when (> displayable-buffers-len 1) - (switch-to-buffer-other-window (car (cdr displayable-buffers))) + (cond + ;; Two buffers; display them both. + ((= displayable-buffers-len 2) + (switch-to-buffer-other-window (cadr displayable-buffers)) ;; Focus on the first buffer. (other-window -1)) + ;; More than two buffers: Ensure that the buffer display order + ;; reflects the order they were given on the command line. + ;; (This will end up with a `next-buffer' order that's in + ;; reverse order -- the final file is the focused one, and then + ;; the rest are in `next-buffer' in descending order. + ((> displayable-buffers-len 2) + (let ((bufs (reverse (cdr displayable-buffers)))) + (switch-to-buffer-other-window (pop bufs)) + (dolist (buf bufs) + (switch-to-buffer buf nil t)) + ;; Focus on the first buffer. + (other-window -1)))) (when (> displayable-buffers-len 2) (setq nondisplayed-buffers-p t)) commit b38223a844caef920c2cd2c6e56e84b0c91df1fa Author: Eli Zaretskii Date: Mon Feb 21 14:51:37 2022 +0200 A friendlier error message from image-mode in an empty buffer * lisp/image-mode.el (image-mode): Handle the case where the empty buffer doesn't visit a file (Bug#54084) diff --git a/lisp/image-mode.el b/lisp/image-mode.el index b87cf213d7..1eb7cd58c3 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -621,9 +621,11 @@ Key bindings: ;; Bail out early if we have no image data. (if (zerop (buffer-size)) (funcall (if (called-interactively-p 'any) 'error 'message) - (if (file-exists-p buffer-file-name) - "Empty file" - "(New file)")) + (if (stringp buffer-file-name) + (if (file-exists-p buffer-file-name) + "Empty file" + "(New file)") + "Empty buffer")) (image-mode--display))) (defun image-mode--display () commit 9e084ddad168102981386159cbf0ad2c884db54b Author: Po Lu Date: Mon Feb 21 19:40:28 2022 +0800 Try to fix bug#54051 * src/xterm.c (handle_one_xevent): Don't give obviously bogus configure events to Xt. diff --git a/src/xterm.c b/src/xterm.c index 6d498ad381..ca74f6cbd9 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -12303,9 +12303,17 @@ handle_one_xevent (struct x_display_info *dpyinfo, OTHER: #ifdef USE_X_TOOLKIT block_input (); - if (*finish != X_EVENT_DROP) - XtDispatchEvent ((XEvent *) event); - unblock_input (); + if (*finish != X_EVENT_DROP) + { + /* Ignore some obviously bogus ConfigureNotify events that + other clients have been known to send Emacs. + (bug#54051)*/ + if (event->type != ConfigureNotify + || (event->xconfigure.width != 0 + && event->xconfigure.height != 0)) + XtDispatchEvent ((XEvent *) event); + } + unblock_input (); #endif /* USE_X_TOOLKIT */ break; } commit b7a651ba3787ab8257e35f93f754c4455fc8dba4 Author: Kyle Meyer Date: Sun Feb 20 14:04:28 2022 -0500 Update to Org 9.5.2-17-gea6b74 diff --git a/lisp/org/org-lint.el b/lisp/org/org-lint.el index 0894951b65..83c2d08a90 100644 --- a/lisp/org/org-lint.el +++ b/lisp/org/org-lint.el @@ -784,8 +784,12 @@ Use \"export %s\" instead" reports)) (defun org-lint-undefined-footnote-reference (ast) - (let ((definitions (org-element-map ast 'footnote-definition - (lambda (f) (org-element-property :label f))))) + (let ((definitions + (org-element-map ast '(footnote-definition footnote-reference) + (lambda (f) + (and (or (eq 'footnote-definition (org-element-type f)) + (eq 'inline (org-element-property :type f))) + (org-element-property :label f)))))) (org-element-map ast 'footnote-reference (lambda (f) (let ((label (org-element-property :label f))) diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el index 336347b29c..6a2aa8ca5b 100644 --- a/lisp/org/org-version.el +++ b/lisp/org/org-version.el @@ -11,7 +11,7 @@ Inserted by installing Org mode or when a release is made." (defun org-git-version () "The Git version of Org mode. Inserted by installing Org or when a release is made." - (let ((org-git-version "release_9.5.2-15-gc5ceb6")) + (let ((org-git-version "release_9.5.2-17-gea6b74")) org-git-version)) (provide 'org-version) diff --git a/lisp/org/ox.el b/lisp/org/ox.el index afea529f64..2a3edaa500 100644 --- a/lisp/org/ox.el +++ b/lisp/org/ox.el @@ -632,7 +632,7 @@ This option can also be set with the SELECT_TAGS keyword." (defcustom org-export-with-smart-quotes nil "Non-nil means activate smart quotes during export. This option can also be set with the OPTIONS keyword, -e.g., \"':t\". +e.g., \"\\=':t\". When setting this to non-nil, you need to take care of using the correct Babel package when exporting to LaTeX. commit 3a8c3f7abd083b95183d047ef07b2f73e4ff9edf Author: Raffael Stocker Date: Sun Feb 20 16:13:46 2022 +0100 ; Don't reference obsolete variables in edebug.el * lisp/emacs-lisp/edebug.el (edebug-mode, edebug-eval-mode): Don't reference obsolete variables in the doc strings. (Bug#54070) diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 273fa040d0..32dc600a1a 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -3902,8 +3902,8 @@ Also see bindings for the eval list buffer *edebug* in `edebug-eval-mode'. The edebug buffer commands: \\{edebug-mode-map} -Global commands prefixed by `global-edebug-prefix': -\\{global-edebug-map} +Global commands prefixed by `edebug-global-prefix': +\\{edebug-global-map} Options: `edebug-setup-hook' @@ -4070,8 +4070,8 @@ buffer and \\\\[edebug-step-mode] in any buffer. Eval list buffer commands: \\{edebug-eval-mode-map} -Global commands prefixed by `global-edebug-prefix': -\\{global-edebug-map}") +Global commands prefixed by `edebug-global-prefix': +\\{edebug-global-map}") ;;; Interface with standard debugger.