help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Lions & tigers & variables - Oh my! [was: Lisp error on function :do


From: Emanuel Berg
Subject: Re: Lions & tigers & variables - Oh my! [was: Lisp error on function :documentation]
Date: Wed, 19 Oct 2022 07:27:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

I wrote in another post that all global variables are
dynamic/special but not all dynamic/special variables are
global, however this is incorrect, it only happens with
`defvar', not `setq' ...

(setq some-var-1 111)

(defvar some-var-2 222)

(special-variable-p 'some-var-1) ; nil

(special-variable-p 'some-var-2) ; t

(defun test-global-vars ()
  (list some-var-1 some-var-2) )

(let ((some-var-1 111000)
      (some-var-2 222000) )
  (test-global-vars) ) ; 111 222000

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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