branch: elpa/symbol-overlay
commit 6e1f23d6f2f17ad059d4cbe65f47488de336d285
Author: wolray <[email protected]>
Commit: wolray <[email protected]>
fix an overlay error
---
readme.md | 2 +-
symbol-overlay.el | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/readme.md b/readme.md
index 256045d665..f21c4ffd8f 100644
--- a/readme.md
+++ b/readme.md
@@ -24,7 +24,7 @@ When putting overlays on symbols, **an auto-activated
overlay-inside keymap** wi
### Powerful
-- Toggle overlays of all occurrences of symbol at point: `symbol-overlay-put`
+- Toggle all overlays of symbol at point: `symbol-overlay-put`
- Copy symbol at point: `symbol-overlay-save-symbol`
- Jump back to the position before a recent jump: `symbol-overlay-echo-mark`
- Remove all highlighted symbols in the buffer: `symbol-overlay-remove-all`
diff --git a/symbol-overlay.el b/symbol-overlay.el
index fbfd5eecb1..f73e4a901d 100644
--- a/symbol-overlay.el
+++ b/symbol-overlay.el
@@ -44,7 +44,7 @@
;; When putting overlays on symbols, an auto-activated overlay-inside keymap
;; will enable you to call various useful commands with a single keystroke.
-;; Toggle overlays of all occurrences of symbol at point: `symbol-overlay-put'
+;; Toggle all overlays of symbol at point: `symbol-overlay-put'
;; Copy symbol at point: `symbol-overlay-save-symbol'
;; Jump back to the position before a recent jump: `symbol-overlay-echo-mark'
;; Remove all highlighted symbols in the buffer: `symbol-overlay-remove-all'
@@ -147,6 +147,7 @@ Use COLOR as the overlay's background color."
(foreground-color . "black"))))
(overlay-put overlay 'face face)
(overlay-put overlay 'keymap symbol-overlay-map)
+ (overlay-put overlay 'evaporate t)
(overlay-put overlay 'symbol symbol)))
(defun symbol-overlay-put-all (symbol &optional keyword)
@@ -189,7 +190,7 @@ If COLOR-MSG is non-nil, add the color used by current
overlay in brackets."
;;;###autoload
(defun symbol-overlay-put ()
- "Toggle overlays of all occurrences of symbol at point."
+ "Toggle all overlays of symbol at point."
(interactive)
(unless (minibufferp)
(let* ((symbol (symbol-overlay-get-symbol))
@@ -368,7 +369,7 @@ BEG, END and LEN are the beginning, end and length of
changed text.
This function is added to `after-change-functions' hook."
(unless (or (minibufferp) (not symbol-overlay-keywords-alist))
(let ((case-fold-search nil)
- bounds p)
+ bounds)
(save-excursion
(goto-char end)
(when (setq bounds (bounds-of-thing-at-point 'symbol))