emacs - How can I get a variable's initial value in Elisp? -



emacs - How can I get a variable's initial value in Elisp? -

in emacs lisp, there function initial value of symbol initilized defvar? some-function shown below:

(defvar var "initial value") (setq var "changed value") (some-function 'var) => "inital value"

emacs doesn't remember initial value. if evaluate

(defvar var "initial value") (setq var "changed value")

in *scratch* buffer, "initial value" no longer available, total stop.

if defvar performed in loaded file, emacs remembers it's loaded from; (symbol-file var 'defvar) returns file name, , can original look variable initialized (but not original value), assuming file still around. available via command m-x find-variable.

emacs elisp

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -