(put 'mode-line-buffer-identification 'risky-local-variable t)
(make-variable-buffer-local 'mode-line-buffer-identification)
-(defun unbury-buffer () "\
-Switch to the last buffer in the buffer list."
- (interactive)
- (switch-to-buffer (last-buffer)))
-
(defun mode-line-unbury-buffer (event) "\
Call `unbury-buffer' in this window."
(interactive "e")
(defun mode-line-other-buffer () "\
Switch to the most recently selected buffer other than the current one."
(interactive)
- (switch-to-buffer (other-buffer)))
+ (with-no-warnings ; We really do want to call `switch-to-buffer' here.
+ (switch-to-buffer (other-buffer))))
(defun mode-line-next-buffer (event)
"Like `next-buffer', but temporarily select EVENT's window."
(define-key map [up] 'previous-history-element)
(define-key map "\es" 'next-matching-history-element)
(define-key map "\er" 'previous-matching-history-element)
+ (define-key map [remap next-buffer] 'ignore)
+ (define-key map [remap previous-buffer] 'ignore)
;; Override the global binding (which calls indent-relative via
;; indent-for-tab-command). The alignment that indent-relative tries to
;; do doesn't make much sense here since the prompt messes it up.