[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/crux b07b31a 005/112: Move a function around
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/crux b07b31a 005/112: Move a function around |
Date: |
Wed, 11 Aug 2021 09:57:43 -0400 (EDT) |
branch: elpa/crux
commit b07b31ae6f8731534b490f706c2dc2f5feb27a7a
Author: Bozhidar Batsov <bozhidar@batsov.com>
Commit: Bozhidar Batsov <bozhidar@batsov.com>
Move a function around
---
crux.el | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/crux.el b/crux.el
index 019a373..7ee47b2 100644
--- a/crux.el
+++ b/crux.el
@@ -64,6 +64,17 @@ With a prefix ARG always prompt for command to use."
"The default `ansi-term' name used by `crux-visit-term-buffer'.
This variable can be set via .dir-locals.el to provide multi-term support.")
+(defun crux-start-or-switch-to (function buffer-name)
+ "Invoke FUNCTION if there is no buffer with BUFFER-NAME.
+Otherwise switch to the buffer named BUFFER-NAME. Don't clobber
+the current buffer."
+ (if (not (get-buffer buffer-name))
+ (progn
+ (split-window-sensibly (selected-window))
+ (other-window 1)
+ (funcall function))
+ (switch-to-buffer-other-window buffer-name)))
+
(defun crux-visit-term-buffer ()
"Create or visit a terminal buffer."
(interactive)
@@ -258,17 +269,6 @@ buffer is not visiting a file."
(add-hook 'find-file-hook #'crux-reopen-as-root)
-(defun crux-start-or-switch-to (function buffer-name)
- "Invoke FUNCTION if there is no buffer with BUFFER-NAME.
-Otherwise switch to the buffer named BUFFER-NAME. Don't clobber
-the current buffer."
- (if (not (get-buffer buffer-name))
- (progn
- (split-window-sensibly (selected-window))
- (other-window 1)
- (funcall function))
- (switch-to-buffer-other-window buffer-name)))
-
(defun crux-insert-date ()
"Insert a timestamp according to locale's date and time format."
(interactive)
- [nongnu] elpa/crux 9330468 016/112: Add missing crux-shell defcustom, (continued)
- [nongnu] elpa/crux 9330468 016/112: Add missing crux-shell defcustom, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux c8ad7c1 017/112: Fix the interactive spec for crux-find-user-init-file, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 61bf2bd 003/112: Code style, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 66f4292 006/112: Code style, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux aafcf48 009/112: Introduce some customization options, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux c174247 014/112: Change crux-kill-like-backward to crux-kill-line-backward, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 0f04d98 015/112: Fix unbound var reference, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 3009713 018/112: Update the copyright, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 86cabce 027/112: Merge pull request #10 from waymondo/file-and-buffer-naming-conventions, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 5ee7dc9 032/112: Require tramp for `tramp-tramp-file-p`, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux b07b31a 005/112: Move a function around,
ELPA Syncer <=
- [nongnu] elpa/crux b5eac2a 008/112: Code style, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 3088be2 012/112: Add a way to make commands operate on either a region or a buffer, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 16eb56d 011/112: Kill crux-setup-default-keybindings, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux d2643ae 019/112: Add crux-ispell-word-then-abbrev, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 382834e 020/112: Fix contributors link, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux e6e3221 025/112: Fix crux-*-file-and-buffer commands inconsistencies and alias the inverse, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 4c90762 026/112: Add complementary `with-region-or-line` & `with-region-or-point-to-eol`, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux e4c539b 028/112: Merge pull request #9 from waymondo/with-region-or-line, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux dc1606b 034/112: Add crux-transpose-windows for swapping the buffers between two windows, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 2be95ea 040/112: Use read-from-minibuffer for the new file name, ELPA Syncer, 2021/08/11