]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/c-ts-mode.el (c-ts-mode-menu): Add 'bound-and-true-p'.
authorJuri Linkov <juri@linkov.net>
Mon, 9 Jun 2025 06:40:12 +0000 (09:40 +0300)
committerEshel Yaron <me@eshelyaron.com>
Wed, 18 Jun 2025 08:00:04 +0000 (10:00 +0200)
Use 'bound-and-true-p' for the case when 'subword-mode' is not loaded.

(cherry picked from commit 3c04806b44843e2e07ff3344e2b3f68ffc62575a)

lisp/progmodes/c-ts-mode.el

index 070984f4aac9c08e089f982c62848d23f7728657..f63b71f89a315768481221cd51d607424848c4bf 100644 (file)
@@ -1618,7 +1618,7 @@ recommended to enable `electric-pair-mode' with this mode."
     "--"
     ("Toggle..."
      ["Subword Mode" subword-mode
-      :style toggle :selected subword-mode
+      :style toggle :selected (bound-and-true-p subword-mode)
       :help "Toggle subword movement and editing mode"])))
 
 ;; We could alternatively use parsers, but if this works well, I don't