[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp/mail pmail.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] emacs/lisp/mail pmail.el |
Date: |
Mon, 29 Dec 2008 19:16:37 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Richard M. Stallman <rms> 08/12/29 19:16:37
Modified files:
lisp/mail : pmail.el
Log message:
(pmail-forwarded-attr-index): Doc fix.
(pmail-resent-attr-index): New variable.
(pmail-attr-array): Add r for resent.
(pmail-add-mbox-headers): Make 8 attributes.
(pmail-set-attribute): Extend attribute line if necessary.
(pmail-widen): New command.
(pmail-mode-map): o is pmail-output, C-o is pmail-output-as-seen,
(pmail-mode-map): c-w is pmail-widen.
(pmail-change-major-mode-hook): Do nothing unless buffer-swapped-with.
(pmail-show-message): Downcase character-coding.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/mail/pmail.el?cvsroot=emacs&r1=1.41&r2=1.42
Patches:
Index: pmail.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/mail/pmail.el,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- pmail.el 23 Dec 2008 03:56:10 -0000 1.41
+++ pmail.el 29 Dec 2008 19:16:37 -0000 1.42
@@ -65,11 +65,14 @@
"The index for the `retried' attribute.")
(defconst pmail-forwarded-attr-index 5
- "The index for the `stored' attribute.")
+ "The index for the `forwarded' attribute.")
(defconst pmail-unseen-attr-index 6
"The index for the `unseen' attribute.")
+(defconst pmail-resent-attr-index 6
+ "The index for the `resent' attribute.")
+
(defconst pmail-attr-array
'[(?A "answered")
(?D "deleted")
@@ -77,7 +80,8 @@
(?F "filed")
(?R "retried")
(?S "forwarded")
- (?U "unseen")]
+ (?U "unseen")
+ (?r "resent")]
"An array that provides a mapping between an attribute index,
its character representation and its display representation.")
@@ -986,8 +990,8 @@
(define-key pmail-mode-map "n" 'pmail-next-undeleted-message)
(define-key pmail-mode-map "\en" 'pmail-next-message)
(define-key pmail-mode-map "\e\C-n" 'pmail-next-labeled-message)
- (define-key pmail-mode-map "o" 'pmail-output-to-babyl-file)
- (define-key pmail-mode-map "\C-o" 'pmail-output)
+ (define-key pmail-mode-map "o" 'pmail-output)
+ (define-key pmail-mode-map "\C-o" 'pmail-output-as-seen)
(define-key pmail-mode-map "p" 'pmail-previous-undeleted-message)
(define-key pmail-mode-map "\ep" 'pmail-previous-message)
(define-key pmail-mode-map "\e\C-p" 'pmail-previous-labeled-message)
@@ -1000,6 +1004,7 @@
(define-key pmail-mode-map "t" 'pmail-toggle-header)
(define-key pmail-mode-map "u" 'pmail-undelete-previous-message)
(define-key pmail-mode-map "w" 'pmail-output-body-to-file)
+ (define-key pmail-mode-map "C-w" 'pmail-widen)
(define-key pmail-mode-map "x" 'pmail-expunge)
(define-key pmail-mode-map "." 'pmail-beginning-of-message)
(define-key pmail-mode-map "/" 'pmail-end-of-message)
@@ -1276,9 +1281,10 @@
(defun pmail-change-major-mode-hook ()
;; Bring the actual Pmail messages back into the main buffer.
+ (if buffer-swapped-with
(when (pmail-buffers-swapped-p)
(setq buffer-swapped-with nil)
- (buffer-swap-text pmail-view-buffer)))
+ (buffer-swap-text pmail-view-buffer))))
;; Throw away the summary.
;;(when (buffer-live-p pmail-view-buffer) (kill-buffer pmail-view-buffer)))
@@ -1930,7 +1936,7 @@
(save-restriction
(let ((count 0)
(start (point))
- (value "------U")
+ (value "------U-")
limit)
;; Detect an empty inbox file.
(unless (= start (point-max))
@@ -2145,13 +2151,22 @@
(if (search-forward (concat pmail-attribute-header ": ")
limit t)
;; If this message already records attributes,
;; just change the value for this one.
- (progn (forward-char attr)
+ (let ((missing (- (+ (point) attr) (line-end-position))))
+ ;; Position point at this attribute,
+ ;; adding attributes if necessary.
+ (if (> missing 0)
+ (progn
+ (end-of-line)
+ (insert-char ?- missing)
+ (backward-char 1))
+ (forward-char attr))
+ ;; Change this attribute.
(when (/= value (char-after))
(delete-char 1)
(insert value)))
;; Otherwise add a header line to record the attributes
- ;; and set all but this one to nil.
- (let ((header-value "-------"))
+ ;; and set all but this one to no.
+ (let ((header-value "--------"))
(aset header-value attr value)
(goto-char (if limit (- limit 1) (point-max)))
(insert pmail-attribute-header ": " header-value
"\n"))))))
@@ -2441,6 +2456,12 @@
(buffer-swap-text pmail-view-buffer)
(setq buffer-swapped-with nil))))
+(defun pmail-widen ()
+ "Display the entire mailbox file."
+ (interactive)
+ (pmail-swap-buffers-maybe)
+ (widen))
+
(defun pmail-show-message-maybe (&optional n no-summary)
"Show message number N (prefix argument), counting from start of file.
If summary buffer is currently displayed, update current message there also."
@@ -2521,6 +2542,8 @@
(setq character-coding (mail-fetch-field "content-transfer-encoding")
is-text-message (pmail-is-text-p)
coding-system (pmail-get-coding-system))
+ (if character-coding
+ (setq character-coding (downcase character-coding)))
(widen)
(narrow-to-region beg end)
;; Decode the message body into an empty view buffer using a
- [Emacs-diffs] emacs/lisp/mail pmail.el, (continued)
- [Emacs-diffs] emacs/lisp/mail pmail.el, Chong Yidong, 2008/12/15
- [Emacs-diffs] emacs/lisp/mail pmail.el, Chong Yidong, 2008/12/19
- [Emacs-diffs] emacs/lisp/mail pmail.el, Chong Yidong, 2008/12/19
- [Emacs-diffs] emacs/lisp/mail pmail.el, Chong Yidong, 2008/12/20
- [Emacs-diffs] emacs/lisp/mail pmail.el, Chong Yidong, 2008/12/20
- [Emacs-diffs] emacs/lisp/mail pmail.el, Chong Yidong, 2008/12/21
- [Emacs-diffs] emacs/lisp/mail pmail.el, Richard M. Stallman, 2008/12/22
- [Emacs-diffs] emacs/lisp/mail pmail.el, Richard M. Stallman, 2008/12/22
- [Emacs-diffs] emacs/lisp/mail pmail.el, Richard M. Stallman, 2008/12/22
- [Emacs-diffs] emacs/lisp/mail pmail.el, Richard M. Stallman, 2008/12/22
- [Emacs-diffs] emacs/lisp/mail pmail.el,
Richard M. Stallman <=
- [Emacs-diffs] emacs/lisp/mail pmail.el, Chong Yidong, 2008/12/30