emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/gnus/gnus-kill.el [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/gnus/gnus-kill.el [lexbind]
Date: Wed, 15 Sep 2004 20:37:28 -0400

Index: emacs/lisp/gnus/gnus-kill.el
diff -c emacs/lisp/gnus/gnus-kill.el:1.5.18.1 
emacs/lisp/gnus/gnus-kill.el:1.5.18.2
*** emacs/lisp/gnus/gnus-kill.el:1.5.18.1       Tue Oct 14 23:34:50 2003
--- emacs/lisp/gnus/gnus-kill.el        Thu Sep 16 00:12:16 2004
***************
*** 1,5 ****
  ;;; gnus-kill.el --- kill commands for Gnus
! ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000
  ;;        Free Software Foundation, Inc.
  
  ;; Author: Masanobu UMEDA <address@hidden>
--- 1,5 ----
  ;;; gnus-kill.el --- kill commands for Gnus
! ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
  ;;        Free Software Foundation, Inc.
  
  ;; Author: Masanobu UMEDA <address@hidden>
***************
*** 357,372 ****
  (defun gnus-apply-kill-file-unless-scored ()
    "Apply .KILL file, unless a .SCORE file for the same newsgroup exists."
    (cond ((file-exists-p (gnus-score-file-name gnus-newsgroup-name))
!          ;; Ignores global KILL.
!          (when (file-exists-p (gnus-newsgroup-kill-file gnus-newsgroup-name))
           (gnus-message 3 "Note: Ignoring %s.KILL; preferring .SCORE"
                         gnus-newsgroup-name))
!          0)
!         ((or (file-exists-p (gnus-newsgroup-kill-file nil))
!              (file-exists-p (gnus-newsgroup-kill-file gnus-newsgroup-name)))
!          (gnus-apply-kill-file-internal))
!         (t
!          0)))
  
  (defun gnus-apply-kill-file-internal ()
    "Apply a kill file to the current newsgroup.
--- 357,372 ----
  (defun gnus-apply-kill-file-unless-scored ()
    "Apply .KILL file, unless a .SCORE file for the same newsgroup exists."
    (cond ((file-exists-p (gnus-score-file-name gnus-newsgroup-name))
!        ;; Ignores global KILL.
!        (when (file-exists-p (gnus-newsgroup-kill-file gnus-newsgroup-name))
           (gnus-message 3 "Note: Ignoring %s.KILL; preferring .SCORE"
                         gnus-newsgroup-name))
!        0)
!       ((or (file-exists-p (gnus-newsgroup-kill-file nil))
!            (file-exists-p (gnus-newsgroup-kill-file gnus-newsgroup-name)))
!        (gnus-apply-kill-file-internal))
!       (t
!        0)))
  
  (defun gnus-apply-kill-file-internal ()
    "Apply a kill file to the current newsgroup.
***************
*** 398,404 ****
                          gnus-newsgroup-kill-headers))
                  (setq headers (cdr headers))))
              (setq files nil))
!         (setq files (cdr files)))))
      (if (not gnus-newsgroup-kill-headers)
        ()
        (save-window-excursion
--- 398,404 ----
                          gnus-newsgroup-kill-headers))
                  (setq headers (cdr headers))))
              (setq files nil))
!         (setq files (cdr files)))))
      (if (not gnus-newsgroup-kill-headers)
        ()
        (save-window-excursion
***************
*** 428,443 ****
        0))))
  
  ;; Parse a Gnus killfile.
- (defun gnus-score-insert-help (string alist idx)
-   (save-excursion
-     (pop-to-buffer "*Score Help*")
-     (buffer-disable-undo)
-     (erase-buffer)
-     (insert string ":\n\n")
-     (while alist
-       (insert (format " %c: %s\n" (caar alist) (nth idx (car alist))))
-       (setq alist (cdr alist)))))
- 
  (defun gnus-kill-parse-gnus-kill-file ()
    (goto-char (point-min))
    (gnus-kill-file-mode)
--- 428,433 ----
***************
*** 588,594 ****
        (insert "\n  t"))
        (insert ")")
        (prog1
!         (buffer-substring (point-min) (point-max))
        (kill-buffer (current-buffer))))))
  
  (defun gnus-execute-1 (function regexp form header)
--- 578,584 ----
        (insert "\n  t"))
        (insert ")")
        (prog1
!         (buffer-string)
        (kill-buffer (current-buffer))))))
  
  (defun gnus-execute-1 (function regexp form header)
***************
*** 608,614 ****
                     (setq did-kill (string-match regexp value)))
                   (cond ((stringp form) ;Keyboard macro.
                          (execute-kbd-macro form))
!                        ((gnus-functionp form)
                          (funcall form))
                         (t
                          (eval form)))))
--- 598,604 ----
                     (setq did-kill (string-match regexp value)))
                   (cond ((stringp form) ;Keyboard macro.
                          (execute-kbd-macro form))
!                        ((functionp form)
                          (funcall form))
                         (t
                          (eval form)))))
***************
*** 627,633 ****
                    (setq did-kill (re-search-forward regexp nil t)))
              (cond ((stringp form)     ;Keyboard macro.
                     (execute-kbd-macro form))
!                   ((gnus-functionp form)
                     (funcall form))
                    (t
                     (eval form)))))))
--- 617,623 ----
                    (setq did-kill (re-search-forward regexp nil t)))
              (cond ((stringp form)     ;Keyboard macro.
                     (execute-kbd-macro form))
!                   ((functionp form)
                     (funcall form))
                    (t
                     (eval form)))))))
***************
*** 641,658 ****
  marked as read or ticked are ignored."
    (save-excursion
      (let ((killed-no 0)
!         function article header)
        (cond
         ;; Search body.
         ((or (null field)
            (string-equal field ""))
        (setq function nil))
         ;; Get access function of header field.
!        ((fboundp
!        (setq function
!              (intern-soft
!               (concat "mail-header-" (downcase field)))))
!       (setq function `(lambda (h) (,function h))))
         ;; Signal error.
         (t
        (error "Unknown header field: \"%s\"" field)))
--- 631,660 ----
  marked as read or ticked are ignored."
    (save-excursion
      (let ((killed-no 0)
!         function article header extras)
        (cond
         ;; Search body.
         ((or (null field)
            (string-equal field ""))
        (setq function nil))
         ;; Get access function of header field.
!        ((cond ((fboundp
!               (setq function
!                     (intern-soft
!                      (concat "mail-header-" (downcase field)))))
!              (setq function `(lambda (h) (,function h))))
!             ((when (setq extras
!                          (member (downcase field)
!                                  (mapcar (lambda (header)
!                                            (downcase (symbol-name header)))
!                                          gnus-extra-headers)))
!                (setq function
!                      `(lambda (h)
!                         (gnus-extra-header
!                          (quote ,(nth (- (length gnus-extra-headers)
!                                          (length extras))
!                                       gnus-extra-headers))
!                          h)))))))
         ;; Signal error.
         (t
        (error "Unknown header field: \"%s\"" field)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]