Mercurial > emacs
comparison lisp/menu-bar.el @ 96587:9e942cda4453
Remove Longlines mode from menu. Add word-wrap option.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Thu, 10 Jul 2008 04:27:23 +0000 |
parents | 75191063f8b6 |
children | 771bcc6d1c99 |
comparison
equal
deleted
inserted
replaced
96586:8ae70a323343 | 96587:9e942cda4453 |
---|---|
1052 :help "Automatically fill text while typing (Auto Fill Mode)" | 1052 :help "Automatically fill text while typing (Auto Fill Mode)" |
1053 :button (:toggle . (if (listp text-mode-hook) | 1053 :button (:toggle . (if (listp text-mode-hook) |
1054 (member 'turn-on-auto-fill text-mode-hook) | 1054 (member 'turn-on-auto-fill text-mode-hook) |
1055 (eq 'turn-on-auto-fill text-mode-hook))))) | 1055 (eq 'turn-on-auto-fill text-mode-hook))))) |
1056 | 1056 |
1057 (define-key menu-bar-options-menu [longlines-mode] | 1057 |
1058 '(menu-item "Word Wrap for Long Lines in this Buffer" | 1058 (defvar menu-bar-line-wrapping-menu (make-sparse-keymap "Line Wrapping")) |
1059 longlines-mode | 1059 |
1060 :help "Perform word wrapping for long lines (Long Lines mode)" | 1060 (define-key menu-bar-line-wrapping-menu [truncate] |
1061 :button (:toggle . (and (boundp 'longlines-mode) | 1061 '(menu-item "Truncate Long Lines" |
1062 longlines-mode)))) | |
1063 | |
1064 (define-key menu-bar-options-menu [truncate-lines] | |
1065 '(menu-item "Truncate Long Lines in this Buffer" | |
1066 toggle-truncate-lines | 1062 toggle-truncate-lines |
1067 :help "Truncate long lines at the window edge " | 1063 :help "Truncate long lines at window edge" |
1068 :button (:toggle . (if (or (window-full-width-p) | 1064 :button (:radio . (or truncate-lines |
1069 (not truncate-partial-width-windows)) | 1065 (truncated-partial-width-window-p))) |
1070 truncate-lines | 1066 :visible (menu-bar-menu-frame-live-and-visible-p) |
1071 truncate-partial-width-windows)) | 1067 :enable (not (truncated-partial-width-window-p)))) |
1072 :enable (and (menu-bar-menu-frame-live-and-visible-p) | 1068 |
1073 (or (window-full-width-p) | 1069 (define-key menu-bar-line-wrapping-menu [word-wrap] |
1074 (not truncate-partial-width-windows))))) | 1070 '(menu-item "Wrap at Word Boundaries" |
1071 (lambda () (interactive) (setq truncate-lines nil | |
1072 word-wrap t)) | |
1073 :help "Wrap long lines at word boundaries" | |
1074 :button (:radio . (and (null truncate-lines) | |
1075 (not (truncated-partial-width-window-p)) | |
1076 word-wrap)) | |
1077 :visible (menu-bar-menu-frame-live-and-visible-p) | |
1078 :enable (not (truncated-partial-width-window-p)))) | |
1079 | |
1080 (define-key menu-bar-line-wrapping-menu [window-wrap] | |
1081 '(menu-item "Wrap at Window Edge" | |
1082 (lambda () (interactive) (setq truncate-lines nil | |
1083 word-wrap nil)) | |
1084 :help "Wrap long lines at window edge" | |
1085 :button (:radio . (and (null truncate-lines) | |
1086 (not (truncated-partial-width-window-p)) | |
1087 (not word-wrap))) | |
1088 :visible (menu-bar-menu-frame-live-and-visible-p) | |
1089 :enable (not (truncated-partial-width-window-p)))) | |
1090 | |
1091 (define-key menu-bar-options-menu [line-wrapping] | |
1092 (list 'menu-item "Line Wrapping in this Buffer" menu-bar-line-wrapping-menu)) | |
1093 | |
1075 | 1094 |
1076 (define-key menu-bar-options-menu [highlight-separator] | 1095 (define-key menu-bar-options-menu [highlight-separator] |
1077 '("--")) | 1096 '("--")) |
1078 (define-key menu-bar-options-menu [highlight-paren-mode] | 1097 (define-key menu-bar-options-menu [highlight-paren-mode] |
1079 (menu-bar-make-mm-toggle show-paren-mode | 1098 (menu-bar-make-mm-toggle show-paren-mode |