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

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

[nongnu] elpa/boxquote a6bf9f8abe 18/31: Move describe-function and desc


From: ELPA Syncer
Subject: [nongnu] elpa/boxquote a6bf9f8abe 18/31: Move describe-function and describe-variable away from help quoting
Date: Sat, 1 Jan 2022 01:58:26 -0500 (EST)

branch: elpa/boxquote
commit a6bf9f8abefca7d675fbebccdd7637137a5abe18
Author: Dave Pearson <davep@davep.org>
Commit: Dave Pearson <davep@davep.org>

    Move describe-function and describe-variable away from help quoting
    All that's left that uses the help buffer quoting helper code is the
    command that boxquotes a key description. I should look at making
    it all standalone now.
---
 boxquote.el | 52 ++++++++++++++++++++++++++--------------------------
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/boxquote.el b/boxquote.el
index e63d632de5..4708d7eb47 100644
--- a/boxquote.el
+++ b/boxquote.el
@@ -387,32 +387,6 @@ whatever `boxquote-kill-ring-save-title' returned at the 
time."
   (let ((box (boxquote-points-with-check)))
     (boxquote-region (car box) (1+ (cdr box)))))
 
-(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-function (function)
   "Call `describe-function' and boxquote the output into the current buffer."
@@ -441,6 +415,32 @@ ITEM is a function for retrieving the item to get help on."
       (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.



reply via email to

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