emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CheckDoc and package.el versus file variable prop lines


From: Sebastian Wiesner
Subject: CheckDoc and package.el versus file variable prop lines
Date: Mon, 25 Feb 2013 17:48:38 +0100

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 <address@hidden>
;; 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 via email to

[Prev in Thread] Current Thread [Next in Thread]