GNU bug report logs - #23926
defcustom with STANDARD=<non-constant-expression> gives confusing results

Previous Next

Package: emacs;

Reported by: Noam Postavsky <npostavs <at> users.sourceforge.net>

Date: Sat, 9 Jul 2016 03:12:01 UTC

Severity: minor

Full log


Message #55 received at 23926 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 23926 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#23926: defcustom with STANDARD=<non-pure-expression> gives
 confusing results
Date: Sat, 09 Jul 2016 16:48:23 -0400
Eli Zaretskii <eliz <at> gnu.org> writes:
> Of course, I do.  Maybe you don't realize how many times Emacs
> evaluates the value of a defcustom, but I do.

What about making Emacs evaluate it less? e.g. replace occurences of
(eval (car (get var 'standard-value))) with

(or (get var 'original-value)
    (let ((val (eval (car (get var 'standard-value)))))
      (put var 'original-value val)
      val))

Wrapped in a function of course, call it custom-get-standard-value?




This bug report was last modified 1 year and 299 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.