aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/simple.el15
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 @@
12009-02-08 Juri Linkov <juri@jurta.org>
2
3 * simple.el (toggle-word-wrap): New command.
4
12009-02-07 Chong Yidong <cyd@stupidchicken.com> 52009-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.
5084With prefix argument ARG, wrap continuation lines at word boundaries
5085if ARG is positive, otherwise wrap them at the right screen edge.
5086This command toggles the value of `word-wrap'. It has no effect
5087if 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"