[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/boxquote 3da429f64d 16/31: Rewrite boxquote-describe-varia
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/boxquote 3da429f64d 16/31: Rewrite boxquote-describe-variable |
Date: |
Sat, 1 Jan 2022 01:58:26 -0500 (EST) |
branch: elpa/boxquote
commit 3da429f64d56a4c717c3d232934e406012bc6336
Author: Dave Pearson <davep@davep.org>
Commit: Dave Pearson <davep@davep.org>
Rewrite boxquote-describe-variable
No more dumpster-diving the input history just to get the variable name.
See #3 for more information.
---
boxquote.el | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/boxquote.el b/boxquote.el
index 1c1725161d..619ace8a61 100644
--- a/boxquote.el
+++ b/boxquote.el
@@ -426,17 +426,20 @@ ITEM is a function for retrieving the item to get help
on."
(boxquote-title (format boxquote-describe-function-title-format function)))
;;;###autoload
-(defun boxquote-describe-variable ()
+(defun boxquote-describe-variable (variable)
"Call `describe-variable' and boxquote the output into the current buffer."
- (interactive)
- (boxquote-quote-help-buffer
- #'(lambda ()
- (call-interactively #'describe-variable))
- boxquote-describe-variable-title-format
- #'(lambda ()
- (car (if (boxquote-xemacs-p)
- (symbol-value 'variable-history)
- minibuffer-history)))))
+ (interactive
+ (list
+ (completing-read "Describe variable: " obarray
+ #'(lambda (v)
+ (or (get v 'variable-documentation)
+ (and (boundp v) (not (keywordp v)))))
+ t nil nil)))
+ (boxquote-text
+ (save-window-excursion
+ (substring-no-properties
+ (describe-variable (intern variable)))))
+ (boxquote-title (format boxquote-describe-variable-title-format variable)))
;;;###autoload
(defun boxquote-describe-key (key)
- [nongnu] elpa/boxquote a6bf9f8abe 18/31: Move describe-function and describe-variable away from help quoting, (continued)
- [nongnu] elpa/boxquote a6bf9f8abe 18/31: Move describe-function and describe-variable away from help quoting, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote 8a529c63c1 22/31: Tweak the README, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote d6b49938de 21/31: Support for XEmacs is dropped (for now)., ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote 7e47e0e285 28/31: Bump licence to GPL-3+, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote b37ad4dc96 04/31: Whitespace cleaning, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote 54b4e6191c 10/31: Take some hints from checkdoc, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote db9aa7d7d3 15/31: Rewrite boxquote-describe-function, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote b0239fb7b7 24/31: v2.0, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote 80d63aad92 29/31: Fix typos, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote 3fba714167 08/31: Stop supporting versions of emacs nobody will run these days, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote 3da429f64d 16/31: Rewrite boxquote-describe-variable,
ELPA Syncer <=
- [nongnu] elpa/boxquote ffe617af2f 25/31: Remove * from start of defcustom doc-strings., ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote 9cecf1333b 30/31: Merge pull request #4 from tarsiiformes/typos, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote 55c120adbd 12/31: Add README, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote ed67659ca7 23/31: More README tweaking, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote b6a4ad3ee5 27/31: v2.1, ELPA Syncer, 2022/01/01