about summary refs log tree commit diff stats
path: root/lisp/+paredit.el
blob: 0c65328108e09beffa85461278ee15317ba87131 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
;;; +paredit.el --- bespoke paredit stuffs -*- lexical-binding: t; -*-

;;; Commentary:

;;; Code:

(require '+emacs)                       ; `+backward-kill-word-wrapper'

(defun +paredit--backward-kill-word (&optional n)
  "Perform `paredit-backward-kill-word' N times."
  (interactive "p")
  (dotimes (_ (or n 1))
    (paredit-backward-kill-word)))

(defun +paredit-backward-kill-word (&optional arg)
  "Kill a word backward using `paredit-backward-kill-word'.
Wrapped in `+backward-kill-word-wrapper', which see.

Prefix ARG means to just call `paredit-backward-kill-word'."
  ;; Of course, `paredit-backward-kill-word' doesn't TAKE an argument ... :///
  ;; So I had to write the wrapper above.
  (interactive)
  (+backward-kill-word-wrapper #'+paredit--backward-kill-word arg))

(provide '+paredit)
;;; +paredit.el ends here