[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 398f8e4 32/50: Add hypb:def-to-buffer to hypb
From: |
Stefan Monnier |
Subject: |
[elpa] externals/hyperbole 398f8e4 32/50: Add hypb:def-to-buffer to hypb.el for fast def copying |
Date: |
Wed, 17 Mar 2021 18:44:19 -0400 (EDT) |
branch: externals/hyperbole
commit 398f8e4ead18664dc64719e9504b5ffb6b925bda
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>
Add hypb:def-to-buffer to hypb.el for fast def copying
---
hypb.el | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/hypb.el b/hypb.el
index c3b199b..520ce18 100644
--- a/hypb.el
+++ b/hypb.el
@@ -184,6 +184,22 @@ Global keymap is used unless optional KEYMAP is given."
;; string.
string)))
+;; Similar keyboard macro to next function, but less flexible: {C-x 1 M-o F
M-o a C-x b *scratch* RET M-< M-o s C-@ C-M-h M-o t a C-u C-@ C-u C-@ M-o a
C-M-p}
+
+;;;###autoload
+(defun hypb:def-to-buffer (&optional arg buffer)
+ "Copy next optional ARG (default = 1) code definitions to the start of
BUFFER (default = *scratch*) and leave point at the start of the inserted text."
+ (interactive "p\nbDef insertion buffer (default *scratch*): ")
+ (let ((def (save-excursion
+ (mark-defun arg)
+ (deactivate-mark)
+ (buffer-substring (region-beginning) (region-end)))))
+ (pop-to-buffer (or buffer "*scratch*"))
+ (goto-char (point-min))
+ (insert def)
+ (goto-char (point-min))
+ (forward-line 1)))
+
(defun hypb:domain-name ()
"Return current Internet domain name with '@' prepended or nil if none."
(let* ((dname-cmd (or (file-exists-p "/usr/bin/domainname")
- [elpa] externals/hyperbole e914edb 15/50: Add hypb-maintenance.el to MANIFEST, (continued)
- [elpa] externals/hyperbole e914edb 15/50: Add hypb-maintenance.el to MANIFEST, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole b4f7e49 16/50: Move HY-TALK.org button data to HY-TALK/.hypb, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 781bbb5 17/50: Merge pull request #41 from rswgnu/update-git-repo-cache-interactively, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 22439e6 20/50: Add klink ref cmds, ebut:program and defiblink for programmatic creation, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole e999fc7 21/50: Stop man-apropos from matching to log file entries, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole cfc61a3 22/50: Eliminate a number of order-based byte-compilation warnings, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole e3544c8 23/50: Revert improper application of "Use \\0 for matched Nth substitution", Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole f1b2cba 24/50: Add dependency on hvar to resolve use of var:remove-all (#43), Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 312c858 25/50: kexport.el - use lowercase HTML tags; mail-address ibtype allow trigger in any major mode, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole a3b9d6d 26/50: Merge branch 'master' of github.com:rswgnu/hyperbole, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 398f8e4 32/50: Add hypb:def-to-buffer to hypb.el for fast def copying,
Stefan Monnier <=
- [elpa] externals/hyperbole a831ef9 36/50: Fix bug #46606 by replacing hkey-define-key with hkey-global-set-key, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 8969fe9 43/50: Merge branch 'master' of hyperbole, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole c8947dd 47/50: Merge branch 'master' of hyperbole, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole db73cf7 19/50: Use \0 for matched Nth substitution (see also commit #c0e48fb3), Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 1826307 27/50: Resolve bug#43644 where final double quote was trimmed from strings., Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole f38a8dd 28/50: Fix Hyrolo logicial searches; bug fixes; handle file:// URLs better, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 3469ea3 29/50: Release defil and defal simpler implicit button type create macros, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole 6a8154a 33/50: Add first unit tests (#46), Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole a44b392 34/50: Add UNIX shell error implicit button support, Stefan Monnier, 2021/03/17
- [elpa] externals/hyperbole aa6f2f6 38/50: Verify error message from hpath:find is correct (#50), Stefan Monnier, 2021/03/17