From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.devel Subject: Deriving from cc-mode with define-derived-mode Date: Sun, 06 Sep 2015 16:21:41 -0400 Message-ID: <87k2s3fgdm.fsf@earth.catern.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1441593007 21567 80.91.229.3 (7 Sep 2015 02:30:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Sep 2015 02:30:07 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 07 04:29:58 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZYmBs-0001HU-Qn for ged-emacs-devel@m.gmane.org; Mon, 07 Sep 2015 04:29:52 +0200 Original-Received: from localhost ([::1]:52222 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYmBt-0005cU-9x for ged-emacs-devel@m.gmane.org; Sun, 06 Sep 2015 22:29:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYgRq-0003P5-G6 for emacs-devel@gnu.org; Sun, 06 Sep 2015 16:21:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYgRn-00068L-8B for emacs-devel@gnu.org; Sun, 06 Sep 2015 16:21:58 -0400 Original-Received: from catern.com ([104.131.201.120]:58647 helo=mail.catern.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYgRn-0005zZ-4d for emacs-devel@gnu.org; Sun, 06 Sep 2015 16:21:55 -0400 Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.catern.com (Postfix) with ESMTPSA id 1269F47C37 for ; Sun, 6 Sep 2015 20:21:48 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 104.131.201.120 X-Mailman-Approved-At: Sun, 06 Sep 2015 22:29:51 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:189662 Archived-At: 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