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.
This commit is contained in:
parent
6af7a7844e
commit
8998d1b3e8
3 changed files with 11 additions and 94 deletions
|
@ -1,3 +1,13 @@
|
|||
2011-06-22 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* 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.
|
||||
|
||||
2011-06-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* mail/smtpmail.el (smtpmail-via-smtp): Set
|
||||
|
|
|
@ -95,96 +95,6 @@ appended when the minibuffer frame is created."
|
|||
(sexp :tag "Value")))
|
||||
:group 'frames)
|
||||
|
||||
(defcustom pop-up-frame-alist nil
|
||||
"Alist of parameters for automatically generated new frames.
|
||||
You can set this in your init file; for example,
|
||||
|
||||
(setq pop-up-frame-alist '((width . 80) (height . 20)))
|
||||
|
||||
If non-nil, the value you specify here is used by the default
|
||||
`pop-up-frame-function' for the creation of new frames.
|
||||
|
||||
Since `pop-up-frame-function' is used by `display-buffer' for
|
||||
making new frames, any value specified here by default affects
|
||||
the automatic generation of new frames via `display-buffer' and
|
||||
all functions based on it. The behavior of `make-frame' is not
|
||||
affected by this variable."
|
||||
:type '(repeat (cons :format "%v"
|
||||
(symbol :tag "Parameter")
|
||||
(sexp :tag "Value")))
|
||||
:group 'frames)
|
||||
|
||||
(defcustom pop-up-frame-function
|
||||
(lambda () (make-frame pop-up-frame-alist))
|
||||
"Function used by `display-buffer' for creating a new frame.
|
||||
This function is called with no arguments and should return a new
|
||||
frame. The default value calls `make-frame' with the argument
|
||||
`pop-up-frame-alist'."
|
||||
:type 'function
|
||||
:group 'frames)
|
||||
|
||||
(defcustom special-display-frame-alist
|
||||
'((height . 14) (width . 80) (unsplittable . t))
|
||||
"Alist of parameters for special frames.
|
||||
Special frames are used for buffers whose names are listed in
|
||||
`special-display-buffer-names' and for buffers whose names match
|
||||
one of the regular expressions in `special-display-regexps'.
|
||||
|
||||
This variable can be set in your init file, like this:
|
||||
|
||||
(setq special-display-frame-alist '((width . 80) (height . 20)))
|
||||
|
||||
These supersede the values given in `default-frame-alist'."
|
||||
:type '(repeat (cons :format "%v"
|
||||
(symbol :tag "Parameter")
|
||||
(sexp :tag "Value")))
|
||||
:group 'frames)
|
||||
|
||||
(defun special-display-popup-frame (buffer &optional args)
|
||||
"Display BUFFER and return the window chosen.
|
||||
If BUFFER is already displayed in a visible or iconified frame,
|
||||
raise that frame. Otherwise, display BUFFER in a new frame.
|
||||
|
||||
Optional argument ARGS is a list specifying additional
|
||||
information.
|
||||
|
||||
If ARGS is an alist, use it as a list of frame parameters. If
|
||||
these parameters contain \(same-window . t), display BUFFER in
|
||||
the selected window. If they contain \(same-frame . t), display
|
||||
BUFFER in a window of the selected frame.
|
||||
|
||||
If ARGS is a list whose car is a symbol, use (car ARGS) as a
|
||||
function to do the work. Pass it BUFFER as first argument,
|
||||
and (cdr ARGS) as second."
|
||||
(if (and args (symbolp (car args)))
|
||||
(apply (car args) buffer (cdr args))
|
||||
(let ((window (get-buffer-window buffer 0)))
|
||||
(or
|
||||
;; If we have a window already, make it visible.
|
||||
(when window
|
||||
(let ((frame (window-frame window)))
|
||||
(make-frame-visible frame)
|
||||
(raise-frame frame)
|
||||
window))
|
||||
;; Reuse the current window if the user requested it.
|
||||
(when (cdr (assq 'same-window args))
|
||||
(condition-case nil
|
||||
(progn (switch-to-buffer buffer) (selected-window))
|
||||
(error nil)))
|
||||
;; Stay on the same frame if requested.
|
||||
(when (or (cdr (assq 'same-frame args)) (cdr (assq 'same-window args)))
|
||||
(let* ((pop-up-windows t)
|
||||
pop-up-frames
|
||||
special-display-buffer-names special-display-regexps)
|
||||
(display-buffer buffer)))
|
||||
;; If no window yet, make one in a new frame.
|
||||
(let ((frame
|
||||
(with-current-buffer buffer
|
||||
(make-frame (append args special-display-frame-alist)))))
|
||||
(set-window-buffer (frame-selected-window frame) buffer)
|
||||
(set-window-dedicated-p (frame-selected-window frame) t)
|
||||
(frame-selected-window frame))))))
|
||||
|
||||
(defun handle-delete-frame (event)
|
||||
"Handle delete-frame events from the X server."
|
||||
(interactive "e")
|
||||
|
|
|
@ -3820,8 +3820,6 @@ subwindows can get as small as `window-safe-min-height' and
|
|||
(pop-up-window-min-height . 40)
|
||||
(pop-up-window-min-width . 80)
|
||||
(reuse-window other nil nil)
|
||||
(pop-up-frame-alist
|
||||
(height . 24) (width . 80))
|
||||
(reuse-window nil other visible)
|
||||
(reuse-window nil nil t)
|
||||
(reuse-window-even-sizes . t))
|
||||
|
@ -4371,8 +4369,7 @@ using the location specifiers `same-window' or `other-frame'."
|
|||
(list
|
||||
:tag "Pop-up frame"
|
||||
:value (pop-up-frame
|
||||
(pop-up-frame)
|
||||
(pop-up-frame-alist (height . 24) (width . 80)))
|
||||
(pop-up-frame))
|
||||
:format "%t\n%v"
|
||||
:inline t
|
||||
(const :format "" pop-up-frame)
|
||||
|
|
Loading…
Add table
Reference in a new issue