diff options
| author | Martin Rudalics | 2011-06-22 09:12:18 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2011-06-22 09:12:18 +0200 |
| commit | 8998d1b3e8d8f53f3bf46b6a0b7ea89c8676811f (patch) | |
| tree | 92ac1aa62904aa0d23cbe946d8353496a39bad9e | |
| parent | 6af7a7844e0254fba81b2ba2992854bc2c169932 (diff) | |
| download | emacs-8998d1b3e8d8f53f3bf46b6a0b7ea89c8676811f.tar.gz emacs-8998d1b3e8d8f53f3bf46b6a0b7ea89c8676811f.zip | |
Remove preset entries for pop-up-frame-alist from window.el defaults.
* window.el (display-buffer-default-specifiers)
(display-buffer-alist): Remove entries for pop-up-frame-alist.
Suggested by Katsumi Yamaoka <yamaoka@jpl.org>.
* frame.el (pop-up-frame-alist, pop-up-frame-function)
(special-display-frame-alist, special-display-popup-frame):
Remove duplicate declarations. These are now in window.el.
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/frame.el | 90 | ||||
| -rw-r--r-- | lisp/window.el | 5 |
3 files changed, 11 insertions, 94 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 94f6437989a..bfb630c5e3d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2011-06-22 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * window.el (display-buffer-default-specifiers) | ||
| 4 | (display-buffer-alist): Remove entries for pop-up-frame-alist. | ||
| 5 | Suggested by Katsumi Yamaoka <yamaoka@jpl.org>. | ||
| 6 | |||
| 7 | * frame.el (pop-up-frame-alist, pop-up-frame-function) | ||
| 8 | (special-display-frame-alist, special-display-popup-frame): | ||
| 9 | Remove duplicate declarations. These are now in window.el. | ||
| 10 | |||
| 1 | 2011-06-21 Lars Magne Ingebrigtsen <larsi@gnus.org> | 11 | 2011-06-21 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 12 | ||
| 3 | * mail/smtpmail.el (smtpmail-via-smtp): Set | 13 | * mail/smtpmail.el (smtpmail-via-smtp): Set |
diff --git a/lisp/frame.el b/lisp/frame.el index a95e91c8eeb..3ceec2657e7 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -95,96 +95,6 @@ appended when the minibuffer frame is created." | |||
| 95 | (sexp :tag "Value"))) | 95 | (sexp :tag "Value"))) |
| 96 | :group 'frames) | 96 | :group 'frames) |
| 97 | 97 | ||
| 98 | (defcustom pop-up-frame-alist nil | ||
| 99 | "Alist of parameters for automatically generated new frames. | ||
| 100 | You can set this in your init file; for example, | ||
| 101 | |||
| 102 | (setq pop-up-frame-alist '((width . 80) (height . 20))) | ||
| 103 | |||
| 104 | If non-nil, the value you specify here is used by the default | ||
| 105 | `pop-up-frame-function' for the creation of new frames. | ||
| 106 | |||
| 107 | Since `pop-up-frame-function' is used by `display-buffer' for | ||
| 108 | making new frames, any value specified here by default affects | ||
| 109 | the automatic generation of new frames via `display-buffer' and | ||
| 110 | all functions based on it. The behavior of `make-frame' is not | ||
| 111 | affected by this variable." | ||
| 112 | :type '(repeat (cons :format "%v" | ||
| 113 | (symbol :tag "Parameter") | ||
| 114 | (sexp :tag "Value"))) | ||
| 115 | :group 'frames) | ||
| 116 | |||
| 117 | (defcustom pop-up-frame-function | ||
| 118 | (lambda () (make-frame pop-up-frame-alist)) | ||
| 119 | "Function used by `display-buffer' for creating a new frame. | ||
| 120 | This function is called with no arguments and should return a new | ||
| 121 | frame. The default value calls `make-frame' with the argument | ||
| 122 | `pop-up-frame-alist'." | ||
| 123 | :type 'function | ||
| 124 | :group 'frames) | ||
| 125 | |||
| 126 | (defcustom special-display-frame-alist | ||
| 127 | '((height . 14) (width . 80) (unsplittable . t)) | ||
| 128 | "Alist of parameters for special frames. | ||
| 129 | Special frames are used for buffers whose names are listed in | ||
| 130 | `special-display-buffer-names' and for buffers whose names match | ||
| 131 | one of the regular expressions in `special-display-regexps'. | ||
| 132 | |||
| 133 | This variable can be set in your init file, like this: | ||
| 134 | |||
| 135 | (setq special-display-frame-alist '((width . 80) (height . 20))) | ||
| 136 | |||
| 137 | These supersede the values given in `default-frame-alist'." | ||
| 138 | :type '(repeat (cons :format "%v" | ||
| 139 | (symbol :tag "Parameter") | ||
| 140 | (sexp :tag "Value"))) | ||
| 141 | :group 'frames) | ||
| 142 | |||
| 143 | (defun special-display-popup-frame (buffer &optional args) | ||
| 144 | "Display BUFFER and return the window chosen. | ||
| 145 | If BUFFER is already displayed in a visible or iconified frame, | ||
| 146 | raise that frame. Otherwise, display BUFFER in a new frame. | ||
| 147 | |||
| 148 | Optional argument ARGS is a list specifying additional | ||
| 149 | information. | ||
| 150 | |||
| 151 | If ARGS is an alist, use it as a list of frame parameters. If | ||
| 152 | these parameters contain \(same-window . t), display BUFFER in | ||
| 153 | the selected window. If they contain \(same-frame . t), display | ||
| 154 | BUFFER in a window of the selected frame. | ||
| 155 | |||
| 156 | If ARGS is a list whose car is a symbol, use (car ARGS) as a | ||
| 157 | function to do the work. Pass it BUFFER as first argument, | ||
| 158 | and (cdr ARGS) as second." | ||
| 159 | (if (and args (symbolp (car args))) | ||
| 160 | (apply (car args) buffer (cdr args)) | ||
| 161 | (let ((window (get-buffer-window buffer 0))) | ||
| 162 | (or | ||
| 163 | ;; If we have a window already, make it visible. | ||
| 164 | (when window | ||
| 165 | (let ((frame (window-frame window))) | ||
| 166 | (make-frame-visible frame) | ||
| 167 | (raise-frame frame) | ||
| 168 | window)) | ||
| 169 | ;; Reuse the current window if the user requested it. | ||
| 170 | (when (cdr (assq 'same-window args)) | ||
| 171 | (condition-case nil | ||
| 172 | (progn (switch-to-buffer buffer) (selected-window)) | ||
| 173 | (error nil))) | ||
| 174 | ;; Stay on the same frame if requested. | ||
| 175 | (when (or (cdr (assq 'same-frame args)) (cdr (assq 'same-window args))) | ||
| 176 | (let* ((pop-up-windows t) | ||
| 177 | pop-up-frames | ||
| 178 | special-display-buffer-names special-display-regexps) | ||
| 179 | (display-buffer buffer))) | ||
| 180 | ;; If no window yet, make one in a new frame. | ||
| 181 | (let ((frame | ||
| 182 | (with-current-buffer buffer | ||
| 183 | (make-frame (append args special-display-frame-alist))))) | ||
| 184 | (set-window-buffer (frame-selected-window frame) buffer) | ||
| 185 | (set-window-dedicated-p (frame-selected-window frame) t) | ||
| 186 | (frame-selected-window frame)))))) | ||
| 187 | |||
| 188 | (defun handle-delete-frame (event) | 98 | (defun handle-delete-frame (event) |
| 189 | "Handle delete-frame events from the X server." | 99 | "Handle delete-frame events from the X server." |
| 190 | (interactive "e") | 100 | (interactive "e") |
diff --git a/lisp/window.el b/lisp/window.el index 8934cc297ad..1c347c70067 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -3820,8 +3820,6 @@ subwindows can get as small as `window-safe-min-height' and | |||
| 3820 | (pop-up-window-min-height . 40) | 3820 | (pop-up-window-min-height . 40) |
| 3821 | (pop-up-window-min-width . 80) | 3821 | (pop-up-window-min-width . 80) |
| 3822 | (reuse-window other nil nil) | 3822 | (reuse-window other nil nil) |
| 3823 | (pop-up-frame-alist | ||
| 3824 | (height . 24) (width . 80)) | ||
| 3825 | (reuse-window nil other visible) | 3823 | (reuse-window nil other visible) |
| 3826 | (reuse-window nil nil t) | 3824 | (reuse-window nil nil t) |
| 3827 | (reuse-window-even-sizes . t)) | 3825 | (reuse-window-even-sizes . t)) |
| @@ -4371,8 +4369,7 @@ using the location specifiers `same-window' or `other-frame'." | |||
| 4371 | (list | 4369 | (list |
| 4372 | :tag "Pop-up frame" | 4370 | :tag "Pop-up frame" |
| 4373 | :value (pop-up-frame | 4371 | :value (pop-up-frame |
| 4374 | (pop-up-frame) | 4372 | (pop-up-frame)) |
| 4375 | (pop-up-frame-alist (height . 24) (width . 80))) | ||
| 4376 | :format "%t\n%v" | 4373 | :format "%t\n%v" |
| 4377 | :inline t | 4374 | :inline t |
| 4378 | (const :format "" pop-up-frame) | 4375 | (const :format "" pop-up-frame) |