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

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

bug#14247: 24.3.50; Autoloaded defcustom in package loses saved setting


From: Mauro Aranda
Subject: bug#14247: 24.3.50; Autoloaded defcustom in package loses saved setting
Date: Sun, 5 Jan 2020 12:25:25 -0300

Magnus Henoch <magnus.henoch@gmail.com> writes:

> 1. Set HOME to the name of an empty directory and start a fresh Emacs.
>
> 2. Put the following into a file named foo.el:
>
> ;;; foo.el --- test autoloaded defcustom
> ;;;
> ;;; Version: 0.1
>
> ;;;###autoload
> (defcustom foo-setting nil
>   "A boolean setting."
>   :type 'boolean)
>
> ;;;###autoload
> (defun foo-get-setting ()
>   (interactive)
>   (message "foo-setting is %s" foo-setting))
>
> (provide 'foo)
> ;;; foo.el ends here
>
> 3. Install foo.el with M-x package-install-file.
>
> 4. Type M-x customize-option RET foo-setting RET, set the setting to t,
> and "save for future sessions".
>
> 5. Exit and restart Emacs, still with the new home directory.
>
> 6. Type M-x foo-get-setting.  I would expect it to say "foo-setting is
> t", but it says "foo-setting is nil".
>
> At this point, M-x customize-option RET foo-setting RET will say that
> the variable is "CHANGED outside Customize", and choosing "Revert This
> Session's Customization" will set foo-setting to t, i.e. the value saved
> through Customize.

I've tried to reproduce this on the emacs-27 branch, but I can't.
I get:
"foo-setting is t", and the STATE in the customize buffer is SAVED and
set.


reply via email to

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