[Top][All Lists]

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

browse-url when symbol browse-url-browser-function (patch)

From: Kevin Ryde
Subject: browse-url when symbol browse-url-browser-function (patch)
Date: Mon, 26 Mar 2007 07:38:58 +1000
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

If browse-url-browser-function is a symbol which is not a function the
error message isn't terrifically helpful

        M-: (setq browse-url-browser-function 'my-crazy-browse-url)
        M-x browse-url

=>      Wrong type argument: listp, my-crazy-browse-url

Perhaps any symbol could be taken to be a function (or rather, meant
to be a function).  So the error would be from apply,

=>      Symbol's function definition is void: my-crazy-browse-url

I struck this when my .emacs asked for an browse function that was
unavailable (on account of site-lisp setups).  The error about listp
had me (wrongly) thinking I couldn't put a function there any more, or

2007-03-26  Kevin Ryde  <address@hidden>

        * net/browse-url.el (browse-url): Assume any symbol in
        browse-url-browser-function is meant to be a function and call apply
        on it.  This improves the error message, since apply complains about
        "definition as a function", instead of from dolist complaining listp
        and suggesting a symbol is wrong.

Attachment: browse-url.el.apply-symbol.diff
Description: Text Data

reply via email to

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