[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master da26364: * lisp/simple.el (forward-visible-line, en
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] master da26364: * lisp/simple.el (forward-visible-line, end-of-visible-line): Use invisible-p |
Date: |
Tue, 25 Jun 2019 11:36:02 -0400 (EDT) |
branch: master
commit da263640c8157ddf9a9656f45ec7e8afcbcadbb4
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>
* lisp/simple.el (forward-visible-line, end-of-visible-line): Use
invisible-p
---
lisp/simple.el | 39 +++++++--------------------------------
1 file changed, 7 insertions(+), 32 deletions(-)
diff --git a/lisp/simple.el b/lisp/simple.el
index 5e9d13f..8715936 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -5261,24 +5261,14 @@ If ARG is zero, move to the beginning of the current
line."
(signal 'end-of-buffer nil))
;; If the newline we just skipped is invisible,
;; don't count it.
- (let ((prop
- (get-char-property (1- (point)) 'invisible)))
- (if (if (eq buffer-invisibility-spec t)
- prop
- (or (memq prop buffer-invisibility-spec)
- (assq prop buffer-invisibility-spec)))
- (setq arg (1+ arg))))
+ (if (invisible-p (1- (point)))
+ (setq arg (1+ arg)))
(setq arg (1- arg)))
;; If invisible text follows, and it is a number of complete lines,
;; skip it.
(let ((opoint (point)))
(while (and (not (eobp))
- (let ((prop
- (get-char-property (point) 'invisible)))
- (if (eq buffer-invisibility-spec t)
- prop
- (or (memq prop buffer-invisibility-spec)
- (assq prop buffer-invisibility-spec)))))
+ (invisible-p (point)))
(goto-char
(if (get-text-property (point) 'invisible)
(or (next-single-property-change (point) 'invisible)
@@ -5295,24 +5285,14 @@ If ARG is zero, move to the beginning of the current
line."
;; If the newline we just moved to is invisible,
;; don't count it.
(unless (bobp)
- (let ((prop
- (get-char-property (1- (point)) 'invisible)))
- (unless (if (eq buffer-invisibility-spec t)
- prop
- (or (memq prop buffer-invisibility-spec)
- (assq prop buffer-invisibility-spec)))
- (setq arg (1+ arg)))))
+ (unless (invisible-p (1- (point)))
+ (setq arg (1+ arg))))
(setq first nil))
;; If invisible text follows, and it is a number of complete lines,
;; skip it.
(let ((opoint (point)))
(while (and (not (bobp))
- (let ((prop
- (get-char-property (1- (point)) 'invisible)))
- (if (eq buffer-invisibility-spec t)
- prop
- (or (memq prop buffer-invisibility-spec)
- (assq prop buffer-invisibility-spec)))))
+ (invisible-p (1- (point))))
(goto-char
(if (get-text-property (1- (point)) 'invisible)
(or (previous-single-property-change (point) 'invisible)
@@ -5332,12 +5312,7 @@ If ARG is zero, move to the beginning of the current
line."
(while (and (not (eobp))
(save-excursion
(skip-chars-forward "^\n")
- (let ((prop
- (get-char-property (point) 'invisible)))
- (if (eq buffer-invisibility-spec t)
- prop
- (or (memq prop buffer-invisibility-spec)
- (assq prop buffer-invisibility-spec))))))
+ (invisible-p (point))))
(skip-chars-forward "^\n")
(if (get-text-property (point) 'invisible)
(goto-char (or (next-single-property-change (point) 'invisible)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master da26364: * lisp/simple.el (forward-visible-line, end-of-visible-line): Use invisible-p,
Stefan Monnier <=