Path: utzoo!utgpu!watserv1!watmath!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!sane From: sane@cs.uiuc.edu (Aamod Sane) Newsgroups: comp.emacs Subject: Re: C++-mode and public: (was abbrevs) Message-ID: <1990Nov30.000710.17543@julius.cs.uiuc.edu> Date: 30 Nov 90 00:07:10 GMT References: Sender: news@julius.cs.uiuc.edu (USENet News) Organization: U of Illinois, Dept. of Computer Science, Systems Research Group Lines: 46 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 == / \ ----- == * \_/ -|||- ==