[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/symbol-overlay c241942296 2/5: Merge branch 'master' into
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/symbol-overlay c241942296 2/5: Merge branch 'master' into patch-1 |
Date: |
Tue, 17 Jan 2023 08:00:23 -0500 (EST) |
branch: elpa/symbol-overlay
commit c2419422964d2dd6c462fa39e9109c81008afe2e
Merge: ab9ca20024 37de0a1c81
Author: 我没有抓狂 <a844620174@gmail.com>
Commit: GitHub <noreply@github.com>
Merge branch 'master' into patch-1
---
symbol-overlay.el | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/symbol-overlay.el b/symbol-overlay.el
index 701a3d7262..b27295cc04 100644
--- a/symbol-overlay.el
+++ b/symbol-overlay.el
@@ -236,22 +236,21 @@ You can re-bind the commands to any keys you prefer.")
If SYMBOL is non-nil, get the overlays that belong to it.
DIR is an integer.
If EXCLUDE is non-nil, get all overlays excluding those belong to SYMBOL."
- (if (= dir 0)
- (overlays-in (point-min) (point-max))
- (let ((overlays (cond ((< dir 0) (overlays-in (point-min) (point)))
- ((> dir 0) (overlays-in
- (if (looking-at-p "\\_>") (1- (point))
(point))
- (point-max))))))
- (seq-filter
- (lambda (ov)
- (let ((value (overlay-get ov 'symbol))
- (end (overlay-end ov)))
- (and value
- (or (> dir 0) (< end (point)))
- (or (not symbol)
- (if (string= value symbol) (not exclude)
- (and exclude (not (string= value ""))))))))
- overlays))))
+ (let ((overlays (cond ((= dir 0) (overlays-in (point-min) (point-max)))
+ ((< dir 0) (overlays-in (point-min) (point)))
+ ((> dir 0) (overlays-in
+ (if (looking-at-p "\\_>") (1- (point))
(point))
+ (point-max))))))
+ (seq-filter
+ (lambda (ov)
+ (let ((value (overlay-get ov 'symbol))
+ (end (overlay-end ov)))
+ (and value
+ (or (>= dir 0) (< end (point)))
+ (or (not symbol)
+ (if (string= value symbol) (not exclude)
+ (and exclude (not (string= value ""))))))))
+ overlays)))
(defun symbol-overlay-get-symbol (&optional noerror)
"Get the symbol at point.