From: Martin Rudalics Date: Wed, 22 Jun 2011 07:12:18 +0000 (+0200) Subject: Remove preset entries for pop-up-frame-alist from window.el defaults. X-Git-Tag: emacs-pretest-24.0.90~104^2~478 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8998d1b3e8d8f53f3bf46b6a0b7ea89c8676811f;p=emacs.git 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 . * 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 94f6437989a..bfb630c5e3d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2011-06-22 Martin Rudalics + + * window.el (display-buffer-default-specifiers) + (display-buffer-alist): Remove entries for pop-up-frame-alist. + Suggested by Katsumi Yamaoka . + + * 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 * 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." (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") 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 (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)