emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/simple.el


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/simple.el
Date: Sat, 12 Jan 2002 23:01:11 -0500

Index: emacs/lisp/simple.el
diff -c emacs/lisp/simple.el:1.517 emacs/lisp/simple.el:1.518
*** emacs/lisp/simple.el:1.517  Fri Jan 11 16:24:17 2002
--- emacs/lisp/simple.el        Sat Jan 12 23:01:11 2002
***************
*** 2562,2579 ****
          (if (and (not (integerp selective-display))
                   (not line-move-ignore-invisible))
              ;; Use just newline characters.
              (or (if (> arg 0)
                      (progn (if (> arg 1) (forward-line (1- arg)))
                             ;; This way of moving forward ARG lines
                             ;; verifies that we have a newline after the last 
one.
                             ;; It doesn't get confused by intangible text.
                             (end-of-line)
!                            (zerop (forward-line 1)))
                    (and (zerop (forward-line arg))
!                        (bolp)))
                  (signal (if (< arg 0)
                              'beginning-of-buffer
! a                         'end-of-buffer)
                          nil))
            ;; Move by arg lines, but ignore invisible ones.
            (while (> arg 0)
--- 2562,2582 ----
          (if (and (not (integerp selective-display))
                   (not line-move-ignore-invisible))
              ;; Use just newline characters.
+             ;; Set ARG to 0 if we move as many lines as requested.
              (or (if (> arg 0)
                      (progn (if (> arg 1) (forward-line (1- arg)))
                             ;; This way of moving forward ARG lines
                             ;; verifies that we have a newline after the last 
one.
                             ;; It doesn't get confused by intangible text.
                             (end-of-line)
!                            (if (zerop (forward-line 1))
!                                (setq arg 0)))
                    (and (zerop (forward-line arg))
!                        (bolp)
!                        (setq arg 0)))
                  (signal (if (< arg 0)
                              'beginning-of-buffer
!                           'end-of-buffer)
                          nil))
            ;; Move by arg lines, but ignore invisible ones.
            (while (> arg 0)
***************
*** 2594,2600 ****
              (while (and (not (bobp)) (line-move-invisible (1- (point))))
                (goto-char (previous-char-property-change (point)))))))
  
!       (line-move-finish (or goal-column temporary-goal-column) opoint)))
    nil)
  
  (defun line-move-finish (column opoint)
--- 2597,2612 ----
              (while (and (not (bobp)) (line-move-invisible (1- (point))))
                (goto-char (previous-char-property-change (point)))))))
  
!       (cond ((> arg 0)
!            ;; If we did not move down as far as desired,
!            ;; at least go to end of line.
!            (end-of-line))
!           ((< arg 0)
!            ;; If we did not move down as far as desired,
!            ;; at least go to end of line.
!            (beginning-of-line))
!           (t
!            (line-move-finish (or goal-column temporary-goal-column) 
opoint)))))
    nil)
  
  (defun line-move-finish (column opoint)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]