summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2016-04-12 10:15:00 -0300
committerArtur Malabarba <bruce.connor.am@gmail.com>2016-04-12 10:15:00 -0300
commit007cb2a3004d973c307967b45fddec66aa7748ef (patch)
tree08092b8c5882bf983553b68d18952546969f8f9a
parent0112143a77064eb4fe1509c84b1aa534431ee49c (diff)
Change cider-type overlay property to category
-rw-r--r--cider-debug.el8
-rw-r--r--cider-overlays.el10
-rw-r--r--cider-test.el3
3 files changed, 10 insertions, 11 deletions
diff --git a/cider-debug.el b/cider-debug.el
index 8f0b2412..6afa8999 100644
--- a/cider-debug.el
+++ b/cider-debug.el
@@ -353,10 +353,10 @@ In order to work properly, this mode must be activated by
(with-current-buffer (or buffer (current-buffer))
(unless cider--debug-mode
(kill-local-variable 'tool-bar-map)
- (remove-overlays nil nil 'cider-type 'debug-result)
- (remove-overlays nil nil 'cider-type 'debug-code)
+ (remove-overlays nil nil 'category 'debug-result)
+ (remove-overlays nil nil 'category 'debug-code)
(setq cider--debug-prompt-overlay nil)
- (remove-overlays nil nil 'cider-type 'debug-prompt)))))
+ (remove-overlays nil nil 'category 'debug-prompt)))))
(defun cider--debug-set-prompt (value)
"Set `cider-debug-prompt' to VALUE, then redisplay."
@@ -636,7 +636,7 @@ displaying its value."
(clojure-backward-logical-sexp 1)
(nrepl-dbind-response response (debug-value erase-previous)
(when erase-previous
- (remove-overlays (point) marker 'cider-type 'enlighten))
+ (remove-overlays (point) marker 'category 'enlighten))
(when debug-value
(if (memq (char-before marker) '(?\) ?\] ?}))
;; Enlightening a sexp looks like a regular return value, except
diff --git a/cider-overlays.el b/cider-overlays.el
index 1686ad86..cfb97d77 100644
--- a/cider-overlays.el
+++ b/cider-overlays.el
@@ -95,12 +95,12 @@ Never throws errors, and can be used in an overlay's modification-hooks."
(defun cider--make-overlay (l r type &rest props)
"Place an overlay between L and R and return it.
-TYPE is a symbol put on the overlay's cider-type property. It is used to
+TYPE is a symbol put on the overlay's category property. It is used to
easily remove all overlays from a region with:
- (remove-overlays start end 'cider-type TYPE)
+ (remove-overlays start end 'category TYPE)
PROPS is a plist of properties and values to add to the overlay."
(let ((o (make-overlay l (or r l) (current-buffer))))
- (overlay-put o 'cider-type type)
+ (overlay-put o 'category type)
(overlay-put o 'cider-temporary t)
(while props (overlay-put o (pop props) (pop props)))
(push #'cider--delete-overlay (overlay-get o 'modification-hooks))
@@ -110,7 +110,7 @@ PROPS is a plist of properties and values to add to the overlay."
"Remove result overlay from current buffer.
This function also removes itself from `post-command-hook'."
(remove-hook 'post-command-hook #'cider--remove-result-overlay 'local)
- (remove-overlays nil nil 'cider-type 'result))
+ (remove-overlays nil nil 'category 'result))
(defun cider--remove-result-overlay-after-command ()
"Add `cider--remove-result-overlay' locally to `post-command-hook'.
@@ -167,7 +167,7 @@ overlay."
(line-end-position)))
(display-string (format format value))
(o nil))
- (remove-overlays beg end 'cider-type type)
+ (remove-overlays beg end 'category type)
(funcall (if cider-overlays-use-font-lock
#'font-lock-prepend-text-property
#'put-text-property)
diff --git a/cider-test.el b/cider-test.el
index e4f6383c..359de477 100644
--- a/cider-test.el
+++ b/cider-test.el
@@ -508,8 +508,7 @@ Or nil if not found."
(dolist (var (nrepl-dict-keys vars))
(when-let ((buffer (cider-find-var-file ns var)))
(with-current-buffer buffer
- (remove-overlays (point-min) (point-max)
- 'cider-type 'cider-test)))))
+ (remove-overlays nil nil 'category 'cider-test)))))
cider-test-last-results)))