GNU bug report logs -
#46355
27.1; custom.el `widget-apply: Symbol’s function definition is void: nil'
Previous Next
Reported by: zdm <zdm <at> cock.li>
Date: Sun, 7 Feb 2021 08:45:02 UTC
Severity: normal
Tags: fixed, moreinfo, patch
Merged with 40853,
42801,
48531
Found in versions 26.3, 27.1, 28.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 46355 <at> debbugs.gnu.org (full text, mbox):
zdm <zdm <at> cock.li> writes:
> On Emacs 27.1 using the ‘Apply and Save’ button in a ‘M-x
> customize-face’ (or ‘M-x
> customize-apropos-faces’) buffer with more than one face to customize
> causes an error
> complaining of:
>
> | widget-apply: Symbol’s function definition is void: nil
>
> Step 1:
> | M-x customize-apropos-faces RET vc RET
> Step 2:
> | Press the ‘Apply and Save’ button and ‘yes’ to the dialog box
>
> The error will occur in the echo area.
Thanks for the bug report. This sounds like Bug#40853. I can reproduce
this in Emacs 27.1, but not in the development branch, which has this
fix:
commit 5c39f6f1165a33f5714eedd3a413f786dffbb5a2
Author: Mauro Aranda <maurooaranda <at> gmail.com>
Date: Fri Aug 14 16:40:40 2020 +0200
Make sure we only act on edited widgets in Custom-save
* lisp/cus-edit.el (Custom-save): Only act on edited widgets in the
buffer. If we attempt to redraw all widgets, we confuse
custom-variable-modified-p, or we end up drawing State buttons for
all options, including the hidden ones (bug#42801).
Would it be possible to you to build Emacs from the master branch and
try to see if you can reproduce it?
Alternatively, maybe you can try to redefine Custom-save as below in a
session, and see if the bug is still reproducible. You should evaluate
the following after Step 1, and before Step 2.
(defun Custom-save (&rest _ignore)
"Set all edited settings, then save all settings that have been set.
If a setting was edited and set before, this saves it. If a
setting was merely edited before, this sets it then saves it."
(interactive)
(let (edited-widgets)
(when (custom-command-apply
(lambda (child)
(when (memq (widget-get child :custom-state)
'(modified set changed rogue))
(push child edited-widgets)
(widget-apply child :custom-mark-to-save)))
"Save all settings in this buffer? " t)
;; Save changes to buffer.
(custom-save-all)
;; Redraw and recalculate the state when necessary.
(dolist (widget edited-widgets)
(widget-apply widget :custom-state-set-and-redraw)))))
That is how the function looks after the fix for Bug#40853 and
Bug#42801.
This bug report was last modified 3 years and 361 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.