comparison lisp/menu-bar.el @ 93962:a505b9f92df3

(menu-bar-options-menu) <truncate-lines>: Respect truncate-partial-width-windows in non-full windows, with regards to :toggle and :enable state.
author Glenn Morris <rgm@gnu.org>
date Thu, 10 Apr 2008 07:51:56 +0000
parents 09cc3d0d41ce
children 6d96ac31f7cd
comparison
equal deleted inserted replaced
93961:e03345b7622b 93962:a505b9f92df3
1048 (eq 'turn-on-auto-fill text-mode-hook))))) 1048 (eq 'turn-on-auto-fill text-mode-hook)))))
1049 (define-key menu-bar-options-menu [truncate-lines] 1049 (define-key menu-bar-options-menu [truncate-lines]
1050 '(menu-item "Truncate Long Lines in this Buffer" 1050 '(menu-item "Truncate Long Lines in this Buffer"
1051 toggle-truncate-lines 1051 toggle-truncate-lines
1052 :help "Truncate long lines on the screen" 1052 :help "Truncate long lines on the screen"
1053 :button (:toggle . truncate-lines) 1053 :button (:toggle . (if (or (window-full-width-p)
1054 :enable (menu-bar-menu-frame-live-and-visible-p))) 1054 (not truncate-partial-width-windows))
1055 truncate-lines
1056 truncate-partial-width-windows))
1057 :enable (and (menu-bar-menu-frame-live-and-visible-p)
1058 (or (window-full-width-p)
1059 (not truncate-partial-width-windows)))))
1055 1060
1056 (define-key menu-bar-options-menu [highlight-separator] 1061 (define-key menu-bar-options-menu [highlight-separator]
1057 '("--")) 1062 '("--"))
1058 (define-key menu-bar-options-menu [highlight-paren-mode] 1063 (define-key menu-bar-options-menu [highlight-paren-mode]
1059 (menu-bar-make-mm-toggle show-paren-mode 1064 (menu-bar-make-mm-toggle show-paren-mode