diff options
author | João Távora <joaotavora@gmail.com> | 2023-03-27 12:25:16 +0100 |
---|---|---|
committer | João Távora <joaotavora@gmail.com> | 2023-03-27 12:59:14 +0100 |
commit | edc460e3b6c38eee97dde847987b2c29dd134653 (patch) | |
tree | 89dce921cf45579d001f9896dd042e7600c43b57 /lisp/subr.el | |
parent | cbef1422fe3ba5d3327835f3952a0f42f7881716 (diff) | |
download | emacs-edc460e3b6c38eee97dde847987b2c29dd134653.tar.gz |
Fix accidental backward-incompatible change (bug#62417)
This code used to work, but with the change of 59ecf25fc860 it stopped
working:
(defun foop (buffer-name _alist) (string-match "foop" buffer-name))
(add-to-list 'display-buffer-alist '(foop . display-buffer-other-frame))
This change makes it work again, restoring compatibility.
* lisp/subr.el (buffer-match-p): Fix and adjust docstring.
* lisp/window.el (display-buffer-alist): Adjust docstring.
(display-buffer-assq-regexp): Make good on promise of display-buffer-alist.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r-- | lisp/subr.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index c73643f6d2b..8d27c831c96 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -7069,7 +7069,7 @@ CONDITION is either: - the symbol t, to always match, - the symbol nil, which never matches, - a regular expression, to match a buffer name, -- a predicate function that takes a buffer object and ARG as +- a predicate function that takes BUFFER-OR-NAME and ARG as arguments, and returns non-nil if the buffer matches, - a cons-cell, where the car describes how to interpret the cdr. The car can be one of the following: @@ -7095,8 +7095,8 @@ CONDITION is either: (string-match-p condition (buffer-name buffer))) ((pred functionp) (if (eq 1 (cdr (func-arity condition))) - (funcall condition buffer) - (funcall condition buffer arg))) + (funcall condition buffer-or-name) + (funcall condition buffer-or-name arg))) (`(major-mode . ,mode) (eq (buffer-local-value 'major-mode buffer) |