]> git.eshelyaron.com Git - emacs.git/commitdiff
(desktop-buffer-rmail): Handle the situation
authorRichard M. Stallman <rms@gnu.org>
Wed, 6 Jul 1994 19:45:38 +0000 (19:45 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 6 Jul 1994 19:45:38 +0000 (19:45 +0000)
where the RMAIL file is locked, mail is waiting, and the
user selects `quit' gracefully.

lisp/desktop.el

index fa92582fef6f50190832846391051fd82ac6e8eb..2e12ac34e7ade08bbc27199c24560221aa206824 100644 (file)
@@ -447,7 +447,11 @@ autoloaded files."
 ;; ----------------------------------------------------------------------------
 (defun desktop-buffer-rmail () "Load an RMAIL file."
   (if (eq 'rmail-mode mam)
-      (progn (rmail-input fn) t)))
+      (condition-case error
+        (progn (rmail-input fn) t)
+      (file-locked
+       (kill-buffer (current-buffer))
+       'ignored))))
 ;; ----------------------------------------------------------------------------
 (defun desktop-buffer-mh () "Load a folder in the mh system."
   (if (eq 'mh-folder-mode mam)