emacs-devel
[Top][All Lists]
Advanced

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

Re: The purpose of makunbound


From: Kelly Dean
Subject: Re: The purpose of makunbound
Date: Sun, 22 Feb 2015 00:18:43 +0000

Here's a verbatim (including the comments) quote from section 11.4 ((elisp) 
Void Variables) of the manual in Emacs 24.4:
          (setq x 1)               ; Put a value in the global binding.
               => 1
          (let ((x 2))             ; Locally bind it.
            (makunbound 'x)        ; Void the local binding.
            x)
          error--> Symbol's value as variable is void: x
          x                        ; The global binding is unchanged.
               => 1

Notice the ‟global binding is unchanged”. That matches my interpretation. Your 
interpretation would be ‟the global binding is changed back”.

And in the same section:
          (boundp 'abracadabra)          ; Starts out void.
               => nil
          (let ((abracadabra 5))         ; Locally bind it.
            (boundp 'abracadabra))
               => t
          (boundp 'abracadabra)          ; Still globally void.
               => nil
          (setq abracadabra 5)           ; Make it globally nonvoid.
               => 5
          (boundp 'abracadabra)
               => t

Notice the ‟still globally void”. That matches my interpretation. Yours would 
be ‟globally void again”.

I'm pointing this out just because you're saying my interpretation is 
weird/unusual. It isn't.



reply via email to

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