;;; Code:
+(eval-when-compile (require 'cl))
+
(require 'custom)
(require 'gnus)
(require 'gnus-sum)
"^Date-Received:" "^References:" "^Control:" "^Xref:" "^Lines:"
"^Posted:" "^Relay-Version:" "^Message-ID:" "^Nf-ID:" "^Nf-From:"
"^Approved:" "^Sender:" "^Received:" "^Mail-from:")
- "All headers that match this regexp will be hidden.
+ "All headers that start with this regexp will be hidden.
This variable can also be a list of regexps of headers to be ignored.
If `gnus-visible-headers' is non-nil, this variable will be ignored."
:type '(choice :custom-show nil
(const :tag "Newsgroups with only one group." newsgroups)
(const :tag "Followup-to identical to newsgroups." followup-to)
(const :tag "Reply-to identical to from." reply-to)
- (const :tag "Date less than four days old." date))
+ (const :tag "Date less than four days old." date)
+ (const :tag "Very long To header." long-to))
:group 'gnus-article-hiding)
(defcustom gnus-signature-separator '("^-- $" "^-- *$")
(defcustom gnus-article-x-face-too-ugly nil
"Regexp matching posters whose face shouldn't be shown automatically."
- :type 'regexp
+ :type '(choice regexp (const nil))
:group 'gnus-article-washing)
(defcustom gnus-emphasis-alist
(defcustom gnus-article-time-format "%a, %b %d %Y %T %Z"
"Format for display of Date headers in article bodies.
-See `format-time-zone' for the possible values."
+See `format-time-string' for the possible values."
:type 'string
:link '(custom-manual "(gnus)Article Date")
:group 'gnus-article-washing)
If that variable is nil, however, all headers that match this regexp
will be kept while the rest will be deleted before saving."
:group 'gnus-article-saving
- :type '(repeat string))
+ :type 'regexp)
(defcustom gnus-default-article-saver 'gnus-summary-save-in-rmail
"A function to save articles in your favourite format.
(when (and date
(< (gnus-days-between (current-time-string) date)
4))
- (gnus-article-hide-header "date")))))))))))
+ (gnus-article-hide-header "date"))))
+ ((eq elem 'long-to)
+ (let ((to (message-fetch-field "to")))
+ (when (> (length to) 1024)
+ (gnus-article-hide-header "to")))))))))))
(defun gnus-article-hide-header (header)
(save-excursion
(eval-and-compile
(autoload 'w3-display "w3-parse")
- (autoload 'w3-do-setup "w3" "" t))
+ (autoload 'w3-do-setup "w3" "" t)
+ (autoload 'w3-region "w3-display" "" t))
(defun gnus-article-treat-html ()
"Render HTML."
(progn
(save-excursion
(set-buffer summary-buffer)
+ (push article gnus-newsgroup-history)
(setq gnus-last-article gnus-current-article
- gnus-newsgroup-history (cons gnus-current-article
- gnus-newsgroup-history)
gnus-current-article 0
gnus-current-headers nil
gnus-article-current nil)
;; `gnus-current-article' must be an article number.
(save-excursion
(set-buffer summary-buffer)
+ (push article gnus-newsgroup-history)
(setq gnus-last-article gnus-current-article
- gnus-newsgroup-history (cons gnus-current-article
- gnus-newsgroup-history)
gnus-current-article article
gnus-current-headers
(gnus-summary-article-header gnus-current-article)
(cons gnus-newsgroup-name gnus-current-article))
(unless (vectorp gnus-current-headers)
(setq gnus-current-headers nil))
+ (gnus-summary-goto-subject gnus-current-article)
(gnus-summary-show-thread)
(run-hooks 'gnus-mark-article-hook)
(gnus-set-mode-line 'summary)
(gnus-group-read-only-p))
(error "The current newsgroup does not support article editing"))
(gnus-article-edit-article
- `(lambda ()
+ `(lambda (no-highlight)
(gnus-summary-edit-article-done
,(or (mail-header-references gnus-current-headers) "")
- ,(gnus-group-read-only-p) ,gnus-summary-buffer))))
+ ,(gnus-group-read-only-p) ,gnus-summary-buffer no-highlight))))
(defun gnus-article-edit-article (exit-func)
"Start editing the contents of the current article buffer."
(setq gnus-prev-winconf winconf)
(gnus-message 6 "C-c C-c to end edits")))
-(defun gnus-article-edit-done ()
+(defun gnus-article-edit-done (&optional arg)
"Update the article edits and exit."
- (interactive)
+ (interactive "P")
(let ((func gnus-article-edit-done-function)
(buf (current-buffer))
(start (window-start)))
(save-excursion
(set-buffer buf)
(let ((buffer-read-only nil))
- (funcall func)))
+ (funcall func arg)))
(set-buffer buf)
(set-window-start (get-buffer-window buf) start)
(set-window-point (get-buffer-window buf) (point))))