Mercurial > emacs
changeset 105376:1e211a362b04
Kevin Ryde <user42 at zip.com.au>
(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)
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Fri, 02 Oct 2009 07:11:13 +0000 |
parents | 0cd17ca4caf4 |
children | 7f4c7f5c0eba |
files | lisp/ChangeLog lisp/net/browse-url.el |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 <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)
--- 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).