* gnus-art.el (gnus-button-handle-custom): Do not just use
authorReiner Steib <Reiner.Steib@gmx.de>
Wed, 14 Dec 2005 13:12:54 +0000 (13:12 +0000)
committerReiner Steib <Reiner.Steib@gmx.de>
Wed, 14 Dec 2005 13:12:54 +0000 (13:12 +0000)
`customize-apropos' for any "M-x customize-*" button but the
function called for.  Accept both the function name and its
argument in order to achieve this.
(gnus-button-alist): Remove support for "custom:" URL's.  Pass
function name to `gnus-button-handle-custom' in case of "M-x
customize-*" buttons.

lisp/ChangeLog
lisp/gnus-art.el

index c2cca40..4dd062e 100644 (file)
@@ -1,3 +1,13 @@
+2005-12-14  Ralf Angeli  <angeli@iwi.uni-sb.de>
+
+       * gnus-art.el (gnus-button-handle-custom): Do not just use
+       `customize-apropos' for any "M-x customize-*" button but the
+       function called for.  Accept both the function name and its
+       argument in order to achieve this.
+       (gnus-button-alist): Remove support for "custom:" URL's.  Pass
+       function name to `gnus-button-handle-custom' in case of "M-x
+       customize-*" buttons.
+
 2005-12-12  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-art.el (gnus-buttonized-mime-types): Mention addition of
index 336cd79..1a2b21c 100644 (file)
@@ -6297,9 +6297,11 @@ address, `ask' if unsure and `invalid' if the string is invalid."
           (gnus-url-mailto url-mailto))
          (t (gnus-message 3 "Invalid string.")))))
 
-(defun gnus-button-handle-custom (url)
-  "Follow a Custom URL."
-  (customize-apropos (gnus-url-unhex-string url)))
+(defun gnus-button-handle-custom (fun arg)
+  "Call function FUN on argument ARG.
+Both FUN and ARG are supposed to be strings.  ARG will be passed
+as a symbol to FUN."
+  (funcall (intern fun) (intern arg)))
 
 (defvar gnus-button-handle-describe-prefix "^\\(C-h\\|<?[Ff]1>?\\)")
 
@@ -6479,10 +6481,8 @@ positives are possible."
      ;; Info links like `C-h i d m CC Mode RET'
      0 (>= gnus-button-emacs-level 1) gnus-button-handle-info-keystrokes 2)
     ;; This is custom
-    ("\\bcustom:\\(//\\)?\\([^'\">\n\t ]+\\)"
-     0 (>= gnus-button-emacs-level 5) gnus-button-handle-custom 2)
-    ("M-x[ \t\n]customize-[^ ]+[ \t\n]RET[ \t\n]\\([^ ]+\\)[ \t\n]RET" 0
-     (>= gnus-button-emacs-level 1) gnus-button-handle-custom 1)
+    ("M-x[ \t\n]\\(customize-[^ ]+\\)[ \t\n]RET[ \t\n]\\([^ ]+\\)[ \t\n]RET" 0
+     (>= gnus-button-emacs-level 1) gnus-button-handle-custom 1 2)
     ;; Emacs help commands
     ("M-x[ \t\n]+apropos[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET"
      ;; regexp doesn't match arguments containing ` '.