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: Wed, 2 Sep 2020 17:46:01 -0300

Mauro Aranda <maurooaranda@gmail.com> writes:

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

This was 8 months ago.  In the meantime, I was able to reproduce this on
Emacs 24.5, but not with Emacs 25.1 and beyond.

So I'm going to go ahead and close this as fixed.  If this is
incorrect, please reopen.

reply via email to

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