Xref: utzoo comp.emacs:9644 gnu.emacs.help:462 Path: utzoo!utgpu!watserv1!watmath!uunet!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!ukma!uflorida!rex!wuarchive!julius.cs.uiuc.edu!sane From: sane@cs.uiuc.edu (Aamod Sane) Newsgroups: comp.emacs,gnu.emacs.help Subject: Re: C++-mode and public: (was abbrevs) Message-ID: <1990Nov30.012050.17972@julius.cs.uiuc.edu> Date: 30 Nov 90 01:20:50 GMT References: <1990Nov30.000710.17543@julius.cs.uiuc.edu> Sender: news@julius.cs.uiuc.edu (USENet News) Organization: U of Illinois, Dept. of Computer Science, Systems Research Group Lines: 53 sane@cs.uiuc.edu (Aamod Sane) writes: >fuchs@it.uka.de (Harald Fuchs) writes: >>I have a problem with the version of c++-mode.el beginning like that: >> ;; C++ code editing commands for Emacs >> ;; 1987 Dave Detlefs (dld@cs.cmu.edu) >> ;; and Stewart Clamen (clamen@cs.cmu.edu). >> ;; Done by fairly faithful modification of: >> ;; c-mode.el, Copyright (C) 1985 Richard M. Stallman. >> ;; >> ;; Feb, 1990 (Dave Detlefs, dld@cs.cmu.edu) >> ;; Fixed electric-c++-terminator to handle double colons, at the >> ;; request of John Hagerman. >>I'm a lazy typist (seems that C++ is too verbose for me), so I defined >>mode-abbrevs like "reg" for "register", "pub" for "public" etc. >>This works fine except in one case: >>class Foo { >> pub >> ^ cursor is here >>When I hit the ":" key, "pub" is correctly expanded to "public:", but >>it is not moved to the beginning of the line: >>class Foo { >> public: >>What I would like to see is: >In general, using the same variable to define the indentation of the >case: and the others public: or normal labels is a bit inconvenient. >I want case: indentation of -4, but public: and any other labels >flush to the left. ( The best thing would be a table of label words >and indentations. ( Since C++ is sure to have more of these as we go along :-)) >Is there a quick fix for this? >Thanks >Aamod Sane >-- >sane@cs.uiuc.edu > == / \ >----- == * \_/ -|||- > == -- sane@cs.uiuc.edu == / \ ----- == * \_/ -|||- ==