# HG changeset patch # User Eli Zaretskii # Date 1200751475 0 # Node ID 2be6cb49457d3a7fc67559762ccc7556c8a68488 # Parent 457037a18993fa095fa5b25d8b762b63d5685bea Add comment before kill-buffer-if-not-modified. diff -r 457037a18993 -r 2be6cb49457d lisp/view.el --- a/lisp/view.el Sat Jan 19 12:50:35 2008 +0000 +++ b/lisp/view.el Sat Jan 19 14:04:35 2008 +0000 @@ -238,6 +238,10 @@ ;;; 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))))