[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CC Mode and electric-pair "problem". (Was: ... master bb591f139f: Enhan
From: |
Alan Mackenzie |
Subject: |
CC Mode and electric-pair "problem". (Was: ... master bb591f139f: Enhance CC Mode's fontification, etc., of unterminated strings.) |
Date: |
Thu, 31 May 2018 12:37:47 +0000 |
User-agent: |
Mutt/1.9.4 (2018-02-28) |
Hello agin, Tino and João.
On Tue, May 22, 2018 at 16:42:46 +0900, Tino Calancha wrote:
> Hi Alan,
> Since this commit one test
> (electric-pair-autowrapping-5-at-point-2-in-c++-mode-in-strings)
> in electric-tests.el is failing with error:
> (scan-error "Unbalanced parentheses" 6 1)
This should now have been fixed.
However, the test suite (make check) threw up another discrepancy, in a
test called
electric-pair-whitespace-chomping-2-at-point-4-in-c++-mode-in-strings.
That's with electric-pair mode enabled, and
electric-pair-skip-whitespace set to 'chomp. The buffer, at the start
of the test, looks something like:
" (
) "
. With point just after the (, type a ). The expected result is that
everything up to and including the existing ) gets "chomped", leaving
the buffer looking like:
" () "
. This no longer happens in C++ mode, and it is not clear that it
should. In the original buffer, ( and ) are not in the same string,
since the opening string ends at EOL, there being no backslash to
continue it.
If there were escaped newlines in the buffer, I don't think the "chomp"
would work, because elec-pair.el doesn't recognise escaped newlines as
whitespace.
Comments?
--
Alan Mackenzie (Nuremberg, Germany).
- [Emacs-diffs] master bb591f139f: Enhance CC Mode's fontification, etc., of unterminated strings., Tino Calancha, 2018/05/22
- Re: [Emacs-diffs] master bb591f139f: Enhance CC Mode's fontification, etc., of unterminated strings., Alan Mackenzie, 2018/05/22
- Re: [Emacs-diffs] master bb591f139f: Enhance CC Mode's fontification, etc., of unterminated strings., João Távora, 2018/05/22
- Re: [Emacs-diffs] master bb591f139f: Enhance CC Mode's fontification, etc., of unterminated strings., Eli Zaretskii, 2018/05/22
- Re: [Emacs-diffs] master bb591f139f: Enhance CC Mode's fontification, etc., of unterminated strings., João Távora, 2018/05/22
- Re: [Emacs-diffs] master bb591f139f: Enhance CC Mode's fontification, etc., of unterminated strings., João Távora, 2018/05/22
- Re: [Emacs-diffs] master bb591f139f: Enhance CC Mode's fontification, etc., of unterminated strings., Eli Zaretskii, 2018/05/23
- Re: [Emacs-diffs] master bb591f139f: Enhance CC Mode's fontification, etc., of unterminated strings., Alan Mackenzie, 2018/05/23
- Re: [Emacs-diffs] master bb591f139f: Enhance CC Mode's fontification, etc., of unterminated strings., João Távora, 2018/05/23
- Re: [Emacs-diffs] master bb591f139f: Enhance CC Mode's fontification, etc., of unterminated strings., Michael Welsh Duggan, 2018/05/23
CC Mode and electric-pair "problem". (Was: ... master bb591f139f: Enhance CC Mode's fontification, etc., of unterminated strings.),
Alan Mackenzie <=