From: Spencer Baugh <sbaugh@catern.com>
To: emacs-devel@gnu.org
Subject: Deriving from cc-mode with define-derived-mode
Date: Sun, 06 Sep 2015 16:21:41 -0400 [thread overview]
Message-ID: <87k2s3fgdm.fsf@earth.catern.com> (raw)
Hi emacs-devel,
I'm trying to write a mode for a C variant, C0. C0 is a pedagogical
language described in more depth here: http://c0.typesafety.net/. The
mode is called c0-mode.
More precisely, I'm trying to update our already existing mode. The
existing mode seems to be heavily inspired by
http://cc-mode.sourceforge.net/derived-mode-ex.el and awk-mode. In the
course of adding some new features I would like to replace some of the
old idioms and boilerplate with newer approaches.(C0 has a REPL, so one
of the new features I want to add is REPL interaction; I would also
appreciate recommendations on how to approach that.)
Just like in derivde-mode-ex.el, currently c0-mode is defined with
(defun c0-mode () ...)
But I would rather use define-derived-mode, and anyway that example
seems very out of date. Is there some documentation about how to write a
mode deriving from cc-mode in a modern way? Or at least some examples of
modes deriving from cc-mode that use define-derived-mode? Or any other
advice you can offer me?
Thanks,
Spencer Baugh
next reply other threads:[~2015-09-06 20:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-06 20:21 Spencer Baugh [this message]
2015-09-07 15:16 ` Deriving from cc-mode with define-derived-mode 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k2s3fgdm.fsf@earth.catern.com \
--to=sbaugh@catern.com \
--cc=emacs-devel@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.
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.