From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: Heuristics for: is a major-mode a "programming language" mode?
Date: Wed, 15 Sep 2010 16:27:19 +0200 [thread overview]
Message-ID: <jwvvd67m6jb.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: 87tylrup5r.fsf@puma.rapttech.com.au
> Not sure if this will help, but in current emacs 24, there is note in
> the NEWS file about a new mode called prog-mode, which is supposed to be
> a parent mode for programming modes. I believe the supplied prog modes
> in emacs have/are being updated to be derived from this mode.
Indeed, this prog-mode should provide just the info that Ilya needs,
except that:
- it'll be new in Emacs-24.1, so it's not a good solution for "right now"
- only some of the major modes distributed with Emacs have been updated
to use it, as of now. Hopefully by 24.1 they will "all" have been
adapted.
- non-bundled programming modes probably take a lot longer to start
using it.
In the mean time, for modes bundled with Emacs, a good heuristic could
be to try and find the file from which the mode was loaded and then see
if that file is in "lisp/progmodes/" or elsewhere. And of course that
will have some false positives (e.g. inferior-process interaction modes)
and false negatives (lisp-mode.el which i still in lisp/emacs-lisp).
And then come the ambiguous ones, like sgml-mode and latex-mode which
can be considered both as programming modes and text modes (they
currently inherit from text-mode only, tho).
Stefan
next prev parent reply other threads:[~2010-09-15 14:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-15 9:28 Heuristics for: is a major-mode a "programming language" mode? Ilya Zakharevich
2010-09-15 13:12 ` Tim X
2010-09-15 14:27 ` Stefan Monnier [this message]
2010-09-15 14:43 ` Xah Lee
2010-09-15 15:08 ` Stefan Monnier
2010-09-15 15:32 ` Xah Lee
2010-09-15 23:22 ` Stefan Monnier
2010-09-16 23:43 ` Ilya Zakharevich
2010-09-17 9:50 ` Stefan Monnier
2010-09-16 23:40 ` Ilya Zakharevich
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=jwvvd67m6jb.fsf-monnier+gnu.emacs.help@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=help-gnu-emacs@gnu.org \
/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.
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).