Respect truncate-partial-width-windows in non-full windows, with regards to
:toggle and :enable state.
2008-04-10 Glenn Morris <rgm@gnu.org>
+ * menu-bar.el (menu-bar-options-menu) <truncate-lines>:
+ Respect truncate-partial-width-windows in non-full windows,
+ with regards to :toggle and :enable state.
+
* simple.el (toggle-truncate-lines): Doc fix.
* Makefile.in (MH_E_DIR): New variable.
'(menu-item "Truncate Long Lines in this Buffer"
toggle-truncate-lines
:help "Truncate long lines on the screen"
- :button (:toggle . truncate-lines)
- :enable (menu-bar-menu-frame-live-and-visible-p)))
+ :button (:toggle . (if (or (window-full-width-p)
+ (not truncate-partial-width-windows))
+ truncate-lines
+ truncate-partial-width-windows))
+ :enable (and (menu-bar-menu-frame-live-and-visible-p)
+ (or (window-full-width-p)
+ (not truncate-partial-width-windows)))))
(define-key menu-bar-options-menu [highlight-separator]
'("--"))