unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Engster <deng@randomsample.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "Eric M. Ludlam" <ericludlam@gmail.com>,
	Vyacheslav Gonakhchyan <ytriffy@gmail.com>,
	emacs-devel@gnu.org
Subject: Re: Emacs 24 semantic C++ completion problem
Date: Mon, 02 Jan 2012 20:33:08 +0100	[thread overview]
Message-ID: <87aa65hpcb.fsf@engster.org> (raw)
In-Reply-To: <jwvfwfzvybw.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sun, 01 Jan 2012 17:43:33 -0500")

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



  reply	other threads:[~2012-01-02 19:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-29 18:32 Emacs 24 semantic C++ completion problem Vyacheslav Gonakhchyan
2011-12-29 22:03 ` Eric M. Ludlam
2011-12-30  9:22   ` David Engster
2011-12-30 11:31     ` Vyacheslav Gonakhchyan
2011-12-30 11:57       ` David Engster
2011-12-30 15:00         ` Vyacheslav Gonakhchyan
2011-12-30 16:51           ` David Engster
2011-12-30 19:52             ` Vyacheslav Gonakhchyan
2011-12-30 20:06               ` David Engster
2011-12-30 21:14                 ` Vyacheslav Gonakhchyan
2011-12-30 22:22                   ` David Engster
2011-12-31  7:05                     ` Vyacheslav Gonakhchyan
2011-12-31 12:07                       ` David Engster
2011-12-31 12:16                         ` David Engster
2012-01-01 22:43                         ` Stefan Monnier
2012-01-02 19:33                           ` David Engster [this message]
2012-01-05  4:43                             ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87aa65hpcb.fsf@engster.org \
    --to=deng@randomsample.de \
    --cc=emacs-devel@gnu.org \
    --cc=ericludlam@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    --cc=ytriffy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).