changeset 100630:6ad9ecc72b63

(pmail-save): New function.
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 22 Dec 2008 00:05:51 +0000
parents cc7f1aa8703e
children 9edfb32d9f38
files lisp/mail/pmail.el
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/pmail.el	Mon Dec 22 00:05:20 2008 +0000
+++ b/lisp/mail/pmail.el	Mon Dec 22 00:05:51 2008 +0000
@@ -1000,6 +1000,7 @@
 ;; I find I can't live without the default M-r command -- rms.
 ;;  (define-key pmail-mode-map "\er"  'pmail-search-backwards)
   (define-key pmail-mode-map "s"      'pmail-expunge-and-save)
+  (define-key pmail-mode-map "\C-x\C-s" 'pmail-save)
   (define-key pmail-mode-map "\es"    'pmail-search)
   (define-key pmail-mode-map "t"      'pmail-toggle-header)
   (define-key pmail-mode-map "u"      'pmail-undelete-previous-message)
@@ -1419,6 +1420,16 @@
       (pmail-select-summary (set-buffer-modified-p nil))
     (pmail-show-message)))
 
+(defun pmail-save ()
+  "Save the PMAIL file."
+  (interactive)
+  (set-buffer pmail-buffer)
+  (pmail-swap-buffers-maybe)
+  (save-buffer)
+  (if (pmail-summary-exists)
+      (pmail-select-summary (set-buffer-modified-p nil))
+    (pmail-show-message)))
+
 (defun pmail-quit ()
   "Quit out of PMAIL.
 Hook `pmail-quit-hook' is run after expunging."