]> code.delx.au - gnu-emacs/commitdiff
(menu-bar-options-menu): Cope if text-mode-hook is not a list.
authorRichard M. Stallman <rms@gnu.org>
Mon, 18 Mar 2002 09:06:35 +0000 (09:06 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 18 Mar 2002 09:06:35 +0000 (09:06 +0000)
lisp/menu-bar.el

index 2e085759eab081244e800865d0557a107dd11f79..ad49784a312180d8f029a757e348131b7dfffe9b 100644 (file)
@@ -782,7 +782,9 @@ Do the same for the keys of the same name."
                ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2002-02-11.
                (customize-mark-as-set 'text-mode-hook))
              :help "Automatically fill text between left and right margins"
-              :button (:toggle . (member 'turn-on-auto-fill text-mode-hook))))
+              :button (:toggle . (if (listp text-mode-hook)
+                                    (member 'turn-on-auto-fill text-mode-hook)
+                                  (eq 'turn-on-auto-fill text-mode-hook)))))
 (define-key menu-bar-options-menu [truncate-lines]
   '(menu-item "Truncate Long Lines in this Buffer"
              (lambda ()