summaryrefslogtreecommitdiff
path: root/lisp/view.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2008-01-19 14:04:35 +0000
committerEli Zaretskii <eliz@gnu.org>2008-01-19 14:04:35 +0000
commit404967ca97ee9da387d06a6d79371bbb3fb7c2bb (patch)
tree4de0e679e6e721e2d661a09eee68528b825bbeb3 /lisp/view.el
parent5169d86148ea4edac7726c094e179dad1751dfe3 (diff)
downloademacs-404967ca97ee9da387d06a6d79371bbb3fb7c2bb.tar.gz
Add comment before kill-buffer-if-not-modified.
Diffstat (limited to 'lisp/view.el')
-rw-r--r--lisp/view.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/view.el b/lisp/view.el
index bdf7f6a5728..c89fd692152 100644
--- a/lisp/view.el
+++ b/lisp/view.el
@@ -238,6 +238,10 @@ This is local in each buffer, once it is used.")
;;; Commands that enter or exit view mode.
+;; This is used when view mode is exited, to make sure we don't try to
+;; kill a buffer modified by the user. A buffer in view mode can
+;; become modified if the user types C-x C-q, edits the buffer, then
+;; types C-x C-q again to return to view mode.
(defun kill-buffer-if-not-modified (buf)
"Like `kill-buffer', but does nothing if the buffer is modified."
(let ((buf (or (bufferp buf) (get-buffer buf))))