|
From: | Stefan Monnier |
Subject: | Re: [Emacs-diffs] master d7df36e: Rewrite elisp--xref-find-definitions to handle many more cases; add tests. |
Date: | Tue, 11 Aug 2015 12:25:18 -0400 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
>> -(defvar elisp--xref-format >> +(defconst elisp--xref-format >> (let ((str "(%s %s)")) >> (put-text-property 1 3 'face 'font-lock-keyword-face str) >> (put-text-property 4 6 'face 'font-lock-function-name-face str) >> str)) > I'm not sure which part of the change did that, but now I don't see the > colors in the output. I can shed some light here: - because it's now a defconst, the value is purecopy'd (since elisp-mode is preloaded). - purecopy currently doesn't know how to copy string's text properties so they're just thrown away. I know because I bumped into that a few times in the last year or so. So the quick fix is to use `defvar' (which doesn't purecopy its value), and the better fix would be to improve purecopy to not throw away those properties. Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |