[gnu.emacs.help] C++-mode and public:

sane@cs.uiuc.edu (Aamod Sane) (11/30/90)

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
         ==         / \  
-----    ==    *    \_/     -|||- 
         ==