comparison lisp/simple.el @ 110118:b2115e1dafc0

* simple.el (beginning-of-buffer, end-of-buffer): Doc fix (Bug#6907).
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 26 Aug 2010 11:09:45 -0400
parents 34afb1a49d4c
children 0dcf6ddbe02b 061976c19319
comparison
equal deleted inserted replaced
110115:fae81355c62c 110118:b2115e1dafc0
782 (progn 782 (progn
783 (skip-chars-forward " \t") 783 (skip-chars-forward " \t")
784 (constrain-to-field nil orig-pos t))))) 784 (constrain-to-field nil orig-pos t)))))
785 785
786 (defun beginning-of-buffer (&optional arg) 786 (defun beginning-of-buffer (&optional arg)
787 "Move point to the beginning of the buffer; leave mark at previous position. 787 "Move point to the beginning of the buffer.
788 With \\[universal-argument] prefix, do not set mark at previous position.
789 With numeric arg N, put point N/10 of the way from the beginning. 788 With numeric arg N, put point N/10 of the way from the beginning.
790 789 If the buffer is narrowed, this command uses the beginning of the
791 If the buffer is narrowed, this command uses the beginning and size 790 accessible part of the buffer.
792 of the accessible part of the buffer. 791
792 If Transient Mark mode is disabled, leave mark at previous
793 position, unless a \\[universal-argument] prefix is supplied.
793 794
794 Don't use this command in Lisp programs! 795 Don't use this command in Lisp programs!
795 \(goto-char (point-min)) is faster and avoids clobbering the mark." 796 \(goto-char (point-min)) is faster."
796 (interactive "^P") 797 (interactive "^P")
797 (or (consp arg) 798 (or (consp arg)
798 (region-active-p) 799 (region-active-p)
799 (push-mark)) 800 (push-mark))
800 (let ((size (- (point-max) (point-min)))) 801 (let ((size (- (point-max) (point-min))))
807 (/ (+ 10 (* size (prefix-numeric-value arg))) 10))) 808 (/ (+ 10 (* size (prefix-numeric-value arg))) 10)))
808 (point-min)))) 809 (point-min))))
809 (if (and arg (not (consp arg))) (forward-line 1))) 810 (if (and arg (not (consp arg))) (forward-line 1)))
810 811
811 (defun end-of-buffer (&optional arg) 812 (defun end-of-buffer (&optional arg)
812 "Move point to the end of the buffer; leave mark at previous position. 813 "Move point to the end of the buffer.
813 With \\[universal-argument] prefix, do not set mark at previous position.
814 With numeric arg N, put point N/10 of the way from the end. 814 With numeric arg N, put point N/10 of the way from the end.
815 815 If the buffer is narrowed, this command uses the end of the
816 If the buffer is narrowed, this command uses the beginning and size 816 accessible part of the buffer.
817 of the accessible part of the buffer. 817
818 If Transient Mark mode is disabled, leave mark at previous
819 position, unless a \\[universal-argument] prefix is supplied.
818 820
819 Don't use this command in Lisp programs! 821 Don't use this command in Lisp programs!
820 \(goto-char (point-max)) is faster and avoids clobbering the mark." 822 \(goto-char (point-max)) is faster."
821 (interactive "^P") 823 (interactive "^P")
822 (or (consp arg) (region-active-p) (push-mark)) 824 (or (consp arg) (region-active-p) (push-mark))
823 (let ((size (- (point-max) (point-min)))) 825 (let ((size (- (point-max) (point-min))))
824 (goto-char (if (and arg (not (consp arg))) 826 (goto-char (if (and arg (not (consp arg)))
825 (- (point-max) 827 (- (point-max)