From 9c0919750b705fe77c9ace99833b2fe78a21b5f0 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 4 Sep 2003 02:01:26 +0000 Subject: [PATCH] Synch to Gnus 200309040206. --- lisp/ChangeLog | 9 +++++++++ lisp/gnus-art.el | 31 ++++++++++++++++++++++++++++--- lisp/gnus-util.el | 1 - 3 files changed, 37 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index db96494..6f9467e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2003-09-04 Jesper Harder + + * gnus-art.el (gnus-button-handle-info-url) + (gnus-button-handle-info-url-gnome) + (gnus-button-handle-info-url-kde, gnus-button-alist): Handle GNOME + and KDE style Info URLs. + + * gnus-util.el (gnus-url-unhex-string): Don't replace "+" with " ". + 2003-09-02 Jesper Harder * rfc2047.el (rfc2047-fold-region): Don't fold at the beginning diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 73ecadd..12148de 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -6561,9 +6561,15 @@ positives are possible." gnus-button-ctan-directory-regexp "/[-_.a-z0-9]+/[-_./a-z0-9]+[/a-z0-9]\\)") 1 (>= gnus-button-tex-level 8) gnus-button-handle-ctan 1) - ;; This is info - ("\\binfo:\\(//\\)?\\([^'\">\n\t ]+\\)" - 0 (>= gnus-button-emacs-level 1) gnus-button-handle-info-url 2) + ;; This is info (home-grown style) + ("\\binfo://\\([^'\">\n\t ]+\\)" + 0 (>= gnus-button-emacs-level 1) gnus-button-handle-info-url 1) + ;; Info GNOME style + ("\\binfo:\\([^(][^'\n\t\r \"><]*\\)" + 0 (>= gnus-button-emacs-level 1) gnus-button-handle-info-url-gnome 1) + ;; Info KDE style + ("<\\(info:\\(([^)]+)[^>\n\r]*\\)\\)>" + 1 (>= gnus-button-emacs-level 1) gnus-button-handle-info-url-kde 2) ("\\((Info-goto-node\\|(info\\)[ \t\n]*\\(\"[^\"]*\"\\))" 0 (>= gnus-button-emacs-level 1) gnus-button-handle-info-url 2) ("\\b\\(C-h\\|?\\)[ \t\n]+i[ \t\n]+d?[ \t\n]?m[ \t\n]+\\([^ ]+ ?[^ ]+\\)[ \t\n]+RET" @@ -7058,6 +7064,7 @@ specified by `gnus-button-alist'." (defun gnus-button-handle-info-url (url) "Fetch an info URL." + (setq url (mm-subst-char-in-string ?+ ?\ url)) (cond ((string-match "^\\([^:/]+\\)?/\\(.*\\)" url) (gnus-info-find-node @@ -7071,6 +7078,24 @@ specified by `gnus-button-alist'." (gnus-info-find-node url)) (t (error "Can't parse %s" url)))) +(defun gnus-button-handle-info-url-gnome (url) + "Fetch GNOME style info URL." + (setq url (mm-subst-char-in-string ?_ ?\ url)) + (if (string-match "\\([^#]+\\)#?\\(.*\\)" url) + (gnus-info-find-node + (concat "(" + (gnus-url-unhex-string + (match-string 1 url)) + ")" + (or (gnus-url-unhex-string + (match-string 2 url)) + "Top"))) + (error "Can't parse %s" url))) + +(defun gnus-button-handle-info-url-kde (url) + "Fetch KDE style info URL." + (gnus-info-find-node (gnus-url-unhex-string url))) + (defun gnus-button-handle-info-keystrokes (url) "Call `info' when pushing the corresponding URL button." ;; For links like `C-h i d m gnus RET', `C-h i d m CC Mode RET'. diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index e69c753..bd64337 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -1240,7 +1240,6 @@ If you find some problem with the directory separator character, try If optional second argument ALLOW-NEWLINES is non-nil, then allow the decoding of carriage returns and line feeds in the string, which is normally forbidden in URL encoding." - (setq str (or (mm-subst-char-in-string ?+ ? str) "")) ; why `or'? (let ((tmp "") (case-fold-search t)) (while (string-match "%[0-9a-f][0-9a-f]" str) -- 1.7.10.4