[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm 2a2a142fdf 4/4: Fix error when calling documentation
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm 2a2a142fdf 4/4: Fix error when calling documentation on void function |
Date: |
Mon, 4 Jul 2022 14:58:38 -0400 (EDT) |
branch: elpa/helm
commit 2a2a142fdfb004e2f93157468e101e780fb0c550
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Fix error when calling documentation on void function
This error was trigerred by a defalias pointing to a non existing
function.
---
helm-elisp.el | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/helm-elisp.el b/helm-elisp.el
index 76f9731aa4..e18d20f8ae 100644
--- a/helm-elisp.el
+++ b/helm-elisp.el
@@ -413,18 +413,20 @@ the same time to variable and a function."
If SYM is not documented, return \"Not documented\".
Argument NAME allows specifiying what function to use to display
documentation when SYM name is the same for function and variable."
- (let ((doc (pcase sym
- ((and (pred fboundp) (pred boundp))
- (pcase name
- ("describe-function"
- (documentation sym t))
- ("describe-variable"
- (documentation-property sym 'variable-documentation t))
- (_ (documentation sym t))))
- ((pred fboundp) (documentation sym t))
- ((pred boundp) (documentation-property
- sym 'variable-documentation t))
- ((pred facep) (face-documentation sym)))))
+ (let ((doc (condition-case _err
+ (pcase sym
+ ((and (pred fboundp) (pred boundp))
+ (pcase name
+ ("describe-function"
+ (documentation sym t))
+ ("describe-variable"
+ (documentation-property sym 'variable-documentation t))
+ (_ (documentation sym t))))
+ ((pred fboundp) (documentation sym t))
+ ((pred boundp) (documentation-property
+ sym 'variable-documentation t))
+ ((pred facep) (face-documentation sym)))
+ (void-function "Void function -- Not documented"))))
(if (and doc (not (string= doc ""))
;; `documentation' return "\n\n(args...)"
;; for CL-style functions.