+2001-02-11 09:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-group.el (gnus-group-suspend): Offer save summaries.
+
+ * gnus-art.el (gnus-treat-leading-whitespace): New.
+ (gnus-treatment-function-alist): Use it.
+ (article-remove-leading-whitespace): New.
+ (gnus-article-make-menu-bar): Use it.
+
+ * gnus-sum.el (gnus-summary-wash-empty-map): Add
+ remove-leading-whitespace.
+ (gnus-summary-wash-map): Bind strip-headers-in-body to `W a',
+ because of conflict.
+
2001-02-09 23:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
* Makefile.in: Hack generating gnus-load.el.
:group 'gnus-article-treat
:type gnus-article-treat-custom)
+(defcustom gnus-treat-leading-whitespace nil
+ "Remove leading whitespace in headers.
+Valid values are nil, t, `head', `last', an integer or a predicate.
+See the manual for details."
+ :group 'gnus-article-treat
+ :type gnus-article-treat-custom)
+
(defcustom gnus-treat-hide-headers 'head
"Hide headers.
Valid values are nil, t, `head', `last', an integer or a predicate.
(gnus-treat-hide-citation gnus-article-hide-citation)
(gnus-treat-hide-citation-maybe gnus-article-hide-citation-maybe)
(gnus-treat-strip-list-identifiers gnus-article-hide-list-identifiers)
+ (gnus-treat-leading-whitespace gnus-article-remove-leading-whitespace)
(gnus-treat-strip-pgp gnus-article-hide-pgp)
(gnus-treat-strip-pem gnus-article-hide-pem)
(gnus-treat-highlight-headers gnus-article-highlight-headers)
(let ((buffer-read-only nil))
(gnus-article-unhide-text (point-min) (point-max)))))
+(defun article-remove-leading-whitespace ()
+ "Remove excessive whitespace from all headers."
+ (interactive)
+ (save-excursion
+ (save-restriction
+ (let ((buffer-read-only nil))
+ (article-narrow-to-head)
+ (goto-char (point-min))
+ (while (re-search-forward "^[^ :]+: \\([ \t]+\\)" nil t)
+ (delete-region (match-beginning 1) (match-end 1)))))))
+
(defun article-emphasize (&optional arg)
"Emphasize text according to `gnus-emphasis-alist'."
(interactive (gnus-article-hidden-arg))
article-fill-long-lines
article-capitalize-sentences
article-remove-cr
+ article-remove-leading-whitespace
article-display-x-face
article-de-quoted-unreadable
article-de-base64-unreadable
["Hide citation" gnus-article-hide-citation t]
["Treat overstrike" gnus-article-treat-overstrike t]
["Remove carriage return" gnus-article-remove-cr t]
+ ["Remove leading whitespace" gnus-article-remove-leading-whitespace t]
["Remove quoted-unreadable" gnus-article-de-quoted-unreadable t]
["Remove base64" gnus-article-de-base64-unreadable t]
["Treat html" gnus-article-wash-html t]
"r" gnus-summary-caesar-message
"t" gnus-summary-toggle-header
"v" gnus-summary-verbose-headers
- "H" gnus-article-strip-headers-in-body
+ "a" gnus-article-strip-headers-in-body ;; mnemonic: wash archive
"p" gnus-article-verify-x-pgp-sig
"d" gnus-article-treat-dumbquotes)
"a" gnus-article-strip-blank-lines
"A" gnus-article-strip-all-blank-lines
"s" gnus-article-strip-leading-space
- "e" gnus-article-strip-trailing-space)
+ "e" gnus-article-strip-trailing-space
+ "w" gnus-article-remove-leading-whitespace)
(gnus-define-keys (gnus-summary-help-map "H" gnus-summary-mode-map)
"v" gnus-version
["All of the above" gnus-article-strip-blank-lines t]
["All" gnus-article-strip-all-blank-lines t]
["Leading space" gnus-article-strip-leading-space t]
- ["Trailing space" gnus-article-strip-trailing-space t])
+ ["Trailing space" gnus-article-strip-trailing-space t]
+ ["Leading space in headers"
+ gnus-article-remove-leading-whitespace t])
["Overstrike" gnus-article-treat-overstrike t]
["Dumb quotes" gnus-article-treat-dumbquotes t]
["Emphasis" gnus-article-emphasize t]