]> git.eshelyaron.com Git - emacs.git/commitdiff
Ensure correct toggle menu item display
authorGerd Möllmann <gerd@gnu.org>
Wed, 29 Jun 2022 05:53:35 +0000 (07:53 +0200)
committerGerd Möllmann <gerd@gnu.org>
Wed, 29 Jun 2022 05:53:35 +0000 (07:53 +0200)
* lisp/menu-bar.el (menu-bar-make-toggle-command): Call
force-mode-line-update. (Bug#56155)

lisp/menu-bar.el

index 4a943d252840ed2f6c35a62881fa483c61c3b3d0..92989fcfb2e4e63f650bfbbfab17ccc153dc9eaf 100644 (file)
@@ -749,7 +749,11 @@ by \"Save Options\" in Custom buffers.")
        ;; interactively, because the purpose is to mark the variable as a
        ;; candidate for `Save Options', and we do not want to save options that
        ;; the user has already set explicitly in the init file.
-       (when interactively (customize-mark-as-set ',variable)))
+       (when interactively
+         (customize-mark-as-set ',variable))
+       ;; Toggle menu items must make sure that the menu is updated so
+       ;; that toggle marks are drawn in the right state.
+       (force-mode-line-update t))
      '(menu-item ,item-name ,command :help ,help
                  :button (:toggle . (and (default-boundp ',variable)
                                          (default-value ',variable)))