From: Noam Postavsky <npostavs@users.sourceforge.net>
To: Alan Mackenzie <acm@muc.de>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Fix to handling of C++ digit separators, improvements in handling of single quotes.
Date: Sat, 1 Jul 2017 23:35:41 -0400 [thread overview]
Message-ID: <CAM-tV-9vsF7NsOO-6cLtg0VmJ7Cmkd-SibztanJkRHYDoCRxDQ@mail.gmail.com> (raw)
In-Reply-To: <20170701161008.GB8743@acm>
[-- Attachment #1: Type: text/plain, Size: 576 bytes --]
On Sat, Jul 1, 2017 at 12:10 PM, Alan Mackenzie <acm@muc.de> wrote:
> The code involved is moderately involved, with special cases needed to
> handle things like '\'', '\\', or char foo [] = {',',',',',',','};. So
> if there are any problems with it (in particular, large areas of text
> following a quotey bit getting misfontified with font-lock-string-face),
> please let me know.
I think this change breaks tests/lisp/electric-tests.el, here's a
reduced test case (backtrace attached)
(with-temp-buffer
(c++-mode)
(insert " (((()) ")
(goto-char 4)
(insert ")"))
[-- Attachment #2: c-quotes.backtrace --]
[-- Type: application/octet-stream, Size: 1619 bytes --]
Debugger entered--Lisp error: (args-out-of-range 0 0)
get-text-property(0 syntax-table)
c-clear-char-property-with-value-on-char-function(0 4 syntax-table (1) 39)
c-parse-quotes-before-change(4 4)
#f(compiled-function (fn) #<bytecode>)(c-parse-quotes-before-change)
mapc(#f(compiled-function (fn) #<bytecode>) (c-extend-region-for-CPP c-before-change-check-raw-strings c-before-change-check-<>-operators c-depropertize-CPP c-invalidate-macro-cache c-truncate-bs-cache c-parse-quotes-before-change))
c-before-change(4 4)
insert(")")
(progn (c++-mode) (insert " (((()) ") (goto-char 4) (insert ")"))
(unwind-protect (progn (c++-mode) (insert " (((()) ") (goto-char 4) (insert ")")) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (c++-mode) (insert " (((()) ") (goto-char 4) (insert ")")) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
(let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (c++-mode) (insert " (((()) ") (goto-char 4) (insert ")")) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
eval((let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (c++-mode) (insert " (((()) ") (goto-char 4) (insert ")")) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) nil)
elisp--eval-last-sexp(nil)
eval-last-sexp(nil)
funcall-interactively(eval-last-sexp nil)
call-interactively(eval-last-sexp nil nil)
command-execute(eval-last-sexp)
next prev parent reply other threads:[~2017-07-02 3:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-01 16:10 Fix to handling of C++ digit separators, improvements in handling of single quotes Alan Mackenzie
2017-07-02 3:35 ` Noam Postavsky [this message]
2017-07-02 6:03 ` Alan Mackenzie
2017-07-02 13:05 ` Alan Mackenzie
2017-07-02 15:47 ` Noam Postavsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAM-tV-9vsF7NsOO-6cLtg0VmJ7Cmkd-SibztanJkRHYDoCRxDQ@mail.gmail.com \
--to=npostavs@users.sourceforge.net \
--cc=acm@muc.de \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).