+2010-11-05 Martin Rudalics <rudalics@gmx.at>
+
+ * electric.el (Electric-pop-up-window): Use buffer display
+ specifiers.
+
+ * emacs-lisp/elint.el (elint-display-log): Use
+ display-buffer-other-window.
+
+ * vc/pcvs-util.el (cvs-pop-to-buffer-same-frame): Use buffer
+ display specifiers.
+
2010-11-04 Martin Rudalics <rudalics@gmx.at>
* window.el (display-buffer-names, display-buffer-regexps): Make
(defun Electric-pop-up-window (buffer &optional max-height)
(let* ((win (or (get-buffer-window buffer) (selected-window)))
(buf (get-buffer buffer))
- (one-window (one-window-p t))
- (pop-up-windows t)
- (pop-up-frames nil))
+ (one-window (one-window-p t)))
(if (not buf)
(error "Buffer %s does not exist" buffer)
(cond ((and (eq (window-buffer win) buf))
(select-window win))
(one-window
- (pop-to-buffer buffer)
+ (pop-to-buffer
+ ;; Try to do what the comment above says.
+ buffer '(same-frame (new-window (selected . below))))
(setq win (selected-window)))
(t
(switch-to-buffer buf)))
#'electric-pair-post-self-insert-function)
(remove-hook 'post-self-insert-hook
#'electric-pair-post-self-insert-function)))
-
+
(provide 'electric)
;; arch-tag: dae045eb-dc2d-4fb7-9f27-9cc2ce277be8
(defun elint-display-log ()
"Display the lint log buffer."
- (let ((pop-up-windows t))
- (display-buffer (elint-get-log-buffer))
- (sit-for 0)))
+ (display-buffer-other-window (elint-get-log-buffer))
+ (sit-for 0))
(defvar elint-running)
+2010-11-05 Martin Rudalics <rudalics@gmx.at>
+
+ * message.el (message-mail-other-window)
+ (message-news-other-window): Pass pop-to-buffer-other-window as
+ switch-function to message-pop-to-buffer.
+ (message-mail-other-frame, message-news-other-frame): Pass
+ pop-to-buffer-other-frame as switch-function to
+ message-pop-to-buffer.
+
2010-11-04 Andrew Cohen <cohen@andy.bu.edu>
* nnir.el (gnus-summary-nnir-goto-thread): limiting work done by
"Like `message-mail' command, but display mail buffer in another window."
(interactive)
(unless (message-mail-user-agent)
- (let ((pop-up-windows t)
- (special-display-buffer-names nil)
- (special-display-regexps nil)
- (same-window-buffer-names nil)
- (same-window-regexps nil))
- (message-pop-to-buffer (message-buffer-name "mail" to))))
+ (message-pop-to-buffer
+ (message-buffer-name "mail" to) 'pop-to-buffer-other-window))
(let ((message-this-is-mail t))
(message-setup `((To . ,(or to "")) (Subject . ,(or subject "")))
nil nil nil 'switch-to-buffer-other-window)))
"Like `message-mail' command, but display mail buffer in another frame."
(interactive)
(unless (message-mail-user-agent)
- (let ((pop-up-frames t)
- (special-display-buffer-names nil)
- (special-display-regexps nil)
- (same-window-buffer-names nil)
- (same-window-regexps nil))
- (message-pop-to-buffer (message-buffer-name "mail" to))))
+ (message-pop-to-buffer
+ (message-buffer-name "mail" to) 'pop-to-buffer-other-frame))
(let ((message-this-is-mail t))
(message-setup `((To . ,(or to "")) (Subject . ,(or subject "")))
nil nil nil 'switch-to-buffer-other-frame)))
(defun message-news-other-window (&optional newsgroups subject)
"Start editing a news article to be sent."
(interactive)
- (let ((pop-up-windows t)
- (special-display-buffer-names nil)
- (special-display-regexps nil)
- (same-window-buffer-names nil)
- (same-window-regexps nil))
- (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups)))
+ (message-pop-to-buffer
+ (message-buffer-name "posting" nil newsgroups) 'pop-to-buffer-other-window)
(let ((message-this-is-news t))
(message-setup `((Newsgroups . ,(or newsgroups ""))
(Subject . ,(or subject ""))))))
(defun message-news-other-frame (&optional newsgroups subject)
"Start editing a news article to be sent."
(interactive)
- (let ((pop-up-frames t)
- (special-display-buffer-names nil)
- (special-display-regexps nil)
- (same-window-buffer-names nil)
- (same-window-regexps nil))
- (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups)))
+ (message-pop-to-buffer
+ (message-buffer-name "posting" nil newsgroups) 'pop-to-buffer-other-frame)
(let ((message-this-is-news t))
(message-setup `((Newsgroups . ,(or newsgroups ""))
(Subject . ,(or subject ""))))))
+2010-11-05 Martin Rudalics <rudalics@gmx.at>
+
+ * mh-comp.el (mh-send-other-window): Pass t as extra argument to
+ mh-send-sub.
+ (mh-send-sub): New optional argument OTHER-WINDOW. Pass extra
+ argument to mh-read-draft.
+ (mh-read-draft): New optional argument OTHER-WINDOW. Pass it in
+ suitable fashion to pop-to-buffer.
+
2010-11-03 Glenn Morris <rgm@gnu.org>
* mh-mime.el (dots, type, ov): Avoid unnecessary declaration.
(mh-interactive-read-address "To: ")
(mh-interactive-read-address "Cc: ")
(mh-interactive-read-string "Subject: ")))
- (let ((pop-up-windows t))
- (mh-send-sub to cc subject (current-window-configuration))))
+ (mh-send-sub to cc subject (current-window-configuration) t))
(defvar mh-error-if-no-draft nil) ;raise error over using old draft
(t
nil))))
-(defun mh-send-sub (to cc subject config)
+(defun mh-send-sub (to cc subject config &optional other-window)
"Do the real work of composing and sending a letter.
Expects the TO, CC, and SUBJECT fields as arguments.
-CONFIG is the window configuration before sending mail."
+CONFIG is the window configuration before sending mail.
+OTHER-WINDOW non-nil means use another window for composing."
(let ((folder mh-current-folder)
(msg-num (mh-get-msg-num nil)))
(message "Composing a message...")
(t
(error "Can't find %s in %s or %s"
mh-comp-formfile mh-user-path mh-lib))))
- nil)))
+ nil (and other-window t))))
(mh-insert-fields "To:" to "Subject:" subject "Cc:" cc)
(goto-char (point-max))
(mh-compose-and-send-mail draft "" folder msg-num
(mh-letter-mode-message)
(mh-letter-adjust-point))))
-(defun mh-read-draft (use initial-contents delete-contents-file)
+(defun mh-read-draft (use initial-contents delete-contents-file &optional other-window)
"Read draft file into a draft buffer and make that buffer the current one.
USE is a message used for prompting about the intended use of the
INITIAL-CONTENTS is filename that is read into an empty buffer, or nil
if buffer should not be modified. Delete the initial-contents file if
DELETE-CONTENTS-FILE flag is set.
+OTHER-WINDOW non-nil means use another window for displaying the
+draft file.
Returns the draft folder's name.
If the draft folder facility is enabled in ~/.mh_profile, a new buffer
is used each time and saved in the draft folder. The draft file can
(draft-file-name (mh-new-draft-name)))
(pop-to-buffer (generate-new-buffer
(format "draft-%s"
- (file-name-nondirectory draft-file-name))))
+ (file-name-nondirectory draft-file-name)))
+ (and other-window t))
(condition-case ()
(insert-file-contents draft-file-name t)
(file-error))
(setq default-directory orig-default-dir)))
(t
(let ((draft-name (expand-file-name "draft" mh-user-path)))
- (pop-to-buffer "draft") ; Create if necessary
+ (pop-to-buffer "draft" (and other-window t)) ; Create if necessary
(if (buffer-modified-p)
(if (y-or-n-p "Draft has been modified; kill anyway? ")
(set-buffer-modified-p nil)
"Pop to BUF like `pop-to-buffer' but staying on the same frame.
If `pop-to-buffer' would have opened a new frame, this function would
try to split a new window instead."
- (let ((pop-up-windows (or pop-up-windows pop-up-frames))
- (pop-up-frames nil))
- (or (let ((buf (get-buffer-window buf))) (and buf (select-window buf)))
- (and pop-up-windows
- (ignore-errors (select-window (split-window-vertically)))
- (switch-to-buffer buf))
- (pop-to-buffer (current-buffer)))))
+ (pop-to-buffer
+ (current-buffer) '(same-frame (new-window (selected . below))
+ (reuse-buffer-window . nil))))
(defun cvs-bury-buffer (buf &optional mainbuf)
"Hide the buffer BUF that was temporarily popped up.