diff options
| author | Chong Yidong | 2008-07-10 04:27:23 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-07-10 04:27:23 +0000 |
| commit | 815776895dc9e73e1ff456c1d3c25cc174682c82 (patch) | |
| tree | 6774bc3705b01b2c45038a1fcdd6654feb8ec48a | |
| parent | 0443c1eb25f2e9ff7c8b8de1a6c16daa4dc582b1 (diff) | |
| download | emacs-815776895dc9e73e1ff456c1d3c25cc174682c82.tar.gz emacs-815776895dc9e73e1ff456c1d3c25cc174682c82.zip | |
Remove Longlines mode from menu. Add word-wrap option.
| -rw-r--r-- | lisp/menu-bar.el | 53 |
1 files changed, 36 insertions, 17 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index cbb44da9664..f9e43757d70 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -1054,24 +1054,43 @@ mail status in mode line")) | |||
| 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 | '("--")) |