From: yamaoka Date: Mon, 30 Jan 2006 22:20:28 +0000 (+0000) Subject: Synch to No Gnus 200601301455. X-Git-Tag: t-gnus-6_17_4-quimby-~122 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=2d6c3629ce3b1d9ad6a0a1e8a5b183d54d1973da;p=elisp%2Fgnus.git- Synch to No Gnus 200601301455. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 024bccc..f5c09ac 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,29 @@ +2006-01-30 Reiner Steib + + * nnweb.el (nnweb-google-parse-1): Clarify some comments. + +2006-01-30 Andreas Seltenreich + + * nnweb.el (nnweb-type-definition, nnweb-google-parse-1) + (nnweb-google-create-mapping, nnweb-google-search): Adapt to + current Google Groups. + 2006-01-26 Reiner Steib + * gnus-sum.el (gnus-summary-make-tool-bar): Add checks for XEmacs + and tool-bar-mode. + + * gnus-group.el (gnus-group-make-tool-bar): Add checks for XEmacs + and tool-bar-mode. + + * message.el (message-tool-bar-update): Simplify. + (message-make-tool-bar): Add checks for XEmacs and tool-bar-mode. + + * gnus-sum.el (gnus-summary-tool-bar-update): Check for + gnus-summary-buffer. + (gnus-summary-tool-bar-gnome): Use "reply-author" icon for + gnus-summary-reply. + * gmm-utils.el (gmm): Add :version. 2006-01-26 Katsumi Yamaoka diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index 8bc5e7b..3a6ac01 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -1119,7 +1119,12 @@ See `gmm-tool-bar-from-list' for the format of the list." (defun gnus-group-make-tool-bar (&optional force) "Make a group mode tool bar from `gnus-group-tool-bar'. When FORCE, rebuild the tool bar." - (when (or (not gnus-group-tool-bar-map) force) + (when (and (not (featurep 'xemacs)) + (boundp 'tool-bar-mode) + tool-bar-mode + ;; The Gnus 5.10.6 code checked (default-value 'tool-bar-mode). + ;; Why? --rsteib + (or (not gnus-group-tool-bar-map) force)) (let ((map (when (default-value 'tool-bar-mode) (let ((load-path (mm-image-load-path))) (gmm-tool-bar-from-list gnus-group-tool-bar diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index c427b17..2fae1d0 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -2619,16 +2619,17 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs)))) ;; Note: The :set function in the `gnus-summary-tool-bar*' variables will only ;; affect _new_ message buffers. We might add a function that walks thru all -;; message-mode buffers and force the update. +;; summary-mode buffers and force the update. (defun gnus-summary-tool-bar-update (&optional symbol value) "Update summary mode toolbar. Setter function for custom variables." - (if symbol - ;; When used as ":set" function: - (progn - (set-default symbol value) - (setq-default gnus-summary-tool-bar-map nil)) - (gnus-summary-make-tool-bar t))) + (setq-default gnus-summary-tool-bar-map nil) + (when symbol + ;; When used as ":set" function: + (set-default symbol value)) + (when (gnus-buffer-live-p gnus-summary-buffer) + (with-current-buffer gnus-summary-buffer + (gnus-summary-make-tool-bar)))) ;; The default will be changed when the new icons have been checked in: (defcustom gnus-summary-tool-bar 'gnus-summary-tool-bar-retro @@ -2652,14 +2653,13 @@ Pre-defined symbols include `gnus-summary-tool-bar-gnome' and (defcustom gnus-summary-tool-bar-gnome '((gnus-summary-post-news "compose" nil) (gnus-summary-reply-with-original "reply-author") - (gnus-summary-reply "reply" nil :visible nil) + (gnus-summary-reply "reply-author" nil :visible nil) (gnus-summary-followup-with-original "reply-all") (gnus-summary-followup "reply-all" nil :visible nil) (gnus-summary-mail-forward "forward") (gnus-summary-save-article "save") ;; stock_mail-copy (gnus-summary-search-article-forward "search") (gnus-summary-print-article "print") - ;; gnus-group-read-only-p (gnus-summary-mark-as-expirable "delete" nil :visible (gnus-check-backend-function 'request-expire-articles @@ -2746,7 +2746,10 @@ See `gmm-tool-bar-from-list' for the format of the list." (defun gnus-summary-make-tool-bar (&optional force) "Make a summary mode tool bar from `gnus-summary-tool-bar'. When FORCE, rebuild the tool bar." - (when (or (not gnus-summary-tool-bar-map) force) + (when (and (not (featurep 'xemacs)) + (boundp 'tool-bar-mode) + tool-bar-mode + (or (not gnus-summary-tool-bar-map) force)) (let ((map (when (default-value 'tool-bar-mode) (let ((load-path (mm-image-load-path))) (gmm-tool-bar-from-list gnus-summary-tool-bar diff --git a/lisp/message.el b/lisp/message.el index 6a3e855..7cbc70c 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -7431,12 +7431,10 @@ which specify the range to operate on." (defun message-tool-bar-update (&optional symbol value) "Update message mode toolbar. Setter function for custom variables." - (if symbol - ;; When used as ":set" function: - (progn - (set-default symbol value) - (setq-default message-tool-bar-map nil)) - (message-make-tool-bar t))) + (setq-default message-tool-bar-map nil) + (when symbol + ;; When used as ":set" function: + (set-default symbol value))) ;; The default will be changed when the new icons have been checked in: (defcustom message-tool-bar 'message-tool-bar-retro @@ -7521,7 +7519,10 @@ See `gmm-tool-bar-from-list' for the format of the list." (defun message-make-tool-bar (&optional force) "Make a message mode tool bar from `message-tool-bar-list'. When FORCE, rebuild the tool bar." - (when (or (not message-tool-bar-map) force) + (when (and (not (featurep 'xemacs)) + (boundp 'tool-bar-mode) + tool-bar-mode + (or (not message-tool-bar-map) force)) (setq message-tool-bar-map (when (default-value 'tool-bar-mode) (let ((load-path (mm-image-load-path))) diff --git a/lisp/nnweb.el b/lisp/nnweb.el index 94a4114..910284a 100644 --- a/lisp/nnweb.el +++ b/lisp/nnweb.el @@ -27,11 +27,12 @@ ;; Note: You need to have `w3' installed for some functions to work. -;; FIXME: Due to changes in the HTML output of Google Groups and Gmane, stuff -;; related to web groups (gnus-group-make-web-group) doesn't work anymore. +;; FIXME: Due to changes in the HTML output of Gmane, stuff related to Gmane +;; web groups (`gnus-group-make-web-group') doesn't work anymore. -;; Fetching an article by MID (cf. gnus-refer-article-method) over Google -;; Groups should work. +;; FIXME: Solid web groups are currently broken because ARGS are no longer +;; passed from `gnus-group-make-web-group' to `nnweb-request-create-group'. +;; See revision 6.96 of `gnus-group.el' (2003-01-06). ;;; Code: @@ -61,6 +62,7 @@ Valid types include `google', `dejanews', and `gmane'.") (defvar nnweb-type-definition '((google (id . "http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source") + (result . "http://groups.google.com/group/%s/msg/%s?dmode=source") (article . nnweb-google-wash-article) (reference . identity) (map . nnweb-google-create-mapping) @@ -69,8 +71,9 @@ Valid types include `google', `dejanews', and `gmane'.") (base . "http://groups.google.com") (identifier . nnweb-google-identity)) (dejanews ;; alias of google - (article . ignore) - (id . "http://groups.google.com/groups?selm=%s&output=gplain") + (id . "http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source") + (result . "http://groups.google.com/group/%s/msg/%s?dmode=source") + (article . nnweb-google-wash-article) (reference . identity) (map . nnweb-google-create-mapping) (search . nnweb-google-search) @@ -337,6 +340,7 @@ Valid types include `google', `dejanews', and `gmane'.") (mm-url-decode-entities)))) (defun nnweb-google-parse-1 (&optional Message-ID) + "Parse search result in current buffer." (let ((i 0) (case-fold-search t) (active (cadr (assoc nnweb-group nnweb-group-alist))) @@ -348,11 +352,16 @@ Valid types include `google', `dejanews', and `gmane'.") nnweb-group-alist)) ;; Go through all the article hits on this page. (goto-char (point-min)) - (while (re-search-forward - "a href=/groups\\(\\?[^ \">]*selm=\\([^ &\">]+\\)\\)" nil t) - (setq mid (match-string 2) + (while + (re-search-forward + "a +href=\"/group/\\([^>\"]+\\)/browse_thread/[^>]+#\\([0-9a-f]+\\)" + nil t) + (setq Newsgroups (match-string-no-properties 1) + ;; Note: Starting with Google Groups 2, `mid' is a Google-internal + ;; ID, not a proper Message-ID. + mid (match-string-no-properties 2) url (format - (nnweb-definition 'id) mid)) + (nnweb-definition 'result) Newsgroups mid)) (narrow-to-region (search-forward ">" nil t) (search-forward "" nil t)) (mm-url-remove-markup) @@ -360,25 +369,22 @@ Valid types include `google', `dejanews', and `gmane'.") (setq Subject (buffer-string)) (goto-char (point-max)) (widen) - (forward-line 2) - (when (looking-at "
]+>") - (goto-char (match-end 0))) - (if (not (looking-at "]+>")) - (skip-chars-forward " \t") - (narrow-to-region (point) - (search-forward "" nil t)) - (mm-url-remove-markup) - (mm-url-decode-entities) - (setq Newsgroups (buffer-string)) - (goto-char (point-max)) - (widen) - (skip-chars-forward "- \t")) + (narrow-to-region (point) + (search-forward "]+\\).*Next" nil t)) + "\"]+\\)\">= i nnweb-max-hits)) (setq more nil) ;; Yup, there are more articles @@ -443,7 +449,8 @@ Valid types include `google', `dejanews', and `gmane'.") ("hl" . "en") ("lr" . "") ("safe" . "off") - ("sites" . "groups"))))) + ("sites" . "groups") + ("filter" . "0"))))) t) (defun nnweb-google-identity (url)