bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62417: 30.0.50; Regression: 59ecf25fc860 is the first bad commit


From: João Távora
Subject: bug#62417: 30.0.50; Regression: 59ecf25fc860 is the first bad commit
Date: Fri, 24 Mar 2023 15:22:27 +0000
User-agent: Gnus/5.13 (Gnus v5.13)

tag 62417 patch

João Távora <joaotavora@gmail.com> writes:

> I haven't yet investigated the reason.  There are other use cases inside
> SLY that are also failing with similar errors, but they are not as easy
> to trigger.

The simples way to fix this is to make display-buffer-assq-regexp keep
the old protocol before trying `buffer-match-p'.

diff --git a/lisp/window.el b/lisp/window.el
index 2da2f8bb2c8..0932a05aabf 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -7502,8 +7502,13 @@ display-buffer-assq-regexp
 the form of the action argument passed to `display-buffer'."
   (catch 'match
     (dolist (entry alist)
-      (when (buffer-match-p (car entry) buffer-name action)
-        (throw 'match (cdr entry))))))
+      (let ((key (car entry)))
+        (when (or (and (stringp key)
+                       (string-match-p key buffer-name))
+                  (and (functionp key)
+                       (funcall key buffer-name action))
+                  (buffer-match-p (car entry) buffer-name action))
+          (throw 'match (cdr entry)))))))
 
 (defvar display-buffer--same-window-action
   '(display-buffer-same-window

Another way would be to fix this in buffer-match-p.

João





reply via email to

[Prev in Thread] Current Thread [Next in Thread]