diff options
| -rw-r--r-- | lisp/view.el | 4 |
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.") | |||
| 238 | 238 | ||
| 239 | ;;; Commands that enter or exit view mode. | 239 | ;;; Commands that enter or exit view mode. |
| 240 | 240 | ||
| 241 | ;; This is used when view mode is exited, to make sure we don't try to | ||
| 242 | ;; kill a buffer modified by the user. A buffer in view mode can | ||
| 243 | ;; become modified if the user types C-x C-q, edits the buffer, then | ||
| 244 | ;; types C-x C-q again to return to view mode. | ||
| 241 | (defun kill-buffer-if-not-modified (buf) | 245 | (defun kill-buffer-if-not-modified (buf) |
| 242 | "Like `kill-buffer', but does nothing if the buffer is modified." | 246 | "Like `kill-buffer', but does nothing if the buffer is modified." |
| 243 | (let ((buf (or (bufferp buf) (get-buffer buf)))) | 247 | (let ((buf (or (bufferp buf) (get-buffer buf)))) |