commit 58b0bcd16df83d914fe4d538e6be88cac9574906 (HEAD, refs/remotes/origin/master) Author: Lars Ingebrigtsen Date: Wed May 5 10:31:33 2021 +0200 Use @defmac on eval-{and,when}-compile * doc/lispref/compile.texi (Eval During Compile): Use @defmac instead of @defspec on two macros (bug#47862). diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi index 6624234315..bf42004095 100644 --- a/doc/lispref/compile.texi +++ b/doc/lispref/compile.texi @@ -361,7 +361,7 @@ it does nothing. It always returns @var{function}. These features permit you to write code to be evaluated during compilation of a program. -@defspec eval-and-compile body@dots{} +@defmac eval-and-compile body@dots{} This form marks @var{body} to be evaluated both when you compile the containing code and when you run it (whether compiled or not). @@ -386,9 +386,9 @@ If functions are defined programmatically (with @code{fset} say), then @code{eval-and-compile} can be used to have that done at compile-time as well as run-time, so calls to those functions are checked (and warnings about ``not known to be defined'' suppressed). -@end defspec +@end defmac -@defspec eval-when-compile body@dots{} +@defmac eval-when-compile body@dots{} This form marks @var{body} to be evaluated at compile time but not when the compiled program is loaded. The result of evaluation by the compiler becomes a constant which appears in the compiled program. If @@ -434,7 +434,7 @@ with other versions of Emacs. Lisp idiom @code{(eval-when (compile eval) @dots{})}. Elsewhere, the Common Lisp @samp{#.} reader macro (but not when interpreting) is closer to what @code{eval-when-compile} does. -@end defspec +@end defmac @node Compiler Errors @section Compiler Errors commit 483c5e953c12a95382bef4a3b6769a680c32fe86 Author: Martin Rudalics Date: Wed May 5 10:26:32 2021 +0200 Fix two GTK3 event handling issues * src/xterm.c (handle_one_xevent): For GTK3 PropertyNotify and MapNotify events explicitly request the stored frame sizes when the frame changes from iconified to a non-hidden state (Bug#24526). For Expose events do not change the frame's visibility or iconified state. For FocusIn events on GTK3 do not apply the fix for Bug#42655. The latter two changes are to avoid that plain invisible frames get reported as iconified. diff --git a/src/xterm.c b/src/xterm.c index 88a393cc6c..9edaed9a34 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -8178,6 +8178,12 @@ handle_one_xevent (struct x_display_info *dpyinfo, f->output_data.x->has_been_visible = true; inev.ie.kind = DEICONIFY_EVENT; +#if defined USE_GTK && defined HAVE_GTK3 + /* If GTK3 wants to impose some old size here (Bug#24526), + tell it that the current size is what we want. */ + xg_frame_set_char_size + (f, FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f)); +#endif XSETFRAME (inev.ie.frame_or_window, f); } else if (!not_hidden && !FRAME_ICONIFIED_P (f)) @@ -8232,33 +8238,36 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (!FRAME_VISIBLE_P (f)) { block_input (); - SET_FRAME_VISIBLE (f, 1); - SET_FRAME_ICONIFIED (f, false); - if (FRAME_X_DOUBLE_BUFFERED_P (f)) + /* The following two are commented out to avoid that a + plain invisible frame gets reported as iconified. That + problem occurred first for Emacs 26 and is described in + https://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00133.html. */ +/** SET_FRAME_VISIBLE (f, 1); **/ +/** SET_FRAME_ICONIFIED (f, false); **/ + + if (FRAME_X_DOUBLE_BUFFERED_P (f)) font_drop_xrender_surfaces (f); f->output_data.x->has_been_visible = true; SET_FRAME_GARBAGED (f); unblock_input (); } else if (FRAME_GARBAGED_P (f)) - { + { #ifdef USE_GTK - /* Go around the back buffer and manually clear the - window the first time we show it. This way, we avoid - showing users the sanity-defying horror of whatever - GtkWindow is rendering beneath us. We've garbaged - the frame, so we'll redraw the whole thing on next - redisplay anyway. Yuck. */ - x_clear_area1 ( - FRAME_X_DISPLAY (f), - FRAME_X_WINDOW (f), - event->xexpose.x, event->xexpose.y, - event->xexpose.width, event->xexpose.height, - 0); + /* Go around the back buffer and manually clear the + window the first time we show it. This way, we avoid + showing users the sanity-defying horror of whatever + GtkWindow is rendering beneath us. We've garbaged + the frame, so we'll redraw the whole thing on next + redisplay anyway. Yuck. */ + x_clear_area1 (FRAME_X_DISPLAY (f), + FRAME_X_WINDOW (f), + event->xexpose.x, event->xexpose.y, + event->xexpose.width, event->xexpose.height, + 0); x_clear_under_internal_border (f); #endif - } - + } if (!FRAME_GARBAGED_P (f)) { @@ -8351,7 +8360,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, the frame was deleted. */ { bool visible = FRAME_VISIBLE_P (f); - /* While a frame is unmapped, display generation is + + /* While a frame is unmapped, display generation is disabled; you don't want to spend time updating a display that won't ever be seen. */ SET_FRAME_VISIBLE (f, 0); @@ -8426,11 +8436,20 @@ handle_one_xevent (struct x_display_info *dpyinfo, x_set_z_group (f, Qbelow, Qnil); } - SET_FRAME_VISIBLE (f, 1); - SET_FRAME_ICONIFIED (f, false); - f->output_data.x->has_been_visible = true; + if (not_hidden) + { + SET_FRAME_VISIBLE (f, 1); + SET_FRAME_ICONIFIED (f, false); +#if defined USE_GTK && defined HAVE_GTK3 + /* If GTK3 wants to impose some old size here (Bug#24526), + tell it that the current size is what we want. */ + xg_frame_set_char_size + (f, FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f)); +#endif + f->output_data.x->has_been_visible = true; + } - if (iconified) + if (not_hidden && iconified) { inev.ie.kind = DEICONIFY_EVENT; XSETFRAME (inev.ie.frame_or_window, f); @@ -8808,10 +8827,16 @@ handle_one_xevent (struct x_display_info *dpyinfo, goto OTHER; case FocusIn: +#ifndef USE_GTK /* Some WMs (e.g. Mutter in Gnome Shell), don't unmap minimized/iconified windows; thus, for those WMs we won't get a MapNotify when unminimizing/deconifying. Check here if we - are deconizing a window (Bug42655). */ + are deiconizing a window (Bug42655). + + But don't do that on GTK since it may cause a plain invisible + frame get reported as iconified, compare + https://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00133.html. + That is fixed above but bites us here again. */ f = any; if (f && FRAME_ICONIFIED_P (f)) { @@ -8821,6 +8846,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, inev.ie.kind = DEICONIFY_EVENT; XSETFRAME (inev.ie.frame_or_window, f); } +#endif /* USE_GTK */ x_detect_focus_change (dpyinfo, any, event, &inev.ie); goto OTHER; commit 203ee33980571823147122dffb0789f92ea66b53 Author: Lars Ingebrigtsen Date: Wed May 5 09:41:49 2021 +0200 Make the ELC+ELN lines line up with the other lines diff --git a/src/verbose.mk.in b/src/verbose.mk.in index 085a05a2fa..50d6ea3200 100644 --- a/src/verbose.mk.in +++ b/src/verbose.mk.in @@ -38,7 +38,7 @@ ifeq ($(HAVE_NATIVE_COMP),yes) ifeq ($(NATIVE_DISABLED),1) AM_V_ELC = @echo " ELC " $@; else -AM_V_ELC = @echo " ELC+ELN " $@; +AM_V_ELC = @echo " ELC+ELN " $@; endif else AM_V_ELC = @echo " ELC " $@; commit aeada12ebb1bf431af6f2b35424d732b632f305e Author: Eric Abrahamsen Date: Mon May 3 09:14:24 2021 -0700 Add new defvoo nnimap-keepalive-intervals to Gnus nnimap servers * lisp/gnus/nnimap.el (nnimap-keepalive-intervals): New per-server config for customizing when keepalive commands are sent. (nnimap-keepalive, nnimap-open-connection-1): Consult in these places. Additionally, use nnimap-streaming -> t when sending the keepalive NOOP, so we don't wait for the response. * doc/misc/gnus.texi (Customizing the IMAP Connection): Document. diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 869bb27266..a31411ef8e 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -14515,6 +14515,17 @@ names. If your IMAP mailboxes are called something like @samp{INBOX} and @samp{INBOX.Lists.emacs}, but you'd like the nnimap group names to be @samp{INBOX} and @samp{Lists.emacs}, you should enable this option. +@item nnimap-keepalive-intervals +By default, nnimap will send occasional @samp{NOOP} (keepalive) +commands to the server, to keep the connection alive. This option +governs how often that happens. It is a cons of two integers, +representing seconds: first how often to run the keepalive check, and +the second how many seconds of user inactivity are required to +actually send the command. The default, @code{(900 . 300)}, means run +the check every fifteen minutes and, if the user has been inactive for +five minutes, send the keepalive command. Set to @code{nil} to +disable keepalive commands altogether. + @end table diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 8990b2bebe..570be49094 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -136,6 +136,16 @@ will fetch all parts that have types that match that string. A likely value would be \"text/\" to automatically fetch all textual parts.") +(defvoo nnimap-keepalive-intervals (cons (* 60 15) + (* 60 5)) + "Configuration for the nnimap keepalive timer. +The value is a cons of two integers (each representing a number +of seconds): the first is how often to run the keepalive +function, the second is the seconds of inactivity required to +send the actual keepalive command. + +Set to nil to disable keepalive commands altogether.") + (defgroup nnimap nil "IMAP for Gnus." :group 'gnus) @@ -405,15 +415,16 @@ during splitting, which may be slow." nil))) (defun nnimap-keepalive () - (let ((now (current-time))) + (let ((now (current-time)) + ;; Set this so we don't wait for a response. + (nnimap-streaming t)) (dolist (buffer nnimap-process-buffers) (when (buffer-live-p buffer) (with-current-buffer buffer (when (and nnimap-object (nnimap-last-command-time nnimap-object) (time-less-p - ;; More than five minutes since the last command. - (* 5 60) + (cdr nnimap-keepalive-intervals) (time-subtract now (nnimap-last-command-time nnimap-object)))) @@ -448,9 +459,12 @@ during splitting, which may be slow." port)) (defun nnimap-open-connection-1 (buffer) - (unless nnimap-keepalive-timer - (setq nnimap-keepalive-timer (run-at-time (* 60 15) (* 60 15) - #'nnimap-keepalive))) + (unless (or nnimap-keepalive-timer + (null nnimap-keepalive-intervals)) + (setq nnimap-keepalive-timer (run-at-time + (car nnimap-keepalive-intervals) + (car nnimap-keepalive-intervals) + #'nnimap-keepalive))) (with-current-buffer (nnimap-make-process-buffer buffer) (let* ((coding-system-for-read 'binary) (coding-system-for-write 'binary) commit 3783e7fb4dbf4ed9620d6e3d54ef3462331e6660 Author: Basil L. Contovounesios Date: Tue May 4 20:56:37 2021 +0100 Remove unused lexical variables in cc-defs.el * lisp/progmodes/cc-defs.el (c-sc-scan-lists-no-category+1+1) (c-sc-scan-lists-no-category+1-1, c-sc-scan-lists-no-category-1+1) (c-sc-scan-lists-no-category-1-1): Remove unused lexical variable 'here' to pacify byte-compilation warnings in cc-engine.el. diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index 0229232758..5d93435066 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -1653,8 +1653,7 @@ with value CHAR in the region [FROM to)." ;; determined by and angle bracket; or (ii) is inside a macro whose start ;; isn't POINT-MACRO-START doesn't count as a finishing position. (declare (debug t)) - `(let ((here (point)) - (pos (scan-lists ,from 1 1))) + `(let ((pos (scan-lists ,from 1 1))) (while (eq (char-before pos) ?>) (setq pos (scan-lists pos 1 1))) pos)) @@ -1664,8 +1663,7 @@ with value CHAR in the region [FROM to)." ;; determined by an angle bracket; or (ii) is inside a macro whose start ;; isn't POINT-MACRO-START doesn't count as a finishing position. (declare (debug t)) - `(let ((here (point)) - (pos (scan-lists ,from 1 -1))) + `(let ((pos (scan-lists ,from 1 -1))) (while (eq (char-before pos) ?<) (setq pos (scan-lists pos 1 1)) (setq pos (scan-lists pos 1 -1))) @@ -1676,8 +1674,7 @@ with value CHAR in the region [FROM to)." ;; determined by and angle bracket; or (ii) is inside a macro whose start ;; isn't POINT-MACRO-START doesn't count as a finishing position. (declare (debug t)) - `(let ((here (point)) - (pos (scan-lists ,from -1 1))) + `(let ((pos (scan-lists ,from -1 1))) (while (eq (char-after pos) ?<) (setq pos (scan-lists pos -1 1))) pos)) @@ -1687,8 +1684,7 @@ with value CHAR in the region [FROM to)." ;; determined by and angle bracket; or (ii) is inside a macro whose start ;; isn't POINT-MACRO-START doesn't count as a finishing position. (declare (debug t)) - `(let ((here (point)) - (pos (scan-lists ,from -1 -1))) + `(let ((pos (scan-lists ,from -1 -1))) (while (eq (char-after pos) ?>) (setq pos (scan-lists pos -1 1)) (setq pos (scan-lists pos -1 -1))) commit d6ddc97884c3106a59b956fbc4e4f5f3e4aaf4e2 Author: Andrea Corallo Date: Tue May 4 21:31:44 2021 +0200 * Do not try to load unexistent eln file if async compilation was skipped * lisp/emacs-lisp/comp.el (comp-run-async-workers): Don't try to load if the eln file was not produced. diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 0ebaccbe4a..297c1f7ebc 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -3944,11 +3944,14 @@ display a message." source-file) (comp-accept-and-process-async-output process) (ignore-errors (delete-file temp-file)) - (when (and load1 - (zerop (process-exit-status process))) - (native-elisp-load - (comp-el-to-eln-filename source-file1) - (eq load1 'late))) + (let ((eln-file (comp-el-to-eln-filename + source-file1))) + (when (and load1 + (zerop (process-exit-status + process)) + (file-exists-p eln-file)) + (native-elisp-load eln-file + (eq load1 'late)))) (comp-run-async-workers)) :noquery (not comp-async-query-on-exit)))) (puthash source-file process comp-async-compilations)) commit c36df52ff5c05826382d88ddbe3fffaa99d12597 Author: Eli Zaretskii Date: Tue May 4 20:37:33 2021 +0300 Fix infloop in lsp-mode * src/indent.c (line_number_display_width): Make sure the selected window's buffer is current before using display code on it: redisplay assumes that the window's buffer is current at all times. Reported by Evgeny Kurnevsky via lsp-mode's issue 1621, https://github.com/emacs-lsp/lsp-mode/issues/1621. diff --git a/src/indent.c b/src/indent.c index 6246b544fb..de6b489561 100644 --- a/src/indent.c +++ b/src/indent.c @@ -1967,9 +1967,13 @@ line_number_display_width (struct window *w, int *width, int *pixel_width) struct it it; struct text_pos startpos; bool saved_restriction = false; + struct buffer *old_buf = current_buffer; ptrdiff_t count = SPECPDL_INDEX (); SET_TEXT_POS_FROM_MARKER (startpos, w->start); void *itdata = bidi_shelve_cache (); + + /* Make sure W's buffer is the current one. */ + set_buffer_internal_1 (XBUFFER (w->contents)); /* We want to start from window's start point, but it could be outside the accessible region, in which case we widen the buffer temporarily. It could even be beyond the buffer's end @@ -1998,6 +2002,7 @@ line_number_display_width (struct window *w, int *width, int *pixel_width) *pixel_width = it.lnum_pixel_width; if (saved_restriction) unbind_to (count, Qnil); + set_buffer_internal_1 (old_buf); bidi_unshelve_cache (itdata, 0); } } commit 0c993ed1d3af6320a8aec6e94c0537bc62948701 Merge: 697fd3e919 40228fffd7 Author: Glenn Morris Date: Tue May 4 07:50:28 2021 -0700 Merge from origin/emacs-27 40228fffd7 (origin/emacs-27) Fix code for newline-and-indent in skele... 56c4c8ef32 * lisp/jka-compr.el (jka-compr-uninstall): Fix function re... commit 697fd3e91918b6ec8eeed30fa81885da77af5942 Merge: 6a030deb3d 6a46d3d809 Author: Glenn Morris Date: Tue May 4 07:50:28 2021 -0700 ; Merge from origin/emacs-27 The following commits were skipped: 6a46d3d809 (emacs-27) ; Auto-commit of loaddefs files. ccfd2e20a9 Fix GUD overlay arrows in M-x gdb when debugging over Tram... e61688f87d Fix setting breakpoints in M-x gdb for remote files. Don'... commit 6a030deb3d5213d0b32a4d2d6b6e7839ce85b5fa Merge: b8f88d76ea 101a049f55 Author: Glenn Morris Date: Tue May 4 07:50:25 2021 -0700 Merge from origin/emacs-27 101a049f55 Improve doc string of 'tab-width'. 43c154404e * lisp/emacs-lisp/elp.el: Doc fixes. 1984213f62 * lisp/emacs-lisp/pp.el: Doc fixes. 6486c9dc73 * admin/make-tarball.txt: Note to update more files on web... commit b8f88d76ea79b12d600a090f76cea9d6ec3818f2 Author: Basil L. Contovounesios Date: Tue May 4 15:08:16 2021 +0100 Remove as of recently unused GDK macro Its only use was removed in the recent change of 2021-04-27 "Major rewrite of adjust_frame_size", announced in the following thread: https://lists.gnu.org/r/emacs-devel/2021-04/msg01162.html * src/gtkutil.c [USE_GTK && !HAVE_GTK3] (gdk_window_get_geometry): Remove unused macro to pacify -Wunused-macros build warning. diff --git a/src/gtkutil.c b/src/gtkutil.c index ba506faf35..dee2a93089 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -81,8 +81,6 @@ along with GNU Emacs. If not, see . */ gtk_font_selection_dialog_set_font_name (x, y) #endif -#define gdk_window_get_geometry(w, a, b, c, d) \ - gdk_window_get_geometry (w, a, b, c, d, 0) #define gtk_box_new(ori, spacing) \ ((ori) == GTK_ORIENTATION_HORIZONTAL \ ? gtk_hbox_new (FALSE, (spacing)) : gtk_vbox_new (FALSE, (spacing))) commit 7d0067f297b131c98a5198eb52d49891a83ac5aa Author: Basil L. Contovounesios Date: Tue May 4 10:36:56 2021 +0100 ; Fix and simplify last change in bookmark.el. diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 4e717a7dc0..3b7519059f 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -169,7 +169,7 @@ A non-nil value may result in truncated bookmark names." (defcustom bookmark-fontify t "Whether to colorize a bookmarked line. -If non-nil, setting a bookmark wil colorize the current line with +If non-nil, setting a bookmark will colorize the current line with `bookmark-face'." :type 'boolean :version "28.1") @@ -183,18 +183,18 @@ If non-nil, setting a bookmark wil colorize the current line with (defface bookmark-face '((((class grayscale) (background light)) - (:background "DimGray")) + :background "DimGray") (((class grayscale) (background dark)) - (:background "LightGray")) + :background "LightGray") (((class color) (background light)) - (:foreground "White" :background "DarkOrange1")) + :foreground "White" :background "DarkOrange1") (((class color) (background dark)) - (:foreground "Black" :background "DarkOrange1"))) + :foreground "Black" :background "DarkOrange1")) "Face used to highlight current line." - :version "28.2") + :version "28.1") ;;; No user-serviceable parts beyond this point. @@ -451,23 +451,22 @@ In other words, return all information but the name." (defun bookmark--fontify () "Apply a colorized overlay to the bookmarked location. -See defcustom variable `bookmark-fontify'." +See user option `bookmark-fontify'." (let ((bm (make-overlay (point-at-bol) - (min (point-max) (+ 1 (point-at-eol)))))) + (min (point-max) (1+ (point-at-eol)))))) (overlay-put bm 'category 'bookmark) (overlay-put bm 'face 'bookmark-face))) (defun bookmark--unfontify (bm) "Remove a bookmark's colorized overlay. BM is a bookmark as returned from function `bookmark-get-bookmark'. -See defcustom variable `bookmark-fontify'." +See user option `bookmark-fontify'." (let ((filename (assq 'filename bm)) (pos (assq 'position bm)) - (buffers (buffer-list)) - buf overlays found temp) + overlays found temp) (when filename (setq filename (expand-file-name (cdr filename)))) (when pos (setq pos (cdr pos))) - (while (setq buf (pop buffers)) + (dolist (buf (buffer-list)) (with-current-buffer buf (when (equal filename buffer-file-name) (setq overlays (overlays-at pos)) commit e634130607b844a0b428c826b205ede05edeedfc Author: Lars Ingebrigtsen Date: Tue May 4 11:48:27 2021 +0200 Fix inconsistent behaviour in find-file-noselect when using nowarn * lisp/files.el (after-find-file): Behave the same in when warning/not warning (bug#47850). This fixes this test case: (switch-to-buffer (find-file-noselect "non-existing-dir/test.el" t)) which would leave the buffer read-only. diff --git a/lisp/files.el b/lisp/files.el index 2c5017a2fd..16ebe744b9 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2537,21 +2537,20 @@ unless NOMODES is non-nil." (let* (not-serious (msg (cond - ((not warn) nil) ((and error (file-exists-p buffer-file-name)) (setq buffer-read-only t) "File exists, but cannot be read") ((and error (file-symlink-p buffer-file-name)) "Symbolic link that points to nonexistent file") ((not buffer-read-only) - (if (and warn - ;; No need to warn if buffer is auto-saved - ;; under the name of the visited file. - (not (and buffer-file-name - auto-save-visited-file-name)) - (file-newer-than-file-p (or buffer-auto-save-file-name - (make-auto-save-file-name)) - buffer-file-name)) + (if (and + ;; No need to warn if buffer is auto-saved + ;; under the name of the visited file. + (not (and buffer-file-name + auto-save-visited-file-name)) + (file-newer-than-file-p (or buffer-auto-save-file-name + (make-auto-save-file-name)) + buffer-file-name)) (format "%s has auto save data; consider M-x recover-this-file" (file-name-nondirectory buffer-file-name)) (setq not-serious t) @@ -2565,7 +2564,7 @@ unless NOMODES is non-nil." (setq buffer-read-only nil) (unless (file-directory-p default-directory) "Use M-x make-directory RET RET to create the directory and its parents"))))) - (when msg + (when (and warn msg) (message "%s" msg) (or not-serious (sit-for 1 t)))) (when (and auto-save-default (not noauto)) commit ed42afd403f69c2e29e4c09b9e7fd6cd6d7e68b1 Author: Lars Ingebrigtsen Date: Tue May 4 11:25:33 2021 +0200 Allow TAB to go to a key in EPA key buffers * lisp/epa.el (epa--insert-keys): Allow TAB to go to the keys (bug#47876). diff --git a/lisp/epa.el b/lisp/epa.el index bbfa2c188c..2698b39ffe 100644 --- a/lisp/epa.el +++ b/lisp/epa.el @@ -333,7 +333,10 @@ If ARG is non-nil, mark the key." (insert (propertize (concat " " (epa--button-key-text key)) - 'epa-key key)) + 'epa-key key + ;; Allow TAB to tab to the key. + 'button t + 'category t)) (insert "\n"))) (defun epa--list-keys (name secret &optional doc) commit 60ff12a7d9dacbf971321da1ac1afd610417bd38 Author: Lars Ingebrigtsen Date: Tue May 4 11:04:38 2021 +0200 Fix doc marker for previous bookmark NEWS change diff --git a/etc/NEWS b/etc/NEWS index 33bd8b73b5..8f4a6837b1 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1120,6 +1120,7 @@ without using 'header-line-format', has been dropped. Consequently, the variables 'bookmark-bmenu-use-header-line' and 'bookmark-bmenu-inline-header-height' are now declared obsolete. +--- *** New user option 'bookmark-fontify'. If non-nil, setting a bookmark will colorize the current line with 'bookmark-face'. commit ab6cb65cb2b6d11a7b690dfcea8d98611290fad9 Author: Boruch Baum Date: Tue May 4 10:58:52 2021 +0200 Fontify lines when setting a bookmark * lisp/bookmark.el (bookmark-fontify): New user option (bug#48179). (bookmark-face): New face. (bookmark--fontify, bookmark--unfontify): New functions. (bookmark-set-internal, bookmark--jump-via, bookmark-delete): Use them. diff --git a/etc/NEWS b/etc/NEWS index c5e61a56ea..33bd8b73b5 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1081,16 +1081,6 @@ defaulting to active region when used interactively. --- ** The old non-SMIE indentation of 'sh-mode' has been removed. ---- -** The 'list-bookmarks' menu is now based on 'tabulated-list-mode'. -The interactive bookmark list will now benefit from features in -'tabulated-list-mode' like sorting columns or changing column width. - -Support for the optional "inline" header line, allowing for a header -without using 'header-line-format', has been dropped. Consequently, -the variables 'bookmark-bmenu-use-header-line' and -'bookmark-bmenu-inline-header-height' are now declared obsolete. - --- ** The sb-image.el library is now marked obsolete. This file was a compatibility kludge which is no longer needed. @@ -1114,6 +1104,27 @@ To customize obsolete user options, use 'customize-option' or They will be used automatically instead of the old icons. If Emacs is built without SVG support, the old icons will be used instead. +** Bookmarks + +*** Bookmarks can now be targets for new tabs. +When the bookmark.el library is loaded, a customize choice is added +to 'tab-bar-new-tab-choice' for new tabs to show the bookmark list. + +--- +*** The 'list-bookmarks' menu is now based on 'tabulated-list-mode'. +The interactive bookmark list will now benefit from features in +'tabulated-list-mode' like sorting columns or changing column width. + +Support for the optional "inline" header line, allowing for a header +without using 'header-line-format', has been dropped. Consequently, +the variables 'bookmark-bmenu-use-header-line' and +'bookmark-bmenu-inline-header-height' are now declared obsolete. + +*** New user option 'bookmark-fontify'. +If non-nil, setting a bookmark will colorize the current line with +'bookmark-face'. + + ** Edebug *** Obsoletions @@ -2194,10 +2205,6 @@ The width now depends of the width of the window, but will never be wider than the length of the longest buffer name, except that it will never be narrower than 19 characters. -*** Bookmarks can now be targets for new tabs. -When the bookmark.el library is loaded, a customize choice is added -to 'tab-bar-new-tab-choice' for new tabs to show the bookmark list. - --- *** Movement commands in 'gomoku-mode' are fixed. 'gomoku-move-sw' and 'gomoku-move-ne' now work correctly, and diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 98797a0de2..4e717a7dc0 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -167,12 +167,34 @@ A non-nil value may result in truncated bookmark names." "Time before `bookmark-bmenu-search' updates the display." :type 'number) +(defcustom bookmark-fontify t + "Whether to colorize a bookmarked line. +If non-nil, setting a bookmark wil colorize the current line with +`bookmark-face'." + :type 'boolean + :version "28.1") + ;; FIXME: No longer used. Should be declared obsolete or removed. (defface bookmark-menu-heading '((t (:inherit font-lock-type-face))) "Face used to highlight the heading in bookmark menu buffers." :version "22.1") +(defface bookmark-face + '((((class grayscale) + (background light)) + (:background "DimGray")) + (((class grayscale) + (background dark)) + (:background "LightGray")) + (((class color) + (background light)) + (:foreground "White" :background "DarkOrange1")) + (((class color) + (background dark)) + (:foreground "Black" :background "DarkOrange1"))) + "Face used to highlight current line." + :version "28.2") ;;; No user-serviceable parts beyond this point. @@ -427,6 +449,31 @@ In other words, return all information but the name." (defvar bookmark-history nil "The history list for bookmark functions.") +(defun bookmark--fontify () + "Apply a colorized overlay to the bookmarked location. +See defcustom variable `bookmark-fontify'." + (let ((bm (make-overlay (point-at-bol) + (min (point-max) (+ 1 (point-at-eol)))))) + (overlay-put bm 'category 'bookmark) + (overlay-put bm 'face 'bookmark-face))) + +(defun bookmark--unfontify (bm) + "Remove a bookmark's colorized overlay. +BM is a bookmark as returned from function `bookmark-get-bookmark'. +See defcustom variable `bookmark-fontify'." + (let ((filename (assq 'filename bm)) + (pos (assq 'position bm)) + (buffers (buffer-list)) + buf overlays found temp) + (when filename (setq filename (expand-file-name (cdr filename)))) + (when pos (setq pos (cdr pos))) + (while (setq buf (pop buffers)) + (with-current-buffer buf + (when (equal filename buffer-file-name) + (setq overlays (overlays-at pos)) + (while (and (not found) (setq temp (pop overlays))) + (when (eq 'bookmark (overlay-get temp 'category)) + (delete-overlay (setq found temp))))))))) (defun bookmark-completing-read (prompt &optional default) "Prompting with PROMPT, read a bookmark name in completion. @@ -825,7 +872,9 @@ still there, in order, if the topmost one is ever deleted." ;; Ask for an annotation buffer for this bookmark (when bookmark-use-annotations - (bookmark-edit-annotation str)))) + (bookmark-edit-annotation str)) + (when bookmark-fontify + (bookmark--fontify)))) (setq bookmark-yank-point nil) (setq bookmark-current-buffer nil))) @@ -1094,6 +1143,14 @@ and then show any annotations for this bookmark." (if win (set-window-point win (point)))) ;; FIXME: we used to only run bookmark-after-jump-hook in ;; `bookmark-jump' itself, but in none of the other commands. + (when bookmark-fontify + (let ((overlays (overlays-at (point))) + temp found) + (while (and (not found) (setq temp (pop overlays))) + (when (eq 'bookmark (overlay-get temp 'category)) + (setq found t))) + (unless found + (bookmark--fontify)))) (run-hooks 'bookmark-after-jump-hook) (if bookmark-automatically-show-annotations ;; if there is an annotation for this bookmark, @@ -1357,6 +1414,7 @@ probably because we were called from there." (bookmark-maybe-historicize-string bookmark-name) (bookmark-maybe-load-default-file) (let ((will-go (bookmark-get-bookmark bookmark-name 'noerror))) + (bookmark--unfontify will-go) (setq bookmark-alist (delq will-go bookmark-alist)) ;; Added by db, nil bookmark-current-bookmark if the last ;; occurrence has been deleted commit 40228fffd7266d4c2836806ea9b65d8f5b5db607 (refs/remotes/origin/emacs-27) Author: Philipp Stephani Date: Sun May 2 20:57:38 2021 +0200 Fix code for newline-and-indent in skeleton language. The code for this is the symbol 'n', which is usually spelled as '\n' here, not the character ?\n. * doc/misc/autotype.texi (Skeleton Language): Fix item for newline-and-indent. diff --git a/doc/misc/autotype.texi b/doc/misc/autotype.texi index 72ba73697d..5f9dc01d33 100644 --- a/doc/misc/autotype.texi +++ b/doc/misc/autotype.texi @@ -579,7 +579,7 @@ table: @vindex skeleton-transformation Insert string or character. Literal strings and characters are passed through @code{skeleton-transformation} when that is non-@code{nil}. -@item @code{?\n} +@item @code{\n} @c ??? something seems very wrong here. Insert a newline and align under current line, but not if this is the last element of a skeleton and the newline would be inserted at end of commit 56c4c8ef323a3e205f3ffa299b24afdcb1cdf9cc Author: Philipp Stephani Date: Sun May 2 01:01:28 2021 +0200 * lisp/jka-compr.el (jka-compr-uninstall): Fix function reference. diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el index 4466130293..f9bec722f1 100644 --- a/lisp/jka-compr.el +++ b/lisp/jka-compr.el @@ -661,7 +661,7 @@ It is not recommended to set this variable permanently to anything but nil.") "Uninstall jka-compr. This removes the entries in `file-name-handler-alist' and `auto-mode-alist' and `inhibit-local-variables-suffixes' that were added -by `jka-compr-installed'." +by `jka-compr-install'." ;; Delete from inhibit-local-variables-suffixes what jka-compr-install added. (mapc (function (lambda (x) commit 6a46d3d8094173b35d048361b9c2bdcd53e53643 Author: Glenn Morris Date: Sat May 1 06:11:33 2021 -0700 ; Auto-commit of loaddefs files. diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 0c15d78156..b68ef6851a 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -25278,14 +25278,14 @@ Macroexpand EXPRESSION and pretty-print its value. (autoload 'pp-eval-last-sexp "pp" "\ Run `pp-eval-expression' on sexp before point. -With argument, pretty-print output into current buffer. +With ARG, pretty-print output into current buffer. Ignores leading comment characters. \(fn ARG)" t nil) (autoload 'pp-macroexpand-last-sexp "pp" "\ Run `pp-macroexpand-expression' on sexp before point. -With argument, pretty-print output into current buffer. +With ARG, pretty-print output into current buffer. Ignores leading comment characters. \(fn ARG)" t nil) @@ -38652,19 +38652,10 @@ Zone out, completely." t nil) ;;;;;; "eshell/em-unix.el" "eshell/em-xtra.el" "facemenu.el" "faces.el" ;;;;;; "files.el" "font-core.el" "font-lock.el" "format.el" "frame.el" ;;;;;; "help.el" "hfy-cmap.el" "ibuf-ext.el" "indent.el" "international/characters.el" -;;;;;; "international/charprop.el" "international/charscript.el" -;;;;;; "international/cp51932.el" "international/eucjp-ms.el" "international/mule-cmds.el" -;;;;;; "international/mule-conf.el" "international/mule.el" "international/uni-bidi.el" -;;;;;; "international/uni-brackets.el" "international/uni-category.el" -;;;;;; "international/uni-combining.el" "international/uni-comment.el" -;;;;;; "international/uni-decimal.el" "international/uni-decomposition.el" -;;;;;; "international/uni-digit.el" "international/uni-lowercase.el" -;;;;;; "international/uni-mirrored.el" "international/uni-name.el" -;;;;;; "international/uni-numeric.el" "international/uni-old-name.el" -;;;;;; "international/uni-special-lowercase.el" "international/uni-special-titlecase.el" -;;;;;; "international/uni-special-uppercase.el" "international/uni-titlecase.el" -;;;;;; "international/uni-uppercase.el" "isearch.el" "jit-lock.el" -;;;;;; "jka-cmpr-hook.el" "language/burmese.el" "language/cham.el" +;;;;;; "international/charscript.el" "international/cp51932.el" +;;;;;; "international/eucjp-ms.el" "international/mule-cmds.el" +;;;;;; "international/mule-conf.el" "international/mule.el" "isearch.el" +;;;;;; "jit-lock.el" "jka-cmpr-hook.el" "language/burmese.el" "language/cham.el" ;;;;;; "language/chinese.el" "language/cyrillic.el" "language/czech.el" ;;;;;; "language/english.el" "language/ethiopic.el" "language/european.el" ;;;;;; "language/georgian.el" "language/greek.el" "language/hebrew.el" commit ccfd2e20a985a1114469963e33b966721bb3ce29 Author: Jim Porter Date: Sat May 1 12:05:37 2021 +0200 Fix GUD overlay arrows in M-x gdb when debugging over Tramp. Don't merge * lisp/progmodes/gdb-mi.el (gdb-frame-handler): Use local part of file name when setting `gud-last-frame'. diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 1b2642fae7..51a237a38e 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -4376,7 +4376,7 @@ overlay arrow in source buffer." (let ((frame (bindat-get-field (gdb-json-partial-output) 'frame))) (when frame (setq gdb-selected-frame (bindat-get-field frame 'func)) - (setq gdb-selected-file (bindat-get-field frame 'fullname)) + (setq gdb-selected-file (file-local-name (bindat-get-field frame 'fullname))) (setq gdb-frame-number (bindat-get-field frame 'level)) (setq gdb-frame-address (bindat-get-field frame 'addr)) (let ((line (bindat-get-field frame 'line))) commit e61688f87db985e8f12631d609d74f9a12e5839b Author: Jim Porter Date: Sat May 1 11:56:19 2021 +0200 Fix setting breakpoints in M-x gdb for remote files. Don't merge * lisp/progmodes/gdb-mi.el (gdb-jsonify-buffer): Fix modification of GDB/MI "fullname" property for remote files diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 65fe997341..1b2642fae7 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -2696,7 +2696,7 @@ If `default-directory' is remote, full file names are adapted accordingly." (let ((remote (file-remote-p default-directory))) (when remote (goto-char (point-min)) - (while (re-search-forward "[\\[,]fullname=\"\\(.+\\)\"" nil t) + (while (re-search-forward "[\\[,]fullname=\"\\(.+?\\)\"" nil t) (replace-match (concat remote "\\1") nil nil nil 1)))) (goto-char (point-min)) (when fix-key commit 101a049f551b4013e54fdef0d87a74ec5dfd05e0 Author: Eli Zaretskii Date: Fri Apr 30 13:48:13 2021 +0300 Improve doc string of 'tab-width'. * src/buffer.c (syms_of_buffer) : Clarify doc string. (Bug#48058) diff --git a/src/buffer.c b/src/buffer.c index a60327bb6c..60a45731d1 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5639,9 +5639,12 @@ Linefeed indents to this column in Fundamental mode. */); DEFVAR_PER_BUFFER ("tab-width", &BVAR (current_buffer, tab_width), Qintegerp, doc: /* Distance between tab stops (for display of tab characters), in columns. -NOTE: This controls the display width of a TAB character, and not -the size of an indentation step. -This should be an integer greater than zero. */); +This controls the width of a TAB character on display. +The value should be a positive integer. +Note that this variable doesn't necessarily affect the size of the +indentation step. However, if the major mode's indentation facility +inserts one or more TAB characters, this variable will affect the +indentation step as well, even if `indent-tabs-mode' is non-nil. */); DEFVAR_PER_BUFFER ("ctl-arrow", &BVAR (current_buffer, ctl_arrow), Qnil, doc: /* Non-nil means display control chars with uparrow. commit 43c154404e1f0361d18c1d80caecf4b62ce7b74e Author: Stefan Kangas Date: Thu Apr 29 17:17:50 2021 +0200 * lisp/emacs-lisp/elp.el: Doc fixes. diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el index 4fb4a438b2..1be46ae7e3 100644 --- a/lisp/emacs-lisp/elp.el +++ b/lisp/emacs-lisp/elp.el @@ -1,7 +1,6 @@ ;;; elp.el --- Emacs Lisp Profiler -*- lexical-binding: t -*- -;; Copyright (C) 1994-1995, 1997-1998, 2001-2021 Free Software -;; Foundation, Inc. +;; Copyright (C) 1994-2021 Free Software Foundation, Inc. ;; Author: Barry A. Warsaw ;; Maintainer: emacs-devel@gnu.org @@ -30,8 +29,8 @@ ;; hacks those functions so that profiling information is recorded ;; whenever they are called. To print out the current results, use ;; M-x elp-results. If you want output to go to standard-output -;; instead of a separate buffer, setq elp-use-standard-output to -;; non-nil. With elp-reset-after-results set to non-nil, profiling +;; instead of a separate buffer, set `elp-use-standard-output' to +;; non-nil. With `elp-reset-after-results' set to non-nil, profiling ;; information will be reset whenever the results are displayed. You ;; can also reset all profiling info at any time with M-x ;; elp-reset-all. @@ -40,12 +39,12 @@ ;; the package follows the GNU coding standard of a common textual ;; prefix. Use M-x elp-instrument-package for this. ;; -;; If you want to sort the results, set elp-sort-by-function to some +;; If you want to sort the results, set `elp-sort-by-function' to some ;; predicate function. The three most obvious choices are predefined: -;; elp-sort-by-call-count, elp-sort-by-average-time, and -;; elp-sort-by-total-time. Also, you can prune from the output, all +;; `elp-sort-by-call-count', `elp-sort-by-average-time', and +;; `elp-sort-by-total-time'. Also, you can prune from the output, all ;; functions that have been called fewer than a given number of times -;; by setting elp-report-limit. +;; by setting `elp-report-limit'. ;; ;; Elp can instrument byte-compiled functions just as easily as ;; interpreted functions, but it cannot instrument macros. However, @@ -95,11 +94,11 @@ ;; Note that there are plenty of factors that could make the times ;; reported unreliable, including the accuracy and granularity of your -;; system clock, and the overhead spent in lisp calculating and +;; system clock, and the overhead spent in Lisp calculating and ;; recording the intervals. I figure the latter is pretty constant, ;; so while the times may not be entirely accurate, I think they'll ;; give you a good feel for the relative amount of work spent in the -;; various lisp routines you are profiling. Note further that times +;; various Lisp routines you are profiling. Note further that times ;; are calculated using wall-clock time, so other system load will ;; affect accuracy too. @@ -405,15 +404,15 @@ original definition, use \\[elp-restore-function] or \\[elp-restore-all]." (defvar elp-et-len nil) (defun elp-sort-by-call-count (vec1 vec2) - ;; sort by highest call count. See `sort'. + "Predicate to sort by highest call count. See `sort'." (>= (aref vec1 0) (aref vec2 0))) (defun elp-sort-by-total-time (vec1 vec2) - ;; sort by highest total time spent in function. See `sort'. + "Predicate to sort by highest total time spent in function. See `sort'." (>= (aref vec1 1) (aref vec2 1))) (defun elp-sort-by-average-time (vec1 vec2) - ;; sort by highest average time spent in function. See `sort'. + "Predicate to sort by highest average time spent in function. See `sort'." (>= (aref vec1 2) (aref vec2 2))) (defsubst elp-pack-number (number width) @@ -471,13 +470,13 @@ original definition, use \\[elp-restore-function] or \\[elp-restore-all]." "Keymap used on the function name column." ) (defun elp-results-jump-to-definition (&optional event) - "Jump to the definition of the function under the point." + "Jump to the definition of the function at point." (interactive (list last-nonmenu-event)) (if event (posn-set-point (event-end event))) (find-function (get-text-property (point) 'elp-symname))) (defun elp-output-insert-symname (symname) - ;; Insert SYMNAME with text properties. + "Insert SYMNAME with text properties." (insert (propertize symname 'elp-symname (intern symname) 'keymap elp-results-symname-map @@ -588,7 +587,6 @@ displayed." "Un-instrument before unloading a function." (elp-restore-function (cdr x))) - (provide 'elp) ;;; elp.el ends here commit 1984213f62e058937814995f7be369aa5924884a Author: Stefan Kangas Date: Thu Apr 29 13:44:54 2021 +0200 * lisp/emacs-lisp/pp.el: Doc fixes. diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index cd2e80907a..6889d924c0 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -140,7 +140,7 @@ Also add the value to the front of the list in the variable `values'." (pp-display-expression (macroexpand-1 expression) "*Pp Macroexpand Output*")) (defun pp-last-sexp () - "Read sexp before point. Ignores leading comment characters." + "Read sexp before point. Ignore leading comment characters." (with-syntax-table emacs-lisp-mode-syntax-table (let ((pt (point))) (save-excursion @@ -160,7 +160,7 @@ Also add the value to the front of the list in the variable `values'." ;;;###autoload (defun pp-eval-last-sexp (arg) "Run `pp-eval-expression' on sexp before point. -With argument, pretty-print output into current buffer. +With ARG, pretty-print output into current buffer. Ignores leading comment characters." (interactive "P") (if arg @@ -170,7 +170,7 @@ Ignores leading comment characters." ;;;###autoload (defun pp-macroexpand-last-sexp (arg) "Run `pp-macroexpand-expression' on sexp before point. -With argument, pretty-print output into current buffer. +With ARG, pretty-print output into current buffer. Ignores leading comment characters." (interactive "P") (if arg commit 6486c9dc73fed37028836abb0afbab2d604473ca Author: Stefan Kangas Date: Wed Apr 28 15:22:11 2021 +0200 * admin/make-tarball.txt: Note to update more files on web page. diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index dd3e504ddc..c231db8178 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -265,6 +265,7 @@ The pages to update are: emacs.html (for a new major release, a more thorough update is needed) history.html add the new NEWS file as news/NEWS.xx.y +Copy new etc/MACHINES to MACHINES and CONTRIBUTE to CONTRIBUTE For every new release, a banner is displayed on top of the emacs.html page. Uncomment and the release banner in emacs.html. Keep it on the