Function: view-really-at-end

view-really-at-end is a byte-compiled function defined in view.el.gz.

Signature

(view-really-at-end)

Documentation

Return non-nil if buffer end visible. Maybe revert buffer and test.

Source Code

;; Defined in /usr/src/emacs/lisp/view.el.gz
(defun view-really-at-end ()
  "Return non-nil if buffer end visible.  Maybe revert buffer and test."
  (and (or (null scroll-error-top-bottom) (eobp))
       (pos-visible-in-window-p (point-max))
       (let ((buf (current-buffer))
	     (bufname (buffer-name))
	     (file (buffer-file-name)))
	 (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)))))))