From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Geoff Gole Newsgroups: gmane.emacs.devel Subject: [PATCH] whitespace.el leaves a spurious entry in post-command-hook Date: Mon, 9 Aug 2010 06:35:26 +0800 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1281306942 19646 80.91.229.12 (8 Aug 2010 22:35:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 8 Aug 2010 22:35:42 +0000 (UTC) To: Emacs development discussions Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 09 00:35:40 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OiESu-0006El-V0 for ged-emacs-devel@m.gmane.org; Mon, 09 Aug 2010 00:35:37 +0200 Original-Received: from localhost ([127.0.0.1]:50416 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OiESu-0002di-Dl for ged-emacs-devel@m.gmane.org; Sun, 08 Aug 2010 18:35:36 -0400 Original-Received: from [140.186.70.92] (port=60625 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OiESo-0002db-Ag for emacs-devel@gnu.org; Sun, 08 Aug 2010 18:35:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OiESm-00011s-UT for emacs-devel@gnu.org; Sun, 08 Aug 2010 18:35:30 -0400 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:50701) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OiESm-00011S-Px for emacs-devel@gnu.org; Sun, 08 Aug 2010 18:35:28 -0400 Original-Received: by wyg36 with SMTP id 36so10605635wyg.0 for ; Sun, 08 Aug 2010 15:35:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=9+NJTlPhzKe4ZnAqrUAtOLalTLFo7eUVfu5KVO5tRus=; b=Sfi2fMv28bJMZLjaygSSRq7/zeHg4WYBalRSqlMTdtq1gg7NYOzbgf7jEMef0SQQpw BfKeCYR2nTOV6UQUXI3AHLJt+IGByOOGF6CFA/0/uCl0pO7zWpxa6UROKP9cCqIjUu8d TYHf/MDW1JJlHZm429YFbXL/W5LVlFxRaN0qE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=lpLN6kDWAKx1n99C/5gvJ/YVt52A1AyiWzXvApYYzspnpbfl+D710AKCy8odAvx3FL pdcGek2VLsiCj4wS4HgppHtL0+Td3Nu2w12BdFPpcwBfIMJP0Q5VYotPqGLNhSpu8T7N H9Ro9v4qUWcMx+hqq038guJKmsqwhlOjb4p/0= Original-Received: by 10.216.178.80 with SMTP id e58mr12590400wem.108.1281306926714; Sun, 08 Aug 2010 15:35:26 -0700 (PDT) Original-Received: by 10.216.70.5 with HTTP; Sun, 8 Aug 2010 15:35:26 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:128434 Archived-At: Start an emacs -Q and do M-x whitespace-mode twice. There will be a local entry left in post-command-hook. The cause is that an appropriate call to remove-hook exists, but lacks the `local' argument. The fix is to add it: *** /usr/local/share/emacs/24.0.50/lisp/whitespace.el.gz --- /tmp/buffer-content-4209UhA *************** *** 2296,2302 **** ;; turn off font lock (when (whitespace-style-face-p) (font-lock-mode 0) ! (remove-hook 'post-command-hook #'whitespace-post-command-hook) (when whitespace-font-lock (setq whitespace-font-lock nil font-lock-keywords whitespace-font-lock-keywords)) --- 2296,2302 ---- ;; turn off font lock (when (whitespace-style-face-p) (font-lock-mode 0) ! (remove-hook 'post-command-hook #'whitespace-post-command-hook t) (when whitespace-font-lock (setq whitespace-font-lock nil font-lock-keywords whitespace-font-lock-keywords))