GNU bug report logs - #12259
[Mathieu Boespflug] Add delete-trailing-whitespace to list of safe eval forms

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Wed, 22 Aug 2012 13:20:02 UTC

Severity: wishlist

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 12259 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 12259 <at> debbugs.gnu.org, Mathieu Boespflug <mboes <at> tweag.net>
Subject: Re: bug#12259: Add delete-trailing-whitespace to list of safe eval
	forms
Date: Wed, 22 Aug 2012 12:24:43 -0400
Stefan Monnier wrote:

> Actually, I wonder whether we want to accept/encourage those uses
> instead of (add-hook 'before-save-hook 'delete-trailing-whitespace).

OT: I wouldn't encourage that either. :)
Blind application of such a hook has removed trailing whitespace that
was supposed to be there in the Emacs sources a few times.

> You don't have to write patches like this one.  You can just customize
> safe-local-eval-forms.  There is a problem, indeed, tho: if you
> customize this var and we later add things to it, you'll keep using your
> customized version and won't benefit from the expanded list.
> So we should keep the default value of safe-local-eval-forms as nil, and
> allow things like those add-hook some other way (e.g. a new var).

(add-to-list 'safe-local-eval-forms ...)

There's also the long-standing Todo item to create a "diff-list" custom
type http://debbugs.gnu.org/7812, and use it for such things.




This bug report was last modified 12 years and 272 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.