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.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el
index 1c3e1baa9b1..ce1dbf8993b 100644
--- a/lisp/textmodes/picture.el
+++ b/lisp/textmodes/picture.el
@@ -758,8 +758,9 @@ they are not defaultly assigned to keys."
(defun picture-mode-exit (&optional nostrip)
"Undo `picture-mode' and return to previous major mode.
-With no argument strips whitespace from end of every line in Picture buffer
- otherwise just return to previous mode."
+With no argument, strip whitespace from end of every line in Picture buffer;
+ otherwise, just return to previous mode.
+Runs `picture-mode-exit-hook' at the end."
(interactive "P")
(if (not (eq major-mode 'picture-mode))
(error "You aren't editing a Picture")
@@ -769,7 +770,8 @@ With no argument strips whitespace from end of every line in Picture buffer
(setq major-mode picture-mode-old-major-mode)
(kill-local-variable 'tab-stop-list)
(setq truncate-lines picture-mode-old-truncate-lines)
- (force-mode-line-update)))
+ (force-mode-line-update)
+ (run-hooks 'picture-mode-exit-hook)))
(provide 'picture)