[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master 188f657: Fix false negatives in tex--prettify-s
From: |
Stefan Monnier |
Subject: |
Re: [Emacs-diffs] master 188f657: Fix false negatives in tex--prettify-symbols-compose-p. |
Date: |
Sat, 26 Sep 2015 00:54:49 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> - ;; Don't compose inside verbatim blocks!
> - (nth 8 (syntax-ppss))
[...]
> + ;; Don't compose inside verbatim blocks.
> + (let* ((face (get-text-property end 'face))
> + (faces (if (consp face) face (list face))))
> + (or (memq 'tex-verbatim faces)
> + (memq 'font-latex-verbatim-face faces)))))))
Rather than check the `face' property, I think it'd be more robust to
use the (syntax-ppss) data. Since tex-env-mark uses "< c" for the
syntax of \begin{verbatim}, A test like
(eq 2 (nth 7 (syntax-ppss)))
should do the trick.
Stefan "at least for the non-font-latex case"
- Re: [Emacs-diffs] master 188f657: Fix false negatives in tex--prettify-symbols-compose-p.,
Stefan Monnier <=