]> git.eshelyaron.com Git - emacs.git/commit
First "working" version of cacheing comments in a text property.
authorAlan Mackenzie <acm@muc.de>
Tue, 8 Mar 2016 12:47:28 +0000 (12:47 +0000)
committerAlan Mackenzie <acm@muc.de>
Tue, 8 Mar 2016 13:17:14 +0000 (13:17 +0000)
commit7272a47df18873f8583e88c88d38b9c21a96fea4
tree2a4319d0b8d24130598f82d766c6fe5f431fa04d
parent223d16fbf4a48f43ebac075e58ae2e5bd8898d7d
First "working" version of cacheing comments in a text property.

To test this facility, set `comment-cacheing-flag' to non-nil.

* src/buffer.c, src/buffer.h:  Create BVAR variable `comment-depth-hwm'.

* src/insdel.c (signal_after_change): call Ftrim_comment_cache.

* src/syntax.c (comment-depth-hwm): Removed (moved into buffer.c/h).
(scan_sexps_forward): Restore to the previous functionality by removing the
parameter `propertize' and the code which applied text properties.
(Ftrim_comment_cache, syntax_table_value_is_interesting_for_literals)
(check_comment_depth_hwm_for_prop, scan_literals_forward_to): New functions.
(back_comment): Extensive rework.  It now calls old_back_comment only when
`comment-cacheing-flag' is non-nil.
(comment-depth-values): New variable.

* src/syntax.h (check_comment_depth_hwm_for_prop): Exported.

* src/textprop.c (set_properties, add_properties, remove_properties): * call
check_comment_depth_hwm_for_prop.
src/buffer.c
src/buffer.h
src/insdel.c
src/syntax.c
src/syntax.h
src/textprop.c