emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/cider 8a7fb48c49: `cider-docstring--format`: nil-safe (#37


From: ELPA Syncer
Subject: [nongnu] elpa/cider 8a7fb48c49: `cider-docstring--format`: nil-safe (#3722)
Date: Thu, 4 Jul 2024 21:59:24 -0400 (EDT)

branch: elpa/cider
commit 8a7fb48c49007b9e3861ea842fa8283f51b95c06
Author: Naoya Yamashita <conao3@gmail.com>
Commit: GitHub <noreply@github.com>

    `cider-docstring--format`: nil-safe (#3722)
    
    * call cider-docstring--format after checking argument
    
    * use when-let for DRY
    
    * add CHANGELOG entry
---
 CHANGELOG.md   | 1 +
 cider-eldoc.el | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 11ba721396..1a4a3a0ede 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,7 @@
 - [#3719](https://github.com/clojure-emacs/cider/pull/3719): Remove duplicated 
keybinding.
 - Bump the injected `cider-nrepl` to 
[0.49.1](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0491-2024-06-30).
   - Reduces the minimal supported Clojure version to 1.10.0 (from 1.10.3).
+- [#3722](https://github.com/clojure-emacs/cider/pull/3722): Call 
`cider-docstring--format` after checking argument
 
 ### Bugs fixed
 
diff --git a/cider-eldoc.el b/cider-eldoc.el
index 4c094b06c0..1137046bbe 100644
--- a/cider-eldoc.el
+++ b/cider-eldoc.el
@@ -218,9 +218,9 @@ information."
          (symbol (lax-plist-get eldoc-info "symbol"))
          (docstring (or (cider--render-docstring-first-sentence eldoc-info)
                         (cider--render-docstring eldoc-info)
-                        (cider-docstring--trim
-                         (cider-docstring--format
-                          (lax-plist-get eldoc-info "docstring")))))
+                        (when-let (docstring (lax-plist-get eldoc-info 
"docstring"))
+                          (cider-docstring--trim
+                           (cider-docstring--format docstring)))))
          ;; if it's a single class (and not multiple class candidates), that's 
it
          (maybe-class (car (lax-plist-get eldoc-info "class")))
          (formatted-var (or (when maybe-class



reply via email to

[Prev in Thread] Current Thread [Next in Thread]