Mercurial > emacs
comparison lisp/view.el @ 91465:3e380c491c96
(kill-buffer-if-not-modified): Add an autoload cookie.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 02 Feb 2008 16:07:12 +0000 |
parents | e75f63aebb2b |
children | 1e3a407766b9 |
comparison
equal
deleted
inserted
replaced
91464:54f9fee16e00 | 91465:3e380c491c96 |
---|---|
245 | 245 |
246 ;; This is used when view mode is exited, to make sure we don't try to | 246 ;; This is used when view mode is exited, to make sure we don't try to |
247 ;; kill a buffer modified by the user. A buffer in view mode can | 247 ;; kill a buffer modified by the user. A buffer in view mode can |
248 ;; become modified if the user types C-x C-q, edits the buffer, then | 248 ;; become modified if the user types C-x C-q, edits the buffer, then |
249 ;; types C-x C-q again to return to view mode. | 249 ;; types C-x C-q again to return to view mode. |
250 ;;;###autoload | |
250 (defun kill-buffer-if-not-modified (buf) | 251 (defun kill-buffer-if-not-modified (buf) |
251 "Like `kill-buffer', but does nothing if the buffer is modified." | 252 "Like `kill-buffer', but does nothing if the buffer is modified." |
252 (let ((buf (get-buffer buf))) | 253 (let ((buf (get-buffer buf))) |
253 (and buf (not (buffer-modified-p buf)) | 254 (and buf (not (buffer-modified-p buf)) |
254 (kill-buffer buf)))) | 255 (kill-buffer buf)))) |