[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/eat e597bcfbb2 5/7: Don't use '.*-char-property-.*' functi
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/eat e597bcfbb2 5/7: Don't use '.*-char-property-.*' functions |
Date: |
Thu, 15 Dec 2022 10:58:37 -0500 (EST) |
branch: elpa/eat
commit e597bcfbb27477a4e98dc96ada2e91bce397a1e6
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>
Don't use '.*-char-property-.*' functions
* eat.el (eat--t-move-before-to-safe): Use
'previous-single-property-change' instead of
'(previous-single-char-property-change'.
* eat.el (eat--t-join-long-line): Use 'get-text-property'
instead of 'get-char-property'. Handle properly the case where
'next-single-property-change' returns nil.
* eat.el (eat--t-fix-partial-multi-col-char): Handle properly
the case where 'next-single-property-change' returns nil.
---
eat.el | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/eat.el b/eat.el
index 831b85ab29..042d15e9e8 100644
--- a/eat.el
+++ b/eat.el
@@ -684,10 +684,11 @@ Assume all characters occupy a single column."
For example: \"*foo\\nbar\\nbaz\" is converted to \"foo*bar\\nbaz\",
where `*' indicates point."
;; Are we already at the end a part of a long line?
- (unless (get-char-property (point) 'eat--t-wrap-line)
+ (unless (get-text-property (point) 'eat--t-wrap-line)
;; Find the next end of a part of a long line.
- (goto-char (next-single-property-change
- (point) 'eat--t-wrap-line nil limit)))
+ (goto-char (or (next-single-property-change
+ (point) 'eat--t-wrap-line nil limit)
+ limit (point-max))))
;; Remove the newline.
(when (< (point) (or limit (point-max)))
(1value (cl-assert (1value (= (1value (char-after)) ?\n))))
@@ -1185,8 +1186,9 @@ character or its the internal invisible spaces."
(get-text-property (1- (point)) 'eat--t-invisible-space))
(let ((start-pos (point)))
;; Move to the safe position.
- (goto-char (previous-single-char-property-change
- (point) 'eat--t-invisible-space))
+ (goto-char (or (previous-single-property-change
+ (point) 'eat--t-invisible-space)
+ (point-min)))
(cl-assert
(1value (or (bobp)
(null (get-text-property
@@ -1214,8 +1216,9 @@ character or its the internal invisible spaces."
(if (get-text-property (point) 'eat--t-invisible-space)
(let ((start-pos (point))
(count nil))
- (goto-char (next-single-property-change
- (point) 'eat--t-invisible-space))
+ (goto-char (or (next-single-property-change
+ (point) 'eat--t-invisible-space)
+ (point-max)))
(setq count (- (1+ (point)) start-pos))
;; Make sure we really overwrote the character
;; partially.
- [nongnu] elpa/eat updated (8fce5fe928 -> 61695d9671), ELPA Syncer, 2022/12/15
- [nongnu] elpa/eat f912425fb4 6/7: Fix handling non-interactive processes in Eshell, ELPA Syncer, 2022/12/15
- [nongnu] elpa/eat fc195410e4 1/7: Ask if 'stty' is unavailable in Eshell, ELPA Syncer, 2022/12/15
- [nongnu] elpa/eat 162ec61f3d 3/7: Remove invisible spaces when killing text, ELPA Syncer, 2022/12/15
- [nongnu] elpa/eat 35df1bc2a4 2/7: Refactor 'eat--eshell-adjust-make-process-args', ELPA Syncer, 2022/12/15
- [nongnu] elpa/eat 559c9c362c 4/7: Refactor 'eat--eshell-adjust-make-process-args', ELPA Syncer, 2022/12/15
- [nongnu] elpa/eat e597bcfbb2 5/7: Don't use '.*-char-property-.*' functions,
ELPA Syncer <=
- [nongnu] elpa/eat 61695d9671 7/7: Decrease regexp usage while parsing output, ELPA Syncer, 2022/12/15