[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 62fe329: Fix following doc-links in `widget-documen
From: |
Martin Rudalics |
Subject: |
[Emacs-diffs] master 62fe329: Fix following doc-links in `widget-documentation-link-action' |
Date: |
Thu, 23 Apr 2015 07:12:55 +0000 |
branch: master
commit 62fe329762301b4edf546e74893d9169906ffa96
Author: Martin Rudalics <address@hidden>
Commit: Martin Rudalics <address@hidden>
Fix following doc-links in `widget-documentation-link-action'
* lisp/wid-edit.el (widget-documentation-link-action): Make
following doc-links less simplistic (Bug#20398).
---
lisp/wid-edit.el | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 04a900f..0a95783 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -2846,9 +2846,17 @@ The following properties have special meanings for this
widget:
(if (and (fboundp symbol) (boundp symbol))
;; If there are two doc strings, give the user a way to pick one.
(apropos (concat "\\`" (regexp-quote string) "\\'"))
- (if (fboundp symbol)
- (describe-function symbol)
- (describe-variable symbol)))))
+ (cond
+ ((fboundp symbol)
+ (describe-function symbol))
+ ((facep symbol)
+ (describe-face symbol))
+ ((featurep symbol)
+ (describe-package symbol))
+ ((or (boundp symbol) (get symbol 'variable-documentation))
+ (describe-variable symbol))
+ (t
+ (message "No documentation available for %s" symbol))))))
(defcustom widget-documentation-links t
"Add hyperlinks to documentation strings when non-nil."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 62fe329: Fix following doc-links in `widget-documentation-link-action',
Martin Rudalics <=