[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/symbol-overlay 11749c31f4 1/6: Update for Emacs 29
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/symbol-overlay 11749c31f4 1/6: Update for Emacs 29 |
Date: |
Thu, 15 Dec 2022 12:59:40 -0500 (EST) |
branch: elpa/symbol-overlay
commit 11749c31f4553034edd437815a485c460595cc66
Author: ksqsf <i@ksqsf.moe>
Commit: ksqsf <i@ksqsf.moe>
Update for Emacs 29
Rewrite symbol-overlay-get-list to use 'overlays-in' instead of
'overlay-recenter' and 'overlay-lists', which are deprecated.
---
symbol-overlay.el | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/symbol-overlay.el b/symbol-overlay.el
index c20f59355d..747cb0d3fe 100644
--- a/symbol-overlay.el
+++ b/symbol-overlay.el
@@ -236,17 +236,20 @@ 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."
- (let ((lists (progn (overlay-recenter (point)) (overlay-lists)))
- (func (if (> dir 0) 'cdr (if (< dir 0) 'car nil))))
- (seq-filter
- (lambda (ov)
- (let ((value (overlay-get ov 'symbol)))
- (and value
- (or (not symbol)
- (if (string= value symbol) (not exclude)
- (and exclude (not (string= value ""))))))))
- (if func (funcall func lists)
- (append (car lists) (cdr lists))))))
+ (let ((overlays (overlays-in (point-min) (point-max))))
+ (if (= dir 0)
+ overlays
+ (seq-filter
+ (lambda (ov)
+ (let ((value (overlay-get ov 'symbol))
+ (start (overlay-start ov)))
+ (and value
+ (if (> dir 0) (<= (point) start)
+ (> (point) start))
+ (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.
- [nongnu] elpa/symbol-overlay updated (c439b73a5f -> f18493673d), ELPA Syncer, 2022/12/15
- [nongnu] elpa/symbol-overlay 1071d4ac87 3/6: Minor improvement., ELPA Syncer, 2022/12/15
- [nongnu] elpa/symbol-overlay dc9f5f1d44 5/6: Merge pull request #87 from wolray/add-github-actions-ci, ELPA Syncer, 2022/12/15
- [nongnu] elpa/symbol-overlay 5274b7ee77 2/6: Fix and optimize symbol-overlay-get-list., ELPA Syncer, 2022/12/15
- [nongnu] elpa/symbol-overlay 11749c31f4 1/6: Update for Emacs 29,
ELPA Syncer <=
- [nongnu] elpa/symbol-overlay f18493673d 6/6: Merge pull request #86 from ksqsf/master, ELPA Syncer, 2022/12/15
- [nongnu] elpa/symbol-overlay 7cef46c6c9 4/6: Add basic CI with byte compilation and package-lint check, ELPA Syncer, 2022/12/15