all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Eric M. Ludlam" <eric@siege-engine.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: david.hansen@gmx.net, emacs-devel@gnu.org
Subject: Re[2]: Improving Emacs for writing code
Date: Wed, 23 Apr 2008 11:00:11 -0400	[thread overview]
Message-ID: <200804231500.m3NF0BpH002463@projectile.siege-engine.com> (raw)
In-Reply-To: <jwvabjlpdrf.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Tue, 22 Apr 2008 21:33:00 -0400)

>>> Stefan Monnier <monnier@iro.umontreal.ca> seems to think that:
  [ ... ]
>>   There are a few sub-tools in CEDET that probably need care when
>> merging.  When I needed convenience functions in CEDET for a specific
>> tool, I usually focused on making them generically useful.  As such,
>> each such tool should probably be examined to see if that is a feature
>> Emacs wants.  One item that comes to mind is the mode-local variables
>> and functions that has been discussed here at least twice.
>
>Do these use advices or similar redefinitions?  If not, it shouldn't be
>a problem.

There is advice in CEDET, though not much.  Most advice deals with
`describe-function' and similar help routines that are not inherently
extensible.  Other advice is tied to some minor-mode or other.

>>   Right now, CEDET installs assuming you want to use it.  This may not
>> be the case in core Emacs.  Making the features accessible has been a
>> struggle.  Stefan touched on one such issue in his post.  I have no
>> good answers.
>
>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.

* A change-mode hook (and a couple other hooks) enables "semantic" on
  any buffer with the right variables set up.

* Any tool that requires semantic can automatically enable itself via
  the semantic init hook


The default right now is that all mode hooks are enabled by default.
The Semantic setup from the mode-hook itself won't change any
behavior.  It is the tools that enable themselves via the semantic
init hook that change behavior, and those tools are turned on via a
`global-whatever-mode' type function which must be put into a .emacs
file.

If you want some tools on in C mode but not in Emacs Lisp, you would
not use `global-whatever-mode', but instead create a semantic init
hook that turns some minor-mode on with `whatever-mode' conditionally.
You might be able to enable some modes in a mode-hook, but I haven't
tried it.  Some may depend on semantic initialization completing
first.

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.

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.

Eric

-- 
          Eric Ludlam:                       eric@siege-engine.com
   Siege: www.siege-engine.com          Emacs: http://cedet.sourceforge.net




  parent reply	other threads:[~2008-04-23 15:00 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       ` Eric M. Ludlam [this message]
2008-04-23 17:45         ` Stefan Monnier
2008-04-24  2:41           ` Re[2]: " 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

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

  git send-email \
    --in-reply-to=200804231500.m3NF0BpH002463@projectile.siege-engine.com \
    --to=eric@siege-engine.com \
    --cc=david.hansen@gmx.net \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.