comparison lisp/emulation/tpu-extras.el @ 34207:93dbe8902ff0

(tpu-write-file-hook) (tpu-set-cursor-bound): Replaced picture-clean with tpu-trim-line-ends.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 05 Dec 2000 13:59:08 +0000
parents a1f20ca97c0b
children b174db545cfd
comparison
equal deleted inserted replaced
34206:18117bc6bcdd 34207:93dbe8902ff0
140 140
141 (add-hook 'picture-mode-hook 'tpu-set-cursor-free) 141 (add-hook 'picture-mode-hook 'tpu-set-cursor-free)
142 142
143 (defun tpu-write-file-hook nil 143 (defun tpu-write-file-hook nil
144 "Eliminate whitespace at ends of lines, if the cursor is free." 144 "Eliminate whitespace at ends of lines, if the cursor is free."
145 (if (and (buffer-modified-p) tpu-cursor-free) (picture-clean))) 145 (if (and (buffer-modified-p) tpu-cursor-free) (tpu-trim-line-ends)))
146 146
147 (or (memq 'tpu-write-file-hook write-file-hooks) 147 (or (memq 'tpu-write-file-hook write-file-hooks)
148 (setq write-file-hooks 148 (setq write-file-hooks
149 (cons 'tpu-write-file-hook write-file-hooks))) 149 (cons 'tpu-write-file-hook write-file-hooks)))
150 150
471 471
472 ;;;###autoload 472 ;;;###autoload
473 (defun tpu-set-cursor-bound nil 473 (defun tpu-set-cursor-bound nil
474 "Constrain the cursor to the flow of the text." 474 "Constrain the cursor to the flow of the text."
475 (interactive) 475 (interactive)
476 (picture-clean) 476 (tpu-trim-line-ends)
477 (setq tpu-cursor-free nil) 477 (setq tpu-cursor-free nil)
478 (substitute-key-definition 'tpu-set-cursor-bound 478 (substitute-key-definition 'tpu-set-cursor-bound
479 'tpu-set-cursor-free 479 'tpu-set-cursor-free
480 GOLD-map) 480 GOLD-map)
481 (message "The cursor is now bound to the flow of your text.")) 481 (message "The cursor is now bound to the flow of your text."))