From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#12259: Add delete-trailing-whitespace to list of safe eval forms Date: Wed, 22 Aug 2012 12:24:43 -0400 Message-ID: <3v7gsq99o4.fsf@fencepost.gnu.org> References: <87r4r1e7i1.fsf@santiago.tweag.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1345652750 5463 80.91.229.3 (22 Aug 2012 16:25:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Aug 2012 16:25:50 +0000 (UTC) Cc: Mathieu Boespflug , 12259@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 22 18:25:48 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T4DkU-0008MM-Nl for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Aug 2012 18:25:42 +0200 Original-Received: from localhost ([::1]:35905 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4DkS-0004Bq-PV for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Aug 2012 12:25:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4DkP-00048b-RG for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2012 12:25:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4DkO-00071V-Rc for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2012 12:25:37 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4DkO-00071N-Kg for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2012 12:25:36 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T4Dkn-00038w-Ld for bug-gnu-emacs@gnu.org; Wed, 22 Aug 2012 12:26:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Aug 2012 16:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12259 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12259-submit@debbugs.gnu.org id=B12259.134565271212020 (code B ref 12259); Wed, 22 Aug 2012 16:26:01 +0000 Original-Received: (at 12259) by debbugs.gnu.org; 22 Aug 2012 16:25:12 +0000 Original-Received: from localhost ([127.0.0.1]:43582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T4Djz-00037n-7N for submit@debbugs.gnu.org; Wed, 22 Aug 2012 12:25:11 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:38672) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T4Djx-00037h-FB for 12259@debbugs.gnu.org; Wed, 22 Aug 2012 12:25:10 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1T4DjX-0001Xo-Cn; Wed, 22 Aug 2012 12:24:43 -0400 X-Spook: enigma Leitrim infowar Bin Laden Mantis Hamas chameleon X-Ran: MiPBnMEY:~i^D"Ju}O94'U:|>W0+Y"X{X'>y{p_jk'YP>6JN^soA>$"{1i4{lIE:L!{*U9 X-Hue: yellow X-Attribution: GM In-Reply-To: (Stefan Monnier's message of "Wed, 22 Aug 2012 10:36:29 -0400") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:63396 Archived-At: 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.