diff options
| author | Richard M. Stallman | 1994-09-22 05:47:28 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-09-22 05:47:28 +0000 |
| commit | 95e6cf3913dda77badbeeabf5327a1568d523a00 (patch) | |
| tree | 024433699cab556838d7605e2f3aac4e71edf802 | |
| parent | 34b0ef48cbde21e2e9e71639dc7df5943dea2614 (diff) | |
| download | emacs-95e6cf3913dda77badbeeabf5327a1568d523a00.tar.gz emacs-95e6cf3913dda77badbeeabf5327a1568d523a00.zip | |
(special-display-popup-frame): Rename new arg to ARGS.
Allow (FUNCTION OTHER-ARGS...) as the value of ARGS.
| -rw-r--r-- | lisp/frame.el | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/lisp/frame.el b/lisp/frame.el index e19ad10a3c2..f71a0a22e53 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -84,19 +84,25 @@ These supersede the values given in `default-frame-alist'.") | |||
| 84 | ;; Display BUFFER in its own frame, reusing an existing window if any. | 84 | ;; Display BUFFER in its own frame, reusing an existing window if any. |
| 85 | ;; Return the window chosen. | 85 | ;; Return the window chosen. |
| 86 | ;; Currently we do not insist on selecting the window within its frame. | 86 | ;; Currently we do not insist on selecting the window within its frame. |
| 87 | (defun special-display-popup-frame (buffer &optional params) | 87 | ;; If ARGS is an alist, use it as a list of frame parameter specs. |
| 88 | (let ((window (get-buffer-window buffer t))) | 88 | ;; If ARGS is a list whose car is a symbol. |
| 89 | (if window | 89 | ;; use (car ARGS) as a function to do the work. |
| 90 | ;; If we have a window already, make it visible. | 90 | ;; Pass it BUFFER as first arg, and (cdr ARGS) gives the rest of the args. |
| 91 | (let ((frame (window-frame window))) | 91 | (defun special-display-popup-frame (buffer &optional args) |
| 92 | (make-frame-visible frame) | 92 | (if (and args (symbolp (car args))) |
| 93 | (raise-frame frame) | 93 | (apply (car args) buffer (cdr args)) |
| 94 | window) | 94 | (let ((window (get-buffer-window buffer t))) |
| 95 | ;; If no window yet, make one in a new frame. | 95 | (if window |
| 96 | (let ((frame (make-frame (append params special-display-frame-alist)))) | 96 | ;; If we have a window already, make it visible. |
| 97 | (set-window-buffer (frame-selected-window frame) buffer) | 97 | (let ((frame (window-frame window))) |
| 98 | (set-window-dedicated-p (frame-selected-window frame) t) | 98 | (make-frame-visible frame) |
| 99 | (frame-selected-window frame))))) | 99 | (raise-frame frame) |
| 100 | window) | ||
| 101 | ;; If no window yet, make one in a new frame. | ||
| 102 | (let ((frame (make-frame (append args special-display-frame-alist)))) | ||
| 103 | (set-window-buffer (frame-selected-window frame) buffer) | ||
| 104 | (set-window-dedicated-p (frame-selected-window frame) t) | ||
| 105 | (frame-selected-window frame)))))) | ||
| 100 | 106 | ||
| 101 | (setq special-display-function 'special-display-popup-frame) | 107 | (setq special-display-function 'special-display-popup-frame) |
| 102 | 108 | ||