unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* `safe-local-variable' updates for Common Lisp programmers
@ 2006-11-14 22:55 Edward O'Connor
  2006-11-14 23:39 ` Stefan Monnier
  2006-11-15 22:59 ` Richard Stallman
  0 siblings, 2 replies; 9+ messages in thread
From: Edward O'Connor @ 2006-11-14 22:55 UTC (permalink / raw)


Hi,

Andreas Fuchs recently pointed out[0] that Common Lisp files often have
a file-local variables section which specifies the package and syntax of
the code in the file. For example:

           -*- mode: lisp; package: cl-user; syntax: ansi -*-

Andreas does the following in his .emacs; perhaps these should be the
default (at least, for files in lisp-mode)?

,----
| (put 'package 'safe-local-variable 'symbolp)
| (put 'Package 'safe-local-variable 'symbolp)
| (put 'syntax 'safe-local-variable 'symbolp)
| (put 'Syntax 'safe-local-variable 'symbolp)
| (put 'Base 'safe-local-variable 'integerp)
| (put 'base 'safe-local-variable 'integerp)
`----


Ted

0. http://boinkor.net/archives/2006/11/three_useful_emacs_hacks_for_l.html

-- 
Edward O'Connor
hober0@gmail.com

Ense petit placidam sub libertate quietem.

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

* Re: `safe-local-variable' updates for Common Lisp programmers
  2006-11-14 22:55 `safe-local-variable' updates for Common Lisp programmers Edward O'Connor
@ 2006-11-14 23:39 ` Stefan Monnier
  2006-11-15 22:59 ` Richard Stallman
  1 sibling, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2006-11-14 23:39 UTC (permalink / raw)
  Cc: emacs-devel

> Andreas Fuchs recently pointed out[0] that Common Lisp files often have
> a file-local variables section which specifies the package and syntax of
> the code in the file. For example:

>            -*- mode: lisp; package: cl-user; syntax: ansi -*-

> Andreas does the following in his .emacs; perhaps these should be the
> default (at least, for files in lisp-mode)?

