From: Glenn Morris Date: Thu, 10 Apr 2008 07:52:10 +0000 (+0000) Subject: (menu-bar-options-menu) : X-Git-Tag: emacs-pretest-23.0.90~6359 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=eda0be5a2c35ef3bcb0c1d11e2324fa7e90d1ef8;p=emacs.git (menu-bar-options-menu) : Respect truncate-partial-width-windows in non-full windows, with regards to :toggle and :enable state. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6f7c05ce28d..84fa0a02a57 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -24,6 +24,10 @@ 2008-04-10 Glenn Morris + * menu-bar.el (menu-bar-options-menu) : + 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. diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 2eaed4c5e34..00f76789b34 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -1050,8 +1050,13 @@ mail status in mode line")) '(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] '("--"))