From: Gerd Moellmann Date: Mon, 1 Nov 1999 11:44:58 +0000 (+0000) Subject: (end-of-buffer): Use window-end to find the window end X-Git-Tag: emacs-pretest-21.0.90~6240 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=314808dc648814f3b68fe45db3f14ca414db63bd;p=emacs.git (end-of-buffer): Use window-end to find the window end instead of vertical-motion because this handles variable-height lines correctly. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cf1dc9afeac..9721ec5d0f3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,56 +1,62 @@ +1999-11-01 Gerd Moellmann + + * simple.el (end-of-buffer): Use window-end to find the window end + instead of vertical-motion because this handles variable-height + lines correctly. + 1999-11-01 Michael Kifer - * ediff.el: version change. + * ediff.el: Version change. - * ediff-util.el (ediff-cleanup-mess): fixed the case of dead windows. + * ediff-util.el (ediff-cleanup-mess): Fixed the case of dead windows. make sure you are in a good frame before deleting other windows. - (ediff-file-checked-in-p): don't consider CVS + (ediff-file-checked-in-p): Don't consider CVS files checked in. (ediff-make-temp-file,ediff-make-empty-tmp-file): Make sure you are writing to a newly created empty file. - * ediff-mult.el (ediff-show-session-group-hook): new default. + * ediff-mult.el (ediff-show-session-group-hook): New default. * ediff-vers.el (ediff-pcl-cvs-view-revision): - first cd to the file directory. reportedly works + First cd to the file directory. reportedly works better with remote files. * ediff-vers.el (ediff-pcl-cvs-internal, ediff-pcl-cvs-merge-internal): - use file-name-nondirectory when passing files to CVS. + Use file-name-nondirectory when passing files to CVS. - * ediff-diff.el (ediff-cmp-options): new var. - (ediff-same-file-contents): use ediff-cmp-options. + * ediff-diff.el (ediff-cmp-options): New var. + (ediff-same-file-contents): Use ediff-cmp-options. * ediff-ptch.el (ediff-prompt-for-patch-buffer, - ediff-get-patch-buffer): use current buffer if it appears to be a + ediff-get-patch-buffer): Use current buffer if it appears to be a patch. * viper-keym.el: Fixed calls to viper-ex, - change key C-cg to C-cC-g + change key C-c g to C-c C-g - * viper-util.el (viper-nontrivial-find-file-function): deleted. - (viper-glob-unix-files, viper-glob-mswindows-files): new functions. + * viper-util.el (viper-nontrivial-find-file-function): Deleted. + (viper-glob-unix-files, viper-glob-mswindows-files): New functions. (viper-save-cursor-color,viper-restore-cursor-color): - improved cursor color handling. + Improved cursor color handling. (viper-get-saved-cursor-color-in-replace-mode, - viper-get-saved-cursor-color-in-insert-mode): new functions for + viper-get-saved-cursor-color-in-insert-mode): New functions for better cursor color handling. * viper-ex.el (ex-read,ex-edit): - fixes for correct interpretation of #,%. - (viper-ex): now works correctly when called from other functions. - (viper-glob-function): new variable. - (viper-ex): save excursion before doing :global. + Fixes for correct interpretation of #,%. + (viper-ex): Now works correctly when called from other functions. + (viper-glob-function): New variable. + (viper-ex): Save excursion before doing :global. - * viper-mous.el (viper-counting-clicks-p): bug fixes. + * viper-mous.el (viper-counting-clicks-p): Bug fixes. * viper-cmd.el (viper-post-command-sentinel, viper-insert-state-post-command-sentinel, - viper-insert-state-pre-command-sentinel): takes better care of + viper-insert-state-pre-command-sentinel): Takes better care of cursor colors. - - * viper.el: version change. + + * viper.el: Version change. 1999-10-31 Rajesh Vaidheeswarran diff --git a/lisp/simple.el b/lisp/simple.el index 245727455e0..1fb214cc6c0 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -379,17 +379,12 @@ Don't use this command in Lisp programs! (point-max)))) ;; If we went to a place in the middle of the buffer, ;; adjust it to the beginning of a line. - (if arg (forward-line 1) - ;; If the end of the buffer is not already on the screen, - ;; then scroll specially to put it near, but not at, the bottom. - (if (let ((old-point (point))) - (save-excursion - (goto-char (window-start)) - (vertical-motion (window-height)) - (< (point) old-point))) - (progn - (overlay-recenter (point)) - (recenter -3))))) + (cond (arg (forward-line 1)) + ((< (point) (window-end nil t)) + ;; If the end of the buffer is not already on the screen, + ;; then scroll specially to put it near, but not at, the bottom. + (overlay-recenter (point)) + (recenter -3)))) (defun mark-whole-buffer () "Put point at beginning and mark at end of buffer.