summaryrefslogtreecommitdiff
path: root/evil-collection-integration.el
diff options
context:
space:
mode:
authorJames Nguyen <james@jojojames.com>2018-01-20 00:58:59 -0800
committerJames Nguyen <james@jojojames.com>2018-01-20 00:58:59 -0800
commit96da780a3d06b7c8e231ebd977453be3bcd59e98 (patch)
tree317d32872a5f547b3728d2245488548d2b26ba44 /evil-collection-integration.el
parent8e18f2b72ff4c48d4ef7890ff0dbaf580a389774 (diff)
Fix show-paren advice not activating (#79)
Moved to advice-add as well as move integration into separate file.
Diffstat (limited to 'evil-collection-integration.el')
-rw-r--r--evil-collection-integration.el37
1 files changed, 0 insertions, 37 deletions
diff --git a/evil-collection-integration.el b/evil-collection-integration.el
index 947d523..32b377b 100644
--- a/evil-collection-integration.el
+++ b/evil-collection-integration.el
@@ -137,43 +137,6 @@
"\C-]" 'Info-follow-nearest-node
(kbd "DEL") 'Info-scroll-down)
-;;; Parentheses
-
-(defadvice show-paren-function (around evil disable)
- "Match parentheses in Normal state."
- (if (if (memq 'not evil-highlight-closing-paren-at-point-states)
- (memq evil-state evil-highlight-closing-paren-at-point-states)
- (not (memq evil-state evil-highlight-closing-paren-at-point-states)))
- ad-do-it
- (let ((pos (point)) syntax narrow)
- (setq pos
- (catch 'end
- (dotimes (var (1+ (* 2 evil-show-paren-range)))
- (if (zerop (mod var 2))
- (setq pos (+ pos var))
- (setq pos (- pos var)))
- (setq syntax (syntax-class (syntax-after pos)))
- (cond
- ((eq syntax 4)
- (setq narrow pos)
- (throw 'end pos))
- ((eq syntax 5)
- (throw 'end (1+ pos)))))))
- (if pos
- (save-excursion
- (goto-char pos)
- (save-restriction
- (when narrow
- (narrow-to-region narrow (point-max)))
- ad-do-it))
- ;; prevent the preceding pair from being highlighted
- (dolist (ov '(show-paren--overlay
- show-paren--overlay-1
- show-paren-overlay
- show-paren-overlay-1))
- (let ((ov (and (boundp ov) (symbol-value ov))))
- (when (overlayp ov) (delete-overlay ov))))))))
-
;;; Speedbar
(evil-add-hjkl-bindings speedbar-key-map 'motion