diff options
| author | Glenn Morris | 2009-10-02 07:11:13 +0000 |
|---|---|---|
| committer | Glenn Morris | 2009-10-02 07:11:13 +0000 |
| commit | 895d190402f5b7ed021bd9c9e05c81d473dfee08 (patch) | |
| tree | df6c7c6a6e724b37689b9df48082c3ac81c5e45a | |
| parent | e9a0aef83c8176a32bc29ef342c68b91b73c64f5 (diff) | |
| download | emacs-895d190402f5b7ed021bd9c9e05c81d473dfee08.tar.gz emacs-895d190402f5b7ed021bd9c9e05c81d473dfee08.zip | |
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)
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/net/browse-url.el | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 54929a6c0ca..cc330ada560 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2009-10-02 Kevin Ryde <user42@zip.com.au> | ||
| 2 | |||
| 3 | * net/browse-url.el (browse-url): Pass any symbol in | ||
| 4 | browse-url-browser-function to `apply', since if you've mistakenly put | ||
| 5 | an unbound symbol then the error is clearer. (Bug#4531) | ||
| 6 | |||
| 1 | 2009-10-02 Juanma Barranquero <lekktu@gmail.com> | 7 | 2009-10-02 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 8 | ||
| 3 | * allout.el (allout-init, allout-back-to-current-heading) | 9 | * allout.el (allout-init, allout-back-to-current-heading) |
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 1e724dda047..ead2a39c9d4 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el | |||
| @@ -778,7 +778,10 @@ Prompts for a URL, defaulting to the URL at or before point. Variable | |||
| 778 | ;; which may not even exist any more. | 778 | ;; which may not even exist any more. |
| 779 | (if (stringp (frame-parameter (selected-frame) 'display)) | 779 | (if (stringp (frame-parameter (selected-frame) 'display)) |
| 780 | (setenv "DISPLAY" (frame-parameter (selected-frame) 'display))) | 780 | (setenv "DISPLAY" (frame-parameter (selected-frame) 'display))) |
| 781 | (if (functionp browse-url-browser-function) | 781 | ;; Send any symbol to `apply', not just fboundp ones, since void-function |
| 782 | ;; from apply is clearer than wrong-type-argument from dolist. | ||
| 783 | (if (or (symbolp browse-url-browser-function) | ||
| 784 | (functionp browse-url-browser-function)) | ||
| 782 | (apply browse-url-browser-function url args) | 785 | (apply browse-url-browser-function url args) |
| 783 | ;; The `function' can be an alist; look down it for first match | 786 | ;; The `function' can be an alist; look down it for first match |
| 784 | ;; and apply the function (which might be a lambda). | 787 | ;; and apply the function (which might be a lambda). |