branch: elpa/cider commit 66edadb64f80de472f7ac47427db200c3df02060 Author: Oleksandr Yakushev <a...@bytopia.org> Commit: Bozhidar Batsov <bozhi...@batsov.dev>
[inspect] Replace overlays with text properties --- cider-inspector.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cider-inspector.el b/cider-inspector.el index 73feaf808d..a3a9b91a3d 100644 --- a/cider-inspector.el +++ b/cider-inspector.el @@ -198,14 +198,14 @@ Can be turned to nil once the user sees and acknowledges the feature." (visual-line-mode 1)) (defun cider-inspector--highlight-diff-tags () - "Apply face to #± using overlays. -We use overlays here because font-locking doesn't seem to work for this." + "Apply distinctive face to #± by manually walking through buffer. +Doing this via font-locking rules doesn't seem to work, probably because +the text is already colored by clojure mode font-locking." (save-excursion (goto-char (point-min)) (while (search-forward "#±" nil t) - (let ((overlay (make-overlay (match-beginning 0) (match-end 0)))) - (overlay-put overlay 'face 'font-lock-warning-face) - (overlay-put overlay 'priority 100))))) + (put-text-property (match-beginning 0) (match-end 0) + 'face 'font-lock-warning-face)))) ;;;###autoload (defun cider-inspect-last-sexp ()