From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Newsgroups: gmane.emacs.devel Subject: [Patch] Correctly handle file local variables containing a ":" Date: Wed, 03 Apr 2013 14:17:35 +0200 Message-ID: <87li8zhkps.fsf@bzg.ath.cx> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1364991483 26832 80.91.229.3 (3 Apr 2013 12:18:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Apr 2013 12:18:03 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 03 14:18:29 2013 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 1UNMe1-0006C5-Vu for ged-emacs-devel@m.gmane.org; Wed, 03 Apr 2013 14:18:26 +0200 Original-Received: from localhost ([::1]:54744 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNMdd-0003Af-6I for ged-emacs-devel@m.gmane.org; Wed, 03 Apr 2013 08:18:01 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNMdT-0003AH-5N for emacs-devel@gnu.org; Wed, 03 Apr 2013 08:17:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNMdQ-0000Nw-MV for emacs-devel@gnu.org; Wed, 03 Apr 2013 08:17:51 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:60297) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNMdQ-0000NU-CH for emacs-devel@gnu.org; Wed, 03 Apr 2013 08:17:48 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UNMdm-0005z0-13 for emacs-devel@gnu.org; Wed, 03 Apr 2013 14:18:10 +0200 Original-Received: from mar75-2-81-56-68-112.fbx.proxad.net ([81.56.68.112]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Apr 2013 14:18:10 +0200 Original-Received: from bzg by mar75-2-81-56-68-112.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Apr 2013 14:18:10 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 51 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: mar75-2-81-56-68-112.fbx.proxad.net User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:6RFZenHWfpAGPfoHs15NiL7hPrA= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:158585 Archived-At: --=-=-= Content-Type: text/plain Hi, this patch handles the issue reported by Eric here: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14089 The idea is to allow setting file local variables which contain a ":" in their names, as this seems to be allowed. If no-one objects, I'll apply this in two days. Thanks, --=-=-= Content-Type: text/x-patch Content-Disposition: inline; 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 --=-=-=--