]> git.eshelyaron.com Git - emacs.git/commit
CC Mode. Make AWK Mode work with electric-pair-mode
authorAlan Mackenzie <acm@muc.de>
Sat, 24 Sep 2022 12:23:32 +0000 (12:23 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 24 Sep 2022 12:23:32 +0000 (12:23 +0000)
commite4b1445f4301a4a672442d29f93983d804a80982
treec98cecd1221a8d9b6259d8feaf10f2d7b2057e38
parent1556b4376457db409a0a15765e89b2a209007d7b
CC Mode.  Make AWK Mode work with electric-pair-mode

Also fix some minor anomalies with other CC Mode modes in electric-pair-mode.
This fixes bug #53446.

* lisp/progmodes/cc-mode.el (c-open-string-opener): New buffer local
variable.
(c-after-change-mark-abnormal-strings): Set c-open-string-opener when an
unbalanced string is detected.
(c-before-change): Initilize c-open-string-opener to nil, each buffer change.
(c-electric-pair-inhibit-predicate): Use the value of c-open-string-opener to
flag an unbalaced string rather than trying to calculate it again.

* lisp/progmodes/cc-awk.el (c-awk-syntax-tablify-string): Set
c-open-string-opener when an unbalanced string is detected.
lisp/progmodes/cc-awk.el
lisp/progmodes/cc-mode.el