]> git.eshelyaron.com Git - emacs.git/commitdiff
Kevin Ryde <user42 at zip.com.au>
authorGlenn Morris <rgm@gnu.org>
Fri, 2 Oct 2009 07:11:13 +0000 (07:11 +0000)
committerGlenn Morris <rgm@gnu.org>
Fri, 2 Oct 2009 07:11:13 +0000 (07:11 +0000)
(browse-url): Pass any symbol in browse-url-browser-function to
`apply', since if you've mistakenly put an unbound symbol then the
error is clearer.  (Bug#4531)

lisp/ChangeLog
lisp/net/browse-url.el

index 54929a6c0ca3240e35d047da49c75fe6977cb1b1..cc330ada560449cda64b2cfcf1c3bcf577b13e24 100644 (file)
@@ -1,3 +1,9 @@
+2009-10-02  Kevin Ryde  <user42@zip.com.au>
+
+       * net/browse-url.el (browse-url): Pass any symbol in
+       browse-url-browser-function to `apply', since if you've mistakenly put
+       an unbound symbol then the error is clearer.  (Bug#4531)
+
 2009-10-02  Juanma Barranquero  <lekktu@gmail.com>
 
        * allout.el (allout-init, allout-back-to-current-heading)
index 1e724dda047c125d0a8cc708712fc2d37e9bde49..ead2a39c9d424bfe505018044a8b5694c5d60115 100644 (file)
@@ -778,7 +778,10 @@ Prompts for a URL, defaulting to the URL at or before point.  Variable
     ;; which may not even exist any more.
     (if (stringp (frame-parameter (selected-frame) 'display))
         (setenv "DISPLAY" (frame-parameter (selected-frame) 'display)))
-    (if (functionp browse-url-browser-function)
+    ;; 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)
       ;; The `function' can be an alist; look down it for first match
       ;; and apply the function (which might be a lambda).