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#14089: 24.3; file local variables can't have a colon in their name Date: Wed, 03 Apr 2013 14:14:08 +0200 Message-ID: <87ppybhkvj.fsf@bzg.ath.cx> References: <877gkqqbc6.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1364991308 23848 80.91.229.3 (3 Apr 2013 12:15:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Apr 2013 12:15:08 +0000 (UTC) Cc: 14089@debbugs.gnu.org To: schulte.eric@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 03 14:15:36 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 1UNMbF-0004K3-T6 for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Apr 2013 14:15:34 +0200 Original-Received: from localhost ([::1]:54459 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNMar-0002nb-4c for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Apr 2013 08:15:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNMai-0002iV-E1 for bug-gnu-emacs@gnu.org; Wed, 03 Apr 2013 08:15:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNMah-0007ec-6l for bug-gnu-emacs@gnu.org; Wed, 03 Apr 2013 08:15:00 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNMah-0007eL-2N for bug-gnu-emacs@gnu.org; Wed, 03 Apr 2013 08:14:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UNMde-0005pM-KO for bug-gnu-emacs@gnu.org; Wed, 03 Apr 2013 08:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Bastien Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Apr 2013 12:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14089 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 14089-submit@debbugs.gnu.org id=B14089.136499143822301 (code B ref 14089); Wed, 03 Apr 2013 12:18:02 +0000 Original-Received: (at 14089) by debbugs.gnu.org; 3 Apr 2013 12:17:18 +0000 Original-Received: from localhost ([127.0.0.1]:59509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNMcv-0005nc-CZ for submit@debbugs.gnu.org; Wed, 03 Apr 2013 08:17:18 -0400 Original-Received: from mail-wi0-f179.google.com ([209.85.212.179]:55179) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNMcs-0005nS-Rg for 14089@debbugs.gnu.org; Wed, 03 Apr 2013 08:17:15 -0400 Original-Received: by mail-wi0-f179.google.com with SMTP id hn17so1437685wib.6 for <14089@debbugs.gnu.org>; Wed, 03 Apr 2013 05:14:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-type; bh=Mm1ajbuUmIi7rorMb6psTb4hlUh0TgGfmMfY3apdlJg=; b=svOXIaWN+QGqb9lOvFtPcy+sBXi7YZMMM5IdDX0gpvV61WMfglkDTdEy2ef0G0PT9I CGZhMmzWhu8QeCUUA/l8Nqss1YJv9zdUkKqk2gN4NedSLYVC9TW5ux+1o2jkHaqewSsV S4n50sCg4pIASI/wW2Nn45XmLSLs29PVVJ0LQmrbdVK5CCXPTawKt0fD9nWjgCSUHg0Q fA29bqWtjS9NwOpLU18z6SSc1QCWnN8OFgmGnvx12y3YL/xcrvVFlzDAcXtl8FdEvs8m T3ljFkMQQE8a5mb5iWw1Hoc+tedfq7r2Qeyk3IbISPMaybCZBokoqxJAlvwhaoWLBSp4 K4bg== X-Received: by 10.180.87.170 with SMTP id az10mr2476366wib.3.1364991250327; Wed, 03 Apr 2013 05:14:10 -0700 (PDT) Original-Received: from bzg.localdomain (mar75-2-81-56-68-112.fbx.proxad.net. [81.56.68.112]) by mx.google.com with ESMTPS id fg6sm8709017wib.10.2013.04.03.05.14.08 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Apr 2013 05:14:09 -0700 (PDT) Original-Received: by bzg.localdomain (Postfix, from userid 1000) id 253331C2221B; Wed, 3 Apr 2013 14:14:08 +0200 (CEST) In-Reply-To: <877gkqqbc6.fsf@gmail.com> (schulte eric's message of "Fri, 29 Mar 2013 13:01:45 -0600") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:73105 Archived-At: --=-=-= Content-Type: text/plain Hi Eric, here is an updated patch for handling this. The idea is to allow ":" in mode's names and variables names. No need to use two `looking-at' in this case I think. I'll submit the patch to emacs-devel and apply it if it's good. Thanks, schulte.eric@gmail.com writes: > === modified file 'lisp/files.el' > --- lisp/files.el 2013-03-24 06:42:25 +0000 > +++ lisp/files.el 2013-03-28 23:09:26 +0000 > @@ -3058,7 +3058,11 @@ > (while (and (or (not mode-only) > (not result)) > (< (point) end)) > - (unless (looking-at "[ \t]*\\([^ \t\n:]+\\)[ \t]*:[ \t]*") > + ;; The first of these next two regexs handles the > + ;; case when a variable name includes a ":", such as > + ;; the `org-babel-default-header-args:R' variable. > + (unless (or (looking-at "[ \t]*\\([^ \t\n]?+\\)[ \t]*:[ \t]*") > + (looking-at "[ \t]*\\([^ \t\n:]+\\)[ \t]*:[ \t]*")) > (message "Malformed mode-line") > (throw 'malformed-line nil)) > (goto-char (match-end 0)) --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=files.el.patch === modified file 'lisp/files.el' --- lisp/files.el 2013-03-24 06:42:25 +0000 +++ lisp/files.el 2013-04-03 12:07:47 +0000 @@ -3046,7 +3046,7 @@ result) (cond ((not end) nil) - ((looking-at "[ \t]*\\([^ \t\n\r:;]+\\)\\([ \t]*-\\*-\\)") + ((looking-at "[ \t]*\\([^ \t\n\r;]+\\)\\([ \t]*-\\*-\\)") ;; Simple form: "-*- MODENAME -*-". (if mode-only (intern (concat (match-string 1) "-mode")))) @@ -3058,7 +3058,7 @@ (while (and (or (not mode-only) (not result)) (< (point) end)) - (unless (looking-at "[ \t]*\\([^ \t\n:]+\\)[ \t]*:[ \t]*") + (unless (looking-at "[ \t]*\\([^ \t\n]+\\)[ \t]*:[ \t]*") (message "Malformed mode-line") (throw 'malformed-line nil)) (goto-char (match-end 0)) --=-=-= Content-Type: text/plain -- Bastien --=-=-=--