From: Ivan Andrus <darthandrus@gmail.com>
To: Alan Mackenzie <acm@muc.de>
Cc: Stefan Monnier <monnier@IRO.UMontreal.CA>, emacs-devel@gnu.org
Subject: Re: Further CC-mode changes
Date: Fri, 12 Sep 2014 19:09:18 -0600 [thread overview]
Message-ID: <6016BCE3-6EAE-455C-A19F-AD2A0D55F321@gmail.com> (raw)
In-Reply-To: <20140912235948.GA4045@acm.acm>
On Sep 12, 2014, at 5:59 PM, Alan Mackenzie <acm@muc.de> 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).
-Ivan
[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
http://www.zeroc.com/forums/help-center/818-any-editor-slice-syntax-highlight.html
I haven't been able to determine the differences between slice
and idl, so I don't know how good it is."
(font-lock-add-keywords
'slice-mode
`(
(,(concat "\\<\\("
(regexp-opt
'("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*"
(regexp-opt
'("Helper" "Holder" "Prx" "Ptr"))
"\\)\\> ")
;; Built-in types
,(concat "\\<\\(\\w*"
(regexp-opt
'("bool" "byte" "short" "int" "long" "float" "double" "string"))
"\\)\\> ")
)))
next prev parent reply other threads:[~2014-09-13 1:09 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-02 5:26 POC: customizable cc-mode keywords Daniel Colascione
2014-05-10 23:13 ` Daniel Colascione
2014-05-11 21:13 ` Alan Mackenzie
2014-05-11 21:23 ` Daniel Colascione
2014-05-16 17:52 ` Alan Mackenzie
2014-05-16 18:06 ` Daniel Colascione
2014-05-18 21:33 ` Alan Mackenzie
2014-05-18 22:28 ` Daniel Colascione
2014-05-19 2:25 ` Stefan Monnier
2014-05-25 18:08 ` Alan Mackenzie
2014-09-08 17:28 ` Stefan Monnier
2014-09-11 13:55 ` Further CC-mode changes Stefan Monnier
2014-09-12 23:59 ` Alan Mackenzie
2014-09-13 1:09 ` Ivan Andrus [this message]
2014-09-13 10:04 ` Alan Mackenzie
2014-09-13 3:04 ` Stefan Monnier
2014-09-13 15:10 ` Alan Mackenzie
2014-09-13 19:24 ` Stefan Monnier
2014-09-13 23:08 ` Syntax-propertize and CC-mode [Was: Further CC-mode changes] Alan Mackenzie
2014-09-14 4:04 ` Stefan Monnier
2014-09-16 17:30 ` Sync'ing cc-mode Stefan Monnier
2014-09-26 19:19 ` Stefan Monnier
[not found] ` <jwv4mvmjl0c.fsf-monnier+emacs@gnu.org>
[not found] ` <jwv4mvkqy4g.fsf-monnier+emacs@gnu.org>
[not found] ` <jwv4mv3mn2a.fsf-monnier+emacs@gnu.org>
[not found] ` <jwv38a644p7.fsf-monnier+emacs@gnu.org>
[not found] ` <jwvppd2wx7o.fsf-monnier+emacs@gnu.org>
[not found] ` <20141106104534.GA3385@acm.acm>
2014-11-06 14:06 ` bug#18022: " Stefan Monnier
2014-09-15 20:24 ` Further CC-mode changes Glenn Morris
2014-09-16 3:07 ` Stephen J. Turnbull
2014-09-16 13:39 ` Stefan Monnier
2014-09-16 14:22 ` David Kastrup
2014-09-16 23:40 ` Stephen J. Turnbull
2014-09-17 1:02 ` Stefan Monnier
2014-09-17 1:48 ` Stephen J. Turnbull
2014-09-17 5:22 ` David Kastrup
2014-09-17 13:00 ` Stefan Monnier
2014-09-17 18:31 ` Glenn Morris
2014-09-17 19:12 ` David Kastrup
2014-09-17 5:24 ` Eli Zaretskii
2014-09-17 6:54 ` Stephen J. Turnbull
2014-09-17 7:20 ` Eli Zaretskii
2014-09-17 7:30 ` David Kastrup
2014-09-17 13:04 ` Stefan Monnier
2014-09-17 18:25 ` Glenn Morris
2014-09-18 5:20 ` Stephen J. Turnbull
2014-09-18 9:44 ` Emilio Lopes
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=6016BCE3-6EAE-455C-A19F-AD2A0D55F321@gmail.com \
--to=darthandrus@gmail.com \
--cc=acm@muc.de \
--cc=emacs-devel@gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/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.