all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Checking in Lisp if a given symbol has its original value
@ 2020-03-31  8:14 Bruno Félix Rezende Ribeiro
  2020-03-31 15:36 ` Drew Adams
  0 siblings, 1 reply; 2+ messages in thread
From: Bruno Félix Rezende Ribeiro @ 2020-03-31  8:14 UTC (permalink / raw)
  To: help-gnu-emacs

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/>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-31 15:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-31  8:14 Checking in Lisp if a given symbol has its original value Bruno Félix Rezende Ribeiro
2020-03-31 15:36 ` Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.