Skip to content

Commit a87756a

Browse files
author
Bozhidar Batsov
committed
[Fix #698] Provide an interactive command for clearing compilation highlights
1 parent 2c08112 commit a87756a

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### New features
66

77
* New interactive command `cider-undef`.
8+
* New interactive command `cider-clear-compilation-highlights`.
89
* First pass at a CIDER quick reference card.
910

1011
* `completion-at-point` now annotates functions, macros and special forms, thus making it

cider-interaction.el

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,16 @@ search for and read a `ns' form."
11611161

11621162

11631163
;;; Evaluation
1164+
(defun cider--clear-compilation-highlights ()
1165+
"Remove compilation highlights."
1166+
(remove-overlays (point-min) (point-max) 'cider-note-p t))
1167+
1168+
(defun cider-clear-compilation-highlights ()
1169+
"Remove compilation highlights."
1170+
(interactive)
1171+
(when (y-or-n-p "Are you sure you want to clear the compilation highlights? ")
1172+
(cider--clear-compilation-highlights)))
1173+
11641174
(defun cider-popup-eval-print (form)
11651175
"Evaluate the given FORM and print value in current buffer."
11661176
(let ((buffer (current-buffer)))
@@ -1177,7 +1187,7 @@ search for and read a `ns' form."
11771187

11781188
(defun cider-interactive-eval (form)
11791189
"Evaluate the given FORM and print value in minibuffer."
1180-
(remove-overlays (point-min) (point-max) 'cider-note-p t)
1190+
11811191
(let ((buffer (current-buffer)))
11821192
(cider-eval form
11831193
(cider-interactive-eval-handler buffer)
@@ -1649,7 +1659,7 @@ strings, include private vars, and be case sensitive."
16491659
nil (if (buffer-file-name)
16501660
(file-name-nondirectory
16511661
(buffer-file-name))))))
1652-
(remove-overlays (point-min) (point-max) 'cider-note-p t)
1662+
(cider--clear-compilation-highlights)
16531663
(cider-send-load-file (cider-file-string filename)
16541664
(cider--server-filename filename)
16551665
(file-name-nondirectory filename))

0 commit comments

Comments
 (0)