+2006-01-20 Alex Schroeder <alex@gnu.org>
+
+ * rmailsum.el (rmail-summary-mode): Fixed typo in doc string and
+ keymap.
+ (rmail-summary-update-attribute): Deleted.
+ (rmail-summary-update): Simple defun regenerates the entire
+ summary line.
+
+ * rmailkwd.el (rmail-set-label): Call rmail-summary-update at the
+ end.
+
+ * rmail.el (rmail-set-attribute): Call rmail-summary-update
+ instead of just updating the attributes.
+
2006-01-19 Henrik Enberg <enberg@printf.se>
* rmailhdr.el (rmail-header-get-header): Rewrite to be a
\\[rmail-summary-by-topic] Filter by Subject.
Filter by the entire message (header and body) if given a
prefix argument.
-\\[rmail-summary-by-sender] Filter by From field.
+\\[rmail-summary-by-senders] Filter by From field.
\\[rmail-summary-by-recipients] Filter by To, From, and Cc fields.
Filter by To and From only if given a prefix argument.
(define-key rmail-summary-mode-map "\e\C-h" 'rmail-summary)
(define-key rmail-summary-mode-map "\e\C-l" 'rmail-summary-by-labels)
(define-key rmail-summary-mode-map "\e\C-r" 'rmail-summary-by-recipients)
- (define-key rmail-summary-mode-map "\e\C-f" 'rmail-summary-by-sender)
+ (define-key rmail-summary-mode-map "\e\C-f" 'rmail-summary-by-senders)
(define-key rmail-summary-mode-map "\e\C-s" 'rmail-summary-by-regexp)
(define-key rmail-summary-mode-map "\e\C-t" 'rmail-summary-by-topic)
(define-key rmail-summary-mode-map "m" 'rmail-summary-mail)
(rmail-summary-get-line-count n)
(concat str (rmail-desc-get-subject n))))))
-(defun rmail-summary-update-attribute (attr-index n)
- "Update the attribute denoted by ATTR-INDEX in message N."
- (save-excursion
- (let (offset)
-
- ;; Position point at the beginning of the attributes.
- (rmail-summary-goto-msg n)
- (skip-chars-forward " ")
- (skip-chars-forward "0-9")
-
- ;; Determine if the attribute is represented on the summary
- ;; line.
- (setq offset (rmail-desc-get-summary-offset attr-index))
- (if offset
-
- ;; It is. If necessary, replace the character code
- ;; corresponding to ATTR-INDEX.
- (let ((char (rmail-desc-get-attr-code attr-index n))
- (buffer-read-only nil))
- (goto-char (+ (point) offset))
- (unless (looking-at char)
- (delete-char 1)
- (insert char)))))))
+(defun rmail-summary-update (n)
+ "Rewrite the summary line for message N."
+ (with-current-buffer rmail-buffer
+ ;; we need to do this in the rmail-buffer lest the keywords are
+ ;; not recognized
+ (let ((summary (rmail-summary-get-summary n)))
+ (with-current-buffer rmail-summary-buffer
+ (save-excursion
+ (let ((buffer-read-only nil))
+ (rmail-summary-goto-msg n)
+ ;; summary line includes newline at the end
+ (delete-region (point) (1+ (line-end-position)))
+ (insert summary)))))))
(provide 'rmailsum)