From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Wiesner Newsgroups: gmane.emacs.devel Subject: Re: CheckDoc and package.el versus file variable prop lines Date: Tue, 26 Feb 2013 14:52:07 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1361886740 2007 80.91.229.3 (26 Feb 2013 13:52:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Feb 2013 13:52:20 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 26 14:52:42 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 1UAKxN-0001dE-Vy for ged-emacs-devel@m.gmane.org; Tue, 26 Feb 2013 14:52:34 +0100 Original-Received: from localhost ([::1]:48594 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAKx3-0002wW-4q for ged-emacs-devel@m.gmane.org; Tue, 26 Feb 2013 08:52:13 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAKwz-0002tg-Qa for emacs-devel@gnu.org; Tue, 26 Feb 2013 08:52:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UAKwy-0006Xv-L2 for emacs-devel@gnu.org; Tue, 26 Feb 2013 08:52:09 -0500 Original-Received: from mail-qa0-f52.google.com ([209.85.216.52]:53578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAKwy-0006Xl-G0 for emacs-devel@gnu.org; Tue, 26 Feb 2013 08:52:08 -0500 Original-Received: by mail-qa0-f52.google.com with SMTP id bs12so2422131qab.18 for ; Tue, 26 Feb 2013 05:52:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=T1nR33PWfsjcQxOnu0JuFSWVCLBib4ara09CzwYCkNg=; b=EfIV2NW3TO1n02mjgMb4ArcgJuMBAcUu8SS4VFHJW144cxu3e2Cj0HmpaIvahBlzP4 iAuNIOBlPnrrQT/MRG50/O0AJ/5l1aBXyfvMfvC0DC4E+p5wDYU2Jh/L1PsSzM8qdogS S7qB7gDhOYiZIKUBtp4WHFo9E7gfT9SvkWdbKX+aMiKbcouycqgqZzocL1atZQOh3Pml 7JL7HRbN3o9W/jSfh5YAjInRd50WFIyrKrLVjW7TKiIbgupwfrW2+S3tNJ+GKwKaC1Mt C8isKwfsrT5vKNyWCTnJ72q8f2sBlWIhsWRMYxv83zTbNILAiV9v8v4G7rBhVemwqExg swzQ== X-Received: by 10.224.9.201 with SMTP id m9mr1917078qam.25.1361886727785; Tue, 26 Feb 2013 05:52:07 -0800 (PST) Original-Received: by 10.224.63.14 with HTTP; Tue, 26 Feb 2013 05:52:07 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.216.52 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:157389 Archived-At: 2013/2/25 Stefan Monnier : >> Doing so, I get a "foo.el" with the following contents: > >> ;; -*- lexical-binding: t; -*- >> ;;; foo.el --- Random stuff > > Please report this via M-x report-emacs-bug (so we get a bug-number for i= t). If I understand you aright, the bug is not in the conflicting requirements for the first line, but simply in that "add-file-local-variable-prop-line" inserts a new line at the beginning of the file instead of appending to the package header line? >> How can I get lexical scoping working for a package, *without* it >> being silently dropped on installation, and *without* checkdoc >> warnings? > > Use > > ;;; foo.el --- Random stuff -*- lexical-binding: t -*- > > It's a bit ugly, especially because it tends to go past the 80-column > limit, but that's the "standard" way to do it (and that's what > add-file-local-variable-prop-line should use in Elisp). Why can't Emacs treat the package header like it treats shebangs, i.e. skip them when searching for the local variable prop line? I mean, in a Python script the following works: #!/bin/sh # -*- coding: utf-8 -*- So can't the following be made to work for Emacs Lisp? ;;; foo.el --- Random stuff ;; -*- lexical-binding: t -*- This is way prettier=E2=80=A6