summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-09-03 17:23:48 -0500
committerCase Duckworth2021-09-03 17:23:48 -0500
commit91b37053113166803ecfd23e18f7fc1683bc5b36 (patch)
treeac627d5bb88b655d7e2aa03190a8417718025c8c
parentRemove beginend.el (diff)
downloademacs-91b37053113166803ecfd23e18f7fc1683bc5b36.tar.gz
emacs-91b37053113166803ecfd23e18f7fc1683bc5b36.zip
Make hungry-delete work with paredit-mode
-rw-r--r--init.el19
1 files changed, 17 insertions, 2 deletions
diff --git a/init.el b/init.el index 29c2d66..8cbd75d 100644 --- a/init.el +++ b/init.el
@@ -1496,8 +1496,23 @@ 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 (:option hungry-delete-join-reluctantly t) 1499 (define-key paredit-mode-map [remap paredit-backward-delete]
1500 (global-hungry-delete-mode +1)) ; TODO: make work with paredit 1500 (defun acdw/paredit-hungry-delete-backward (arg)
1501 (interactive "P")
1502 (if (looking-back "[ \t]" 1)
1503 (hungry-delete-backward (or arg 1))
1504 (paredit-backward-delete arg))))
1505
1506 (define-key paredit-mode-map [remap paredit-forward-delete]
1507 (defun acdw/paredit-hungry-delete-forward (arg)
1508 (interactive "P")
1509 (if (looking-at "[ \t]")
1510 (hungry-delete-forward (or arg 1))
1511 (paredit-forward-delete arg))))
1512
1513 (:option hungry-delete-chars-to-skip " \t"
1514 hungry-delete-join-reluctantly nil)
1515 (global-hungry-delete-mode +1))
1501 1516
1502(setup (:straight iscroll) 1517(setup (:straight iscroll)
1503 (define-globalized-minor-mode global-iscroll-mode 1518 (define-globalized-minor-mode global-iscroll-mode