# HG changeset patch # User Glenn Morris # Date 1254467473 0 # Node ID 1e211a362b048a3349d844e4f487d931e677113d # Parent 0cd17ca4caf4833cb17fbe953cb60c19b9373324 Kevin Ryde (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) diff -r 0cd17ca4caf4 -r 1e211a362b04 lisp/ChangeLog --- a/lisp/ChangeLog Fri Oct 02 06:01:32 2009 +0000 +++ b/lisp/ChangeLog Fri Oct 02 07:11:13 2009 +0000 @@ -1,3 +1,9 @@ +2009-10-02 Kevin Ryde + + * 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 * allout.el (allout-init, allout-back-to-current-heading) diff -r 0cd17ca4caf4 -r 1e211a362b04 lisp/net/browse-url.el --- a/lisp/net/browse-url.el Fri Oct 02 06:01:32 2009 +0000 +++ b/lisp/net/browse-url.el Fri Oct 02 07:11:13 2009 +0000 @@ -778,7 +778,10 @@ ;; 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).