[comp.emacs] c++-mode

milt@SGI.COM (Milton Tinkoff) (10/19/90)

I have the following version of c++-mode:

;;;; c++-mode.el -- Updated C++-mode within

;;;; From ucla-cs!rutgers!seismo!rochester!pt!theory.cs.cmu.edu!dld Wed Jul 22 0
1:38:26 PDT 1987

;;;; There seems to have been a recent mini-surge of interest in the
;;;; c++-mode that I and Stewart Clamen wrote for gnu-emacs.  Glen
;;;; Ditchfield of the University of Waterloo posted a number of changes
;;;; and fixes, and all of these have been included in the version given
;;;; below.

;; C++ code editing commands for Emacs
;; 1987 Dave Detlefs and Stewart Clamen.
;; Done by fairly faithful modification of:
;; c-mode.el, Copyright (C) 1985 Richard M. Stallman.
;;
;; August 1987: incorporated changes done by Glen Ditchfield of Waterloo.


For some reason it's not working correctly.  When I use the TAB key it
just inserts a TAB, it doesn't indent.  I'm sure it's being loaded, so
I know that's not the problem.  It always worked fine in c-mode.
Has anyone else had this problem, or am I just totally clueless?
--
-------------------------------------------------------------------------------
Milt Tinkoff				|	"The average man is a
Silicon Graphics Inc.			|	     stupid man."
milt@waynes-world.esd.sgi.com		|		              -Ed Mao

jdinkins@eagle.calpoly.edu (nobody) (03/20/91)

Using c++-mode, don't know what version, but the most recent comment
is this:

;; Feb, 1990 (Dave Detlefs, dld@cs.cmu.edu)
;;   Fixed electric-c++-terminator to handle double colons, at the
;;   request of John Hagerman.

Anyways, the question is this: can/should electric-c++-brace be automatically
inserting newlines (cariagle returns, whatever) and indent after I press '{'?
It currently doesn't, and I would like it to.

 i.e. typing

 if(wokka_wokka_wokka){ 

should yield

 if(wokka_wokka_wokka)
 {
   .<- cursor should land here

all without me having to press return either after the { or after it
indents in the newline.

So.. am I asking too much? 

While I'm at this wish list, has anyone written anything that does this:

 if(wokka_wokka_wokka){

yields

 if(wokka_wokka_wokka)
 {
   .<- cursor lands here
 }

I know that an editor called brief (my girlfriend uses it at work) does 
this, but I don't use brief.

jeff



-- 
\\         ___/~~O~~\___         //             snikniD  nalA nosreffeJ
  ====____/   \.. ../   \____====               UDE.yloPlaC.olsylop@sniknidj
      -----___=======___-----                   sniknidj!olsylop!redov!xavbcu
              \\-u-//            Where's Waldo?