From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Skip Montanaro Newsgroups: gmane.emacs.help Subject: Re: Temporarily suppress a hook? Date: Sun, 8 Jul 2018 20:39:47 -0500 Message-ID: References: <3b2c670c-e07e-4a35-a2a4-f933e23329f2@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1531100303 26809 195.159.176.226 (9 Jul 2018 01:38:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 9 Jul 2018 01:38:23 +0000 (UTC) Cc: Help GNU Emacs To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 09 03:38:19 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcL86-0006u1-Vw for geh-help-gnu-emacs@m.gmane.org; Mon, 09 Jul 2018 03:38:19 +0200 Original-Received: from localhost ([::1]:38844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcLAD-0005RX-SQ for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Jul 2018 21:40:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcL9l-0005RQ-Vu for help-gnu-emacs@gnu.org; Sun, 08 Jul 2018 21:40:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcL9l-0000Bh-4h for help-gnu-emacs@gnu.org; Sun, 08 Jul 2018 21:40:01 -0400 Original-Received: from mail-pf0-x22b.google.com ([2607:f8b0:400e:c00::22b]:42754) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fcL9k-0000BQ-Tz for help-gnu-emacs@gnu.org; Sun, 08 Jul 2018 21:40:01 -0400 Original-Received: by mail-pf0-x22b.google.com with SMTP id l9-v6so804055pff.9 for ; Sun, 08 Jul 2018 18:40:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/ddw5lU5ex292Ymd93CnQUkyLqScnjEno6mFIbNOlK0=; b=A/EhqlFIRFb6E3VUK4IiV5wL5+5xD8HsA+ammYuZkO37nE/PO3QNAbBhJkYBUh2Fmg 0O5e3GS/oh/vbhotfy+U86qaG+iYxWZZ4jPuUS0OfMeaDkUTa6MTWlhmB3EM8h2vvNgT RjudVnLR/fG3iy59THqImiWQ68ubhQSB3ReNYJphYHFvcv25lRUV/uAnEQ2Xm5tPdsLj pVPHn4rLBoxh1haS3LDZ5pV36wRvgcvZtpUpumzZXsemCTqUy1/O+E/HfLnv8CjyE9Du +MMMdC9uFggIGCb5JDF7y0KepjNIQPXja/LTA1VzyzN7J3PIO6DW04Lf+mUBFhx12U2d K9Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/ddw5lU5ex292Ymd93CnQUkyLqScnjEno6mFIbNOlK0=; b=WN0ezebivYHg1syzR2LOVccg9JOVvC/mDRMGJzcVZzH5oxGFMSgi1oocJ3qmzxPoAq WvQ6hHLnRFLI9hGtIiLW22cwahxewjChOvq0pnmRC9Ho/HE2gO7qRgDIzNNoZMPoYU6Y 6whay5O29ZN2jSZwev8UI9eOKV9dUW4S9NkxRxUs1zbyKlcKcR9DGPOv6Tap6nhsnlvz TNbumhrg0n/oWV9k0JTSLxCxEsUXPjN2x5GK52x1pVudujKvJepZaIyPjOEFOtJkU4UU vPCRIVxd5OfFjzTXXUIY/Evc09EOtER+4blmZhsSix6ymjQleemFrVqG8IKcx/xicuyL 2hbQ== X-Gm-Message-State: APt69E0ymo/X6JpuPnDxl8vZvvriRnHGvPNd0APkhWusdSG036vF0Ryz 5PRl1+n+x4QToXLx6/SbJ5GszoU+r9XYjnaPMmaI1pc= X-Google-Smtp-Source: AAOMgpd75MRrff6v6JVS0JpZ8koaJ8e9Jd1nX08uMV/aQ/yaw20dC5wCoULGWmlUPOHvHrJ/QPd8mL5A1KuEd9MsMeI= X-Received: by 2002:a63:5758:: with SMTP id h24-v6mr17018981pgm.432.1531100399720; Sun, 08 Jul 2018 18:39:59 -0700 (PDT) In-Reply-To: <3b2c670c-e07e-4a35-a2a4-f933e23329f2@default> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::22b X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117391 Archived-At: > I have before-save-hook defined in ~/.emacs > > (add-hook 'before-save-hook 'delete-trailing-whitespace) Both `add-hook' and `remove-hook' take an optional > LOCAL argument, to affect only the current buffer > (the buffer-local value of the hook). > It's not clear how that helps me. In essentially every other file I edit, I want to delete trailing whitespace, so I enable it globally. It seems buffer-local enabling of that hook would be appropriate if I only occasionally wanted to enable it. Skip >