@@ -396,8 +396,10 @@ Tables are marked to be ignored by line wrap."
396
396
(depr (nrepl-dict-get info " deprecated" ))
397
397
(macro (nrepl-dict-get info " macro" ))
398
398
(special (nrepl-dict-get info " special-form" ))
399
- (forms (nrepl-dict-get info " forms-str" ))
400
- (args (nrepl-dict-get info " arglists-str" ))
399
+ (forms (when-let ((str (nrepl-dict-get info " forms-str" )))
400
+ (split-string str " \n " )))
401
+ (args (when-let ((str (nrepl-dict-get info " arglists-str" )))
402
+ (split-string str " \n " )))
401
403
(doc (or (nrepl-dict-get info " doc" )
402
404
" Not documented." ))
403
405
(url (nrepl-dict-get info " url" ))
@@ -426,22 +428,10 @@ Tables are marked to be ignored by line wrap."
426
428
(emit (concat " " (cider-font-lock-as 'java-mode iface)))))
427
429
(when (or super ifaces)
428
430
(insert " \n " ))
429
- (when (or forms args)
430
- (insert " " )
431
- (save-excursion
432
- (emit (cider-font-lock-as-clojure
433
- ; ; All `defn' s use ([...] [...]), but some special forms use
434
- ; ; (...). We only remove the parentheses on the former.
435
- (replace-regexp-in-string " \\ `(\\ (\\ [.*\\ ]\\ ))\\ '" " \\ 1"
436
- (or forms args)))))
437
- ; ; It normally doesn't happen, but it's technically conceivable for
438
- ; ; the args string to contain unbalanced sexps, so `ignore-errors' .
439
- (ignore-errors
440
- (forward-sexp 1 )
441
- (while (not (looking-at " $" ))
442
- (insert " \n " )
443
- (forward-sexp 1 )))
444
- (forward-line 1 ))
431
+ (when-let ((forms (or forms args)))
432
+ (dolist (form forms)
433
+ (insert " " )
434
+ (emit (cider-font-lock-as-clojure form))))
445
435
(when (or special macro)
446
436
(emit (if special " Special Form" " Macro" ) 'font-lock-variable-name-face ))
447
437
(when added
0 commit comments