File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,12 @@ find a symbol if there isn't one at point."
134
134
(setq str (or (ignore-errors (cider-sync-request:macroexpand " macroexpand-1" str)) " " )))
135
135
(unless (text-property-any 0 (length str) 'field 'cider-repl-prompt str)
136
136
; ; Remove font-locking, prefix quotes, and trailing . from constructors like Record.
137
- (string-remove-prefix " '" (string-remove-suffix " ." (substring-no-properties str)))))
137
+ (thread-last (substring-no-properties str)
138
+ ; ; constructurs (Foo.)
139
+ (string-remove-suffix " ." )
140
+ (string-remove-prefix " '" )
141
+ ; ; var references (#'inc 2)
142
+ (string-remove-prefix " #'" ))))
138
143
(when look-back
139
144
(save-excursion
140
145
(ignore-errors
Original file line number Diff line number Diff line change @@ -107,6 +107,11 @@ buffer."
107
107
(with-clojure-buffer " 'foo'bar"
108
108
(expect (cider-symbol-at-point) :to-equal " foo'bar" ))))
109
109
110
+ (describe " when the symbol at point is var-quoted"
111
+ (it " returns the symbol without the preceding #'"
112
+ (with-clojure-buffer " #'inc"
113
+ (expect (cider-symbol-at-point) :to-equal " inc" ))))
114
+
110
115
(describe " when point is on a keyword"
111
116
(it " returns the keyword along with beginning : character"
112
117
(with-clojure-buffer " :abc"
You can’t perform that action at this time.
0 commit comments