emacs-devel
[Top][All Lists]
Advanced

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

Re: CheckDoc and package.el versus file variable prop lines


From: Sebastian Wiesner
Subject: Re: CheckDoc and package.el versus file variable prop lines
Date: Tue, 26 Feb 2013 14:52:07 +0100

2013/2/25 Stefan Monnier <address@hidden>:
>> 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 it).

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…



reply via email to

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