summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/+emacs.el9
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.
225BACKWARD-KILL-WORD-FN is the function to call to kill a word
226backward. 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.