From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Newsgroups: gmane.emacs.bugs Subject: bug#16390: 24.3.50; [PATCH] texinfo-mode does not fontify @math{2^{61}} correctly Date: Wed, 08 Jan 2014 00:32:07 +0100 Message-ID: <87iotvz7uw.fsf@bzg.ath.cx> References: <87k3ebekg6.fsf@bzg.ath.cx> <68wqibh513.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1389137599 23668 80.91.229.3 (7 Jan 2014 23:33:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Jan 2014 23:33:19 +0000 (UTC) Cc: 16390@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 08 00:33:25 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1W0g97-0005t1-Pf for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Jan 2014 00:33:18 +0100 Original-Received: from localhost ([::1]:44073 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0g97-0001eM-Ds for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Jan 2014 18:33:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0g8y-0001aF-GT for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 18:33:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0g8s-0007ZB-LE for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 18:33:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55877) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0g8s-0007Z7-I6 for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 18:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W0g8s-00014V-6B for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 18:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Bastien Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Jan 2014 23:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16390 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16390-submit@debbugs.gnu.org id=B16390.13891375364043 (code B ref 16390); Tue, 07 Jan 2014 23:33:02 +0000 Original-Received: (at 16390) by debbugs.gnu.org; 7 Jan 2014 23:32:16 +0000 Original-Received: from localhost ([127.0.0.1]:41663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W0g87-000136-IP for submit@debbugs.gnu.org; Tue, 07 Jan 2014 18:32:15 -0500 Original-Received: from mail-wi0-f178.google.com ([209.85.212.178]:47084) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W0g84-00012u-Sx for 16390@debbugs.gnu.org; Tue, 07 Jan 2014 18:32:13 -0500 Original-Received: by mail-wi0-f178.google.com with SMTP id bz8so1395973wib.11 for <16390@debbugs.gnu.org>; Tue, 07 Jan 2014 15:32:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=tIForOwXUwydAgGybTKRNT7lt7UnWv5f0ZO1M9bEedQ=; b=SIFSr4cf7W/NvnhPsu7VIX/4IXrmQpKA+NM4RT+WXEp8drFdjDJdhwMUvG4bBSvE+t td3xg1iy7HRWs7LEN5fqZwcZSpGp+pjObxgwKmwTl/JuutOx/c0tm549qG7tUh2aVS6F 3JXvTh3nuFJ+r2g7FM4aKhV1CE0M8966iLF40HjhSAmXEUyAGpncLqSaObdx38eAX/qT LTboDxM++IJiiO45Vh0KifqAkb8TtRMZw0XOh/5nslu1H8dftJZztQvkBxaMUCLDCIu7 Cl2Pqg/n9a0gsP+tRnOZBOIDnb+dLsp63sq1asBTECZdD+qTX6p6bvyxxyCLYN9JJKcr 8FNw== X-Received: by 10.180.108.162 with SMTP id hl2mr18791682wib.56.1389137532020; Tue, 07 Jan 2014 15:32:12 -0800 (PST) Original-Received: from bzg.localdomain (mar75-2-81-56-68-112.fbx.proxad.net. [81.56.68.112]) by mx.google.com with ESMTPSA id nc20sm5924450wic.9.2014.01.07.15.32.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jan 2014 15:32:10 -0800 (PST) Original-Received: by bzg.localdomain (Postfix, from userid 1000) id EE4811C20717; Wed, 8 Jan 2014 00:32:07 +0100 (CET) In-Reply-To: <68wqibh513.fsf@fencepost.gnu.org> (Glenn Morris's message of "Tue, 07 Jan 2014 16:10:32 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:83149 Archived-At: --=-=-= Content-Type: text/plain Glenn Morris writes: > Bastien Guerry wrote: > >> The patch fixes this for @math only. > > No it doesn't. > Even if you fix the obvious 2/1 typo that makes it raise an error during > redisplay, it will make lines like > > @math{e} is used. If @var{arg} or @var{base} is negative, @code{log} > > look awful. Yes. Attached is another patch that works, but looks ugly. Let me know if there is another more elegant way to check for the optional presence of balanced curly brace. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=texinfo.el.patch === modified file 'lisp/textmodes/texinfo.el' *** lisp/textmodes/texinfo.el 2014-01-01 07:43:34 +0000 --- lisp/textmodes/texinfo.el 2014-01-07 23:20:40 +0000 *************** *** 366,373 **** ;; their arguments frequently include a @@, and we don't want that ;; to overwrite the normal fontification of the argument. ("@\\(file\\|email\\){\\([^}]+\\)" 2 font-lock-string-face keep) ! ("@\\(samp\\|code\\|var\\|math\\|env\\|command\\|option\\){\\([^}]+\\)" 2 font-lock-variable-name-face keep) ("@\\(cite\\|x?ref\\|pxref\\|dfn\\|inforef\\){\\([^}]+\\)" 2 font-lock-constant-face) ("@\\(anchor\\){\\([^}]+\\)" 2 font-lock-type-face) --- 366,375 ---- ;; their arguments frequently include a @@, and we don't want that ;; to overwrite the normal fontification of the argument. ("@\\(file\\|email\\){\\([^}]+\\)" 2 font-lock-string-face keep) ! ("@\\(samp\\|code\\|var\\|env\\|command\\|option\\){\\([^}]+\\)" 2 font-lock-variable-name-face keep) + ;; @math allows nested braces like @math{2^{12}} + ("@math{\\([^{}]*{?[^{}]*}?[^{}]*\\)}" 1 font-lock-variable-name-face) ("@\\(cite\\|x?ref\\|pxref\\|dfn\\|inforef\\){\\([^}]+\\)" 2 font-lock-constant-face) ("@\\(anchor\\){\\([^}]+\\)" 2 font-lock-type-face) --=-=-= Content-Type: text/plain -- Bastien --=-=-=--