aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schwab1998-04-20 09:37:18 +0000
committerAndreas Schwab1998-04-20 09:37:18 +0000
commit695764015cebf5ebe3c96da163609bef951d36e6 (patch)
treebe999a09f6059c120353a1a81621e05553d79cab
parent94e554db23127711644cf24e4b625c7d197fd075 (diff)
downloademacs-695764015cebf5ebe3c96da163609bef951d36e6.tar.gz
emacs-695764015cebf5ebe3c96da163609bef951d36e6.zip
(view-really-at-end): Return true when at end and not
reverting.
-rw-r--r--lisp/view.el30
1 files changed, 15 insertions, 15 deletions
diff --git a/lisp/view.el b/lisp/view.el
index f7610132a0d..f2ee76f2e22 100644
--- a/lisp/view.el
+++ b/lisp/view.el
@@ -722,21 +722,21 @@ Also set the mark at the position where point was."
722 (let ((buf (current-buffer)) 722 (let ((buf (current-buffer))
723 (bufname (buffer-name)) 723 (bufname (buffer-name))
724 (file (buffer-file-name))) 724 (file (buffer-file-name)))
725 (when (and view-try-extend-at-buffer-end 725 (or (not view-try-extend-at-buffer-end)
726 file 726 (null file)
727 (not (verify-visited-file-modtime buf)) 727 (verify-visited-file-modtime buf)
728 (file-exists-p file) 728 (not (file-exists-p file))
729 (or (not (buffer-modified-p buf)) 729 (when (buffer-modified-p buf)
730 (progn 730 (setq file (file-name-nondirectory file))
731 (setq file (file-name-nondirectory file)) 731 (not (yes-or-no-p
732 (yes-or-no-p 732 (format
733 (format 733 "File %s changed on disk. Discard your edits%s? "
734 "File %s changed on disk. Discard your edits%s? " 734 file
735 file 735 (if (string= bufname file) ""
736 (if (string= bufname file) "" 736 (concat " in " bufname))))))
737 (concat " in " bufname))))))) 737 (progn
738 (revert-buffer t t t) 738 (revert-buffer t t t)
739 (pos-visible-in-window-p (point-max)))))) 739 (pos-visible-in-window-p (point-max)))))))
740 740
741(defun view-end-message () 741(defun view-end-message ()
742 ;; Tell that we are at end of buffer. 742 ;; Tell that we are at end of buffer.