GNU bug report logs -
#65145
‘enable-theme’ completion for themes loaded by ‘require-theme’
Previous Next
Reported by: Shynur Xie <one.last.kiss <at> outlook.com>
Date: Tue, 8 Aug 2023 10:37:01 UTC
Severity: normal
Tags: notabug
Done: Mauro Aranda <maurooaranda <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Shynur Xie <one.last.kiss <at> outlook.com> writes:
>> I can't reproduce it. I did:
>> emacs -Q
>> (require-theme 'leuven-theme)
>> M-x enable-theme
>
> Oh Oh, sorry, Mauro. I forgot to say that, this occurs only when
> using a third-party theme, e.g., you create a file named ‘X-theme.el’,
> which is under ‘/tmp/’ and contains the following code:
>
> (deftheme X)
> (provide 'X-theme)
>
> Then evaluate
>
> (let ((custom-theme-load-path '("/tmp/")))
> (require-theme 'X-theme))
>
> Then call ‘enable-theme’ interactively.
Thanks, I see it now. Note that if you change the X-theme.el file to
something like this:
(deftheme X)
(let ((class '((class color) (min-colors 89))))
(custom-theme-set-faces
'X
`(default ((,class (:background "#222222" :foreground "#f6f6f6"))))))
(provide-theme 'X)
Then there's completion for "X". The reason is that, for completion,
Custom looks for a non-nil theme-settings property. Your empty theme
recipe doesn't have settings, so theme-settings is nil, while if you
change it to a non-empty theme, theme-settings will be non-nil.
I don't really see a need to change the code here.
This bug report was last modified 1 year and 291 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.