From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.devel Subject: Re: Emacs 24 semantic C++ completion problem Date: Mon, 02 Jan 2012 20:33:08 +0100 Message-ID: <87aa65hpcb.fsf@engster.org> References: <4EFCE3A1.7030302@siege-engine.com> <87hb0i9zxt.fsf@engster.org> <878vlu9ss2.fsf@engster.org> <87r4zm80kf.fsf@engster.org> <87mxa9963m.fsf@engster.org> <87fwg18zub.fsf@engster.org> <87r4zleygr.fsf@engster.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1325532810 2304 80.91.229.12 (2 Jan 2012 19:33:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 2 Jan 2012 19:33:30 +0000 (UTC) Cc: "Eric M. Ludlam" , Vyacheslav Gonakhchyan , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 02 20:33:25 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RhndN-0007Bq-BU for ged-emacs-devel@m.gmane.org; Mon, 02 Jan 2012 20:33:25 +0100 Original-Received: from localhost ([::1]:42278 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RhndM-0002tk-Nk for ged-emacs-devel@m.gmane.org; Mon, 02 Jan 2012 14:33:24 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:33470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RhndJ-0002tU-2K for emacs-devel@gnu.org; Mon, 02 Jan 2012 14:33:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RhndH-0003TP-EO for emacs-devel@gnu.org; Mon, 02 Jan 2012 14:33:21 -0500 Original-Received: from randomsample.de ([83.169.19.17]:45495) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RhndH-0003SA-1Y for emacs-devel@gnu.org; Mon, 02 Jan 2012 14:33:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=KoLV5xUiDrD+6oDPWjycUGYMM1GRfpUpjerbYeEXep4=; b=s0CSoaPb0Hz3/wI9GdZY3G5xYCvyhvON1aXMMF9gaWh+UUpO58muRtu/sSWcu0IJ5/mkCk01iFEuWvodCqa1LwxKFHmDWG04LLZEVb8mywXWL+saZASmEUlsYlS6sgkN; Original-Received: from dslc-082-083-052-059.pools.arcor-ip.net ([82.83.52.59] helo=spaten) by randomsample.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Rhnd8-0001zF-9A; Mon, 02 Jan 2012 20:33:10 +0100 In-Reply-To: (Stefan Monnier's message of "Sun, 01 Jan 2012 17:43:33 -0500") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.92 (darwin) Mail-Followup-To: Stefan Monnier , Vyacheslav Gonakhchyan , "Eric M. Ludlam" , emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 83.169.19.17 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:147191 Archived-At: Stefan Monnier writes: >> We used to have the `semantic-lex-c-preprocessor-symbol-file' defcustom >> autoloaded, but that would never get past the Monnier-filter. I'm not > > Could someone explain to me what is the problem? The general problem is this: Say you have a custom variable V, belonging to package P, which is initialized with some list of filenames. When you require P, it will use V's value to set up some things, but will only do so once. How should the user add further filenames to V in his .emacs? If he first requires P, then any changes to V will be moot. Hence he has to look up the default value of V and then use setq-default, with the additional files added. The simplest solution (or rather: cop-out) is to autoload the defcustom, but I remember you saying that this is a no-no. [To add a few details: `semantic-lex-c-preprocessor-symbol-file' is a variable containing a list of C header files from which pre-processor #defines will be included when parsing further C(++) files. Since Semantic goes to great lengths to minimize startup time (a common complaint back in the days), this will only be done when semantic/bovine/c is actually loaded. It then parses those files and populates `semantic-lex-c-preprocessor-symbol-map' with the macros it finds, which is a c-mode local variable. Now, you may say that this is bad design, and I tend to agree, but setting up the c-mode parser is a pretty delicate issue.] -David