diff options
| author | Juri Linkov | 2009-02-08 00:47:15 +0000 |
|---|---|---|
| committer | Juri Linkov | 2009-02-08 00:47:15 +0000 |
| commit | c899b3db0cff6e28f9a820efd45fe9e80b737f09 (patch) | |
| tree | ef7e560fce79fc382411df1f7812ed2a0f693447 | |
| parent | c07dfdd98cc935b55ecebdfdd24fe542c52446b0 (diff) | |
| download | emacs-c899b3db0cff6e28f9a820efd45fe9e80b737f09.tar.gz emacs-c899b3db0cff6e28f9a820efd45fe9e80b737f09.zip | |
(toggle-word-wrap): New command.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/simple.el | 15 |
2 files changed, 19 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 82802f147dd..371a97bcab3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2009-02-08 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * simple.el (toggle-word-wrap): New command. | ||
| 4 | |||
| 1 | 2009-02-07 Chong Yidong <cyd@stupidchicken.com> | 5 | 2009-02-07 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 6 | ||
| 3 | * progmodes/ps-mode.el (ps-run-tmp-dir): Doc fix. | 7 | * progmodes/ps-mode.el (ps-run-tmp-dir): Doc fix. |
diff --git a/lisp/simple.el b/lisp/simple.el index 950d7f0730d..cb2459a7348 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -5079,6 +5079,21 @@ is non-nil." | |||
| 5079 | (message "Truncate long lines %s" | 5079 | (message "Truncate long lines %s" |
| 5080 | (if truncate-lines "enabled" "disabled"))) | 5080 | (if truncate-lines "enabled" "disabled"))) |
| 5081 | 5081 | ||
| 5082 | (defun toggle-word-wrap (&optional arg) | ||
| 5083 | "Toggle whether to use word-wrapping for continuation lines. | ||
| 5084 | With prefix argument ARG, wrap continuation lines at word boundaries | ||
| 5085 | if ARG is positive, otherwise wrap them at the right screen edge. | ||
| 5086 | This command toggles the value of `word-wrap'. It has no effect | ||
| 5087 | if long lines are truncated." | ||
| 5088 | (interactive "P") | ||
| 5089 | (setq word-wrap | ||
| 5090 | (if (null arg) | ||
| 5091 | (not word-wrap) | ||
| 5092 | (> (prefix-numeric-value arg) 0))) | ||
| 5093 | (force-mode-line-update) | ||
| 5094 | (message "Word wrapping %s" | ||
| 5095 | (if word-wrap "enabled" "disabled"))) | ||
| 5096 | |||
| 5082 | (defvar overwrite-mode-textual " Ovwrt" | 5097 | (defvar overwrite-mode-textual " Ovwrt" |
| 5083 | "The string displayed in the mode line when in overwrite mode.") | 5098 | "The string displayed in the mode line when in overwrite mode.") |
| 5084 | (defvar overwrite-mode-binary " Bin Ovwrt" | 5099 | (defvar overwrite-mode-binary " Bin Ovwrt" |