Mercurial > emacs
comparison lisp/menu-bar.el @ 95609:31c3df6cae52
(menu-bar-options-menu): Add Menu entry for longlines mode.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Fri, 06 Jun 2008 21:28:20 +0000 |
parents | 4ce13b37e978 |
children | 3050aaaeadc9 |
comparison
equal
deleted
inserted
replaced
95608:0b4cfbfeba84 | 95609:31c3df6cae52 |
---|---|
1014 | 1014 |
1015 (define-key menu-bar-options-menu [case-fold-search] | 1015 (define-key menu-bar-options-menu [case-fold-search] |
1016 (menu-bar-make-toggle toggle-case-fold-search case-fold-search | 1016 (menu-bar-make-toggle toggle-case-fold-search case-fold-search |
1017 "Case-Insensitive Search" | 1017 "Case-Insensitive Search" |
1018 "Case-Insensitive Search %s" | 1018 "Case-Insensitive Search %s" |
1019 "Globally ignore letter-case in search")) | 1019 "Ignore letter-case in search commands")) |
1020 | 1020 |
1021 (defun menu-bar-text-mode-auto-fill () | 1021 (defun menu-bar-text-mode-auto-fill () |
1022 (interactive) | 1022 (interactive) |
1023 (toggle-text-mode-auto-fill) | 1023 (toggle-text-mode-auto-fill) |
1024 ;; This is somewhat questionable, as `text-mode-hook' | 1024 ;; This is somewhat questionable, as `text-mode-hook' |
1025 ;; might have changed outside customize. | 1025 ;; might have changed outside customize. |
1026 ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2002-02-11. | 1026 ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2002-02-11. |
1027 (customize-mark-as-set 'text-mode-hook)) | 1027 (customize-mark-as-set 'text-mode-hook)) |
1028 | 1028 |
1029 (define-key menu-bar-options-menu [auto-fill-mode] | 1029 (define-key menu-bar-options-menu [auto-fill-mode] |
1030 '(menu-item "Word Wrap in Text Modes" | 1030 '(menu-item "Auto Fill in Text Modes" |
1031 menu-bar-text-mode-auto-fill | 1031 menu-bar-text-mode-auto-fill |
1032 :help "Automatically fill text between left and right margins (Auto Fill)" | 1032 :help "Automatically fill text while typing (Auto Fill Mode)" |
1033 :button (:toggle . (if (listp text-mode-hook) | 1033 :button (:toggle . (if (listp text-mode-hook) |
1034 (member 'turn-on-auto-fill text-mode-hook) | 1034 (member 'turn-on-auto-fill text-mode-hook) |
1035 (eq 'turn-on-auto-fill text-mode-hook))))) | 1035 (eq 'turn-on-auto-fill text-mode-hook))))) |
1036 | |
1037 (define-key menu-bar-options-menu [longlines-mode] | |
1038 '(menu-item "Word Wrap for Long Lines in this Buffer" | |
1039 longlines-mode | |
1040 :help "Perform word wrapping for long lines (Long Lines mode)" | |
1041 :button (:toggle . (and (boundp 'longlines-mode) | |
1042 longlines-mode)))) | |
1043 | |
1036 (define-key menu-bar-options-menu [truncate-lines] | 1044 (define-key menu-bar-options-menu [truncate-lines] |
1037 '(menu-item "Truncate Long Lines in this Buffer" | 1045 '(menu-item "Truncate Long Lines in this Buffer" |
1038 toggle-truncate-lines | 1046 toggle-truncate-lines |
1039 :help "Truncate long lines on the screen" | 1047 :help "Truncate long lines at the window edge " |
1040 :button (:toggle . (if (or (window-full-width-p) | 1048 :button (:toggle . (if (or (window-full-width-p) |
1041 (not truncate-partial-width-windows)) | 1049 (not truncate-partial-width-windows)) |
1042 truncate-lines | 1050 truncate-lines |
1043 truncate-partial-width-windows)) | 1051 truncate-partial-width-windows)) |
1044 :enable (and (menu-bar-menu-frame-live-and-visible-p) | 1052 :enable (and (menu-bar-menu-frame-live-and-visible-p) |