diff options
| author | Richard M. Stallman | 2001-12-10 20:38:47 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2001-12-10 20:38:47 +0000 |
| commit | cc17378efe993f5eba4fa9ebb7a59f8f4c23e941 (patch) | |
| tree | 37ada772760b91889936c09e0a88b9865e5bda99 /lisp/simple.el | |
| parent | 4febb0e77dda289b2a2f19cc4b4239eb8685d8d4 (diff) | |
| download | emacs-cc17378efe993f5eba4fa9ebb7a59f8f4c23e941.tar.gz emacs-cc17378efe993f5eba4fa9ebb7a59f8f4c23e941.zip | |
(line-move): Cope if next-single-property-change
or previous-single-property-change returns nil.
Diffstat (limited to 'lisp/simple.el')
| -rw-r--r-- | lisp/simple.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 74821ae3116..cc358ae0edc 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -2543,7 +2543,8 @@ Outline mode sets this." | |||
| 2543 | (or (memq prop buffer-invisibility-spec) | 2543 | (or (memq prop buffer-invisibility-spec) |
| 2544 | (assq prop buffer-invisibility-spec))))) | 2544 | (assq prop buffer-invisibility-spec))))) |
| 2545 | (if (get-text-property (point) 'invisible) | 2545 | (if (get-text-property (point) 'invisible) |
| 2546 | (goto-char (next-single-property-change (point) 'invisible)) | 2546 | (goto-char (or (next-single-property-change (point) 'invisible) |
| 2547 | (point-max))) | ||
| 2547 | (goto-char (next-overlay-change (point))))) | 2548 | (goto-char (next-overlay-change (point))))) |
| 2548 | (setq arg (1- arg))) | 2549 | (setq arg (1- arg))) |
| 2549 | (while (< arg 0) | 2550 | (while (< arg 0) |
| @@ -2558,7 +2559,8 @@ Outline mode sets this." | |||
| 2558 | (or (memq prop buffer-invisibility-spec) | 2559 | (or (memq prop buffer-invisibility-spec) |
| 2559 | (assq prop buffer-invisibility-spec))))) | 2560 | (assq prop buffer-invisibility-spec))))) |
| 2560 | (if (get-text-property (1- (point)) 'invisible) | 2561 | (if (get-text-property (1- (point)) 'invisible) |
| 2561 | (goto-char (previous-single-property-change (point) 'invisible)) | 2562 | (goto-char (or (previous-single-property-change (point) 'invisible) |
| 2563 | (point-min))) | ||
| 2562 | (goto-char (previous-overlay-change (point))))) | 2564 | (goto-char (previous-overlay-change (point))))) |
| 2563 | (setq arg (1+ arg)))) | 2565 | (setq arg (1+ arg)))) |
| 2564 | (let ((buffer-invisibility-spec nil)) | 2566 | (let ((buffer-invisibility-spec nil)) |