Subject: bug#40853: 28.0.50; possible bug in function customize-saved

From: Michelangelo Rodriguez <[email-masked]>
Date: Sat, 25 Apr 2020 21:49:18 +0200

In customize-saved buffers, if two or more options are present, The
following error occurs:

(void-function nil)
  nil(nil)
  widget-apply(nil :value-get)
  widget-value(nil)
  custom-variable-modified-p((custom-variable :tag "Package Archives" :value package-archives :custom-form edit :custom-magic (custom-magic :args (nil) :parent #1 :indent 0 :children nil :from #<marker (moves after insertion) at 587 in *Customize Saved*> :to #<marker at 587 in *Customize Saved*> :buttons nil :value nil) :buttons ((documentation-string :args nil :value "An alist of archives from which to fetch.\nThe defa..." :indent 3 :visibility-widget custom-visibility :parent #1 :doc-overlay #<overlay from 587 to 632 in *Customize Saved*> :buttons ((custom-visibility :args nil :value nil :help-echo "Show or hide rest of the documentation." :on "Hide" :off "More" :always-active t :action widget-parent-action :parent #13 :indent 3 :button-overlay #<overlay from 632 to 636 in *Customize Saved*> :from #<marker (moves after insertion) at 632 in *Customize Saved*> :to #<marker at 636 in *Customize Saved*>)) :from #<marker (moves after insertion) at 587 in *Customize Saved*> :to #<marker at 637 in *Customize Saved*>) (custom-magic :args (nil) :parent #1 :indent 0 :children nil :from #<marker (moves after insertion) at 587 in *Customize Saved*> :to #<marker at 587 in *Customize Saved*> :buttons nil :value nil) (item :format "%{%t%} " :sample-face custom-variable-tag :tag "Package Archives" :parent #1 :indent 0 :sample-overlay #<overlay from 569 to 585 in *Customize Saved*> :from #<marker (moves after insertion) at 569 in *Customize Saved*> :to #<marker at 586 in *Customize Saved*>) (custom-visibility :args nil :value nil :help-echo "Show the value of this option." :on-glyph "down" :on "Hide" :off-glyph "right" :off "Show Value" :action custom-toggle-hide-variable :parent #1 :indent 0 :suppress-face t :button-overlay #<overlay from 558 to 568 in *Customize Saved*> :from #<marker (moves after insertion) at 558 in *Customize Saved*> :to #<marker at 568 in *Customize Saved*>)) :documentation-indent 3 :children nil :custom-state hidden :from #<marker (moves after insertion) at 558 in *Customize Saved*> :to #<marker at 637 in *Customize Saved*>))
  custom-variable-state-set((custom-variable :tag "Package Archives" :value package-archives :custom-form edit :custom-magic (custom-magic :args (nil) :parent #1 :indent 0 :children nil :from #<marker (moves after insertion) at 587 in *Customize Saved*> :to #<marker at 587 in *Customize Saved*> :buttons nil :value nil) :buttons ((documentation-string :args nil :value "An alist of archives from which to fetch.\nThe defa..." :indent 3 :visibility-widget custom-visibility :parent #1 :doc-overlay #<overlay from 587 to 632 in *Customize Saved*> :buttons ((custom-visibility :args nil :value nil :help-echo "Show or hide rest of the documentation." :on "Hide" :off "More" :always-active t :action widget-parent-action :parent #13 :indent 3 :button-overlay #<overlay from 632 to 636 in *Customize Saved*> :from #<marker (moves after insertion) at 632 in *Customize Saved*> :to #<marker at 636 in *Customize Saved*>)) :from #<marker (moves after insertion) at 587 in *Customize Saved*> :to #<marker at 637 in *Customize Saved*>) (custom-magic :args (nil) :parent #1 :indent 0 :children nil :from #<marker (moves after insertion) at 587 in *Customize Saved*> :to #<marker at 587 in *Customize Saved*> :buttons nil :value nil) (item :format "%{%t%} " :sample-face custom-variable-tag :tag "Package Archives" :parent #1 :indent 0 :sample-overlay #<overlay from 569 to 585 in *Customize Saved*> :from #<marker (moves after insertion) at 569 in *Customize Saved*> :to #<marker at 586 in *Customize Saved*>) (custom-visibility :args nil :value nil :help-echo "Show the value of this option." :on-glyph "down" :on "Hide" :off-glyph "right" :off "Show Value" :action custom-toggle-hide-variable :parent #1 :indent 0 :suppress-face t :button-overlay #<overlay from 558 to 568 in *Customize Saved*> :from #<marker (moves after insertion) at 558 in *Customize Saved*> :to #<marker at 568 in *Customize Saved*>)) :documentation-indent 3 :children nil :custom-state hidden :from #<marker (moves after insertion) at 558 in *Customize Saved*> :to #<marker at 637 in *Customize Saved*>))
  custom-variable-state-set-and-redraw((custom-variable :tag "Package Archives" :value package-archives :custom-form edit :custom-magic (custom-magic :args (nil) :parent #1 :indent 0 :children nil :from #<marker (moves after insertion) at 587 in *Customize Saved*> :to #<marker at 587 in *Customize Saved*> :buttons nil :value nil) :buttons ((documentation-string :args nil :value "An alist of archives from which to fetch.\nThe defa..." :indent 3 :visibility-widget custom-visibility :parent #1 :doc-overlay #<overlay from 587 to 632 in *Customize Saved*> :buttons ((custom-visibility :args nil :value nil :help-echo "Show or hide rest of the documentation." :on "Hide" :off "More" :always-active t :action widget-parent-action :parent #13 :indent 3 :button-overlay #<overlay from 632 to 636 in *Customize Saved*> :from #<marker (moves after insertion) at 632 in *Customize Saved*> :to #<marker at 636 in *Customize Saved*>)) :from #<marker (moves after insertion) at 587 in *Customize Saved*> :to #<marker at 637 in *Customize Saved*>) (custom-magic :args (nil) :parent #1 :indent 0 :children nil :from #<marker (moves after insertion) at 587 in *Customize Saved*> :to #<marker at 587 in *Customize Saved*> :buttons nil :value nil) (item :format "%{%t%} " :sample-face custom-variable-tag :tag "Package Archives" :parent #1 :indent 0 :sample-overlay #<overlay from 569 to 585 in *Customize Saved*> :from #<marker (moves after insertion) at 569 in *Customize Saved*> :to #<marker at 586 in *Customize Saved*>) (custom-visibility :args nil :value nil :help-echo "Show the value of this option." :on-glyph "down" :on "Hide" :off-glyph "right" :off "Show Value" :action custom-toggle-hide-variable :parent #1 :indent 0 :suppress-face t :button-overlay #<overlay from 558 to 568 in *Customize Saved*> :from #<marker (moves after insertion) at 558 in *Customize Saved*> :to #<marker at 568 in *Customize Saved*>)) :documentation-indent 3 :children nil :custom-state hidden :from #<marker (moves after insertion) at 558 in *Customize Saved*> :to #<marker at 637 in *Customize Saved*>))
  widget-apply((custom-variable :tag "Package Archives" :value package-archives :custom-form edit :custom-magic (custom-magic :args (nil) :parent #1 :indent 0 :children nil :from #<marker (moves after insertion) at 587 in *Customize Saved*> :to #<marker at 587 in *Customize Saved*> :buttons nil :value nil) :buttons ((documentation-string :args nil :value "An alist of archives from which to fetch.\nThe defa..." :indent 3 :visibility-widget custom-visibility :parent #1 :doc-overlay #<overlay from 587 to 632 in *Customize Saved*> :buttons ((custom-visibility :args nil :value nil :help-echo "Show or hide rest of the documentation." :on "Hide" :off "More" :always-active t :action widget-parent-action :parent #13 :indent 3 :button-overlay #<overlay from 632 to 636 in *Customize Saved*> :from #<marker (moves after insertion) at 632 in *Customize Saved*> :to #<marker at 636 in *Customize Saved*>)) :from #<marker (moves after insertion) at 587 in *Customize Saved*> :to #<marker at 637 in *Customize Saved*>) (custom-magic :args (nil) :parent #1 :indent 0 :children nil :from #<marker (moves after insertion) at 587 in *Customize Saved*> :to #<marker at 587 in *Customize Saved*> :buttons nil :value nil) (item :format "%{%t%} " :sample-face custom-variable-tag :tag "Package Archives" :parent #1 :indent 0 :sample-overlay #<overlay from 569 to 585 in *Customize Saved*> :from #<marker (moves after insertion) at 569 in *Customize Saved*> :to #<marker at 586 in *Customize Saved*>) (custom-visibility :args nil :value nil :help-echo "Show the value of this option." :on-glyph "down" :on "Hide" :off-glyph "right" :off "Show Value" :action custom-toggle-hide-variable :parent #1 :indent 0 :suppress-face t :button-overlay #<overlay from 558 to 568 in *Customize Saved*> :from #<marker (moves after insertion) at 558 in *Customize Saved*> :to #<marker at 568 in *Customize Saved*>)) :documentation-indent 3 :children nil :custom-state hidden :from #<marker (moves after insertion) at 558 in *Customize Saved*> :to #<marker at 637 in *Customize Saved*>) :custom-state-set-and-redraw)
  #f(compiled-function (&rest ignore) "Set all edited settings, then save all settings that have been set.\nIf a setting was edited and set before, this saves it.  If a\nsetting was merely edited before, this sets it then saves it." (interactive nil) #<bytecode 0x134c1f20ff435e95>)()
  apply(#f(compiled-function (&rest ignore) "Set all edited settings, then save all settings that have been set.\nIf a setting was edited and set before, this saves it.  If a\nsetting was merely edited before, this sets it then saves it." (interactive nil) #<bytecode 0x134c1f20ff435e95>) nil)
  ad-Advice-Custom-save(#f(compiled-function (&rest ignore) "Set all edited settings, then save all settings that have been set.\nIf a setting was edited and set before, this saves it.  If a\nsetting was merely edited before, this sets it then saves it." (interactive nil) #<bytecode 0x134c1f20ff435e95>))
  apply(ad-Advice-Custom-save #f(compiled-function (&rest ignore) "Set all edited settings, then save all settings that have been set.\nIf a setting was edited and set before, this saves it.  If a\nsetting was merely edited before, this sets it then saves it." (interactive nil) #<bytecode 0x134c1f20ff435e95>) nil)
  Custom-save()
  #<subr funcall-interactively>(Custom-save)
  apply(#<subr funcall-interactively> Custom-save nil)
  ad-Advice-funcall-interactively(#<subr funcall-interactively> Custom-save)
  apply(ad-Advice-funcall-interactively #<subr funcall-interactively> Custom-save)
  funcall-interactively(Custom-save)
  #<subr call-interactively>(Custom-save nil nil)
  ad-Advice-call-interactively(#<subr call-interactively> Custom-save nil nil)
  apply(ad-Advice-call-interactively #<subr call-interactively> (Custom-save nil nil))
  call-interactively(Custom-save nil nil)
  command-execute(Custom-save)
These are the contents of the init file i used to reproduce this
  unexpected behavior.
  ~/.emacs:
  (load-file "/home/michelangelo/.emacs.d/custom.el")
(load-file "~/emacspeak/lisp/emacspeak-setup.el")

custom.el:
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(custom-file "/home/michelangelo/.emacs.d/custom.el")
 '(package-archives
   '(("gnu" . "https://elpa.gnu.org/packages/")
     ("melpa" . "http://melpa.org/packages/")))
 '(package-selected-packages '(greader)))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.18, cairo version 1.16.0)
 of 2020-04-25 built on mugno
Repository revision: 519567878fa32715aa377d1fa23240f09ce291f6
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Debian GNU/Linux bullseye/sid

Recent messages:
Loading voice-setup...done
Loading voice-setup...done
Turning off global-eldoc-mode
Loading /home/michelangelo/emacspeak/sounds/pan-chimes/define-theme.el (source)...done
  Press C-h C-e to get an   overview of emacspeak  51.0  AssistDog  I am  completely operational,  and all my circuits are functioning perfectly!
Loading /home/michelangelo/emacspeak/lisp/emacspeak-setup.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
ad-Advice-call-interactively: Command attempted to use minibuffer while in minibuffer [2 times]
user-error: End of history; no default available
user-error: Beginning of history; no preceding item

Configured using:
 'configure --with-modules'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD
JSON PDUMPER GMP

Important settings:
  value of $LANG: it_IT.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  shell-dirtrack-mode: t
  global-voice-lock-mode: t
  voice-lock-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  transient-mark-mode: t

Load-path shadows:
/home/michelangelo/emacspeak/lisp/tapestry hides /usr/local/share/emacs/site-lisp/vm/tapestry
/home/michelangelo/emacspeak/lisp/tetris hides /usr/local/share/emacs/28.0.50/lisp/play/tetris

Features:
(shadow sort mail-extr emacsbug emacspeak-message message format-spec
rfc822 mml mml-sec emacspeak-epa epa epg epg-config gnus-util
emacspeak-rmail rmailsort rmail rmail-loaddefs mm-decode mm-bodies
mm-encode mailabbrev gmm-utils mailheader sendmail mail-utils
emacspeak-setup emacspeak-m-player emacspeak-dired locate
emacspeak-desktop desktop frameset dired dired-loaddefs emacspeak-amark
emacspeak-advice shell pcomplete hippie-exp comint ring vc vc-dispatcher
which-func emacspeak-imenu imenu emacspeak-ansi-color ansi-color
emacspeak-redefine emacspeak-personality emacspeak emacspeak-widget
emacspeak-webutils shr text-property-search svg xml dom url-http url
url-proxy url-privacy url-expand url-methods url-history mailcap
url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr url-cookie url-domsuf url-util url-gw nsm rmc puny
emacspeak-tab-bar emacspeak-package emacspeak-calendar appt diary-lib
diary-loaddefs g-utils solar cal-dst cal-menu calendar cal-loaddefs
emacspeak-kmacro emacspeak-ido emacspeak-facemenu emacspeak-buff-menu
g-cus-load cus-load emacspeak-fix-interactive warnings emacspeak-sox
emacspeak-preamble finder-inf emacspeak-keymap wid-edit emacspeak-speak
sox-gen sox ladspa edmacro kmacro derived rect time-date ido
emacspeak-pronounce thingatpt dtk-speak dtk-interp voice-setup cl-extra
emacspeak-sounds dectalk-voices espeak-voices mac-voices outloud-voices
dtk-unicode descr-text help-mode acss-structure tts emacspeak-load-path
advice package easymenu browse-url url-handlers url-parse auth-source
cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json
subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv
cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 304339 21468)
 (symbols 48 19556 1)
 (strings 32 87378 12690)
 (string-bytes 1 2366443)
 (vectors 16 33003)
 (vector-slots 8 401935 16390)
 (floats 8 660 25)
 (intervals 56 293 0)
 (buffers 992 15))