> ,----
> | (put 'package 'safe-local-variable 'symbolp)
> | (put 'Package 'safe-local-variable 'symbolp)
> | (put 'syntax 'safe-local-variable 'symbolp)
> | (put 'Syntax 'safe-local-variable 'symbolp)
> | (put 'Base 'safe-local-variable 'integerp)
> | (put 'base 'safe-local-variable 'integerp)
> `----

Why do people set those vars like you show?  I.e. which piece of code makes
use of that?


        Stefan

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

* Re: `safe-local-variable' updates for Common Lisp programmers
  2006-11-14 22:55 `safe-local-variable' updates for Common Lisp programmers Edward O'Connor
  2006-11-14 23:39 ` Stefan Monnier
@ 2006-11-15 22:59 ` Richard Stallman
  2006-11-18  0:14   ` Johan Bockgård
  1 sibling, 1 reply; 9+ messages in thread
From: Richard Stallman @ 2006-11-15 22:59 UTC (permalink / raw)
  Cc: emacs-devel

If we do mark these variables as safe, we had better defvar them too,
so that people won't think it is ok to define them for some other
meaning.

Another idea is to define something meaning "ignore this variable",
which would mean "don't bind the variable and don't complain about it
either."

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

* Re: `safe-local-variable' updates for Common Lisp programmers
  2006-11-15 22:59 ` Richard Stallman
@ 2006-11-18  0:14   ` Johan Bockgård
  2006-11-18 16:05     ` Richard Stallman
  0 siblings, 1 reply; 9+ messages in thread
From: Johan Bockgård @ 2006-11-18  0:14 UTC (permalink / raw)


Richard Stallman <rms@gnu.org> writes:

> Another idea is to define something meaning "ignore this variable",
> which would mean "don't bind the variable and don't complain about
> it either."

Well...

 -- Variable: ignored-local-variables
     This variable holds a list of variables that should not be given
     local values by files.  Any value specified for one of these
     variables is completely ignored.

-- 
Johan Bockgård

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

* Re: `safe-local-variable' updates for Common Lisp programmers
  2006-11-18  0:14   ` Johan Bockgård
@ 2006-11-18 16:05     ` Richard Stallman
  2006-11-19 17:57       ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Stallman @ 2006-11-18 16:05 UTC (permalink / raw)
  Cc: emacs-devel

How about adding those to ignored-local-variables?

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

* Re: `safe-local-variable' updates for Common Lisp programmers
  2006-11-18 16:05     ` Richard Stallman
@ 2006-11-19 17:57       ` Stefan Monnier
  2006-11-20 12:59         ` Richard Stallman
  2006-11-20 16:08         ` Johan Bockgård
  0 siblings, 2 replies; 9+ messages in thread
From: Stefan Monnier @ 2006-11-19 17:57 UTC (permalink / raw)
  Cc: emacs-devel, Johan Bockgård

> How about adding those to ignored-local-variables?

Before we do that, could someone reply to my question:

What are those variable settings used for?
I.e. which program/package/thing makes use of them?

As long as we don't know that, it's impossible to know what's the
best solution.


        Stefan

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

* Re: `safe-local-variable' updates for Common Lisp programmers
  2006-11-19 17:57       ` Stefan Monnier
@ 2006-11-20 12:59         ` Richard Stallman
  2006-11-20 15:37           ` Stefan Monnier
  2006-11-20 16:08         ` Johan Bockgård
  1 sibling, 1 reply; 9+ messages in thread
From: Richard Stallman @ 2006-11-20 12:59 UTC (permalink / raw)
  Cc: bojohan+news, emacs-devel

    > How about adding those to ignored-local-variables?

    Before we do that, could someone reply to my question:

    What are those variable settings used for?
    I.e. which program/package/thing makes use of them?

Why does it make a difference?  As long as the use isn't in Emacs, I
think the answer doesn't matter for us.

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

* Re: `safe-local-variable' updates for Common Lisp programmers
  2006-11-20 12:59         ` Richard Stallman
@ 2006-11-20 15:37           ` Stefan Monnier
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2006-11-20 15:37 UTC (permalink / raw)
  Cc: bojohan+news, Edward O'Connor, emacs-devel

>> How about adding those to ignored-local-variables?
>     Before we do that, could someone reply to my question:

>     What are those variable settings used for?
>     I.e. which program/package/thing makes use of them?

> Why does it make a difference?  As long as the use isn't in Emacs, I
> think the answer doesn't matter for us.

We don't even know if the use is in Emacs or not.

And if the OP can't be bothered to answer my question, I don't see why we
should go through the trouble to try and solve what he claims to be
a problem (do we even know it's a real problem, and not a pilot error?).


        Stefan

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

* Re: `safe-local-variable' updates for Common Lisp programmers
  2006-11-19 17:57       ` Stefan Monnier
  2006-11-20 12:59         ` Richard Stallman
@ 2006-11-20 16:08         ` Johan Bockgård
  1 sibling, 0 replies; 9+ messages in thread
From: Johan Bockgård @ 2006-11-20 16:08 UTC (permalink / raw)


Stefan Monnier <monnier@iro.umontreal.ca> writes:

> What are those variable settings used for?
> I.e. which program/package/thing makes use of them?

Zmacs

http://groups.google.com/group/comp.lang.lisp/msg/52772f9112d303ad

http://groups.google.com/group/comp.lang.lisp/msg/42d31490dae262fb

-- 
Johan Bockgård

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

end of thread, other threads:[~2006-11-20 16:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-14 22:55 `safe-local-variable' updates for Common Lisp programmers Edward O'Connor
2006-11-14 23:39 ` Stefan Monnier
2006-11-15 22:59 ` Richard Stallman
2006-11-18  0:14   ` Johan Bockgård
2006-11-18 16:05     ` Richard Stallman
2006-11-19 17:57       ` Stefan Monnier
2006-11-20 12:59         ` Richard Stallman
2006-11-20 15:37           ` Stefan Monnier
2006-11-20 16:08         ` Johan Bockgård

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