unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Sebastian Wiesner <lunaryorn@gmail.com>
To: emacs-devel@gnu.org
Subject: CheckDoc and package.el versus file variable prop lines
Date: Mon, 25 Feb 2013 17:48:38 +0100	[thread overview]
Message-ID: <CALf2awSMWhFiuJqawVcO3eHsRyS0ADcKVLgRkP3LCsh53ViiGg@mail.gmail.com> (raw)

Hello,

I am observing a little fight between package.el and Checkdoc on the
one side, or generally packaging conventions, and local file
variables, most notably "lexical-binding".

According to the documentation, "lexical-binding" must be set in the
*first line* the file, e.g. by "add-file-local-variable-prop-line".

Doing so, I get a "foo.el" with the following contents:

;; -*- lexical-binding: t; -*-
;;; foo.el --- Random stuff

;; Author: Sebastian Wiesner <lunaryorn@gmail.com>
;; Version: 0.1

;;; Code:

(message "Hello world")

(provide 'foo)

;;; foo.el ends here

However, on GNU Emacs 24.2.93.1 "C-x u M-x checkdoc-current-buffer"
prints the following warnings:

*** foo.el: checkdoc-current-buffer V 0.6.1
foo.el:0: The first line should be of the form: ";;; package --- Summary"
foo.el:0: You should have a section marked ";;; Commentary:"

Note the first warning.  It complains about "foo.el" not having a
proper package header on the *first line*.

Moreover, if I install "foo.el" with "package-install-file" everything
before the package header is *dropped*, i.e. the whole file variable
line is simply omitted, silently reverting my lexically scoped code
back to dynamic scoping *without any warning*.

So obviously both, "package.el" and Checkdoc on the on side, and file
local variables on the side, rigidly claim the first line of the file
for their own purposes, creating an unsolvable conflict for me.

How can I get lexical scoping working for a package, *without* it
being silently dropped on installation, and *without* checkdoc
warnings?

Greetings,
Sebastian Wiesner



             reply	other threads:[~2013-02-25 16:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-25 16:48 Sebastian Wiesner [this message]
2013-02-25 19:37 ` CheckDoc and package.el versus file variable prop lines Glenn Morris
2013-02-26 13:48   ` Sebastian Wiesner
2013-02-25 20:13 ` Stefan Monnier
2013-02-25 22:53   ` Xue Fuqiao
2013-02-25 23:01     ` Christopher Schmidt
2013-02-26 10:39       ` Xue Fuqiao
2013-02-26  0:00     ` Stefan Monnier
2013-02-26 13:52   ` Sebastian Wiesner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALf2awSMWhFiuJqawVcO3eHsRyS0ADcKVLgRkP3LCsh53ViiGg@mail.gmail.com \
    --to=lunaryorn@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).