From 7224e6e1b84a4351154f0ab836c40f2008dab439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D0=B0?= =?UTF-8?q?=D1=80=20=D0=A1=D0=B8=D0=BC=D0=B8=D1=9B?= Date: Fri, 31 May 2019 11:30:00 +0100 Subject: [PATCH] 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." --- CHANGELOG.md | 1 + inf-clojure.el | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1d3360..d28d305 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## master (unreleased) +# [#164](https://github.com/clojure-emacs/inf-clojure/pull/164): Fix for eldoc-mode on ClojureCLR * [#160](https://github.com/clojure-emacs/inf-clojure/pull/160): Support [Joker](https://joker-lang.org/). * [#135](https://github.com/clojure-emacs/inf-clojure/pull/135): Improve command sanitation code. diff --git a/inf-clojure.el b/inf-clojure.el index 1403432..47e1e6a 100644 --- a/inf-clojure.el +++ b/inf-clojure.el @@ -900,7 +900,7 @@ If you are using REPL types, it will pickup the most appropriate (clojure.core/meta (clojure.core/resolve (clojure.core/read-string \"%s\")))) - (catch Throwable t nil))" + (catch #?(:clj Throwable :cljr Exception) e nil))" "Form to query inferior Clojure for a function's arglists." :type 'string :safe #'stringp