(defface gnus-header-from-face
'((((class color)
(background dark))
- (:foreground "green1" :bold t :italic t))
+ (:foreground "spring green" :bold t))
(((class color)
(background light))
- (:foreground "MidnightBlue" :bold t :italic t))
+ (:foreground "red3" :bold t))
(t
(:bold t :italic t)))
"Face used for displaying from headers."
(defface gnus-header-subject-face
'((((class color)
(background dark))
- (:foreground "green3" :bold t :italic t))
+ (:foreground "SeaGreen3" :bold t))
(((class color)
(background light))
- (:foreground "firebrick" :bold t :italic t))
+ (:foreground "red4" :bold t))
(t
(:bold t :italic t)))
"Face used for displaying subject headers."
(:foreground "yellow" :bold t :italic t))
(((class color)
(background light))
- (:foreground "indianred" :bold t :italic t))
+ (:foreground "MidnightBlue" :bold t :italic t))
(t
(:bold t :italic t)))
"Face used for displaying newsgroups headers."
(defface gnus-header-name-face
'((((class color)
(background dark))
- (:foreground "green4" :bold t))
+ (:foreground "SeaGreen"))
(((class color)
(background light))
- (:foreground "DarkGreen" :bold t))
+ (:foreground "maroon"))
(t
(:bold t)))
"Face used for displaying header names."
(:foreground "forest green" :italic t))
(((class color)
(background light))
- (:foreground "DarkGreen" :italic t))
+ (:foreground "indianred4" :italic t))
(t
(:italic t))) "Face used for displaying header content."
:group 'gnus-article-headers
(defvar gnus-article-mode-syntax-table
(let ((table (copy-syntax-table text-mode-syntax-table)))
- ;;(modify-syntax-entry ?_ "w" table)
+ (modify-syntax-entry ?- "w" table)
table)
"Syntax table used in article mode buffers.
Initialized from `text-mode-syntax-table.")
(while (re-search-forward "\n\n\n+" nil t)
(replace-match "\n\n" t t)))))
+(defun article-strip-leading-space ()
+ "Remove all white space from the beginning of the lines in the article."
+ (interactive)
+ (save-excursion
+ (let ((inhibit-point-motion-hooks t)
+ buffer-read-only)
+ (goto-char (point-min))
+ (search-forward "\n\n" nil t)
+ (while (re-search-forward "^[ \t]+" nil t)
+ (replace-match "" t t)))))
+
(defun article-strip-blank-lines ()
"Strip leading, trailing and multiple blank lines."
(interactive)
article-remove-trailing-blank-lines
article-strip-leading-blank-lines
article-strip-multiple-blank-lines
+ article-strip-leading-space
article-strip-blank-lines
article-date-local
article-date-original
"Show the next page of the article."
(interactive)
(when (gnus-article-next-page)
+ (goto-char (point-min))
(gnus-article-read-summary-keys nil (gnus-character-to-event ?n))))
(defun gnus-article-goto-prev-page ()
(recenter -1))
(let ((scroll-in-place nil))
(prog1
- (ignore-errors
- (scroll-down lines))
+ (condition-case ()
+ (scroll-down lines)
+ (beginning-of-buffer
+ (goto-char (point-min))))
(move-to-window-line 0)))))
(defun gnus-article-refer-article ()
(case-fold-search t)
(inhibit-point-motion-hooks t)
entry regexp header-face field-face from hpoints fpoints)
- (goto-char (point-min))
- (when (search-forward "\n\n" nil t)
- (narrow-to-region (1- (point)) (point-min))
- (while (setq entry (pop alist))
- (goto-char (point-min))
- (setq regexp (concat "^\\("
- (if (string-equal "" (nth 0 entry))
- "[^\t ]"
- (nth 0 entry))
- "\\)")
- header-face (nth 1 entry)
- field-face (nth 2 entry))
- (while (and (re-search-forward regexp nil t)
- (not (eobp)))
- (beginning-of-line)
- (setq from (point))
- (unless (search-forward ":" nil t)
- (forward-char 1))
- (when (and header-face
- (not (memq (point) hpoints)))
- (push (point) hpoints)
- (gnus-put-text-property from (point) 'face header-face))
- (when (and field-face
- (not (memq (setq from (point)) fpoints)))
- (push from fpoints)
- (if (re-search-forward "^[^ \t]" nil t)
- (forward-char -2)
- (goto-char (point-max)))
- (gnus-put-text-property from (point) 'face field-face)))))))))
+ (message-narrow-to-head)
+ (while (setq entry (pop alist))
+ (goto-char (point-min))
+ (setq regexp (concat "^\\("
+ (if (string-equal "" (nth 0 entry))
+ "[^\t ]"
+ (nth 0 entry))
+ "\\)")
+ header-face (nth 1 entry)
+ field-face (nth 2 entry))
+ (while (and (re-search-forward regexp nil t)
+ (not (eobp)))
+ (beginning-of-line)
+ (setq from (point))
+ (unless (search-forward ":" nil t)
+ (forward-char 1))
+ (when (and header-face
+ (not (memq (point) hpoints)))
+ (push (point) hpoints)
+ (gnus-put-text-property from (point) 'face header-face))
+ (when (and field-face
+ (not (memq (setq from (point)) fpoints)))
+ (push from fpoints)
+ (if (re-search-forward "^[^ \t]" nil t)
+ (forward-char -2)
+ (goto-char (point-max)))
+ (gnus-put-text-property from (point) 'face field-face))))))))
(defun gnus-article-highlight-signature ()
"Highlight the signature in an article.