changeset 43254:eb6104aac6b0

2002-02-12 Per Abrahamsen <abraham@dina.kvl.dk> * menu-bar.el (menu-bar-options-save): Removed `truncate-lines'. (menu-bar-options-menu): Don't set default value for `truncate-lines'.
author Per Abrahamsen <abraham@dina.kvl.dk>
date Tue, 12 Feb 2002 16:37:11 +0000
parents a0316e8e7bf0
children c440fcd3adb0
files lisp/ChangeLog lisp/menu-bar.el
diffstat 2 files changed, 17 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Feb 12 09:57:40 2002 +0000
+++ b/lisp/ChangeLog	Tue Feb 12 16:37:11 2002 +0000
@@ -1,3 +1,9 @@
+2002-02-12  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* menu-bar.el (menu-bar-options-save): Removed `truncate-lines'.
+	(menu-bar-options-menu): Don't set default value for
+	`truncate-lines'. 
+
 2002-02-12  Per Abrahamsen  <abraham@dina.kvl.dk>
 
 	* menu-bar.el (menu-bar-options-save): Only save
--- a/lisp/menu-bar.el	Tue Feb 12 09:57:40 2002 +0000
+++ b/lisp/menu-bar.el	Tue Feb 12 16:37:11 2002 +0000
@@ -566,7 +566,7 @@
     (dolist (elt '(line-number-mode column-number-mode scroll-bar-mode
 		   debug-on-quit debug-on-error menu-bar-mode tool-bar-mode
 		   save-place uniquify-buffer-name-style
-		   case-fold-search truncate-lines show-paren-mode
+		   case-fold-search show-paren-mode
 		   transient-mark-mode global-font-lock-mode
 		   display-time-mode auto-compression-mode
 		   current-language-environment default-input-method
@@ -775,15 +775,16 @@
 	      :help "Automatically fill text between left and right margins"
               :button (:toggle . (member 'turn-on-auto-fill text-mode-hook))))
 (define-key menu-bar-options-menu [truncate-lines]
-  (menu-bar-make-toggle
-   toggle-truncate-lines truncate-lines
-   "Truncate Long Lines in this Buffer" "Long Line Truncation %s"
-   "Truncate long lines on the screen"
-   ;; FIXME: We should define a :set method for `truncate-lines' to do
-   ;; the `buffer-modified-p' stuff.
-   ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2002-02-11.
-   (prog1 (setq-default truncate-lines (not truncate-lines))
-     (set-buffer-modified-p (buffer-modified-p)))))
+  '(menu-item "Truncate Long Lines in this Buffer"
+	      (lambda ()
+		(interactive)
+		(setq truncate-lines (not truncate-lines))
+		(set-buffer-modified-p (buffer-modified-p))
+		(message "Truncate long lines %s" 
+			 (if truncate-lines "enabled" "disabled")))
+	      :help "Truncate long lines on the screen"
+	      :button (:toggle . truncate-lines)))
+
 (define-key menu-bar-options-menu [highlight-separator]
   '("--"))
 (define-key menu-bar-options-menu [highlight-paren-mode]