From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathieu Boespflug Newsgroups: gmane.emacs.bugs Subject: bug#12259: Add delete-trailing-whitespace to list of safe eval forms Date: Thu, 23 Aug 2012 09:00:37 -0400 Message-ID: <87sjbdvk3u.fsf@santiago.tweag.net> References: <87r4r1e7i1.fsf@santiago.tweag.net> <87r4qyao3g.fsf@santiago.tweag.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1345727095 11322 80.91.229.3 (23 Aug 2012 13:04:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Aug 2012 13:04:55 +0000 (UTC) Cc: 12259@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 23 15:04:55 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 1T4X5e-0004Sx-Rc for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Aug 2012 15:04:50 +0200 Original-Received: from localhost ([::1]:51169 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4X5d-000832-8X for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Aug 2012 09:04:49 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4X5W-00082f-5U for bug-gnu-emacs@gnu.org; Thu, 23 Aug 2012 09:04:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4X5M-00020f-Lq for bug-gnu-emacs@gnu.org; Thu, 23 Aug 2012 09:04:42 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35194) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4X5M-00020Z-IU for bug-gnu-emacs@gnu.org; Thu, 23 Aug 2012 09:04:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T4X5q-0000lB-Al for bug-gnu-emacs@gnu.org; Thu, 23 Aug 2012 09:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mathieu Boespflug Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Aug 2012 13:05:02 +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.13457270432857 (code B ref 12259); Thu, 23 Aug 2012 13:05:02 +0000 Original-Received: (at 12259) by debbugs.gnu.org; 23 Aug 2012 13:04:03 +0000 Original-Received: from localhost ([127.0.0.1]:44740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T4X4s-0000jo-2s for submit@debbugs.gnu.org; Thu, 23 Aug 2012 09:04:03 -0400 Original-Received: from mail-iy0-f172.google.com ([209.85.210.172]:56502) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <0xbadcode@gmail.com>) id 1T4X4p-0000jc-Mx for 12259@debbugs.gnu.org; Thu, 23 Aug 2012 09:04:00 -0400 Original-Received: by iabz21 with SMTP id z21so1301947iab.3 for <12259@debbugs.gnu.org>; Thu, 23 Aug 2012 06:03:28 -0700 (PDT) Original-Received: by 10.42.156.1 with SMTP id x1mr1124662icw.51.1345727008787; Thu, 23 Aug 2012 06:03:28 -0700 (PDT) Original-Received: from santiago.tweag.net ([216.252.64.250]) by mx.google.com with ESMTPS id at10sm10553722igc.16.2012.08.23.06.03.22 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Aug 2012 06:03:24 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Thu, 23 Aug 2012 08:19:41 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) 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:63426 Archived-At: > I've just installed the patch below in the emacs-24 branch. Thanks Stefan. That should do the trick. -- Mathieu > === modified file 'lisp/files.el' > --- lisp/files.el 2012-08-15 16:29:11 +0000 > +++ lisp/files.el 2012-08-23 12:15:31 +0000 > @@ -2837,7 +2837,8 @@ > ;; This should be here at least as long as Emacs supports write-file-hooks. > '((add-hook 'write-file-hooks 'time-stamp) > (add-hook 'write-file-functions 'time-stamp) > - (add-hook 'before-save-hook 'time-stamp)) > + (add-hook 'before-save-hook 'time-stamp nil t) > + (add-hook 'before-save-hook 'delete-trailing-whitespace nil t)) > "Expressions that are considered safe in an `eval:' local variable. > Add expressions to this list if you want Emacs to evaluate them, when > they appear in an `eval' local variable specification, without first