diff lisp/mh-e/mh-utils.el @ 66518:7cc22b3f2300

* mh-comp.el (mh-annotate-msg): Use new variable mh-scan-field-destination-offset rather than hard-coding 1. * mh-customize.el (mh-interpret-number-as-range-flag): Add * to docstring. (mh-adaptive-cmd-note-flag-check, mh-scan-format-file-check): New functions to check input for mh-adaptive-cmd-note-flag and mh-scan-format-file respectively. (mh-adaptive-cmd-note-flag, mh-scan-format-file): Docstring fixes, add :set. * mh-e.el: (mh-scan-field-destination-offset): New variable. The destination is the -, t, b, c, or n character for Replied, To, cc, Bcc, or Newsgroups respectively. (mh-make-folder, mh-regenerate-headers, mh-generate-new-cmd-note) Call new function mh-msg-num-width-to-column to make leap between width and column more explicit. (mh-msg-num-width-to-column): New function that steals logic from old mh-set-cmd-note. Also, throw error if mh-scan-format-file isn't t since we can't adapt the scan lines in this case. (mh-set-cmd-note): Now just simply sets mh-cmd-note which will make the documentation more clear. (mh-generate-new-cmd-note): Docstring fix--mh-cmd-note is a column, not a width. (mh-add-sequence-notation, mh-remove-sequence-notation): Use new variable mh-scan-field-destination-offset rather than hard-coding 1. * mh-utils.el (mh-cmd-note) Synced docstring with manual. (mh-notate): Use new variable mh-scan-field-destination-offset rather than hard-coding 1. (mh-message-number-width): Rename to mh-msg-num-width to be consistent with mh-get-msg-num and mh-msg-num-width-to-column.
author Bill Wohler <wohler@newt.com>
date Sat, 29 Oct 2005 05:09:05 +0000
parents 117f8e71b37a
children bce5c0d2041c
line wrap: on
line diff
--- a/lisp/mh-e/mh-utils.el	Fri Oct 28 22:28:31 2005 +0000
+++ b/lisp/mh-e/mh-utils.el	Sat Oct 29 05:09:05 2005 +0000
@@ -111,10 +111,9 @@
 number within the expression as in the default of \"^[^0-9]*%d[^0-9]\".")
 
 (defvar mh-cmd-note 4
-  "Column where notations begin.
+  "Column for notations.
 This variable should be set with the function `mh-set-cmd-note'. This variable
-may be updated dynamically if `mh-adaptive-cmd-note-flag' is on and
-`mh-scan-format-file' is set to \"Use MH-E scan Format\".
+may be updated dynamically if `mh-adaptive-cmd-note-flag' is on.
 
 Note that columns in Emacs start with 0.")
 (make-variable-buffer-local 'mh-cmd-note)
@@ -1827,8 +1826,10 @@
         (with-mh-folder-updating (t)
           (beginning-of-line)
           (forward-char offset)
-          (let* ((change-stack-flag (and (equal offset (1+ mh-cmd-note))
-                                         (not (eq notation mh-note-seq))))
+          (let* ((change-stack-flag
+                  (and (equal offset
+                              (+ mh-cmd-note mh-scan-field-destination-offset))
+                       (not (eq notation mh-note-seq))))
                  (msg (and change-stack-flag (or msg (mh-get-msg-num nil))))
                  (stack (and msg (gethash msg mh-sequence-notation-history)))
                  (notation (or notation (char-after))))
@@ -1992,8 +1993,8 @@
                  (substring fmt end))))
       fmt))
 
-(defun mh-message-number-width (folder)
-  "Return the widest message number in this FOLDER."
+(defun mh-msg-num-width (folder)
+  "Return the width of the largest message number in this FOLDER."
   (or mh-progs (mh-find-path))
   (let ((tmp-buffer (get-buffer-create mh-temp-buffer))
         (width 0))