Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
66517:2ed668700790 | 66518:7cc22b3f2300 |
---|---|
109 "This regular expression matches a particular message. | 109 "This regular expression matches a particular message. |
110 It is a format string; use `%d' to represent the location of the message | 110 It is a format string; use `%d' to represent the location of the message |
111 number within the expression as in the default of \"^[^0-9]*%d[^0-9]\".") | 111 number within the expression as in the default of \"^[^0-9]*%d[^0-9]\".") |
112 | 112 |
113 (defvar mh-cmd-note 4 | 113 (defvar mh-cmd-note 4 |
114 "Column where notations begin. | 114 "Column for notations. |
115 This variable should be set with the function `mh-set-cmd-note'. This variable | 115 This variable should be set with the function `mh-set-cmd-note'. This variable |
116 may be updated dynamically if `mh-adaptive-cmd-note-flag' is on and | 116 may be updated dynamically if `mh-adaptive-cmd-note-flag' is on. |
117 `mh-scan-format-file' is set to \"Use MH-E scan Format\". | |
118 | 117 |
119 Note that columns in Emacs start with 0.") | 118 Note that columns in Emacs start with 0.") |
120 (make-variable-buffer-local 'mh-cmd-note) | 119 (make-variable-buffer-local 'mh-cmd-note) |
121 | 120 |
122 (defvar mh-note-seq ?% | 121 (defvar mh-note-seq ?% |
1825 (if (or (null msg) | 1824 (if (or (null msg) |
1826 (mh-goto-msg msg t t)) | 1825 (mh-goto-msg msg t t)) |
1827 (with-mh-folder-updating (t) | 1826 (with-mh-folder-updating (t) |
1828 (beginning-of-line) | 1827 (beginning-of-line) |
1829 (forward-char offset) | 1828 (forward-char offset) |
1830 (let* ((change-stack-flag (and (equal offset (1+ mh-cmd-note)) | 1829 (let* ((change-stack-flag |
1831 (not (eq notation mh-note-seq)))) | 1830 (and (equal offset |
1831 (+ mh-cmd-note mh-scan-field-destination-offset)) | |
1832 (not (eq notation mh-note-seq)))) | |
1832 (msg (and change-stack-flag (or msg (mh-get-msg-num nil)))) | 1833 (msg (and change-stack-flag (or msg (mh-get-msg-num nil)))) |
1833 (stack (and msg (gethash msg mh-sequence-notation-history))) | 1834 (stack (and msg (gethash msg mh-sequence-notation-history))) |
1834 (notation (or notation (char-after)))) | 1835 (notation (or notation (char-after)))) |
1835 (if stack | 1836 (if stack |
1836 ;; The presence of the stack tells us that we don't need to | 1837 ;; The presence of the stack tells us that we don't need to |
1990 (concat (substring fmt 0 begin) | 1991 (concat (substring fmt 0 begin) |
1991 (format mh-scan-msg-format-string width) | 1992 (format mh-scan-msg-format-string width) |
1992 (substring fmt end)))) | 1993 (substring fmt end)))) |
1993 fmt)) | 1994 fmt)) |
1994 | 1995 |
1995 (defun mh-message-number-width (folder) | 1996 (defun mh-msg-num-width (folder) |
1996 "Return the widest message number in this FOLDER." | 1997 "Return the width of the largest message number in this FOLDER." |
1997 (or mh-progs (mh-find-path)) | 1998 (or mh-progs (mh-find-path)) |
1998 (let ((tmp-buffer (get-buffer-create mh-temp-buffer)) | 1999 (let ((tmp-buffer (get-buffer-create mh-temp-buffer)) |
1999 (width 0)) | 2000 (width 0)) |
2000 (save-excursion | 2001 (save-excursion |
2001 (set-buffer tmp-buffer) | 2002 (set-buffer tmp-buffer) |