diff options
Diffstat (limited to 'lisp/window.el')
-rw-r--r-- | lisp/window.el | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/lisp/window.el b/lisp/window.el index 08ce8498655..aa7520f30fa 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -7510,8 +7510,8 @@ Its value takes effect before processing the ACTION argument of If non-nil, this is an alist of elements (CONDITION . ACTION), where: - CONDITION is passed to `buffer-match-p', along with the buffer - that is to be displayed and the ACTION argument of + CONDITION is passed to `buffer-match-p', along with the name of + the buffer that is to be displayed and the ACTION argument of `display-buffer', to check if ACTION should be used. ACTION is a cons cell (FUNCTIONS . ALIST), where FUNCTIONS is an @@ -7565,15 +7565,16 @@ all fail. It should never be set by programs or users. See `display-buffer'.") (put 'display-buffer-fallback-action 'risky-local-variable t) -(defun display-buffer-assq-regexp (buffer-or-name alist action) - "Retrieve ALIST entry corresponding to buffer specified by BUFFER-OR-NAME. +(defun display-buffer-assq-regexp (buffer-name alist action) + "Retrieve ALIST entry corresponding to buffer whose name is BUFFER-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-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) buffer-name action) (throw 'match (cdr entry)))))) (defvar display-buffer--same-window-action @@ -7732,6 +7733,9 @@ specified by the ACTION argument." (let ((buffer (if (bufferp buffer-or-name) buffer-or-name (get-buffer buffer-or-name))) + (buf-name (if (bufferp buffer-or-name) + (buffer-name buffer-or-name) + buffer-or-name)) ;; Make sure that when we split windows the old window keeps ;; point, bug#14829. (split-window-keep-point t) @@ -7740,7 +7744,7 @@ specified by the ACTION argument." (unless (listp action) (setq action nil)) (let* ((user-action (display-buffer-assq-regexp - buffer display-buffer-alist action)) + buf-name display-buffer-alist action)) (special-action (display-buffer--special-action buffer)) ;; Extra actions from the arguments to this function: (extra-action |