diff options
| author | Stefan Monnier | 2007-08-22 15:31:31 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-08-22 15:31:31 +0000 |
| commit | 1d7e63566756032d3337687f7c8c4e8e35316dfa (patch) | |
| tree | c31dda4c77f8a8ab7894d0e2e8112c1200e95499 | |
| parent | 32e1c7b13201ef7f1167a64b2b60fb9263742509 (diff) | |
| download | emacs-1d7e63566756032d3337687f7c8c4e8e35316dfa.tar.gz emacs-1d7e63566756032d3337687f7c8c4e8e35316dfa.zip | |
(text-invisible-p): Rename from line-move-invisible-p.
(line-move-invisible-p): Keep as an obsolete alias, just to be safe.
(line-move-1, line-move-finish, line-move-to-column)
(move-end-of-line, move-beginning-of-line): Use new name.
| -rw-r--r-- | etc/NEWS | 2 | ||||
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/simple.el | 25 |
3 files changed, 22 insertions, 12 deletions
| @@ -79,6 +79,8 @@ in to make it use the scrollbars from the system theme. | |||
| 79 | 79 | ||
| 80 | * Lisp Changes in Emacs 22.2. | 80 | * Lisp Changes in Emacs 22.2. |
| 81 | 81 | ||
| 82 | ** The function text-invisible-p returns non-nil iff pos is invisible. | ||
| 83 | |||
| 82 | +++ | 84 | +++ |
| 83 | ** inhibit-modification-hooks is bound to t while running modification hooks. | 85 | ** inhibit-modification-hooks is bound to t while running modification hooks. |
| 84 | As a happy consequence, after-change-functions and before-change-functions | 86 | As a happy consequence, after-change-functions and before-change-functions |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 823782e4358..bd7c4704c77 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2007-08-22 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * simple.el (text-invisible-p): Rename from line-move-invisible-p. | ||
| 4 | (line-move-invisible-p): Keep as an obsolete alias, just to be safe. | ||
| 5 | (line-move-1, line-move-finish, line-move-to-column) | ||
| 6 | (move-end-of-line, move-beginning-of-line): Use new name. | ||
| 7 | |||
| 1 | 2007-08-22 Glenn Morris <rgm@gnu.org> | 8 | 2007-08-22 Glenn Morris <rgm@gnu.org> |
| 2 | 9 | ||
| 3 | * files.el (backup-buffer-copy): Check backup directory is | 10 | * files.el (backup-buffer-copy): Check backup directory is |
diff --git a/lisp/simple.el b/lisp/simple.el index 1ffa9a9ab23..43d210aa151 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3477,7 +3477,7 @@ Outline mode sets this." | |||
| 3477 | :type 'boolean | 3477 | :type 'boolean |
| 3478 | :group 'editing-basics) | 3478 | :group 'editing-basics) |
| 3479 | 3479 | ||
| 3480 | (defun line-move-invisible-p (pos) | 3480 | (defun text-invisible-p (pos) |
| 3481 | "Return non-nil if the character after POS is currently invisible." | 3481 | "Return non-nil if the character after POS is currently invisible." |
| 3482 | (let ((prop | 3482 | (let ((prop |
| 3483 | (get-char-property pos 'invisible))) | 3483 | (get-char-property pos 'invisible))) |
| @@ -3485,6 +3485,7 @@ Outline mode sets this." | |||
| 3485 | prop | 3485 | prop |
| 3486 | (or (memq prop buffer-invisibility-spec) | 3486 | (or (memq prop buffer-invisibility-spec) |
| 3487 | (assq prop buffer-invisibility-spec))))) | 3487 | (assq prop buffer-invisibility-spec))))) |
| 3488 | (define-obsolete-function-alias 'line-move-invisible-p 'text-invisible-p) | ||
| 3488 | 3489 | ||
| 3489 | ;; Returns non-nil if partial move was done. | 3490 | ;; Returns non-nil if partial move was done. |
| 3490 | (defun line-move-partial (arg noerror to-end) | 3491 | (defun line-move-partial (arg noerror to-end) |
| @@ -3605,7 +3606,7 @@ Outline mode sets this." | |||
| 3605 | (while (and (> arg 0) (not done)) | 3606 | (while (and (> arg 0) (not done)) |
| 3606 | ;; If the following character is currently invisible, | 3607 | ;; If the following character is currently invisible, |
| 3607 | ;; skip all characters with that same `invisible' property value. | 3608 | ;; skip all characters with that same `invisible' property value. |
| 3608 | (while (and (not (eobp)) (line-move-invisible-p (point))) | 3609 | (while (and (not (eobp)) (text-invisible-p (point))) |
| 3609 | (goto-char (next-char-property-change (point)))) | 3610 | (goto-char (next-char-property-change (point)))) |
| 3610 | ;; Move a line. | 3611 | ;; Move a line. |
| 3611 | ;; We don't use `end-of-line', since we want to escape | 3612 | ;; We don't use `end-of-line', since we want to escape |
| @@ -3623,7 +3624,7 @@ Outline mode sets this." | |||
| 3623 | (setq done t))) | 3624 | (setq done t))) |
| 3624 | ((and (> arg 1) ;; Use vertical-motion for last move | 3625 | ((and (> arg 1) ;; Use vertical-motion for last move |
| 3625 | (not (integerp selective-display)) | 3626 | (not (integerp selective-display)) |
| 3626 | (not (line-move-invisible-p (point)))) | 3627 | (not (text-invisible-p (point)))) |
| 3627 | ;; We avoid vertical-motion when possible | 3628 | ;; We avoid vertical-motion when possible |
| 3628 | ;; because that has to fontify. | 3629 | ;; because that has to fontify. |
| 3629 | (forward-line 1)) | 3630 | (forward-line 1)) |
| @@ -3652,7 +3653,7 @@ Outline mode sets this." | |||
| 3652 | (setq done t))) | 3653 | (setq done t))) |
| 3653 | ((and (< arg -1) ;; Use vertical-motion for last move | 3654 | ((and (< arg -1) ;; Use vertical-motion for last move |
| 3654 | (not (integerp selective-display)) | 3655 | (not (integerp selective-display)) |
| 3655 | (not (line-move-invisible-p (1- (point))))) | 3656 | (not (text-invisible-p (1- (point))))) |
| 3656 | (forward-line -1)) | 3657 | (forward-line -1)) |
| 3657 | ((zerop (vertical-motion -1)) | 3658 | ((zerop (vertical-motion -1)) |
| 3658 | (if (not noerror) | 3659 | (if (not noerror) |
| @@ -3664,7 +3665,7 @@ Outline mode sets this." | |||
| 3664 | ;; if our target is the middle of this line. | 3665 | ;; if our target is the middle of this line. |
| 3665 | (or (zerop (or goal-column temporary-goal-column)) | 3666 | (or (zerop (or goal-column temporary-goal-column)) |
| 3666 | (< arg 0)) | 3667 | (< arg 0)) |
| 3667 | (not (bobp)) (line-move-invisible-p (1- (point)))) | 3668 | (not (bobp)) (text-invisible-p (1- (point)))) |
| 3668 | (goto-char (previous-char-property-change (point)))))))) | 3669 | (goto-char (previous-char-property-change (point)))))))) |
| 3669 | ;; This is the value the function returns. | 3670 | ;; This is the value the function returns. |
| 3670 | (= arg 0)) | 3671 | (= arg 0)) |
| @@ -3696,7 +3697,7 @@ Outline mode sets this." | |||
| 3696 | (save-excursion | 3697 | (save-excursion |
| 3697 | ;; Like end-of-line but ignores fields. | 3698 | ;; Like end-of-line but ignores fields. |
| 3698 | (skip-chars-forward "^\n") | 3699 | (skip-chars-forward "^\n") |
| 3699 | (while (and (not (eobp)) (line-move-invisible-p (point))) | 3700 | (while (and (not (eobp)) (text-invisible-p (point))) |
| 3700 | (goto-char (next-char-property-change (point))) | 3701 | (goto-char (next-char-property-change (point))) |
| 3701 | (skip-chars-forward "^\n")) | 3702 | (skip-chars-forward "^\n")) |
| 3702 | (point)))) | 3703 | (point)))) |
| @@ -3779,13 +3780,13 @@ and `current-column' to be able to ignore invisible text." | |||
| 3779 | (move-to-column col)) | 3780 | (move-to-column col)) |
| 3780 | 3781 | ||
| 3781 | (when (and line-move-ignore-invisible | 3782 | (when (and line-move-ignore-invisible |
| 3782 | (not (bolp)) (line-move-invisible-p (1- (point)))) | 3783 | (not (bolp)) (text-invisible-p (1- (point)))) |
| 3783 | (let ((normal-location (point)) | 3784 | (let ((normal-location (point)) |
| 3784 | (normal-column (current-column))) | 3785 | (normal-column (current-column))) |
| 3785 | ;; If the following character is currently invisible, | 3786 | ;; If the following character is currently invisible, |
| 3786 | ;; skip all characters with that same `invisible' property value. | 3787 | ;; skip all characters with that same `invisible' property value. |
| 3787 | (while (and (not (eobp)) | 3788 | (while (and (not (eobp)) |
| 3788 | (line-move-invisible-p (point))) | 3789 | (text-invisible-p (point))) |
| 3789 | (goto-char (next-char-property-change (point)))) | 3790 | (goto-char (next-char-property-change (point)))) |
| 3790 | ;; Have we advanced to a larger column position? | 3791 | ;; Have we advanced to a larger column position? |
| 3791 | (if (> (current-column) normal-column) | 3792 | (if (> (current-column) normal-column) |
| @@ -3798,7 +3799,7 @@ and `current-column' to be able to ignore invisible text." | |||
| 3798 | ;; but with a more reasonable buffer position. | 3799 | ;; but with a more reasonable buffer position. |
| 3799 | (goto-char normal-location) | 3800 | (goto-char normal-location) |
| 3800 | (let ((line-beg (save-excursion (beginning-of-line) (point)))) | 3801 | (let ((line-beg (save-excursion (beginning-of-line) (point)))) |
| 3801 | (while (and (not (bolp)) (line-move-invisible-p (1- (point)))) | 3802 | (while (and (not (bolp)) (text-invisible-p (1- (point)))) |
| 3802 | (goto-char (previous-char-property-change (point) line-beg)))))))) | 3803 | (goto-char (previous-char-property-change (point) line-beg)))))))) |
| 3803 | 3804 | ||
| 3804 | (defun move-end-of-line (arg) | 3805 | (defun move-end-of-line (arg) |
| @@ -3819,7 +3820,7 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t." | |||
| 3819 | (and (line-move arg t) | 3820 | (and (line-move arg t) |
| 3820 | (not (bobp)) | 3821 | (not (bobp)) |
| 3821 | (progn | 3822 | (progn |
| 3822 | (while (and (not (bobp)) (line-move-invisible-p (1- (point)))) | 3823 | (while (and (not (bobp)) (text-invisible-p (1- (point)))) |
| 3823 | (goto-char (previous-char-property-change (point)))) | 3824 | (goto-char (previous-char-property-change (point)))) |
| 3824 | (backward-char 1))) | 3825 | (backward-char 1))) |
| 3825 | (point))))) | 3826 | (point))))) |
| @@ -3855,13 +3856,13 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t." | |||
| 3855 | 3856 | ||
| 3856 | ;; Move to beginning-of-line, ignoring fields and invisibles. | 3857 | ;; Move to beginning-of-line, ignoring fields and invisibles. |
| 3857 | (skip-chars-backward "^\n") | 3858 | (skip-chars-backward "^\n") |
| 3858 | (while (and (not (bobp)) (line-move-invisible-p (1- (point)))) | 3859 | (while (and (not (bobp)) (text-invisible-p (1- (point)))) |
| 3859 | (goto-char (previous-char-property-change (point))) | 3860 | (goto-char (previous-char-property-change (point))) |
| 3860 | (skip-chars-backward "^\n")) | 3861 | (skip-chars-backward "^\n")) |
| 3861 | (setq start (point)) | 3862 | (setq start (point)) |
| 3862 | 3863 | ||
| 3863 | ;; Now find first visible char in the line | 3864 | ;; Now find first visible char in the line |
| 3864 | (while (and (not (eobp)) (line-move-invisible-p (point))) | 3865 | (while (and (not (eobp)) (text-invisible-p (point))) |
| 3865 | (goto-char (next-char-property-change (point)))) | 3866 | (goto-char (next-char-property-change (point)))) |
| 3866 | (setq first-vis (point)) | 3867 | (setq first-vis (point)) |
| 3867 | 3868 | ||