diff options
| author | Constantine Vetoshev <gepardcv@gmail.com> | 2020-11-27 17:53:26 -0800 |
|---|---|---|
| committer | Constantine Vetoshev <gepardcv@gmail.com> | 2020-11-27 17:53:26 -0800 |
| commit | 526bd63a6857a5b8a53b407b3a133233a639a1ae (patch) | |
| tree | 70049598a2a30478fc8190b6cc0f315121083cb8 /perspective.el | |
| parent | 1eb46847ea563e213e21e65ec65892e37aeda577 (diff) | |
Match persp-read-buffer signature to read-buffer.
Diffstat (limited to 'perspective.el')
| -rw-r--r-- | perspective.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/perspective.el b/perspective.el index 73f4316..cffdd07 100644 --- a/perspective.el +++ b/perspective.el @@ -858,7 +858,7 @@ copied across frames." (let ((persp (gethash name (perspectives-hash)))) (if persp (cl-return-from persp-all-get (persp-buffers persp)))))))) -(defun persp-read-buffer (prompt &optional def require-match) +(defun persp-read-buffer (prompt &optional def require-match predicate) "A replacement for the built-in `read-buffer', meant to be used with `read-buffer-function'. Return the name of the buffer selected, only selecting from buffers within the current perspective. @@ -869,7 +869,7 @@ With a prefix arg, uses the old `read-buffer' instead." (persp-protect (let ((read-buffer-function nil)) (if current-prefix-arg - (read-buffer prompt def require-match) + (read-buffer prompt def require-match predicate) ;; Most of this is taken from `minibuffer-with-setup-hook', ;; slightly modified because it's not a macro. ;; The only functional difference is that the append argument @@ -884,7 +884,7 @@ With a prefix arg, uses the old `read-buffer' instead." (unwind-protect (progn (add-hook 'minibuffer-setup-hook persp-read-buffer-hook t) - (read-buffer prompt def require-match)) + (read-buffer prompt def require-match predicate)) (remove-hook 'minibuffer-setup-hook persp-read-buffer-hook))))))) (defun persp-complete-buffer () |
