[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/symbol-overlay 334eed7052 049/152: fix a jump error
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/symbol-overlay 334eed7052 049/152: fix a jump error |
Date: |
Thu, 7 Jul 2022 12:04:11 -0400 (EDT) |
branch: elpa/symbol-overlay
commit 334eed70528378f4c20e7f5c4fa91fa3f1280a78
Author: wolray <290061869@qq.com>
Commit: wolray <290061869@qq.com>
fix a jump error
---
symbol-overlay.el | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/symbol-overlay.el b/symbol-overlay.el
index 95b5ae1610..9aa22d2ede 100644
--- a/symbol-overlay.el
+++ b/symbol-overlay.el
@@ -329,9 +329,9 @@ If SHOW-COLOR is non-nil, display the color used by current
overlay."
"Copy symbol at point."
(interactive)
(unless (minibufferp)
- (symbol-overlay-get-symbol)
- (kill-ring-save (match-beginning 0) (match-end 0))
- (message "Current symbol saved")))
+ (let ((bounds (bounds-of-thing-at-point 'symbol)))
+ (kill-ring-save (car bounds) (cdr bounds))
+ (message "Current symbol saved"))))
;;;###autoload
(defun symbol-overlay-toggle-in-scope ()
@@ -369,10 +369,10 @@ DIR must be 1 or -1."
(defun symbol-overlay-basic-jump (symbol dir)
"Jump to SYMBOL's next location in the direction DIR. DIR must be 1 or -1."
- (let ((case-fold-search nil)
- (bounds (bounds-of-thing-at-point 'symbol))
- (offset (- (point) (if (> dir 0) (match-end 0) (match-beginning 0))))
- target)
+ (let* ((case-fold-search nil)
+ (bounds (bounds-of-thing-at-point 'symbol))
+ (offset (- (point) (if (> dir 0) (cdr bounds) (car bounds))))
+ target)
(goto-char (- (point) offset))
(setq target (re-search-forward symbol nil t dir))
(unless target
@@ -450,9 +450,8 @@ DIR must be 1 or -1."
"Isearch symbol at point literally, without `regexp-quote' the symbol."
(interactive)
(unless (minibufferp)
- (let ((symbol (symbol-overlay-get-symbol))
- (beg (match-beginning 0)))
- (goto-char beg)
+ (let ((symbol (symbol-overlay-get-symbol)))
+ (beginning-of-thing 'symbol)
(isearch-forward nil t)
(isearch-yank-string (substring symbol 3 -3)))))
@@ -480,7 +479,7 @@ DIR must be 1 or -1."
(interactive)
(symbol-overlay-replace-call
'(lambda (symbol scope)
- (and scope (user-error "Query replace is invalid in scope"))
+ (and scope (user-error "Query-replace is invalid in scope"))
(let* ((txt (read-string "Replacement: "))
(defaults (cons symbol txt))
(new (symbol-overlay-get-symbol txt)))
- [nongnu] elpa/symbol-overlay 148652222c 025/152: fix some documentation text., (continued)
- [nongnu] elpa/symbol-overlay 148652222c 025/152: fix some documentation text., ELPA Syncer, 2022/07/07
- [nongnu] elpa/symbol-overlay 674b78983c 027/152: add an image in readme, ELPA Syncer, 2022/07/07
- [nongnu] elpa/symbol-overlay 03e94a9a64 028/152: fix the image, ELPA Syncer, 2022/07/07
- [nongnu] elpa/symbol-overlay 9f5d3c10fa 033/152: fix readme, ELPA Syncer, 2022/07/07
- [nongnu] elpa/symbol-overlay 1d971f69fb 037/152: (v3.3) add isearch, ELPA Syncer, 2022/07/07
- [nongnu] elpa/symbol-overlay fd0bd0f23f 042/152: (v3.4) add symbol-overlay-mode, ELPA Syncer, 2022/07/07
- [nongnu] elpa/symbol-overlay 69dd2bdaac 048/152: fix doc, ELPA Syncer, 2022/07/07
- [nongnu] elpa/symbol-overlay 5fd2c80610 036/152: fix conflicts with replace-match, ELPA Syncer, 2022/07/07
- [nongnu] elpa/symbol-overlay f21c2447b7 046/152: better code, ELPA Syncer, 2022/07/07
- [nongnu] elpa/symbol-overlay b4659bf6b1 052/152: toggle minor-mode when jumping without highlight, ELPA Syncer, 2022/07/07
- [nongnu] elpa/symbol-overlay 334eed7052 049/152: fix a jump error,
ELPA Syncer <=
- [nongnu] elpa/symbol-overlay fb9c1a5cb1 058/152: delete symbol-overlay-narrow-function, ELPA Syncer, 2022/07/07
- [nongnu] elpa/symbol-overlay c7918e18bb 061/152: Make symbol-overlay-mode autoloadable, ELPA Syncer, 2022/07/07
- [nongnu] elpa/symbol-overlay 7b638c8418 064/152: Properly define symbol-overlay-temp-face, ELPA Syncer, 2022/07/07
- [nongnu] elpa/symbol-overlay 6971ab0c16 067/152: Declare minor mode earlier to avoid byte compilation warnings, ELPA Syncer, 2022/07/07
- [nongnu] elpa/symbol-overlay bce9d9d3c9 069/152: Merge pull request #8 from purcell/master, ELPA Syncer, 2022/07/07
- [nongnu] elpa/symbol-overlay 824cefc469 076/152: Use recommended syntax for setting overlay face property, ELPA Syncer, 2022/07/07
- [nongnu] elpa/symbol-overlay 6a3c16e506 077/152: Merge pull request #12 from purcell/patch-3, ELPA Syncer, 2022/07/07
- [nongnu] elpa/symbol-overlay 72c35dadcc 087/152: wip: add support for major-mode dependent ignored keywords, ELPA Syncer, 2022/07/07
- [nongnu] elpa/symbol-overlay bb02b971b0 086/152: magit test, ELPA Syncer, 2022/07/07
- [nongnu] elpa/symbol-overlay 920bf50678 092/152: Remove now-unused symbol-overlay-colors variable, ELPA Syncer, 2022/07/07