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

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

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


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

Eli Zaretskii <eliz@gnu.org> writes:

>> From: João Távora <joaotavora@gmail.com>
>> Cc: philipk@posteo.net,  62417@debbugs.gnu.org
>> Date: Sun, 26 Mar 2023 21:22:14 +0100
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> > The function should be called with the same BUFFER-OR-NAME argument
>> > with which buffer-match-p was called.
>> 
>> Here's your idea in a patch.  It fixes the issue.  Propose this be
>> pushed to emacs-29.
>
> Please install on emacs-29, and thanks.

Done. I took the liberty of pushing this additional change to the patch
I showed, which is essential to make this work.  I had forgotten to show
it.  Unless there are objections, we can close this bug.

 (defun display-buffer-assq-regexp (buffer-or-name alist action)
   "Retrieve ALIST entry corresponding to buffer specified by BUFFER-OR-NAME.
 This returns the cdr of the alist entry ALIST if the entry's
-key (its car) and BUFFER-OR-NAME satisfy `buffer-match-p', using
-the key as CONDITION argument of `buffer-match-p'.  ACTION should
-have the form of the action argument passed to `display-buffer'."
+key (its car) and the name of the buffer designated by
+BUFFER-OR-NAME satisfy `buffer-match-p', using the key as
+CONDITION argument of `buffer-match-p'.  ACTION should have the
+form of the action argument passed to `display-buffer'."
   (catch 'match
     (dolist (entry alist)
-      (when (buffer-match-p (car entry) buffer-or-name action)
+      (when (buffer-match-p (car entry) (if (stringp buffer-or-name)
+                                            buffer-or-name
+                                          (buffer-name buffer-or-name))
+                                          action)
         (throw 'match (cdr entry))))))

João





reply via email to

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