aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoseph Arceneaux1992-10-05 20:38:54 +0000
committerJoseph Arceneaux1992-10-05 20:38:54 +0000
commite9c735fabd6c06c4d3f3bd6c21025fd884dacf87 (patch)
tree06ac2eff16ff1512cabcc09b013d64e0f6667348
parentb81450127da14d8f882dcf1fe61842045394b154 (diff)
downloademacs-e9c735fabd6c06c4d3f3bd6c21025fd884dacf87.tar.gz
emacs-e9c735fabd6c06c4d3f3bd6c21025fd884dacf87.zip
* rmail.el (rmail-first-unseen-message): Don't show the message,
just return its number, if there was an unseen message. (rmail): Check for unseen messages before calling rmail-get-new-mail. After getting the new mail, call rmail-show-message to show the pre-existing unseen message, or if that is nil, the current message, which rmail-get-new-mail sets to the first new message.
-rw-r--r--lisp/mail/rmail.el23
1 files changed, 17 insertions, 6 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 5464eb3852f..4c4fa39aa70 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -201,10 +201,13 @@ that file, but does not copy any new mail into the file."
201 (progn 201 (progn
202 (rmail-set-message-counters) 202 (rmail-set-message-counters)
203 (rmail-show-message)))) 203 (rmail-show-message))))
204 (rmail-get-new-mail) 204 (let ((existing-unseen (rmail-first-unseen-message)))
205 ;; Show the first unseen message, which might be from a previous session 205 (rmail-get-new-mail)
206 ;; or might have been just read in by rmail-get-new-mail. 206 ;; Show the first unseen message, which might be from a previous session
207 (rmail-first-unseen-message))) 207 ;; or might have been just read in by rmail-get-new-mail. Must
208 ;; determine already unseen messages first, as rmail-get-new-mail
209 ;; positions on the first new messsage, thus marking it as seen.
210 (rmail-show-message existing-unseen))))
208 211
209;; Given the value of MAILPATH, return a list of inbox file names. 212;; Given the value of MAILPATH, return a list of inbox file names.
210;; This is turned off because it is not clear that the user wants 213;; This is turned off because it is not clear that the user wants
@@ -1261,6 +1264,12 @@ Interactively, empty argument means use same regexp used last time."
1261 (prefix-numeric-value current-prefix-arg)))) 1264 (prefix-numeric-value current-prefix-arg))))
1262 (rmail-search regexp (- (or n -1)))) 1265 (rmail-search regexp (- (or n -1))))
1263 1266
1267(defun glofp ()
1268 (interactive)
1269 (let ((new (1+ (string-to-int (buffer-substring (1- (point)) (point))))))
1270 (backward-delete-char 1)
1271 (insert (int-to-string new))))
1272
1264;; Show the first message which has the `unseen' attribute. 1273;; Show the first message which has the `unseen' attribute.
1265(defun rmail-first-unseen-message () 1274(defun rmail-first-unseen-message ()
1266 (let ((current 1) 1275 (let ((current 1)
@@ -1271,8 +1280,10 @@ Interactively, empty argument means use same regexp used last time."
1271 (if (rmail-message-labels-p current ", ?\\(unseen\\),") 1280 (if (rmail-message-labels-p current ", ?\\(unseen\\),")
1272 (setq found current)) 1281 (setq found current))
1273 (setq current (1+ current)))) 1282 (setq current (1+ current))))
1274 (if found 1283;; Let the caller show the message.
1275 (rmail-show-message found)))) 1284;; (if found
1285;; (rmail-show-message found))
1286 found))
1276 1287
1277;;;; *** Rmail Message Deletion Commands *** 1288;;;; *** Rmail Message Deletion Commands ***
1278 1289