unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* CheckDoc and package.el versus file variable prop lines
@ 2013-02-25 16:48 Sebastian Wiesner
  2013-02-25 19:37 ` Glenn Morris
  2013-02-25 20:13 ` Stefan Monnier
  0 siblings, 2 replies; 9+ messages in thread
From: Sebastian Wiesner @ 2013-02-25 16:48 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-02-26 13:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-25 16:48 CheckDoc and package.el versus file variable prop lines Sebastian Wiesner
2013-02-25 19:37 ` 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

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).