From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: emacs refuses to save file in the same encoding it was read Date: Thu, 23 Oct 2003 14:38:13 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <87u1617hxe.fsf@mail.jurta.org> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1066934936 9278 80.91.224.253 (23 Oct 2003 18:48:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 23 Oct 2003 18:48:56 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Oct 23 20:48:52 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ACkVw-0001LX-00 for ; Thu, 23 Oct 2003 20:48:52 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1ACkVw-000111-00 for ; Thu, 23 Oct 2003 20:48:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ACkTc-0003zq-JE for emacs-devel@quimby.gnus.org; Thu, 23 Oct 2003 14:46:28 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ACkQY-0003EL-2b for emacs-devel@gnu.org; Thu, 23 Oct 2003 14:43:18 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ACkQ0-00036Q-NH for emacs-devel@gnu.org; Thu, 23 Oct 2003 14:43:15 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ACkQ0-00036E-9a for emacs-devel@gnu.org; Thu, 23 Oct 2003 14:42:44 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.24) id 1ACkLd-0004jk-4W; Thu, 23 Oct 2003 14:38:13 -0400 Original-To: Juri Linkov In-reply-to: <87u1617hxe.fsf@mail.jurta.org> (message from Juri Linkov on 22 Oct 2003 12:14:37 +0300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17377 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17377 This line is added by the function `bbdb-write-file-hook-fn'. Up to now it was added to `local-write-file-hooks' locally only in the bbdb buffer. But now the value of `local-write-file-hooks' is set by the function `add-hook' globally, so this hook adds this line in the beginning of every saved buffer. it looks like my change in add-hook is not right for variables that become local when set. dies ths chg work in general? *** subr.el.~1.365.~ Mon Oct 20 19:26:00 2003 --- subr.el Thu Oct 23 06:10:42 2003 *************** *** 852,857 **** --- 852,859 ---- function, it is changed to a list of functions." (or (boundp hook) (set hook nil)) (or (default-boundp hook) (set-default hook nil)) + (if (local-variable-if-set-p hook) + (setq local t)) (if local (unless (local-variable-if-set-p hook) (set (make-local-variable hook) (list t))) ;; Detect the case where make-local-variable was used on a hook