diff options
author | Case Duckworth | 2022-01-06 18:04:18 -0600 |
---|---|---|
committer | Case Duckworth | 2022-01-06 18:04:18 -0600 |
commit | 1aa0df763136f38255416a2c3c3f2dd0d4c5327d (patch) | |
tree | 4fe8574334c85d8c402703c7429496708d755fc4 /lisp/+emacs.el | |
parent | Fixup +defvar to be in line with defvar (diff) | |
parent | Add /POKE stub command (diff) | |
download | emacs-1aa0df763136f38255416a2c3c3f2dd0d4c5327d.tar.gz emacs-1aa0df763136f38255416a2c3c3f2dd0d4c5327d.zip |
Merge branch 'main' of https://tildegit.org/acdw/emacs
Diffstat (limited to 'lisp/+emacs.el')
-rw-r--r-- | lisp/+emacs.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/+emacs.el b/lisp/+emacs.el index 7453913..ecdfeaa 100644 --- a/lisp/+emacs.el +++ b/lisp/+emacs.el | |||
@@ -220,6 +220,15 @@ kill without asking." | |||
220 | (save-buffers-kill-emacs)) | 220 | (save-buffers-kill-emacs)) |
221 | (delete-frame nil :force))) | 221 | (delete-frame nil :force))) |
222 | 222 | ||
223 | (defun +kill-word-backward-or-region (&optional arg backward-kill-word-fn) | ||
224 | "Kill active region or ARG words backward. | ||
225 | BACKWARD-KILL-WORD-FN is the function to call to kill a word | ||
226 | backward. It defaults to `backward-kill-word'." | ||
227 | (interactive "P") | ||
228 | (call-interactively (if (region-active-p) | ||
229 | #'kill-region | ||
230 | (or backward-kill-word-fn #'backward-kill-word)))) | ||
231 | |||
223 | ;; ... and advice | 232 | ;; ... and advice |
224 | 233 | ||
225 | ;; Indent the region after a yank. | 234 | ;; Indent the region after a yank. |