Skip to content

Commit 0fc2350

Browse files
dotemacsbbatsov
authored andcommitted
Fix for eldoc-mode for ClojureCLR
When using the REPL, whenever you'd type the function name, because Throwable is JVM specific, eldoc-mode would try to look up the function and when it wouldn't find it, it would bomb out with the complaint that Throwable wasn't defined. Which is to be expected since it's not running on JVM. Looking at the documentation https://docs.oracle.com/javase/10/docs/api/java/lang/Throwable.html "The Throwable class is the superclass of all errors and exceptions in the Java language." And in C#, Exception https://docs.microsoft.com/en-us/dotnet/api/system.exception?redirectedfrom=MSDN&view=netframework-4.8 "This class is the base class for all exceptions."
1 parent 16455ab commit 0fc2350

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## master (unreleased)
44

5+
# [#164](https://github.com/clojure-emacs/inf-clojure/pull/164): Fix for eldoc-mode on ClojureCLR
56
* [#160](https://github.com/clojure-emacs/inf-clojure/pull/160): Support [Joker](https://joker-lang.org/).
67
* [#135](https://github.com/clojure-emacs/inf-clojure/pull/135): Improve command sanitation code.
78

inf-clojure.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ If you are using REPL types, it will pickup the most appropriate
900900
(clojure.core/meta
901901
(clojure.core/resolve
902902
(clojure.core/read-string \"%s\"))))
903-
(catch Throwable t nil))"
903+
(catch #?(:clj Throwable :cljr Exception) e nil))"
904904
"Form to query inferior Clojure for a function's arglists."
905905
:type 'string
906906
:safe #'stringp

0 commit comments

Comments
 (0)