(gnus-score-find-trace): Changed behavior of `q'.
authorReiner Steib <Reiner.Steib@gmx.de>
Tue, 1 Apr 2003 22:33:57 +0000 (22:33 +0000)
committerReiner Steib <Reiner.Steib@gmx.de>
Tue, 1 Apr 2003 22:33:57 +0000 (22:33 +0000)
(gnus-score-edit-file-at-point): Goto first match when using `e'.

lisp/ChangeLog
lisp/gnus-score.el

index 733c0bd..56a7c6a 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-02  Reiner Steib  <Reiner.Steib@gmx.de>
+
+       * gnus-score.el (gnus-score-find-trace): Changed behavior of `q'.
+       (gnus-score-edit-file-at-point): Goto first match when using `e'.
+
 2003-04-01  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * gnus-art.el (gnus-button-ctan-directory-regexp): New variable.
index 41adecb..3b37a0f 100644 (file)
@@ -1106,7 +1106,18 @@ EXTRA is the possible non-standard header."
 (defun gnus-score-edit-file-at-point ()
   "Edit score file at point.  Useful especially after `V t'."
   (interactive)
-  (gnus-score-edit-file (ffap-string-at-point)))
+  (let* ((string (ffap-string-at-point))
+        ;; FIXME: Should be the full `match element', not just string at
+        ;; point.
+        file)
+    (save-excursion
+      (end-of-line)
+      (setq file (ffap-string-at-point)))
+    (gnus-score-edit-file file)
+    (unless (string= string file)
+      (goto-char (point-min))
+      ;; Goto first match
+      (search-forward string nil t))))
 
 (defun gnus-score-load-file (file)
   ;; Load score file FILE.  Returns a list a retrieved score-alists.
@@ -2354,8 +2365,8 @@ score in `gnus-newsgroup-scored' by SCORE."
        (local-set-key "q"
                       (lambda ()
                         (interactive)
-                        (kill-buffer nil)
-                        (gnus-article-show-summary)))
+                        (bury-buffer nil)
+                        (gnus-summary-expand-window)))
        (local-set-key "e" 'gnus-score-edit-file-at-point)
        (setq truncate-lines t)
        (while trace