File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change 160
160
(defun typed-clojure-ann-var ()
161
161
(interactive )
162
162
(lexical-let ((t (read-string " Annotate var with type (default Any): " )))
163
- (ignore-errors
164
- (forward-sexp )
165
- (backward-sexp ))
166
- (mark-sexp )
167
- (kill-ring-save (region-beginning ) (region-end ))
168
- ; turn off mark
169
- (set-mark-command 0 )
170
- (lexical-let ((sym (car kill-ring)))
163
+ (lexical-let ((sym (thing-at-point 'symbol )))
171
164
(lexical-let ((p (typed-clojure-qualify-ann-var sym)))
172
165
(if p
173
166
(progn
177
170
(insert (format " (%s ann " (typed-clojure-lowest-ns 'ann )))
178
171
(insert (concat p " " (if (= 0 (length t )) " Any" t ) " )" ))
179
172
())
180
- (error (concat " Current form is not a symbol: " sym)))
181
- ))
182
- (backward-sexp ))
183
- )
173
+ (error (concat " Current form is not a symbol: " sym)))))
174
+ (backward-sexp )))
184
175
185
176
(defun typed-clojure-ann-form ()
186
177
(interactive )
You can’t perform that action at this time.
0 commit comments