From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: customize-rouge output with emacs -q --no-site-file Date: Fri, 4 Feb 2005 17:48:54 -0600 (CST) Message-ID: <200502042348.j14NmsN14084@raven.dms.auburn.edu> References: <00cb01c50ad3$5f978570$0200a8c0@sedrcw11488> <010101c50aed$d57b4640$0200a8c0@sedrcw11488> <004501c50b07$6690f620$0200a8c0@sedrcw11488> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1107562291 22353 80.91.229.2 (5 Feb 2005 00:11:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 5 Feb 2005 00:11:31 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 05 01:11:31 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1CxDXs-00032G-Cc for ged-emacs-devel@m.gmane.org; Sat, 05 Feb 2005 01:11:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CxDlU-0006QM-Ob for ged-emacs-devel@m.gmane.org; Fri, 04 Feb 2005 19:25:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CxDji-0005WC-UG for emacs-devel@gnu.org; Fri, 04 Feb 2005 19:23:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CxDjh-0005Uv-0N for emacs-devel@gnu.org; Fri, 04 Feb 2005 19:23:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CxDjf-0005It-IW for emacs-devel@gnu.org; Fri, 04 Feb 2005 19:23:39 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CxDDK-000612-6Q for emacs-devel@gnu.org; Fri, 04 Feb 2005 18:50:14 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j14NoD9N006767; Fri, 4 Feb 2005 17:50:13 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j14NmsN14084; Fri, 4 Feb 2005 17:48:54 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: lennart.borgman.073@student.lu.se In-reply-to: <004501c50b07$6690f620$0200a8c0@sedrcw11488> (lennart.borgman.073@student.lu.se) 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 X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:32889 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32889 The list of variables we are talking about may depend on the operating system, the environment variables the user has set, the user's X customization settings (usually in .Xdefaults) and of course, also changes over time as Emacs' code changes. So you would need to use mapatoms, as in the patch below. I do _not_ believe that this patch is the right solution to the problems. It solves the problem I described. But as I said, this was just an example of the very large and very varied group of problems that are involved. Here is a second problem, which the patch does not solve. The warning is now gone. So the user happily customizes one of these hook (or alist or list) variables. He thereby hardwires environment and .Xdefaults settings into his .emacs, which is bad, but not the worst problem. If we now make changes to Emacs that require adding other elements to these hooks, lists or alists, or removing elements, the user does not get those values, because he hardwired the old value in his .emacs. One small example. I proposed calling vc-find-file-hook directly from after-find-file. If we do that and if anybody made changes to find-file-hook and saved them to .emacs, vc-find-file hook is probably in the saved value and gets called twice, once from after-find-file and once from the saved value of find-file-hook. This double calling is probably just a slight inefficiency rather than a disaster, but other things could make Emacs completely malfunction. There is nothing we can do about that, we have to be able to make changes in Emacs. The "Changed outside Custom" warning for a variable should stay unless we make _all aspects_ of customizing the variable completely safe. It is _not_ safe, not even after the patch you proposed, to customize any of the involved hooks, lists or alists using Custom. It is safe to customize them in your .emacs as long as you use add-hook (for hooks) or push (for lists) and do not use setq. If you use setq, you get into exactly the same problem I described above for Custom, but most people realize that you should normally not use setq for hooks and something in the docstrings of the lists or alists should make it clear that you should not use setq. The second problem I described above is a second _example_ of the problems involved. There is worse. I pointed out a third example before. And that is not the last one either. The patch below is intended _for experimentation purposes only_. It is interesting to build a version of Emacs with it and experiment. Why, after the patch `paragraph-ignore-fill-prefix' and `parse-sexp-ignore-comments' are considered rogue variables in `emacs -q' beats me. Their values are correct and nothing seems wrong with them. ===File ~/startup-diff====================================== *** startup.el 28 Dec 2004 09:50:38 -0600 1.337 --- startup.el 04 Feb 2005 15:47:50 -0600 *************** *** 785,790 **** --- 785,796 ---- (cdr tool-bar-lines) (not (eq 0 (cdr tool-bar-lines))))))) + (mapatoms + (lambda (symbol) + (and (boundp symbol) + (get symbol 'standard-value) + (put symbol 'standard-value (list symbol))))) + (let ((old-scalable-fonts-allowed scalable-fonts-allowed) (old-font-list-limit font-list-limit) (old-face-ignored-fonts face-ignored-fonts)) ============================================================