[Top][All Lists]

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

Change `customize-save-variable' to work under "emacs -Q"?

From: Lars Magne Ingebrigtsen
Subject: Change `customize-save-variable' to work under "emacs -Q"?
Date: Sun, 10 Jul 2011 14:22:55 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

If you run "emacs -Q", and you have a piece of code that calls
`customize-save-variable', it will error out, saying that it won't
overwrite the conf.

Would anybody mind if I changed that function to not error out, but
instead just do a `setq' on the variable in question, if we're running
under -Q?

Otherwise all the callers end up doing this very awkward thing:

        (if (ignore-errors (custom-file))
              (customize-save-variable 'smtpmail-smtp-server server)
              (customize-save-variable 'smtpmail-smtp-service port))
          (setq smtpmail-smtp-server server
                smtpmail-smtp-service port))

(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/

reply via email to

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