emacs-devel
[Top][All Lists]
Advanced

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

Re: How can url-show-status be void when (featurep 'url-vars) is t?


From: Lennart Borgman
Subject: Re: How can url-show-status be void when (featurep 'url-vars) is t?
Date: Tue, 29 Jun 2010 11:51:53 +0200

On Tue, Jun 29, 2010 at 7:45 AM, Kevin Rodgers
<address@hidden> wrote:
> Lennart Borgman wrote:
>>
>> On Sun, Jun 27, 2010 at 8:08 PM, Andreas Schwab <address@hidden>
>> wrote:
>>>
>>> Lennart Borgman <address@hidden> writes:
>>>
>>>> Any ideas how then url-show-status can be void after loading url-vars?
>>>
>>> ELISP> (let (url-show-status) (load "url-vars"))
>>> t
>>> ELISP> (boundp 'url-show-status)
>>> nil
>>
>> Ah, thanks. I managed to move (require 'url-vars) inside the let-clause.
>>
>> That is pretty easy to do when you are restructuring something. I did
>> not notice until many months later so I had forgotten about the change
>> of course.
>
>> Wouldn't it be possible for defvar, defcustom etc to detect that
>> situation?
>
> defvar does this:
>
>        { /* Check if there is really a global binding rather than just a let
>             binding that shadows the global unboundness of the var.  */
>          volatile struct specbinding *pdl = specpdl_ptr;
>          while (--pdl >= specpdl)
>            {
>              if (EQ (pdl->symbol, sym) && !pdl->func
>                  && EQ (pdl->old_value, Qunbound))
>                {
>                  message_with_string ("Warning: defvar ignored because %s is
> let-bound",
>                                       SYMBOL_NAME (sym), 1);
>                  break;
>                }
>            }
>        }


Thanks, but should not that be an error?



reply via email to

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