]> git.eshelyaron.com Git - emacs.git/commitdiff
(view-really-at-end): Return true when at end and not
authorAndreas Schwab <schwab@suse.de>
Mon, 20 Apr 1998 09:37:18 +0000 (09:37 +0000)
committerAndreas Schwab <schwab@suse.de>
Mon, 20 Apr 1998 09:37:18 +0000 (09:37 +0000)
reverting.

lisp/view.el

index f7610132a0ddca9ff7ae667281a9dc49f7eb0d76..f2ee76f2e2258dcded49eb248d9b6c5c30e3d2ec 100644 (file)
@@ -722,21 +722,21 @@ Also set the mark at the position where point was."
        (let ((buf (current-buffer))
             (bufname (buffer-name))
             (file (buffer-file-name)))
-        (when (and view-try-extend-at-buffer-end
-                   file
-                   (not (verify-visited-file-modtime buf))
-                   (file-exists-p file)
-                   (or (not (buffer-modified-p buf))
-                       (progn
-                         (setq file (file-name-nondirectory file))
-                         (yes-or-no-p
-                          (format
-                           "File %s changed on disk.  Discard your edits%s? "
-                           file
-                           (if (string= bufname file) ""
-                             (concat " in " bufname)))))))
-          (revert-buffer t t t)
-          (pos-visible-in-window-p (point-max))))))
+        (or (not view-try-extend-at-buffer-end)
+            (null file)
+            (verify-visited-file-modtime buf)
+            (not (file-exists-p file))
+            (when (buffer-modified-p buf)
+              (setq file (file-name-nondirectory file))
+              (not (yes-or-no-p
+                    (format
+                     "File %s changed on disk.  Discard your edits%s? "
+                     file
+                     (if (string= bufname file) ""
+                       (concat " in " bufname))))))
+            (progn
+              (revert-buffer t t t)
+              (pos-visible-in-window-p (point-max)))))))
 
 (defun view-end-message ()
   ;; Tell that we are at end of buffer.