diff options
-rw-r--r-- | init.el | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/init.el b/init.el index 8cbd75d..cb8d41e 100644 --- a/init.el +++ b/init.el | |||
@@ -1496,19 +1496,21 @@ successive invocations." | |||
1496 | "C-c C-d" helpful-at-point)) | 1496 | "C-c C-d" helpful-at-point)) |
1497 | 1497 | ||
1498 | (setup (:straight hungry-delete) | 1498 | (setup (:straight hungry-delete) |
1499 | (define-key paredit-mode-map [remap paredit-backward-delete] | 1499 | |
1500 | (defun acdw/paredit-hungry-delete-backward (arg) | 1500 | (with-eval-after-load 'paredit |
1501 | (interactive "P") | 1501 | (define-key paredit-mode-map [remap paredit-backward-delete] |
1502 | (if (looking-back "[ \t]" 1) | 1502 | (defun acdw/paredit-hungry-delete-backward (arg) |
1503 | (hungry-delete-backward (or arg 1)) | 1503 | (interactive "P") |
1504 | (paredit-backward-delete arg)))) | 1504 | (if (looking-back "[ \t]" 1) |
1505 | 1505 | (hungry-delete-backward (or arg 1)) | |
1506 | (define-key paredit-mode-map [remap paredit-forward-delete] | 1506 | (paredit-backward-delete arg)))) |
1507 | (defun acdw/paredit-hungry-delete-forward (arg) | 1507 | |
1508 | (interactive "P") | 1508 | (define-key paredit-mode-map [remap paredit-forward-delete] |
1509 | (if (looking-at "[ \t]") | 1509 | (defun acdw/paredit-hungry-delete-forward (arg) |
1510 | (hungry-delete-forward (or arg 1)) | 1510 | (interactive "P") |
1511 | (paredit-forward-delete arg)))) | 1511 | (if (looking-at "[ \t]") |
1512 | (hungry-delete-forward (or arg 1)) | ||
1513 | (paredit-forward-delete arg))))) | ||
1512 | 1514 | ||
1513 | (:option hungry-delete-chars-to-skip " \t" | 1515 | (:option hungry-delete-chars-to-skip " \t" |
1514 | hungry-delete-join-reluctantly nil) | 1516 | hungry-delete-join-reluctantly nil) |