(message-is-yours-p): New function. Separated common
[gnus] / lisp / gnus-score.el
index d6a8bd1..b2188ed 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.
@@ -1509,7 +1520,7 @@ EXTRA is the possible non-standard header."
   "Lower the score on THREAD with SCORE-ADJUST.
 THREAD is expected to contain a list of the form `(PARENT [CHILD1
 CHILD2 ...])' where PARENT is a header array and each CHILD is a list
-of the same form as THREAD.  The empty list `nil' is valid.  For each
+of the same form as THREAD.  The empty list nil is valid.  For each
 article in the tree, the score of the corresponding entry in
 `gnus-newsgroup-scored' is adjusted by SCORE-ADJUST."
   (while thread
@@ -1818,7 +1829,7 @@ score in `gnus-newsgroup-scored' by SCORE."
            (goto-char (point-min))
            (if (= dmt ?e)
                (while (funcall search-func match nil t)
-                 (and (= (progn (beginning-of-line) (point))
+                 (and (= (gnus-point-at-bol)
                          (match-beginning 0))
                       (= (progn (end-of-line) (point))
                          (match-end 0))
@@ -1916,7 +1927,7 @@ score in `gnus-newsgroup-scored' by SCORE."
       ;; with working on them as a group.  What a hassle.
       ;; Just wait 'til you see what horrors we commit against `match'...
       (if (= gnus-score-index 9)
-         (setq this (prin1-to-string this))) ; ick.
+         (setq this (gnus-prin1-to-string this))) ; ick.
 
       (if simplify
          (setq this (gnus-map-function gnus-simplify-subject-functions this)))
@@ -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
@@ -2765,7 +2776,7 @@ The list is determined from the variable `gnus-score-file-alist'."
       ;; Go through all the functions for finding score files (or actual
       ;; scores) and add them to a list.
       (while funcs
-       (when (gnus-functionp (car funcs))
+       (when (functionp (car funcs))
          (setq score-files
                (append score-files
                        (nreverse (funcall (car funcs) group)))))
@@ -2868,7 +2879,7 @@ If ADAPT, return the home adaptive file instead."
             ((stringp elem)
              elem)
             ;; Function.
-            ((gnus-functionp elem)
+            ((functionp elem)
              (funcall elem group))
             ;; Regexp-file cons.
             ((consp elem)