[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Further CC-mode changes

From: Ivan Andrus
Subject: Re: Further CC-mode changes
Date: Fri, 12 Sep 2014 19:09:18 -0600

On Sep 12, 2014, at 5:59 PM, Alan Mackenzie <address@hidden> wrote:

> Hello, Stefan.
> On Thu, Sep 11, 2014 at 09:55:29AM -0400, Stefan Monnier wrote:
>> While waiting for your guidance as to which parts of my patches need to
>> be reverted and why, here's some candidate patch which (contrary to the
>> one you reverted) actually changes the code's behavior.
>> It's to be applied on top of the ones you removed (tho since the ones
>> you remove are mostly cosmetic, it shouldn't make much of a difference).
>> Questions:
>> - should C-c C-n and friends be moved to c-derivative-mode-map
>>  (AFAIK neither Java nor IDL nor Pike have CPP conditionals)?
> No.  Less disruptive is either to remove these bindings from
> c-mode-base-map and put them in c-mode-map etc., or to splat them out
> from java-mode-map, etc., as is done in awk-mode-map.  This is a bug, I
> suppose, but a tiny one - attempting C-c C-n in Java Mode throws an error
> immediately.
>> - I notice that all cc-mode enable abbrev-mode except for idl-mode.
>>  Was that on purpose or is it just accidental?
> Probably deliberate.  IDL Mode doesn't have keywords like "else", as far
> as I'm aware.  I'm also not aware of anyone using IDL Mode, there having
> been no bug reports for it for many years, if ever.

FWIW I created slice-mode (for the ZeroC Slice language [1]) derived from IDL 
mode.  It’s only in my .emacs right now since it’s so trivial.  It’s not 
perfect, but good enough for the few times I actually have to edit the files 
(they define interfaces and are therefore quite stable).


[1] http://doc.zeroc.com/display/Ice/The+Slice+Language

(define-derived-mode slice-mode idl-mode "Slice"
  "This is a mode for editing slice (Ice definition) files.
It is based on idl-mode because of the comment at
I haven't been able to determine the differences between slice
and idl, so I don't know how good it is."

     (,(concat "\\<\\("
                '("Object" "LocalObject" "exception" "interface" "idempotent"))
               "\\)\\> ")

      1 font-lock-keyword-face t)

     ("^! .*"   0 font-lock-warning-face t)

     ;; Reserved names
     ("\\(Ice\\w*\\)" 1 font-lock-builtin-face)
     ,(concat "\\<\\(\\w*"
               '("Helper" "Holder" "Prx" "Ptr"))
              "\\)\\> ")

     ;; Built-in types
     ,(concat "\\<\\(\\w*"
               '("bool" "byte" "short" "int" "long" "float" "double" "string"))
              "\\)\\> ")

reply via email to

[Prev in Thread] Current Thread [Next in Thread]