summaryrefslogtreecommitdiff
path: root/lisp/textmodes/picture.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/textmodes/picture.el')
-rw-r--r--lisp/textmodes/picture.el11
1 files changed, 2 insertions, 9 deletions
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el
index 1c6fb384063..05e5f98db91 100644
--- a/lisp/textmodes/picture.el
+++ b/lisp/textmodes/picture.el
@@ -24,7 +24,7 @@
;;; Commentary:
-;; This code provides the picture-mode commands documented in the Emacs
+;; This code provides the picture-mode commands documented in the Emacs
;; manual. The screen is treated as a semi-infinite quarter-plane with
;; support for rectangle operations and `etch-a-sketch' character
;; insertion in any of eight directions.
@@ -735,7 +735,7 @@ With no argument strips whitespace from end of every line in Picture buffer
(interactive "P")
(if (not (eq major-mode 'picture-mode))
(error "You aren't editing a Picture.")
- (if (not nostrip) (picture-clean))
+ (if (not nostrip) (delete-trailing-whitespace))
(setq mode-name picture-mode-old-mode-name)
(use-local-map picture-mode-old-local-map)
(setq major-mode picture-mode-old-major-mode)
@@ -743,13 +743,6 @@ With no argument strips whitespace from end of every line in Picture buffer
(setq truncate-lines picture-mode-old-truncate-lines)
(force-mode-line-update)))
-(defun picture-clean ()
- "Eliminate whitespace at ends of lines."
- (save-excursion
- (goto-char (point-min))
- (while (re-search-forward "[ \t][ \t]*$" nil t)
- (delete-region (match-beginning 0) (point)))))
-
(provide 'picture)
;;; picture.el ends here