bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#4531: closed by Glenn Morris <address@hidden> (Re: bug#4531: 23.1; b


From: Kevin Ryde
Subject: bug#4531: closed by Glenn Morris <address@hidden> (Re: bug#4531: 23.1; browse-url with unknown func in browse-url-browser-function)
Date: Thu, 08 Oct 2009 11:14:15 +1100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)

Glenn Morris <rgm@gnu.org> writes:
>
> applied

Actually Stefan proposed "consp && not functionp" to identify the alist
case.  I might apply something like below when I double check it.

(It's all been in slow motion for me lately :-)

--- browse-url.el.~1.83.~       2009-10-08 11:09:10.000000000 +1100
+++ browse-url.el       2009-10-08 11:09:57.000000000 +1100
@@ -780,9 +780,9 @@
         (setenv "DISPLAY" (frame-parameter (selected-frame) 'display)))
     ;; Send any symbol to `apply', not just fboundp ones, since void-function
     ;; from apply is clearer than wrong-type-argument from dolist.
-    (if (or (symbolp browse-url-browser-function)
-            (functionp browse-url-browser-function))
-        (apply browse-url-browser-function url args)
+    (if (and (consp browse-url-browser-function)
+            (not (functionp browse-url-browser-function)))
+
       ;; The `function' can be an alist; look down it for first match
       ;; and apply the function (which might be a lambda).
       (catch 'done
@@ -791,7 +791,9 @@
             (apply (cdr bf) url args)
             (throw 'done t)))
         (error "No browse-url-browser-function matching URL %s"
-               url)))))
+               url))
+
+        (apply browse-url-browser-function url args))))
 
 ;;;###autoload
 (defun browse-url-at-point (&optional arg)

reply via email to

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