562 |
(skip-chars-forward " \t") |
(skip-chars-forward " \t") |
563 |
(constrain-to-field nil orig-pos t))))) |
(constrain-to-field nil orig-pos t))))) |
564 |
|
|
565 |
|
(defvar inhibit-mark-movement nil |
566 |
|
"If non-nil, \\[beginning-of-buffer] and \\[end-of-buffer] does not set the mark.") |
567 |
|
|
568 |
(defun beginning-of-buffer (&optional arg) |
(defun beginning-of-buffer (&optional arg) |
569 |
"Move point to the beginning of the buffer; leave mark at previous position. |
"Move point to the beginning of the buffer; leave mark at previous position. |
570 |
With arg N, put point N/10 of the way from the beginning. |
With \\[universal-argument] prefix, do not set mark at previous position. |
571 |
|
With numeric arg N, put point N/10 of the way from the beginning. |
572 |
|
|
573 |
If the buffer is narrowed, this command uses the beginning and size |
If the buffer is narrowed, this command uses the beginning and size |
574 |
of the accessible part of the buffer. |
of the accessible part of the buffer. |
576 |
Don't use this command in Lisp programs! |
Don't use this command in Lisp programs! |
577 |
\(goto-char (point-min)) is faster and avoids clobbering the mark." |
\(goto-char (point-min)) is faster and avoids clobbering the mark." |
578 |
(interactive "P") |
(interactive "P") |
579 |
(push-mark) |
(unless (or inhibit-mark-movement (consp arg)) |
580 |
|
(push-mark)) |
581 |
(let ((size (- (point-max) (point-min)))) |
(let ((size (- (point-max) (point-min)))) |
582 |
(goto-char (if arg |
(goto-char (if (and arg (not (consp arg))) |
583 |
(+ (point-min) |
(+ (point-min) |
584 |
(if (> size 10000) |
(if (> size 10000) |
585 |
;; Avoid overflow for large buffer sizes! |
;; Avoid overflow for large buffer sizes! |
591 |
|
|
592 |
(defun end-of-buffer (&optional arg) |
(defun end-of-buffer (&optional arg) |
593 |
"Move point to the end of the buffer; leave mark at previous position. |
"Move point to the end of the buffer; leave mark at previous position. |
594 |
With arg N, put point N/10 of the way from the end. |
With \\[universal-argument] prefix, do not set mark at previous position. |
595 |
|
With numeric arg N, put point N/10 of the way from the end. |
596 |
|
|
597 |
If the buffer is narrowed, this command uses the beginning and size |
If the buffer is narrowed, this command uses the beginning and size |
598 |
of the accessible part of the buffer. |
of the accessible part of the buffer. |
600 |
Don't use this command in Lisp programs! |
Don't use this command in Lisp programs! |
601 |
\(goto-char (point-max)) is faster and avoids clobbering the mark." |
\(goto-char (point-max)) is faster and avoids clobbering the mark." |
602 |
(interactive "P") |
(interactive "P") |
603 |
(push-mark) |
(unless (or inhibit-mark-movement (consp arg)) |
604 |
|
(push-mark)) |
605 |
(let ((size (- (point-max) (point-min)))) |
(let ((size (- (point-max) (point-min)))) |
606 |
(goto-char (if arg |
(goto-char (if (and arg (not (consp arg))) |
607 |
(- (point-max) |
(- (point-max) |
608 |
(if (> size 10000) |
(if (> size 10000) |
609 |
;; Avoid overflow for large buffer sizes! |
;; Avoid overflow for large buffer sizes! |