summaryrefslogtreecommitdiff
path: root/lisp/textmodes/picture.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-12-23 05:01:36 +0000
committerRichard M. Stallman <rms@gnu.org>1993-12-23 05:01:36 +0000
commitb9911289d39f9b0e03b8a53fb0476da402f43206 (patch)
tree39ba191bc4cbccbd9aaa9d84a28bba57594023a2 /lisp/textmodes/picture.el
parentc20a77cc5940a7f835569ec475e97ee392d899a4 (diff)
downloademacs-b9911289d39f9b0e03b8a53fb0476da402f43206.tar.gz
(picture-mode): Save the old truncate-lines value.
(picture-mode-exit): Restore that value.
Diffstat (limited to 'lisp/textmodes/picture.el')
-rw-r--r--lisp/textmodes/picture.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el
index 3b6a5fe232c..d744d33f36c 100644
--- a/lisp/textmodes/picture.el
+++ b/lisp/textmodes/picture.el
@@ -509,6 +509,7 @@ Picture mode is invoked by the command \\[picture-mode].")
(defvar picture-mode-old-local-map)
(defvar picture-mode-old-mode-name)
(defvar picture-mode-old-major-mode)
+(defvar picture-mode-old-truncate-lines)
;;;###autoload
(defun picture-mode ()
@@ -586,6 +587,8 @@ they are not defaultly assigned to keys."
(setq picture-tab-chars (default-value 'picture-tab-chars))
(make-local-variable 'picture-vertical-step)
(make-local-variable 'picture-horizontal-step)
+ (make-local-variable 'picture-mode-old-truncate-lines)
+ (setq picture-mode-old-truncate-lines truncate-lines)
(setq truncate-lines t)
(picture-set-motion 0 1)
@@ -611,6 +614,7 @@ With no argument strips whitespace from end of every line in Picture buffer
(use-local-map picture-mode-old-local-map)
(setq major-mode picture-mode-old-major-mode)
(kill-local-variable 'tab-stop-list)
+ (setq truncate-lines picture-mode-old-truncate-lines)
;; Kludge - force the mode line to be updated. Is there a better
;; way to do this?
(set-buffer-modified-p (buffer-modified-p))))