forked from emacs-exordium/exordium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to symbol-overlay from highlight-symbol and highlight combo
I have struggled to tune `hightlight-symbol` for a last few weeks. I've encountered numerous issues, like automatically highlighted symbol not being visible in current line (with `font-lock`'s background) due to conflict with hl-line mode's overlay, jit-lock mode not flushing (required an advice workaround), automatic highlighting clobbering `helpful-mode` fontification (haven't got to the bottom of it), conflict in `highlihgt-symbol` defun (both `highlight` and `highlight-symbol` defined it). It also seem to be unmaintained - last version on MELPA is from 2016. I've chosen to switch to `symbol-overlay`. Amongst others it defines its own symbol highlighting. So I decided to use that instead of Exordium's custom one that required `highlight`. The last but not least `symbol-overlay` seems to be maintained and `modus-themes` - that I use and intent to port to Exordium - has built in support for it.
- Loading branch information
Showing
5 changed files
with
181 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
;;; init-highlight.t.el --- Unit tests for init-highlight.el -*- lexical-binding: t -*- | ||
|
||
;;; Commentary: | ||
;; | ||
;; To run all tests: | ||
;; M-x eval-buffer | ||
;; M-x ert | ||
|
||
;;; Code: | ||
|
||
(eval-when-compile | ||
(unless (featurep 'init-require) | ||
(load (file-name-concat (locate-user-emacs-file "modules") "init-require")))) | ||
(exordium-require 'init-highlight) | ||
|
||
(require 'ert) | ||
|
||
(ert-deftest test-exordium--extract-font-lock-keywords () | ||
(let ((pattern (exordium--extract-font-lock-keywords lisp-el-font-lock-keywords-1))) | ||
(should (string-match-p pattern "defun")) | ||
(should-not (string-match-p pattern "xdefun")) | ||
(should-not (string-match-p pattern "defunx")) | ||
(should (string-match-p pattern "cl-defun")) | ||
(should-not (string-match-p pattern "xcl-defun")) | ||
(should-not (string-match-p pattern "cl-defunx")))) | ||
|
||
|
||
|
||
(provide 'init-highlight.t) | ||
|
||
;;; init-highlight.t.el ends here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters