From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#3808: 23.1.50; CC-mode: Impossible to set c-cleanup-list Date: Sun, 12 Jul 2009 12:33:01 +0200 Message-ID: <4A59BBDD.4080905@swipnet.se> References: <200907101114.n6ABEjXQ030837@gaffa.localdomain> <20090711113638.GA1088@muc.de> Reply-To: Jan =?UTF-8?Q?Dj=C3=A4rv?= , 3808@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1247396274 8789 80.91.229.12 (12 Jul 2009 10:57:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 12 Jul 2009 10:57:54 +0000 (UTC) Cc: 3808@emacsbugs.donarmstrong.com, emacs-pretest-bug@gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 12 12:57:47 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MPwka-0002dM-FD for geb-bug-gnu-emacs@m.gmane.org; Sun, 12 Jul 2009 12:57:45 +0200 Original-Received: from localhost ([127.0.0.1]:33277 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MPwkZ-0002NF-OA for geb-bug-gnu-emacs@m.gmane.org; Sun, 12 Jul 2009 06:57:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MPwkS-0002N2-Eo for bug-gnu-emacs@gnu.org; Sun, 12 Jul 2009 06:57:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MPwkN-0002MT-9q for bug-gnu-emacs@gnu.org; Sun, 12 Jul 2009 06:57:36 -0400 Original-Received: from [199.232.76.173] (port=56152 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MPwkN-0002MJ-3j for bug-gnu-emacs@gnu.org; Sun, 12 Jul 2009 06:57:31 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:56756) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MPwkM-0004kK-Fb for bug-gnu-emacs@gnu.org; Sun, 12 Jul 2009 06:57:30 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6CAvRGP003003; Sun, 12 Jul 2009 03:57:28 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n6CAe6ud032573; Sun, 12 Jul 2009 03:40:06 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 12 Jul 2009 10:40:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3808 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.124739479331700 (code B ref -1); Sun, 12 Jul 2009 10:40:05 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 12 Jul 2009 10:33:13 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6CAX76N031691 for ; Sun, 12 Jul 2009 03:33:09 -0700 Original-Received: from mx10.gnu.org ([199.232.76.166]:50542) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MPwMk-00047R-TS for emacs-pretest-bug@gnu.org; Sun, 12 Jul 2009 06:33:06 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MPwMj-0008JM-7E for emacs-pretest-bug@gnu.org; Sun, 12 Jul 2009 06:33:06 -0400 Original-Received: from proxy3.bredband.net ([195.54.101.73]:49744) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MPwMi-0008Iv-Hd for emacs-pretest-bug@gnu.org; Sun, 12 Jul 2009 06:33:04 -0400 Original-Received: from iph2.telenor.se (195.54.127.133) by proxy3.bredband.net (7.3.140.3) id 49F597CD018173DC for emacs-pretest-bug@gnu.org; Sun, 12 Jul 2009 12:33:02 +0200 X-SMTPAUTH-B2: X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArKVAPZYWUpV4S1uPGdsb2JhbACBUYgnjyQBAQEBN7A0gk4KgTEF X-IronPort-AV: E=Sophos;i="4.42,386,1243807200"; d="scan'208";a="27394999" Original-Received: from c-6e2de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.110]) by iph2.telenor.se with ESMTP; 12 Jul 2009 12:33:02 +0200 Original-Received: from [172.20.199.5] (winter [172.20.199.5]) by coolsville.localdomain (Postfix) with ESMTPSA id 529AA7FA07B; Sun, 12 Jul 2009 12:33:01 +0200 (CEST) User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) In-Reply-To: <20090711113638.GA1088@muc.de> X-detected-operating-system: by monty-python.gnu.org: Error: [-] ERROR: /var/run/p0f.sock: Connection refused X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sun, 12 Jul 2009 06:57:35 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:29350 gmane.emacs.pretest.bugs:24776 Archived-At: Alan Mackenzie skrev: > Hi, Jan! > > On Fri, Jul 10, 2009 at 01:14:45PM +0200, Jan D. wrote: >> I customize c-cleanup-list. This is then the full contents of my >> .emacs: >> (custom-set-variables >> ;; custom-set-variables was added by Custom. >> ;; If you edit it by hand, you could mess it up, so be careful. >> ;; Your init file should contain only one such instance. >> ;; If there is more than one, they won't work right. >> '(c-cleanup-list (quote (scope-operator space-before-funcall)))) >> (custom-set-faces >> ;; custom-set-faces was added by Custom. >> ;; If you edit it by hand, you could mess it up, so be careful. >> ;; Your init file should contain only one such instance. >> ;; If there is more than one, they won't work right. >> ) > >> I start emacs with --no-site-file, open a .c-file. > > Just done this, in a new userid, having copied your .emacs. To be sure, > I tried on a freshly updated CVS Emacs. > >> Check the value of c-cleanup-list: > >> c-cleanup-list is a variable defined in `cc-vars.el'. >> Its value is (scope-operator) > > I can't reproduce the problem; I get: > > Its value is > (scope-operator space-before-funcall) > > , just as desired. > >> Local in buffer xftfont.c; global value is >> (scope-operator space-before-funcall) > > Well, that looks OK. :-) > > Might it be that there's a local variables section at the end of > xftfont.c which is overriding c-cleanup-list? > No, but since this is in the emacs source tree, there is a .dir-locals.el at the root of the source tree, and that comes in effect. So it is not that it doesn't work, it is just this situation (setting c-file-style as a file local variable has the same effect). So what happens is: c-mode sets style to GNU. My customization is applied. .dir-locals.el sets style to GNU, thus erasing my customization. >> And indeed, space-before-funcall is not in effect. It seems impossible to >> set this variable. I also tried setting c-old-style-variable-behavior to t, >> but it made no difference. > >> The manual needs to explain how to set variables in a manner that works, >> an example with lisp to add to .emacs would be nice also. > > "The manual" being the CC Mode manual, of course. In the appendix > "Sample .emacs File", there's an example of c-cleanup-list being set in a > style. The instructions on how to set "style variables" in general (of > which c-cleanup-list is one) are on the page "Configuration Basics" and > its sup-page "Style Variables". > > So I think the information is there, but perhaps it's not easy enough to > find. Could you, perhaps, reconstruct how you went about looking for the > info? Maybe the manual needs an extra hint or two somewhere. Thanks! > The situation above, i.e. how to preserve my customization when .dir-locals.el or file variables are in effect is not described. I tried the mode hook, it didn't work either. Is there a c-set-style hook? Jan D.