2011-01-11 Martin Rudalics <rudalics@gmx.at>
+ * simple.el (goto-line, compose-mail-other-window): Replace
+ switch-to-buffer-other-window by pop-to-buffer-other-window.
+ (pop-global-mark): Use pop-to-buffer-same-window instead of
+ switch-to-buffer.
+ (compose-mail-other-frame): Use pop-to-buffer-other-frame
+ instead of switch-to-buffer-other-frame.
+ (special-mode-map): Bind "q" to quit-restore-window instead of
+ quit-window.
+
* buff-menu.el (Buffer-menu-mode-map): Bind "q" to
quit-restore-window.
(buffer-menu): Call pop-to-buffer-same-window.
(defvar special-mode-map
(let ((map (make-sparse-keymap)))
(suppress-keymap map)
- (define-key map "q" 'quit-window)
+ (define-key map "q" 'quit-restore-window)
(define-key map " " 'scroll-up)
(define-key map "\C-?" 'scroll-down)
(define-key map "?" 'describe-mode)
;; Switch to the desired buffer, one way or another.
(if buffer
(let ((window (get-buffer-window buffer)))
- (if window (select-window window)
- (switch-to-buffer-other-window buffer))))
+ (if window
+ (select-window window)
+ (pop-to-buffer-other-window buffer))))
;; Leave mark at previous position
(or (region-active-p) (push-mark))
;; Move to the specified line number in that buffer.
(widen)
(error "Global mark position is outside accessible part of buffer")))
(goto-char position)
- (switch-to-buffer buffer)))
+ (pop-to-buffer-same-window buffer)))
\f
(defcustom next-line-add-newlines nil
"If non-nil, `next-line' inserts newline to avoid `end of buffer' error."
(interactive
(list nil nil nil current-prefix-arg))
(compose-mail to subject other-headers continue
- 'switch-to-buffer-other-window yank-action send-actions))
+ 'pop-to-buffer-other-window yank-action send-actions))
(defun compose-mail-other-frame (&optional to subject other-headers continue
(interactive
(list nil nil nil current-prefix-arg))
(compose-mail to subject other-headers continue
- 'switch-to-buffer-other-frame yank-action send-actions))
+ 'pop-to-buffer-other-frame yank-action send-actions))
\f
(defvar set-variable-value-history nil
"History of values entered with `set-variable'.