+2001-11-19 Sam Steingold <sds@gnu.org>
+
+ * bindings.el (last-buffer, unbury-buffer): New function.
+ (mode-line-unbury-buffer): Use `unbury-buffer'.
+
2001-11-18 Stephen Eglen <stephen@gnu.org>
* iswitchb.el (iswitchb-cannot-complete-hook): New variable to
(Math-num-integerp, Math-bignum-test, Math-equal-int)
(Math-natnum-lessp, math-format-radix-digit): Change to `defsubst'.
(calc-record-compilation-date-macro): Deleted. Callers updated.
- (math-format-radix-digit): Move to calc-bin.el.
+ (math-format-radix-digit): Move to calc-bin.el.
* calc/calc.el (calc-record-compilation-date): Remove.
(calc-bug-address): Update.
(calc-settings-file): Use `user-init-file'.
-
+
* calc/calc-mode.el (calc-settings-file-name, calc-save-modes):
Handle null `calc-settings-file'.
(calcFunc-floor): Ditto.
* calc-units.el (calcFunc-usimplify): Ditto.
-
+
* calc-aent.el, calc-ext.el, calc-incom.el, calc-misc.el
* calc-sel.el, calc-vec.el, calc-alg.el, calc-fin.el
* calc-keypd.el, calc-mode.el, calc-stat.el, calc-yank.el
and move them before their first use. Use `when', `unless'.
Remove trailing periods from error forms. Add description and
headers suggested by Emacs Lisp coding conventions.
-
+
2001-11-19 Stefan Monnier <monnier@cs.yale.edu>
* newcomment.el (comment-indent):
'mouse-2 #'mode-line-widen))
(propertize ")%]--" 'help-echo help-echo)))
- (setq-default mode-line-position
+ (setq-default mode-line-position
`((line-number-mode (,(propertize "L%l" 'help-echo help-echo) ,dashes))
(column-number-mode (,(propertize "C%c" 'help-echo help-echo) ,dashes))
(-3 . ,(propertize "%p" 'help-echo help-echo)))))
(defvar mode-line-mode-menu-keymap nil "\
Keymap for mode operations menu in the mode line.")
+(defun last-buffer () "
+Return the last non-hidden buffer in the buffer list."
+ (let ((list (reverse (buffer-list))))
+ (while (eq (aref (buffer-name (car list)) 0) ? )
+ (setq list (cdr list)))
+ (car list)))
+
+(defun unbury-buffer () "
+Switch to the `last-buffer'."
+ (interactive)
+ (switch-to-buffer (last-buffer)))
+
(defun mode-line-unbury-buffer (event) "\
-Switch to the last buffer in the buffer list that is not hidden."
+Call `unbury-buffer' in this window."
(interactive "e")
(save-selected-window
(select-window (posn-window (event-start event)))
- (let ((list (reverse (buffer-list))))
- (while (eq (aref (buffer-name (car list)) 0) ? )
- (setq list (cdr list)))
- (switch-to-buffer (car list)))))
+ (unbury-buffer)))
(defun mode-line-bury-buffer (event) "\
Like bury-buffer, but temporarily select EVENT's window."