From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Le Wang Newsgroups: gmane.emacs.devel Subject: Re: BUG REPORT: `kill-buffer-query-functions' Date: Fri, 28 Feb 2003 22:08:53 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: main.gmane.org 1046488289 9733 80.91.224.249 (1 Mar 2003 03:11:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 1 Mar 2003 03:11:29 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18oxPM-0002Wr-00 for ; Sat, 01 Mar 2003 04:11:28 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18oxh3-0002rH-00 for ; Sat, 01 Mar 2003 04:29:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18oxOH-0001LP-02 for emacs-devel@quimby.gnus.org; Fri, 28 Feb 2003 22:10:21 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18oxNm-0001Iz-00 for emacs-devel@gnu.org; Fri, 28 Feb 2003 22:09:50 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18oxNk-0001Eh-00 for emacs-devel@gnu.org; Fri, 28 Feb 2003 22:09:49 -0500 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18oxNj-0001Ab-00 for emacs-devel@gnu.org; Fri, 28 Feb 2003 22:09:47 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18oxNN-0002T9-00 for ; Sat, 01 Mar 2003 04:09:25 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18oxNM-0002St-00 for ; Sat, 01 Mar 2003 04:09:24 +0100 Original-Lines: 32 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: KNode/0.7.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:12043 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12043 Richard Stallman wrote: > When making this hook buffer local, the 't add at the end is called as a > function, and of course it's not a function. > > Would you please send a precise test case? Sure thing. 1. emacs -q 2. paste this code in scratch (defun test-query () (if (and (buffer-modified-p) (not (y-or-n-p (format "Abandon changes to %s? (y/n) " (buffer-name))))) nil t)) (add-hook 'kill-buffer-query-functions 'test-query nil t) 3. eval it. 4. kill-this-buffer 5. answer `y' when prompted. 6. Error: Symbol's function definition is void: t -- Le