From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Eric M. Ludlam" <eric@siege-engine.com>
Cc: david.hansen@gmx.net, emacs-devel@gnu.org
Subject: Re: Improving Emacs for writing code
Date: Wed, 23 Apr 2008 13:45:23 -0400 [thread overview]
Message-ID: <jwv1w4w32z4.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <200804231500.m3NF0BpH002463@projectile.siege-engine.com> (Eric M. Ludlam's message of "Wed, 23 Apr 2008 11:00:11 -0400")
>> The first step is to make sure that when installing CEDET in Emacs we
>> get 2 things:
>> 1 - CEDET is easy to enable.
>> 2 - CEDET doesn't affect anyone who doesn't enable it.
>> That is a strict necessity before we can install it. The second step is:
>> - Make it possible to disable CEDET after enabling it.
>> - Make it possible to enable CEDET in some buffers without it affecting
>> all others.
>> These are very important as well, tho it might be OK to live without
>> them at first, as long as there's a clear commitment to address them.
> Everything in CEDET that changes or augments a behavior is activated
> by hooks, or something in a user's .emacs file. The CEDET build
> system automatically adds (add-hook ...) type items into the loaddefs
> file which is what you had encountered. The goal of the CEDET install
> is to minimize the amount of hacking around users have to do to get
> the system up and running.
> The semantic parser and tools work like this:
> * A mode hook sets up variables about how to do parsing.
IIUC this is code similar to what sets up font-lock-defaults or
imenu-generic-expression, right? I.e. it is conceptually part of the
major mode rather than of CEDET.
> * A change-mode hook (and a couple other hooks) enables "semantic" on
> any buffer with the right variables set up.
I.e. this is like
(define-globalized-minor-mode global-semantic-mode semantic-mode
(lambda () (if vars are set up (semantic-mode 1))))
?
> * Any tool that requires semantic can automatically enable itself via
> the semantic init hook
I do not understand this: do you mean that a tool can call
(semantic-mode 1), or that a tool can register itself so that whenever
semantic-mode is ON, then that tool is activated as well?
I'll assume you mean the latter.
> As such, what you are requesting is possible, and follows typical
> conventions, but just requires more INSTALL explanation. I am
> hesitant to add such discussion because the current install
> instruction is short and simple, and discussing all those options
> would make it much less so. I've batched many modes together into
> "turn on lots of related things" functions which means all sub modes
> would need explaining for basic install.
So IIUC semantic-mode does not in itself affect the behavior, but
because of how features on top of Semantic register themselves in
semantic-init-hook, the mere fact of activating semantic-mode ends up
activating a lot more.
I guess that's fine for now. All we really need is a way to only enable
semantic (and accompagnying features) in some modes. E.g. the user can do
(global-semantic-mode 1)
to get CEDET everywhere, or just:
(add-hook 'java-mode-hook (lambda () (semantic-mode 1)))
to only get it in in Java mode. Would that be difficult? It seems like
you're saying it wouldn't.
> I'm open to any changes in this area to make this easier, as long as
> there continues to be a simple "just make it go" feature.
Sounds good to me,
Stefan
next prev parent reply other threads:[~2008-04-23 17:45 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-22 10:06 Improving Emacs for writing code joakim
2008-04-22 15:49 ` David Hansen
2008-04-22 21:49 ` Re[2]: " Eric M. Ludlam
2008-04-23 1:33 ` Stefan Monnier
2008-04-23 5:10 ` Chong Yidong
2008-04-23 14:05 ` Re[2]: " Eric M. Ludlam
2008-04-23 14:23 ` Chong Yidong
2008-04-23 17:29 ` Stefan Monnier
2008-04-23 15:00 ` Re[2]: " Eric M. Ludlam
2008-04-23 17:45 ` Stefan Monnier [this message]
2008-04-24 2:41 ` Eric M. Ludlam
2008-04-23 19:05 ` Richard M Stallman
2008-04-22 16:02 ` Stefan Monnier
2008-04-22 16:54 ` klaus.berndl
2008-04-22 17:07 ` Lennart Borgman (gmail)
2008-04-23 8:26 ` klaus.berndl
2008-04-23 10:26 ` Nick Roberts
2008-04-23 11:59 ` klaus.berndl
2008-04-23 13:00 ` Nick Roberts
2008-04-23 12:12 ` Neal Becker
2008-04-23 12:19 ` klaus.berndl
2008-04-23 12:28 ` Neal Becker
2008-04-23 21:34 ` Stephen J. Turnbull
2008-04-22 20:08 ` Richard Stallman
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=jwv1w4w32z4.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=david.hansen@gmx.net \
--cc=emacs-devel@gnu.org \
--cc=eric@siege-engine.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).