]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-summary-vector, rmail-mode-map): Add doc string.
authorGlenn Morris <rgm@gnu.org>
Fri, 13 Feb 2009 03:51:16 +0000 (03:51 +0000)
committerGlenn Morris <rgm@gnu.org>
Fri, 13 Feb 2009 03:51:16 +0000 (03:51 +0000)
(rmail-set-header-1): If VALUE is nil, remove the header altogether.
(rmail-set-header): Doc fix.

lisp/ChangeLog
lisp/mail/rmail.el

index a0533e6558b8d39fa3352c28c1f2ad41625caf2e..31347cd3197b5809b34ff1bc6f4faaf79299edaf 100644 (file)
@@ -1,3 +1,27 @@
+2009-02-13  Glenn Morris  <rgm@gnu.org>
+
+       * mail/rmailsum.el (msgnum): Remove declaration.
+       (rmail-summary-redo): Add missing initialization value.
+       (rmail-summary-overlay, rmail-summary-mode-map): Add doc string.
+       (rmail-summary-mark-deleted, rmail-summary-deleted-p):
+       Fix skip-chars-forward calls.
+       (rmail-summary-mark-seen): New function.  As well as removing the '-'
+       mark, update the summary-vector.  (Bug#2135)
+       (rmail-summary-rmail-update, rmail-summary-goto-msg):
+       Use rmail-summary-mark-seen.
+
+       * mail/rmail.el (rmail-summary-vector, rmail-mode-map): Add doc string.
+
+       * mail/unrmail.el (unrmail): When getting message keywords, don't
+       include a leading space, but do include the space after the separating
+       comma.  (Bug#2303)
+
+       * mail/rmail.el (rmail-set-header-1): If VALUE is nil, remove the
+       header altogether.
+       (rmail-set-header): Doc fix.
+       * mail/rmailkwd.el (rmail-set-label): Delete the keyword header if all
+       labels are removed.  (Bug#2302)
+
 2009-02-12  Juri Linkov  <juri@jurta.org>
 
        * image-mode.el (image-toggle-display):
index e54fd01460df655edd6b5000d2d90e933e67b254..78e6ce9db989e94d67a0568afb8e13ea18b03a16 100644 (file)
@@ -564,7 +564,9 @@ by substituting the new message number into the existing list.")
 
 (defvar rmail-summary-buffer nil)
 (put 'rmail-summary-buffer 'permanent-local t)
-(defvar rmail-summary-vector nil)
+(defvar rmail-summary-vector nil
+  "In an Rmail buffer, vector of (newline-terminated) strings.
+Element N specifies the summary line for message N+1.")
 (put 'rmail-summary-vector 'permanent-local t)
 
 ;; Rmail buffer swapping variables.
@@ -1130,7 +1132,8 @@ The buffer is expected to be narrowed to just the header of the message."
     (define-key map [menu-bar move next]
       '("Next" . rmail-next-message))
 
-    map))
+   map)
+  "Keymap used in Rmail mode.")
 
 ;; Rmail toolbar
 (defvar rmail-tool-bar-map
@@ -2010,23 +2013,27 @@ If MSGNUM is nil, use the current message."
 
 (defun rmail-set-header-1 (name value)
   "Subroutine of `rmail-set-header'.
-Narrow to header, set header NAME to VALUE, replacing existing if present."
+Narrow to header, set header NAME to VALUE, replacing existing if present.
+VALUE nil means to remove NAME altogether."
   (if (search-forward "\n\n" nil t)
       (progn
        (forward-char -1)
        (narrow-to-region (point-min) (point))
        (goto-char (point-min))
        (if (re-search-forward (concat "^" (regexp-quote name) ":") nil 'move)
-           (progn
-             (delete-region (point) (line-end-position))
-             (insert " " value))
-         (insert name ": " value "\n")))
+            (if value
+                (progn
+                  (delete-region (point) (line-end-position))
+                  (insert " " value))
+              (delete-region (line-beginning-position)
+                             (line-beginning-position 2)))
+          (if value (insert name ": " value "\n"))))
     (rmail-error-bad-format)))
 
 (defun rmail-set-header (name &optional msgnum value)
-  "Store VALUE in message header NAME, nil if it has none.
-MSGNUM specifies the message number to operate on.
-If MSGNUM is nil, use the current message."
+  "Set message header NAME to VALUE in message number MSGNUM.
+If MSGNUM is nil, use the current message.  NAME and VALUE are strings.
+VALUE may also be nil, meaning to remove the header."
   (rmail-apply-in-message msgnum 'rmail-set-header-1 name value)
   ;; Ensure header changes get saved.
   ;; (Note replacing a header with an identical copy modifies.)