public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* 'md' major mode for Emacs
@ 1998-03-25 23:43 Gary Thomas
  1998-03-26 21:54 ` Ken Raeburn
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Gary Thomas @ 1998-03-25 23:43 UTC (permalink / raw)
  To: EGCS

This is a little off-topic:

Does anyone out there have a Emacs major mode description for GCC 'md'
files?  With all the machine description editing (?) surely there is.

If not, would it be of interest?

------------------------------------------------------------------------
Gary Thomas                              |
The Open Group / Research Institute      | "Fine wine is a necessity of
2 Avenue de Vignate                      |        life for me"
38610 Gieres - FRANCE                    |
+33 4 76 63 48 74                        |      Thomas Jefferson
email: g.thomas@opengroup.org            |
< http://www.opengroup.org/~gdt >          |
   ... opinions expressed here are mine  |
       and no one else would claim them! |
------------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 'md' major mode for Emacs
  1998-03-25 23:43 'md' major mode for Emacs Gary Thomas
@ 1998-03-26 21:54 ` Ken Raeburn
  1998-03-27  4:21 ` Jeffrey A Law
  1998-03-27  4:21 ` Andreas Schwab
  2 siblings, 0 replies; 4+ messages in thread
From: Ken Raeburn @ 1998-03-26 21:54 UTC (permalink / raw)
  To: EGCS

Gary Thomas <g.thomas@opengroup.org> writes:

> Does anyone out there have a Emacs major mode description for GCC 'md'
> files?  With all the machine description editing (?) surely there is.

There used to be some local-variables sections in some md files.
Since I (then) always ignored local-variables sections, but this stuff
looked reasonable, I pulled it out and made a mode.  It doesn't amount
to much -- an auto-mode-alist hook and this code:

(defvar md-mode-syntax-table nil)
(defun md-mode nil
  (interactive)
  (emacs-lisp-mode)
  (setq major-mode 'md-mode)
  (setq mode-name "MD")
  (if md-mode-syntax-table
      (set-syntax-table md-mode-syntax-table)
    (set-syntax-table (copy-sequence (syntax-table)))
    (modify-syntax-entry ?[ "(]")
    (modify-syntax-entry ?] ")[")
    (modify-syntax-entry ?{ "(}")
    (modify-syntax-entry ?} "){")
    (setq md-mode-syntax-table (syntax-table))))

It works for me, but I think ordinary emacs-lisp mode would work about
as well.

If you want to write some spiffy mode that can switch between elisp
and c modes depending on context (e.g., for indentation rules, using C
rules inside strings and elisp rules outside), that would be
fantastic.  I don't know of such a thing.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 'md' major mode for Emacs
  1998-03-25 23:43 'md' major mode for Emacs Gary Thomas
  1998-03-26 21:54 ` Ken Raeburn
  1998-03-27  4:21 ` Jeffrey A Law
@ 1998-03-27  4:21 ` Andreas Schwab
  2 siblings, 0 replies; 4+ messages in thread
From: Andreas Schwab @ 1998-03-27  4:21 UTC (permalink / raw)
  To: Gary Thomas; +Cc: EGCS

Gary Thomas <g.thomas@opengroup.org> writes:

|> Does anyone out there have a Emacs major mode description for GCC 'md'
|> files?  With all the machine description editing (?) surely there is.

C-mode works good enough for me.

-- 
Andreas Schwab                                      "And now for something
schwab@issan.informatik.uni-dortmund.de              completely different"
schwab@gnu.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 'md' major mode for Emacs
  1998-03-25 23:43 'md' major mode for Emacs Gary Thomas
  1998-03-26 21:54 ` Ken Raeburn
@ 1998-03-27  4:21 ` Jeffrey A Law
  1998-03-27  4:21 ` Andreas Schwab
  2 siblings, 0 replies; 4+ messages in thread
From: Jeffrey A Law @ 1998-03-27  4:21 UTC (permalink / raw)
  To: Gary Thomas; +Cc: EGCS

  In message < XFMail.980326070210.g.thomas@opengroup.org >you write:
  > This is a little off-topic:
  > 
  > Does anyone out there have a Emacs major mode description for GCC 'md'
  > files?  With all the machine description editing (?) surely there is.
  > 
  > If not, would it be of interest?
Might be for some folks.  Personally I still use "vi" :-)

jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-03-27  4:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-25 23:43 'md' major mode for Emacs Gary Thomas
1998-03-26 21:54 ` Ken Raeburn
1998-03-27  4:21 ` Jeffrey A Law
1998-03-27  4:21 ` Andreas Schwab

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).