From: Mauro Aranda <maurooaranda@gmail.com>
To: zdm <zdm@cock.li>
Cc: 46355@debbugs.gnu.org
Subject: bug#46355: 27.1; custom.el `widget-apply: Symbol’s function definition is void: nil'
Date: Sun, 07 Feb 2021 09:03:33 -0300 [thread overview]
Message-ID: <601fd719.1c69fb81.f8f51.e817@mx.google.com> (raw)
In-Reply-To: <877dnku85b.fsf@cock.li> (zdm@cock.li's message of "Sat, 06 Feb 2021 15:46:24 -0700")
zdm <zdm@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@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.
next prev parent reply other threads:[~2021-02-07 12:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-06 22:46 bug#46355: 27.1; custom.el `widget-apply: Symbol’s function definition is void: nil' zdm
2021-02-07 12:03 ` Mauro Aranda [this message]
[not found] ` <874kinpl07.fsf@cock.li>
2021-02-08 9:51 ` Mauro Aranda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=601fd719.1c69fb81.f8f51.e817@mx.google.com \
--to=maurooaranda@gmail.com \
--cc=46355@debbugs.gnu.org \
--cc=zdm@cock.li \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.