commit 2987022976f82fa3542ab530745457dbd277a55e (HEAD, refs/remotes/origin/master) Author: Matthew Tromp Date: Wed Jul 23 12:44:46 2025 -0400 Delete overlays from Flymake backends that no longer exist Fix for bug#78862: previously, when starting eglot, existing flymake diagnostics in the buffer would persist until flymake was completely restarted (like by running 'flymake-mode' twice). This change adds logic to 'flymake-start' to delete all diagnostics and their overlays from any backend that is no longer in 'flymake-diagnostic-functions'. * lisp/progmodes/flymake.el (flymake-start): Remove overlays from backends that no longer exist. diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index e911faf603d..bdfcf51a5ff 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -1406,6 +1406,26 @@ Interactively, with a prefix arg, FORCE is t." (cl-reduce #'max (mapcar #'cadr flymake--recent-changes)))))) (setq flymake--recent-changes nil) + ;; Delete all overlays that didn't come from one of the + ;; current diagnostic functions. + ;; Sometimes diagnostic functions are removed from + ;; `flymake-diagnostic-functions' (e.g. by eglot). This + ;; leaves overlays in the buffer which otherwise won't be + ;; cleaned up until `flymake-mode' is restarted. + ;; See bug#78862 + (maphash (lambda (backend state) + (unless (memq backend flymake-diagnostic-functions) + ;; Delete all overlays + (dolist (diag (flymake--state-diags state)) + (let ((ov (flymake--diag-overlay diag))) + (flymake--delete-overlay ov))) + ;; Set the list of diagnostics to nil to + ;; avoid trying to delete them again. + ;; We keep the state object itself around in + ;; case there's still diagnostics in flight, + ;; so we don't break things. + (setf (flymake--state-diags state) nil))) + flymake--state) (run-hook-wrapped 'flymake-diagnostic-functions (lambda (backend) commit 764999bd8d2352db863942934a42c35e75110398 Author: Eli Zaretskii Date: Fri Aug 15 17:40:46 2025 +0300 ; * lisp/register.el (register-alist, jump-to-register): Doc fix (bug#79243). diff --git a/lisp/register.el b/lisp/register.el index 5c7f1c17285..9b2a10f02d7 100644 --- a/lisp/register.el +++ b/lisp/register.el @@ -73,7 +73,7 @@ A list of the form (file . FILE-NAME) represents the file named FILE-NAME. A list of the form (file-query FILE-NAME POSITION) represents position POSITION in the file named FILE-NAME, but query before visiting it. -A list of the form (buffer . BUFFER-NAME) represents the buffer BUFFER-NAME. +A list of the form (buffer . BUFFER) represents the named BUFFER. A list of the form (WINDOW-CONFIGURATION POSITION) represents a saved window configuration plus a saved value of point. A list of the form (FRAME-CONFIGURATION POSITION) @@ -520,7 +520,7 @@ Interactively, prompt for REGISTER using `register-read-with-preview'." "Go to location stored in REGISTER, or restore configuration stored there. Push the mark if going to the location moves point, unless called in succession. If the register contains a file name, find that file. -If the register contains a buffer name, switch to that buffer. +If the register references a buffer, switch to that buffer. If the register contains a window configuration (one frame) or a frameset \(all frames), restore the configuration of that frame or of all frames accordingly. commit 46b22304b0a06344a559f3c5fd5e7ec5a76b6cee Author: Eli Zaretskii Date: Fri Aug 15 13:46:40 2025 +0300 Update description of buffer-in-register * doc/lispref/text.texi (Registers): Update register-in-buffer form. (Bug#79243) diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 7735e0d62a4..60bf8ecc37b 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -4716,9 +4716,9 @@ value visits file @var{filename} and goes to buffer position @var{position}. Restoring this type of position asks the user for confirmation first. -@item @code{(buffer @var{buffer-name})} -This represents a buffer; jumping to this value switches to buffer -@var{buffer-name}. +@item @code{(buffer @var{buffer})} +This represents a buffer; jumping to this value switches to that +@var{buffer}. @end table The functions in this section return unpredictable values unless