From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 188f657: Fix false negatives in tex--prettify-symbols-compose-p. Date: Sat, 26 Sep 2015 00:54:49 -0400 Message-ID: References: <20150925210512.18505.12538@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1443243308 24150 80.91.229.3 (26 Sep 2015 04:55:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Sep 2015 04:55:08 +0000 (UTC) Cc: Tassilo Horn To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 26 06:55:00 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZfhVi-0005eV-Hi for ged-emacs-devel@m.gmane.org; Sat, 26 Sep 2015 06:54:58 +0200 Original-Received: from localhost ([::1]:51926 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfhVh-0004d5-T4 for ged-emacs-devel@m.gmane.org; Sat, 26 Sep 2015 00:54:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfhVe-0004cx-OM for emacs-devel@gnu.org; Sat, 26 Sep 2015 00:54:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfhVb-0008Hr-Fg for emacs-devel@gnu.org; Sat, 26 Sep 2015 00:54:54 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:56196) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfhVb-0008Gy-BM; Sat, 26 Sep 2015 00:54:51 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AwFgA731xV/2yixEVcgxCEAoVVu0CHSwQCAoE8OxIBAQEBAQEBgQpBBYNdAQEEViMQCzQSFBgNiGPPIwEBAQcBAQEBHos6hQUHFoQXAQSQNKMLgUUjgWZVgVkigngBAQE X-IPAS-Result: A0AwFgA731xV/2yixEVcgxCEAoVVu0CHSwQCAoE8OxIBAQEBAQEBgQpBBYNdAQEEViMQCzQSFBgNiGPPIwEBAQcBAQEBHos6hQUHFoQXAQSQNKMLgUUjgWZVgVkigngBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="165890304" Original-Received: from 69-196-162-108.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([69.196.162.108]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 26 Sep 2015 00:54:50 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id B8DE0AE124; Sat, 26 Sep 2015 00:54:49 -0400 (EDT) In-Reply-To: (Tassilo Horn's message of "Fri, 25 Sep 2015 21:05:12 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:190350 Archived-At: > - ;; 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"