2001-07-12 Colin Walters <walters@cis.ohio-state.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 20 Jul 2001 18:13:25 +0000 (18:13 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 20 Jul 2001 18:13:25 +0000 (18:13 +0000)
* gnus-sum.el (gnus-summary-display-arrow): New variable.
(gnus-summary-set-article-display-arrow): New function.
(gnus-summary-goto-subject): Use it.

lisp/ChangeLog
lisp/gnus-sum.el

index 963fb6b..768e899 100644 (file)
@@ -1,3 +1,9 @@
+2001-07-12  Colin Walters  <walters@cis.ohio-state.edu>
+
+       * gnus-sum.el (gnus-summary-display-arrow): New variable.
+       (gnus-summary-set-article-display-arrow): New function.
+       (gnus-summary-goto-subject): Use it.
+       
 2001-07-18 12:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-sum.el (gnus-summary-import-article): Insert date if
index 61044f4..1d118bc 100644 (file)
@@ -797,6 +797,15 @@ automatically when it is selected."
   :group 'gnus-summary
   :type 'hook)
 
+(defcustom gnus-summary-display-arrow
+  (and (string-match "GNU" (emacs-version))
+       (>= emacs-major-version 21)
+       (display-graphic-p))
+  "*If non-nil, display an arrow highlighting the current article."
+  :version "21.1"
+  :group 'gnus-summary
+  :type 'boolean)
+
 (defcustom gnus-summary-selected-face 'gnus-summary-selected-face
   "Face used for highlighting the current article in the summary buffer."
   :group 'gnus-summary-visual
@@ -2704,6 +2713,21 @@ display only a single character."
          (aset table i [??]))))
     (setq buffer-display-table table)))
 
+(defun gnus-summary-set-article-display-arrow (pos)
+  "Update the overlay arrow to point to line at position POS."
+  (when (and gnus-summary-display-arrow
+            (boundp 'overlay-arrow-position)
+            (boundp 'overlay-arrow-string))
+    (save-excursion
+      (goto-char pos)
+      (beginning-of-line)
+      (unless overlay-arrow-position
+       (setq overlay-arrow-position (make-marker)))
+      (setq overlay-arrow-string "=>"
+           overlay-arrow-position (set-marker overlay-arrow-position
+                                              (point)
+                                              (current-buffer))))))
+
 (defun gnus-summary-buffer-name (group)
   "Return the summary buffer name of GROUP."
   (concat "*Summary " group "*"))
@@ -6123,7 +6147,9 @@ If FORCE, also allow jumping to articles not currently shown."
          (unless silent
            (gnus-message 3 "Can't find article %d" article))
          nil)
-      (goto-char (gnus-data-pos data))
+      (let ((pt (gnus-data-pos data)))
+       (goto-char pt)
+       (gnus-summary-set-article-display-arrow pt))
       (gnus-summary-position-point)
       article)))