[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp/mail pmailedit.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] emacs/lisp/mail pmailedit.el |
Date: |
Tue, 23 Dec 2008 04:02:15 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Richard M. Stallman <rms> 08/12/23 04:02:15
Modified files:
lisp/mail : pmailedit.el
Log message:
(pmail-edit-current-message): Change error message.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/mail/pmailedit.el?cvsroot=emacs&r1=1.9&r2=1.10
Patches:
Index: pmailedit.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/mail/pmailedit.el,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- pmailedit.el 23 Dec 2008 03:56:30 -0000 1.9
+++ pmailedit.el 23 Dec 2008 04:02:15 -0000 1.10
@@ -61,6 +61,8 @@
* \\[pmail-cease-edit] makes them permanent.
This functions runs the normal hook `pmail-edit-mode-hook'.
\\{pmail-edit-map}"
+ ;; Changing the major mode unswaps the Pmail buffer
+ ;; via change-major-mode-hook.
(delay-mode-hooks (text-mode))
(use-local-map pmail-edit-map)
(setq major-mode 'pmail-edit-mode)
@@ -82,9 +84,11 @@
"Edit the contents of this message."
(interactive)
(if (= pmail-total-messages 0)
- (error "No messages in this file"))
+ (error "No messages in this buffer"))
(make-local-variable 'pmail-old-pruned)
(setq pmail-old-pruned (eq pmail-header-style 'normal))
+ ;; Changing the major mode unswaps the Pmail buffer
+ ;; via change-major-mode-hook.
(pmail-edit-mode)
(make-local-variable 'pmail-old-text)
(setq pmail-old-text (buffer-substring (point-min) (point-max)))
@@ -114,16 +118,20 @@
(set-marker (aref pmail-message-vector (1+ pmail-current-message))
(point)))
(let ((old pmail-old-text))
+ ;; Go back to Pmail mode, but carefully.
(force-mode-line-update)
(kill-all-local-variables)
(pmail-mode-1)
(if (boundp 'tool-bar-map)
(set (make-local-variable 'tool-bar-map) pmail-tool-bar-map))
(pmail-variables)
+ ;; If text has really changed, mark message as edited.
(unless (and (= (length old) (- (point-max) (point-min)))
(string= old (buffer-substring (point-min) (point-max))))
(setq old nil)
(pmail-set-attribute pmail-edited-attr-index t)
+ ;;;??? BROKEN perhaps.
+ ;; I think that the Summary-Line header may not be kept there any more.
(if (boundp 'pmail-summary-vector)
(progn
(aset pmail-summary-vector (1- pmail-current-message) nil)
- [Emacs-diffs] emacs/lisp/mail pmailedit.el, Chong Yidong, 2008/12/04
- [Emacs-diffs] emacs/lisp/mail pmailedit.el, Chong Yidong, 2008/12/04
- [Emacs-diffs] emacs/lisp/mail pmailedit.el, Chong Yidong, 2008/12/04
- [Emacs-diffs] emacs/lisp/mail pmailedit.el, Richard M. Stallman, 2008/12/22
- [Emacs-diffs] emacs/lisp/mail pmailedit.el, Richard M. Stallman, 2008/12/22
- [Emacs-diffs] emacs/lisp/mail pmailedit.el,
Richard M. Stallman <=
- [Emacs-diffs] emacs/lisp/mail pmailedit.el, Richard M. Stallman, 2008/12/22
- [Emacs-diffs] emacs/lisp/mail pmailedit.el, Richard M. Stallman, 2008/12/22
- [Emacs-diffs] emacs/lisp/mail pmailedit.el, Richard M. Stallman, 2008/12/29