all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#14237: [PATCH] Fix syntax-propertize-multiline bug
@ 2013-04-21  6:38 Erik Charlebois
  2013-04-22 14:11 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Erik Charlebois @ 2013-04-21  6:38 UTC (permalink / raw)
  To: 14237


[-- 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
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxl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mu5sTEATN0LAIHODBHDEImrXD+tGpUmZANI5VvLhBpHYH6
HL87okOrQjosVrEFEqVPZBBwbtdERsCmgPKkRDQoQzKdb+BDVoD3K3GkDWDU84lxyMZPQLNTQ5vm
0CAxil2inou6f/F3JFOFCQFdbGlw

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#14237: [PATCH] Fix syntax-propertize-multiline bug
  2013-04-21  6:38 bug#14237: [PATCH] Fix syntax-propertize-multiline bug Erik Charlebois
@ 2013-04-22 14:11 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2013-04-22 14:11 UTC (permalink / raw)
  To: Erik Charlebois; +Cc: 14237-done

> -  (when (get-text-property end 'font-lock-multiline)
> +  (when (get-text-property end 'syntax-multiline)

Duh!  Yes, thank you very much for catching this.
Installed in the `emacs-24' branch.  And sorry for the copy&paste error.


        Stefan





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-22 14:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-21  6:38 bug#14237: [PATCH] Fix syntax-propertize-multiline bug Erik Charlebois
2013-04-22 14:11 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.