From eda0be5a2c35ef3bcb0c1d11e2324fa7e90d1ef8 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 10 Apr 2008 07:52:10 +0000 Subject: [PATCH] (menu-bar-options-menu) : Respect truncate-partial-width-windows in non-full windows, with regards to :toggle and :enable state. --- lisp/ChangeLog | 4 ++++ lisp/menu-bar.el | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) 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] '("--")) -- 2.11.4.GIT