emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/symbol-overlay 674b78983c 027/152: add an image in readme


From: ELPA Syncer
Subject: [nongnu] elpa/symbol-overlay 674b78983c 027/152: add an image in readme
Date: Thu, 7 Jul 2022 12:04:09 -0400 (EDT)

branch: elpa/symbol-overlay
commit 674b78983ce87673032f74b1a0e343c247cd7b67
Author: wolray <290061869@qq.com>
Commit: wolray <290061869@qq.com>

    add an image in readme
---
 readme.md         |   4 +++-
 screenshot.png    | Bin 0 -> 203310 bytes
 symbol-overlay.el |  12 +++++-------
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/readme.md b/readme.md
index f21c4ffd8f..8d94a1d796 100644
--- a/readme.md
+++ b/readme.md
@@ -1,6 +1,8 @@
 # Symbol Overlay
 
-Highlighting symbols with overlays while providing a keymap for various 
operations about highlighted symbols.  It was originally inspired by the 
package `highlight-symbol`.  The fundamental difference is that in 
`symbol-overlay` every symbol is highlighted by the Emacs built-in function 
`overlay-put` rather than the `font-lock` mechanism used in `highlight-symbol`.
+![]( https://github.com/wolray/symbol-overlay/screenshot.png)
+
+Highlight symbols with overlays while providing a keymap for various 
operations about highlighted symbols.  It was originally inspired by the 
package `highlight-symbol`.  The fundamental difference is that in 
`symbol-overlay` every symbol is highlighted by the Emacs built-in function 
`overlay-put` rather than the `font-lock` mechanism used in `highlight-symbol`.
 
 What's New!
 ---
diff --git a/screenshot.png b/screenshot.png
new file mode 100644
index 0000000000..7434db38f4
Binary files /dev/null and b/screenshot.png differ
diff --git a/symbol-overlay.el b/symbol-overlay.el
index e54de7bde5..3644154a56 100644
--- a/symbol-overlay.el
+++ b/symbol-overlay.el
@@ -1,4 +1,4 @@
-;;; symbol-overlay.el --- Highlighting symbols with keymap-enabled overlays
+;;; symbol-overlay.el --- Highlight symbols with keymap-enabled overlays
 
 ;; Copyright (C) 2017 wolray
 
@@ -360,8 +360,7 @@ If COUNT is non-nil, count at the end."
       (setq new (read-string (format "Rename (%s): " new)))
       (save-excursion
        (goto-char (point-min))
-       (while (re-search-forward symbol nil t)
-         (replace-match new)))
+       (while (re-search-forward symbol nil t) (replace-match new)))
       (symbol-overlay-get-symbol new))))
 
 (defun symbol-overlay-refresh (beg end len)
@@ -373,13 +372,12 @@ BEG, END and LEN are the beginning, end and length of 
changed text."
       (save-excursion
        (goto-char end)
        (and (looking-at-p re)
-            (setq end (or (re-search-forward "\\_>" nil t) end)))
+            (setq end (re-search-forward "\\_>")))
        (goto-char beg)
        (and (looking-at-p (concat "\\(" re "\\|\\_>\\)"))
-            (setq beg (or (re-search-backward "\\_<" nil t) beg)))
+            (setq beg (re-search-backward "\\_<")))
        (mapc #'(lambda (overlay)
-                 (and (overlay-get overlay 'symbol)
-                      (delete-overlay overlay)))
+                 (and (overlay-get overlay 'symbol) (delete-overlay overlay)))
              (overlays-in beg end))
        (mapc #'(lambda (keyword)
                  (let ((symbol (car keyword)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]