[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/boxquote 3613e1d7cc 20/31: Simplify boxquote-describe-key
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/boxquote 3613e1d7cc 20/31: Simplify boxquote-describe-key |
Date: |
Sat, 1 Jan 2022 01:58:27 -0500 (EST) |
branch: elpa/boxquote
commit 3613e1d7cc934cd959bc8326decb835f1c4acc71
Author: Dave Pearson <davep@davep.org>
Commit: Dave Pearson <davep@davep.org>
Simplify boxquote-describe-key
This change *does* mean that XEmacs support is a little up in the air
now. I don't have a copy of XEmacs to hand at the moment and no simple
way of getting one sorted so I can test.
---
boxquote.el | 40 ++++++----------------------------------
1 file changed, 6 insertions(+), 34 deletions(-)
diff --git a/boxquote.el b/boxquote.el
index 23a22bad98..5716eb7cb8 100644
--- a/boxquote.el
+++ b/boxquote.el
@@ -419,32 +419,6 @@ VARIABLE is the variable to describe."
(describe-variable (intern variable)))))
(boxquote-title (format boxquote-describe-variable-title-format variable)))
-(defun boxquote-help-buffer-name (item)
- "Return the name of the help buffer associated with ITEM."
- (if (boxquote-xemacs-p)
- (loop for buffer in (symbol-value 'help-buffer-list)
- when (string-match (concat "^*Help:.*`" item "'") buffer)
- return buffer)
- "*Help*"))
-
-(defun boxquote-quote-help-buffer (help-call title-format item)
- "Perform a help command and boxquote the output.
-
-HELP-CALL is a function that calls the help command.
-
-TITLE-FORMAT is the `format' string to use to product the boxquote title.
-
-ITEM is a function for retrieving the item to get help on."
- (let ((one-window-p (one-window-p)))
- (boxquote-text
- (save-window-excursion
- (funcall help-call)
- (with-current-buffer (boxquote-help-buffer-name (funcall item))
- (buffer-substring-no-properties (point-min) (point-max)))))
- (boxquote-title (format title-format (funcall item)))
- (when one-window-p
- (delete-other-windows))))
-
;;;###autoload
(defun boxquote-describe-key (key)
"Call `describe-key' on KEY and boxquote the output into the current buffer.
@@ -461,14 +435,12 @@ prompted for a buffer. The key defintion used will be
taken from that buffer."
(if (or (null binding) (integerp binding))
(message "%s is undefined" (with-current-buffer from-buffer
(key-description key)))
- (boxquote-quote-help-buffer
- #'(lambda ()
- (with-current-buffer from-buffer
- (describe-key key)))
- boxquote-describe-key-title-format
- #'(lambda ()
- (with-current-buffer from-buffer
- (key-description key))))))))
+ (boxquote-text
+ (save-window-excursion
+ (describe-key key)
+ (with-current-buffer (help-buffer)
+ (buffer-substring-no-properties (point-min) (point-max)))))
+ (boxquote-title (format boxquote-describe-key-title-format
(key-description key)))))))
;;;###autoload
(defun boxquote-shell-command (command)
- [nongnu] branch elpa/boxquote created (now bdc6c84b92), ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote 9470824864 05/31: Change some header stuff, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote 93c7fa57b8 03/31: Update from my website, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote 33a1177db5 11/31: v1.24, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote 1601259582 14/31: Add melpa badge, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote 775c3be429 19/31: Doc string updates, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote 3613e1d7cc 20/31: Simplify boxquote-describe-key,
ELPA Syncer <=
- [nongnu] elpa/boxquote e167b9d325 26/31: loop -> cl-loop, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote bdc6c84b92 31/31: :bookmark: v2.2, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote 4c49b20466 01/31: First commit, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote 8a92c69542 02/31: Tidy up .gitignore, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote 6e570b8f15 06/31: Change URL where the source can always be found, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote f7e3ed83c2 07/31: Add package headers, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote 04afee4651 09/31: Move from cl to cl-lib, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote f4498f6e3e 17/31: Tweak off indentation, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote 34f27a7d6c 13/31: Add melpa badge to the README, ELPA Syncer, 2022/01/01
- [nongnu] elpa/boxquote a6bf9f8abe 18/31: Move describe-function and describe-variable away from help quoting, ELPA Syncer, 2022/01/01