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

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

Checking in Lisp if a given symbol has its original value


From: Bruno Félix Rezende Ribeiro
Subject: Checking in Lisp if a given symbol has its original value
Date: Tue, 31 Mar 2020 05:14:44 -0300

What’s the canonical way of checking if a given symbol has its
original value, as reported by ‘describe-variable’?

I’ve come up with:

#+BEGIN_SRC elisp
  (defun standard-value-p (symbol)
    "Return non-nil if SYMBOL has its original value."
      (equal (eval (car (get symbol 'standard-value)))
             symbol))
#+END_SRC

-- 
Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
<http://oitofelix.freeshell.org/>



reply via email to

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