*** empty log message ***
[gnus] / lisp / gnus-art.el
index 15cfadb..5b54196 100644 (file)
@@ -419,10 +419,10 @@ above them."
 (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."
@@ -432,10 +432,10 @@ above them."
 (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."
@@ -448,7 +448,7 @@ above them."
      (: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."
@@ -458,10 +458,10 @@ above them."
 (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."
@@ -474,7 +474,7 @@ above them."
      (: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
@@ -510,7 +510,7 @@ displayed by the first non-nil matching CONTENT face."
 
 (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.")
@@ -1018,6 +1018,17 @@ always hide."
       (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)
@@ -1669,6 +1680,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is
      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
@@ -2039,6 +2051,7 @@ If given a numerical ARG, move forward ARG pages."
   "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 ()
@@ -2089,8 +2102,10 @@ Argument LINES specifies lines to be scrolled down."
        (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 ()
@@ -2652,35 +2667,33 @@ do the highlighting.  See the documentation for those functions."
            (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.