diff options
author | Miles Bader <miles@gnu.org> | 2006-03-10 23:43:54 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2006-03-10 23:43:54 +0000 |
commit | ea8ae7654a60bf4598a6b6269fe75fb859b91651 (patch) | |
tree | 96a407a30821c25fe11f1e4e8743a449d663976f /lisp/gnus | |
parent | af467e285ed142761527612f2c40fd6dfd02d345 (diff) | |
download | emacs-ea8ae7654a60bf4598a6b6269fe75fb859b91651.tar.gz |
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-147
Merge from gnus--rel--5.10
Patches applied:
* gnus--rel--5.10 (patch 56)
- Update from CVS
Diffstat (limited to 'lisp/gnus')
-rw-r--r-- | lisp/gnus/ChangeLog | 24 | ||||
-rw-r--r-- | lisp/gnus/gnus-group.el | 5 | ||||
-rw-r--r-- | lisp/gnus/gnus-nocem.el | 18 | ||||
-rw-r--r-- | lisp/gnus/gnus-start.el | 9 | ||||
-rw-r--r-- | lisp/gnus/gnus.el | 18 | ||||
-rw-r--r-- | lisp/gnus/smiley.el | 42 |
6 files changed, 91 insertions, 25 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 374c3da2994..8023af47bfd 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,27 @@ +2006-03-10 Reiner Steib <Reiner.Steib@gmx.de> + + * smiley.el: Add more test smileys. + (smiley-data-directory, smiley-regexp-alist) + (gnus-smiley-file-types): Fix doc strings. + (smiley-update-cache): Clear smiley-cached-regexp-alist before + adding new elements. + (smiley-mouse-map): Unused code. Make it a comment. + +2006-03-10 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus-nocem.el (gnus-nocem-scan-groups): Add autoload cookie; + scan latest NoCeM messages instead of old ones. + (gnus-nocem-check-article): Fix regexps so as to match to PGP + delimiters that are recently used. + (gnus-nocem-load-cache): Add autoload cookie. + + * gnus.el (gnus-use-nocem): Enable it to be set to also a number. + + * gnus-start.el (gnus-setup-news): Scan NoCeM messages if a group + level which is larger than gnus-use-nocem is specified. + + * gnus-group.el (gnus-group-get-new-news): Ditto. + 2006-03-08 Reiner Steib <Reiner.Steib@gmx.de> * gnus-util.el (gnus-tool-bar-update): New function. diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 3d20af8b0df..0ed72433115 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -3622,7 +3622,10 @@ re-scanning. If ARG is non-nil and not a number, this will force ;; We might read in new NoCeM messages here. (when (and gnus-use-nocem - (null arg)) + (or (and (numberp gnus-use-nocem) + (numberp arg) + (>= arg gnus-use-nocem)) + (not arg))) (gnus-nocem-scan-groups)) ;; If ARG is not a number, then we read the active file. (when (and arg (not (numberp arg))) diff --git a/lisp/gnus/gnus-nocem.el b/lisp/gnus/gnus-nocem.el index b17c33a5d7f..e75b25282b0 100644 --- a/lisp/gnus/gnus-nocem.el +++ b/lisp/gnus/gnus-nocem.el @@ -136,6 +136,7 @@ valid issuer, which is much faster if you are selective about the issuers." (gnus-sethash group t gnus-nocem-real-group-hashtb)) gnus-newsrc-alist)) +;;;###autoload (defun gnus-nocem-scan-groups () "Scan all NoCeM groups for new NoCeM messages." (interactive) @@ -206,10 +207,10 @@ valid issuer, which is much faster if you are selective about the issuers." (not (member (mail-header-message-id header) gnus-nocem-seen-message-ids)))) (push header check-headers))) - (let* ((i 0) - (check-headers - (last check-headers gnus-nocem-check-article-limit)) - (len (length check-headers))) + (setq check-headers (last (nreverse check-headers) + gnus-nocem-check-article-limit)) + (let ((i 0) + (len (length check-headers))) (dolist (h check-headers) (gnus-message 7 "Checking article %d in %s for NoCeM (%d of %d)..." @@ -235,9 +236,13 @@ valid issuer, which is much faster if you are selective about the issuers." (days-to-time gnus-nocem-expiry-wait))) (gnus-request-article-this-buffer (mail-header-number header) group) (goto-char (point-min)) - (when (re-search-forward "-----BEGIN PGP MESSAGE-----" nil t) + (when (re-search-forward + "-----BEGIN PGP\\( SIGNED\\)? MESSAGE-----" + nil t) (delete-region (point-min) (match-beginning 0))) - (when (re-search-forward "-----END PGP MESSAGE-----\n?" nil t) + (when (re-search-forward + "-----END PGP \\(MESSAGE\\|SIGNATURE\\)-----\n?" + nil t) (delete-region (match-end 0) (point-max))) (goto-char (point-min)) ;; The article has to have proper NoCeM headers. @@ -334,6 +339,7 @@ valid issuer, which is much faster if you are selective about the issuers." gnus-nocem-alist)) t))) +;;;###autoload (defun gnus-nocem-load-cache () "Load the NoCeM cache." (interactive) diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 465ce0627b7..00defe58943 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -1047,9 +1047,12 @@ If LEVEL is non-nil, the news will be set up at level LEVEL." (gnus-check-bogus-newsgroups)) ;; We might read in new NoCeM messages here. - (when (and gnus-use-nocem - (not level) - (not dont-connect)) + (when (and (not dont-connect) + gnus-use-nocem + (or (and (numberp gnus-use-nocem) + (numberp level) + (>= level gnus-use-nocem)) + (not level))) (gnus-nocem-scan-groups)) ;; Read any slave files. diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 2caccc0b70e..7a04c61151a 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -1580,9 +1580,23 @@ articles. This is not a good idea." :value t))) (defcustom gnus-use-nocem nil - "*If non-nil, Gnus will read NoCeM cancel messages." + "*If non-nil, Gnus will read NoCeM cancel messages. +You can also set this variable to a positive number as a group level. +In that case, Gnus scans NoCeM messages when checking new news if this +value is not exceeding a group level that you specify as the prefix +argument to some commands, e.g. `gnus', `gnus-group-get-new-news', etc. +Otherwise, Gnus does not scan NoCeM messages if you specify a group +level to those commands." :group 'gnus-meta - :type 'boolean) + :type '(choice + (const :tag "off" nil) + (const :tag "on" t) + (list :convert-widget + (lambda (widget) + (list 'integer :tag "group level" + :value (if (boundp 'gnus-level-default-subscribed) + gnus-level-default-subscribed + 3)))))) (defcustom gnus-suppress-duplicates nil "*If non-nil, Gnus will mark duplicate copies of the same article as read." diff --git a/lisp/gnus/smiley.el b/lisp/gnus/smiley.el index d7657e444b8..e8afe9dd10d 100644 --- a/lisp/gnus/smiley.el +++ b/lisp/gnus/smiley.el @@ -31,8 +31,21 @@ ;; I'm not sure we need that degree of rococoness and defaults like a ;; yellow background. Also, using PBM means we can display the images ;; more generally. -- fx - -;;; Test smileys: :-) :-\ :-( :-/ +;; `smiley.el' was replaced by `smiley-ems.el' on 2002-01-26 (after fx' +;; comment). + +;; Test smileys: +;; smile ^:-) ^:) +;; blink ;-) ;) +;; forced :-] +;; braindamaged 8-) +;; indifferent :-| +;; wry :-/ :-\ +;; sad :-( +;; evil >:-) +;; cry ;-( +;; dead X-) +;; grin :-D ;;; Code: @@ -45,8 +58,9 @@ :group 'gnus-visual) ;; Maybe this should go. -(defcustom smiley-data-directory (nnheader-find-etc-directory "images/smilies") - "*Location of the smiley faces files." +(defcustom smiley-data-directory + (nnheader-find-etc-directory "images/smilies") + "Location of the smiley faces files." :type 'directory :group 'smiley) @@ -61,8 +75,8 @@ ("\\(:-(\\)\\W" 1 "sad") ("\\(:-{\\)\\W" 1 "frown")) "*A list of regexps to map smilies to images. -The elements are (REGEXP MATCH FILE), where MATCH is the submatch in -regexp to replace with IMAGE. IMAGE is the name of a PBM file in +The elements are (REGEXP MATCH IMAGE), where MATCH is the submatch in +regexp to replace with IMAGE. IMAGE is the name of an image file in `smiley-data-directory'." :type '(repeat (list regexp (integer :tag "Regexp match number") @@ -78,7 +92,7 @@ regexp to replace with IMAGE. IMAGE is the name of a PBM file in (when (gnus-image-type-available-p 'xpm) (push "xpm" types)) types) - "*List of suffixes on picon file names to try." + "*List of suffixes on smiley file names to try." :version "22.1" :type '(repeat string) :group 'smiley) @@ -86,6 +100,7 @@ regexp to replace with IMAGE. IMAGE is the name of a PBM file in (defvar smiley-cached-regexp-alist nil) (defun smiley-update-cache () + (setq smiley-cached-regexp-alist nil) (dolist (elt (if (symbolp smiley-regexp-alist) (symbol-value smiley-regexp-alist) smiley-regexp-alist)) @@ -104,12 +119,13 @@ regexp to replace with IMAGE. IMAGE is the name of a PBM file in (push (list (car elt) (cadr elt) image) smiley-cached-regexp-alist))))))) -(defvar smiley-mouse-map - (let ((map (make-sparse-keymap))) - (define-key map [down-mouse-2] 'ignore) ; override widget - (define-key map [mouse-2] - 'smiley-mouse-toggle-buffer) - map)) +;; Not implemented: +;; (defvar smiley-mouse-map +;; (let ((map (make-sparse-keymap))) +;; (define-key map [down-mouse-2] 'ignore) ; override widget +;; (define-key map [mouse-2] +;; 'smiley-mouse-toggle-buffer) +;; map)) ;;;###autoload (defun smiley-region (start end) |