[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/symbol-overlay fb9c1a5cb1 058/152: delete symbol-overlay-n
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/symbol-overlay fb9c1a5cb1 058/152: delete symbol-overlay-narrow-function |
Date: |
Thu, 7 Jul 2022 12:04:12 -0400 (EDT) |
branch: elpa/symbol-overlay
commit fb9c1a5cb149b406a86ab6dc56ded5e413be3979
Author: wolray <290061869@qq.com>
Commit: wolray <290061869@qq.com>
delete symbol-overlay-narrow-function
---
symbol-overlay.el | 29 +++++++++++------------------
1 file changed, 11 insertions(+), 18 deletions(-)
diff --git a/symbol-overlay.el b/symbol-overlay.el
index dd3c3cd951..b3c97865a8 100644
--- a/symbol-overlay.el
+++ b/symbol-overlay.el
@@ -33,7 +33,7 @@
;; Advantages
;; When highlighting symbols in a buffer of regular size and language,
-;; `overlay-put' behaves as fast as the traditional Highlighting method
+;; `overlay-put' behaves as fast as the traditional highlighting method
;; `font-lock'. However, for a buffer of major-mode with complicated keywords
;; syntax, like haskell-mode, `font-lock' is quite slow even the buffer is less
;; than 100 lines. Besides, when counting the number of highlighted
@@ -146,10 +146,6 @@ If NOERROR is non-nil, just return nil when no symbol is
found."
(delq keyword symbol-overlay-keywords-alist))
(cddr keyword)))
-(defvar symbol-overlay-narrow-function nil
- "Nil or a function that narrows to a specific region.")
-(make-variable-buffer-local 'symbol-overlay-narrow-function)
-
(defvar symbol-overlay-temp-symbol nil
"Symbol for temporary highlighting.")
(make-variable-buffer-local 'symbol-overlay-temp-symbol)
@@ -162,22 +158,19 @@ If NOERROR is non-nil, just return nil when no symbol is
found."
"Narrow to a specific region.
Region might be current scope or displayed window or a specific one,
depending on `symbol-overlay-temp-symbol', `symbol-overlay-temp-in-scope',
-SCOPE, `symbol-overlay-narrow-function' and WINDOW."
+SCOPE and WINDOW."
(if (or scope (and symbol-overlay-temp-symbol symbol-overlay-temp-in-scope))
- (let ((f symbol-overlay-narrow-function)
- (pt (point))
+ (let ((pt (point))
min max p)
(save-excursion
- (if f (funcall f)
- (save-excursion
- (save-restriction
- (narrow-to-defun)
- (setq min (point-min)
- max (point-max)
- p (/= pt (point)))))
- (and p (setq min (progn (backward-paragraph) (point))
- max (progn (forward-paragraph) (point))))
- (narrow-to-region min max))))
+ (save-restriction
+ (narrow-to-defun)
+ (setq min (point-min)
+ max (point-max)
+ p (/= pt (point))))
+ (and p (setq min (progn (backward-paragraph) (point))
+ max (progn (forward-paragraph) (point))))
+ (narrow-to-region min max)))
(when window
(let ((lines (round (window-screen-lines)))
(pt (point))
- [nongnu] elpa/symbol-overlay 674b78983c 027/152: add an image in readme, (continued)
- [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, 2022/07/07
- [nongnu] elpa/symbol-overlay fb9c1a5cb1 058/152: delete symbol-overlay-narrow-function,
ELPA Syncer <=
- [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
- [nongnu] elpa/symbol-overlay f4737b401a 095/152: Merge pull request #22 from LeandroCardoso/master, ELPA Syncer, 2022/07/07