From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Bruno =?utf-8?Q?F=C3=A9lix?= Rezende Ribeiro Newsgroups: gmane.emacs.help Subject: Checking in Lisp if a given symbol has its original value Date: Tue, 31 Mar 2020 05:14:44 -0300 Message-ID: <87eet9c557.fsf@oitofelix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="46840"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 31 10:15:35 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJC3a-000C2o-IE for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 31 Mar 2020 10:15:34 +0200 Original-Received: from localhost ([::1]:33732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJC3Z-0006mn-Hc for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 31 Mar 2020 04:15:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55634) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJC2q-0006jt-OR for help-gnu-emacs@gnu.org; Tue, 31 Mar 2020 04:14:49 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jJC2q-0002jO-Kn for help-gnu-emacs@gnu.org; Tue, 31 Mar 2020 04:14:48 -0400 Original-Received: from [189.41.157.141] (port=55218 helo=felix-laptop) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1jJC2p-0003c8-Uv for help-gnu-emacs@gnu.org; Tue, 31 Mar 2020 04:14:48 -0400 X-Face: %,T7Hsg=SK$Zh)wiU4Qdv9-fZ26Pf5*+}Ld,{LeV'Cq-1?=kA"hc,'i""S85]g; _W+{nZfx 2GnAMS1K\E_E&:{h[wQd+Tqj5#PtH:W&8^crA0>i?nmD7hOL$K".`@An_8.7gaObQLlMy0\%%I0Jp. Lue$J0B Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACcElEQVRYw93YzXHCQAwF4G0h Fw4caYEW0oJbSAtuwa1AldGg8PKQtP+GMHkHxkDG/qLVrtek6x65UCZPleYdH485HA4zrHHQ4R5F cPSTl4L0qigJDoxpoFRpUmMGKzR1sbpB3DTLsnzd83nL+XyeNHWDoBHEeg9YQlQWCtZrSmOa1YVN ktDkiz0FwmDJVbd7CizTUhcXLByDINXIiGyUQqnkL8Nm8iCY5CD1lkf+9UYQFykEhb7UqEGFeLwK Q6YgnXTovEtDZkHGZFpbR21nkLlhlUFqWig63XYGyevxeGSQXFjXG4lclSnyyekW/Ur+jFfzWRD6 31RoeQxAnxQB6cErQBKsywDpW6Yo93UgFAMg3DqgMaCqaRzEc4pBPh50fdxk9oF4zvPCCBDml6fo sIagnClVNTmQn/BAmOXxn4LMXQan45vrJCg07QPC/JI8BeT3BjidLNkGpOu1anSNbgd5U6qWx4Ak DOL1RotkTLMV8ouEWYc8yNzezcBNVchv5MIK8VKEHjKrM0D+malvyFoqxG2kLBHIMCmo3EAjFfLl MSAeNSzZoeZZIH/SHAim3I1MMwvC7syAeBuEyV++s3aA2suDHkI7nyi6UUTCHwLGKxSCsFjzzpV3 ZNUihc+s9QqF7YwtEW88zAMQt5Ec7AkKx4uvWjChwaujFoAay+PLUHhQ5LQXKeVu7y2a0GRY/LZq +gG1jBROap4Sy0XyX1VNyf8Ekav8lom5dqFyocn0k62QOenWkBC05uNNDyCv2fpj2mUtxve7vGZB 21CqI1X1BaBhTfiz1QDL9tAMaN70C8L8ei/Q32rYlN6hgdj0DS+u5+J4AqFYAAAAAElFTkSuQmCC X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:122718 Archived-At: What=E2=80=99s the canonical way of checking if a given symbol has its original value, as reported by =E2=80=98describe-variable=E2=80=99? I=E2=80=99ve 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 --=20 Bruno F=C3=A9lix Rezende Ribeiro (oitofelix) [0x28D618AF]