From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#14595: Erroneous composition of lambda in emacs-lisp buffers with prog-prettify-symbols enabled Date: Sat, 15 Jun 2013 19:35:38 +0200 Message-ID: References: <83fvwjvje3.fsf@gnu.org> <83ehc3viss.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1371317829 4836 80.91.229.3 (15 Jun 2013 17:37:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Jun 2013 17:37:09 +0000 (UTC) Cc: 14595@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 15 19:37:08 2013 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 1UnuPU-0006zv-8A for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Jun 2013 19:37:08 +0200 Original-Received: from localhost ([::1]:47579 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnuPT-0002zi-RV for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Jun 2013 13:37:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnuPP-0002zb-PW for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2013 13:37:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UnuPO-0004DL-L7 for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2013 13:37:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33900) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnuPO-0004DG-HB for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2013 13:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UnuPN-0001Hk-Pj for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2013 13:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Jun 2013 17:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14595 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14595-submit@debbugs.gnu.org id=B14595.13713177874843 (code B ref 14595); Sat, 15 Jun 2013 17:37:01 +0000 Original-Received: (at 14595) by debbugs.gnu.org; 15 Jun 2013 17:36:27 +0000 Original-Received: from localhost ([127.0.0.1]:46799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UnuOo-0001G2-Nv for submit@debbugs.gnu.org; Sat, 15 Jun 2013 13:36:27 -0400 Original-Received: from mail-ea0-f169.google.com ([209.85.215.169]:44531) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UnuOm-0001FS-2S for 14595@debbugs.gnu.org; Sat, 15 Jun 2013 13:36:24 -0400 Original-Received: by mail-ea0-f169.google.com with SMTP id h15so968909eak.28 for <14595@debbugs.gnu.org>; Sat, 15 Jun 2013 10:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=6asI0jZrEGk+D6saK444JF5jgAz+aEwbUVC3FpiFEos=; b=u2lEdKNRRM559+XnN0P+TytxqpjF0fg4LwhoRGJctkM3Xun4yYYmSySzIFsldY4mmj zeOXP8GX4M0Fp/6rSUr20/+jQFFBylnW4M36OLaqUwBwOfj2lpB314hFtMnUUImFhntj orQPn/r3e4o2hHXHemWh581OLQ3KRPgDd/aN4NLPBkC59I790txdfTemYyVtKSaRacwj ju4jAWwtBJwaAUUutJ+EgDGoqa+J+Y0NEqw96hthVYUoMp9O3XOSFz0IUEmSEIlbKp8S OkuQjHKqBZjm6q6v6Vqk6qIGyiEE2RaNALXcC3UwfVli5xe58BcVtFbrbdddM/Pjv4HX 9H4w== X-Received: by 10.15.36.133 with SMTP id i5mr8917333eev.52.1371317778176; Sat, 15 Jun 2013 10:36:18 -0700 (PDT) Original-Received: by 10.14.142.4 with HTTP; Sat, 15 Jun 2013 10:35:38 -0700 (PDT) In-Reply-To: <83ehc3viss.fsf@gnu.org> 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:75168 Archived-At: On Sat, Jun 15, 2013 at 11:12 AM, Eli Zaretskii wrote: > The incorrect display happens when the underlined part below > > (compose-region start end (cdr (assoc (match-string 0) alist))))) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > is nil. When that happens, (match-string 0) is "(", the left > parenthesis, not the expected "lambda". The call to syntax-ppss inside prog--prettify-font-lock-compose-symbol is altering the match-string data. I saved (match-string 0) in the let* as ms0, and then for the erroneous lines I get this log: start = 2507 / end = 2513 / (match-string 0) = #("(" 0 1 (fontified t)) / ms0 = #("lambda" 0 6 (fontified t)) / alist = (("lambda" . 955)) so it was correct when the function was called. Then I wrapped the syntax-ppss call inside save-match-data and the bug disappears. > I hope fontification gurus will be able to tell us why this could > happen. Yep.