Fixes #1974: Correct C-h behavior to ensure electric-pair deletes adjacent pairs#1975
Fixes #1974: Correct C-h behavior to ensure electric-pair deletes adjacent pairs#1975jamescherti wants to merge 1 commit intoemacs-evil:masterfrom
Conversation
ef49df9 to
cbb8c9a
Compare
def101c to
cbb8c9a
Compare
axelf4
left a comment
There was a problem hiding this comment.
I agree that we should try to be compatible with the shenanigans of electric-pair-mode, even at the cost of a more fragile C-h binding. Some comments:
Will need to update the lookup-key check in the evil-want-C-h-delete setter:
((and (not value)
(eq (lookup-key evil-insert-state-map (kbd "C-h"))
'evil-delete-backward-char-and-join))cbb8c9a to
3b80eb5
Compare
Yes, it is less conflusing to see that I have modified (define-key evil-insert-state-map (kbd "C-h") (kbd "DEL")) |
385aafa to
4cdb9db
Compare
|
I enhanced the |
1527ecf to
8ecd4f2
Compare
|
Have there been any updates on this pull request, @axelf4? |
8ecd4f2 to
3b80eb5
Compare
|
I have applied your |
88a3893 to
eaf0dc0
Compare
|
I have enhanced this pull request: I added support for interactive and non-interactive functions |
eaf0dc0 to
4eae39e
Compare
|
FYI: I simplified the pull request. |
…eletes adjacent pairs
4eae39e to
18380b6
Compare
|
The only drawback to binding |
When using
electric-pair-mode, the expected behavior when pressingC-hnear a pair of adjacent delimiters (e.g.,()[]{}"") is that both the opening and closing delimiters should be deleted together if they were inserted as a pair.This pull request fixes #1974.
This pull request corrects
C-hbehavior to ensure electric-pair deletes adjacent pairs. It calls the same function asDEL(code 127) inelectric-pair-mode-map:This pull request could be improved. Please don't hesitate to comment it if you have any suggestions.