branch: elpa/flamegraph
commit e7533da0748b2deaabcd73827dacefd0e0ab9660
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>

    Propertize the search region before anchoring call sites
    
    flamegraph--collect-nested-call-sites uses `\_<...\_>' searches that
    depend on syntax-table text properties (e.g. rbspy's `gsub!'/`any?'
    need ruby-mode to mark `!'/`?' as symbol constituents).  Apply them
    explicitly: only Emacs 31's regexp engine triggers syntax-propertize
    on demand during a match; on Emacs 30 the searches silently miss.
    
    Emacs commit 6942d508f0c (bug#80600) made it optional there: by
    deferring RE_SETUP_SYNTAX_TABLE_FOR_OBJECT's initialization, a regexp
    match now propertizes its region on first syntax access, like the
    sexp scanners already did.
---
 flamegraph.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/flamegraph.el b/flamegraph.el
index 3bad38fe71..0e8b96f948 100644
--- a/flamegraph.el
+++ b/flamegraph.el
@@ -767,6 +767,7 @@ as `lambda', using the same source anchoring flow as named 
functions; if no
 lambda form is found, the object itself is still shown as an unanchored
 callback frame.  SHOWN ignores the threshold, so the tree may show cold
 callees the snippet omits."
+  (syntax-propertize end)
   (let ((total (max 1 (profiler-calltree-count node)))
         regions)
     (cl-labels

Reply via email to