diff options
author | João Távora <joaotavora@gmail.com> | 2019-01-25 13:04:13 +0000 |
---|---|---|
committer | João Távora <joaotavora@gmail.com> | 2019-01-25 17:32:18 +0000 |
commit | 682ab5d92a6922694a92fcde029811bccf98d700 (patch) | |
tree | 8ae6bace81652a4feff7e5abdb14890e1665f028 /lib/regex_internal.c | |
parent | f845f8a279cfc2acd1051b4cd4924e2aede54017 (diff) | |
download | emacs-682ab5d92a6922694a92fcde029811bccf98d700.tar.gz emacs-682ab5d92a6922694a92fcde029811bccf98d700.tar.bz2 emacs-682ab5d92a6922694a92fcde029811bccf98d700.zip |
Adjust previous electric.el and elec-pair.el change
This fixes a serious bug introduced previously
electric-pair-inhibit-if-helps-balance and
electric-pair-skip-if-helps-balance, whereby "innocent" markers were
being pushed by those function's new save-change-and-restore
semantics. The fix can probably still be improved.
It also adds comments to parts of the code, where deemed necessary.
* lisp/elec-pair.el (electric-pair--insert): Add comment.
(electric-pair--save-literal-point-excursion): New helper macro.
(electric-pair-inhibit-if-helps-balance)
(electric-pair-skip-if-helps-balance): Don't use
insert-before-markers since it may hurt other markers that have
nothing to do with the 'save-excursion'.
(electric-pair-post-self-insert-function): Use
electric-pair--save-literal-point-excursion.
* lisp/electric.el (electric-indent-post-self-insert-function):
Remove lexical variable.
Diffstat (limited to 'lib/regex_internal.c')
0 files changed, 0 insertions, 0 deletions