From: Erik Charlebois <erikcharlebois@gmail.com>
To: 14237@debbugs.gnu.org
Subject: bug#14237: [PATCH] Fix syntax-propertize-multiline bug
Date: Sun, 21 Apr 2013 02:38:00 -0400 [thread overview]
Message-ID: <CAC+abJZj18iA_pbF=9FmQ3x50nE0_3+K9ArmFNZ+LvXLfcCaKw@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 606 bytes --]
Description
At least, I think it's a bug. I ran into this while adding support for
C++11 raw strings to cc-mode.
syntax-propertize-multiline seeks backward for the first position without a
'syntax-multiline text property, but searches forward for
'font-lock-multiline. For a span of text marked 'syntax-multiline, the new
end returned from syntax-propertize-multiline will not be the end of the
multiline text.
Changelog
2013-04-21 Erik Charlebois <erikcharlebois@gmail.com>
* emacs-lisp/syntax.el (syntax-propertize-multiline):
Use 'syntax-multiline text property instead of 'font-lock-multiline.
[-- Attachment #1.2: Type: text/html, Size: 1339 bytes --]
[-- Attachment #2: syntax-multiline.txt --]
[-- Type: text/plain, Size: 2141 bytes --]
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: erikcharlebois@gmail.com-20130421062451-\
# 1z50svavx9ke3qby
# target_branch: file:///Users/erikc/Source/emacs/emacs/trunk/
# testament_sha1: d48b99015430ece0334886f393d622f96c26e4a4
# timestamp: 2013-04-21 02:27:46 -0400
# base_revision_id: xfq.free@gmail.com-20130421032751-h3wwmi698ekosiio
#
# Begin patch
=== modified file 'lisp/emacs-lisp/syntax.el'
--- lisp/emacs-lisp/syntax.el 2013-01-01 09:11:05 +0000
+++ lisp/emacs-lisp/syntax.el 2013-04-21 06:24:51 +0000
@@ -99,7 +99,7 @@
(setq beg (or (previous-single-property-change beg 'syntax-multiline)
(point-min))))
;;
- (when (get-text-property end 'font-lock-multiline)
+ (when (get-text-property end 'syntax-multiline)
(setq end (or (text-property-any end (point-max)
'syntax-multiline nil)
(point-max))))
# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBW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EImrXD+tGpUmZANI5VvLhBpHYH6
HL87okOrQjosVrEFEqVPZBBwbtdERsCmgPKkRDQoQzKdb+BDVoD3K3GkDWDU84lxyMZPQLNTQ5vm
0CAxil2inou6f/F3JFOFCQFdbGlw
next reply other threads:[~2013-04-21 6:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-21 6:38 Erik Charlebois [this message]
2013-04-22 14:11 ` bug#14237: [PATCH] Fix syntax-propertize-multiline bug Stefan Monnier
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='CAC+abJZj18iA_pbF=9FmQ3x50nE0_3+K9ArmFNZ+LvXLfcCaKw@mail.gmail.com' \
--to=erikcharlebois@gmail.com \
--cc=14237@debbugs.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).