Mercurial > emacs
comparison lisp/mail/rmail.el @ 5586:fdf1d3924296
(rmail-bury): Rename local rmail-buffer to buffer-to-bury.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 14 Jan 1994 18:35:09 +0000 |
parents | b8e8802d2216 |
children | 55fdac09e7a9 |
comparison
equal
deleted
inserted
replaced
5585:0c8f4489999d | 5586:fdf1d3924296 |
---|---|
1246 (message "Counting messages...") | 1246 (message "Counting messages...") |
1247 (goto-char (point-max)) | 1247 (goto-char (point-max)) |
1248 ;; Put at the end of messages-head | 1248 ;; Put at the end of messages-head |
1249 ;; the entry for message N+1, which marks | 1249 ;; the entry for message N+1, which marks |
1250 ;; the end of message N. (N = number of messages). | 1250 ;; the end of message N. (N = number of messages). |
1251 (search-backward "\n\^_") | 1251 (search-backward "\n\^_" nil t) |
1252 (forward-char 1) | 1252 (if (/= (point) (point-max)) (forward-char 1)) |
1253 (setq messages-head (list (point-marker))) | 1253 (setq messages-head (list (point-marker))) |
1254 (rmail-set-message-counters-counter (min (point) point-save)) | 1254 (rmail-set-message-counters-counter (min (point) point-save)) |
1255 (setq messages-after-point total-messages) | 1255 (setq messages-after-point total-messages) |
1256 (rmail-set-message-counters-counter) | 1256 (rmail-set-message-counters-counter) |
1257 (setq rmail-total-messages total-messages) | 1257 (setq rmail-total-messages total-messages) |
1980 (end-of-line)))))) | 1980 (end-of-line)))))) |
1981 | 1981 |
1982 (defun rmail-bury () | 1982 (defun rmail-bury () |
1983 "Bury current Rmail buffer and its summary buffer." | 1983 "Bury current Rmail buffer and its summary buffer." |
1984 (interactive) | 1984 (interactive) |
1985 (let ((rmail-buffer (current-buffer))) | 1985 ;; This let var was called rmail-buffer, but that interfered |
1986 ;; with the buffer-local var used in summary buffers. | |
1987 (let ((buffer-to-bury (current-buffer))) | |
1986 (if (rmail-summary-exists) | 1988 (if (rmail-summary-exists) |
1987 (let (window) | 1989 (let (window) |
1988 (while (setq window (get-buffer-window rmail-summary-buffer)) | 1990 (while (setq window (get-buffer-window rmail-summary-buffer)) |
1989 (set-window-buffer window (other-buffer rmail-summary-buffer))) | 1991 (set-window-buffer window (other-buffer rmail-summary-buffer))) |
1990 (bury-buffer rmail-summary-buffer))) | 1992 (bury-buffer rmail-summary-buffer))) |
1991 (switch-to-buffer (other-buffer (current-buffer))) | 1993 (switch-to-buffer (other-buffer (current-buffer))) |
1992 (bury-buffer rmail-buffer))) | 1994 (bury-buffer buffer-to-bury))) |
1993 | 1995 |
1994 (defun rmail-summary-exists () | 1996 (defun rmail-summary-exists () |
1995 "Non-nil iff in an RMAIL buffer and an associated summary buffer exists. | 1997 "Non-nil iff in an RMAIL buffer and an associated summary buffer exists. |
1996 Non-nil value returned is the summary buffer." | 1998 Non-nil value returned is the summary buffer." |
1997 (and rmail-summary-buffer (buffer-name rmail-summary-buffer) | 1999 (and rmail-summary-buffer (buffer-name rmail-summary-buffer) |