From xemacs-m  Fri Mar 21 15:00:28 1997
Received: from CNRI.Reston.VA.US (CNRI.Reston.VA.US [132.151.1.1])
	by xemacs.org (8.8.5/8.8.5) with SMTP id PAA06306
	for <xemacs-beta@xemacs.org>; Fri, 21 Mar 1997 15:00:27 -0600 (CST)
Received: from newcnri.cnri.reston.va.us by CNRI.Reston.VA.US id aa19591;
          21 Mar 97 16:03 EST
Received: from anthem.CNRI.Reston.Va.US by newcnri.CNRI.Reston.Va.US (SMI-8.6/SMI-SVR4)
	id QAA06735; Fri, 21 Mar 1997 16:03:10 -0500
Received: by anthem.CNRI.Reston.Va.US (SMI-8.6/SMI-SVR4)
	id QAA00408; Fri, 21 Mar 1997 16:03:10 -0500
Date: Fri, 21 Mar 1997 16:03:10 -0500
Message-Id: <199703212103.QAA00408@anthem.CNRI.Reston.Va.US>
From: "Barry A. Warsaw" <bwarsaw@CNRI.Reston.VA.US>
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="BmEdWK/9rIiCFljztd5UnhRW5yGLV2e4AC/N3s3/"
Content-Transfer-Encoding: 7bit
To: xemacs-beta@xemacs.org
Subject: cc-mode.el 4.381 -> 4.387
X-Mailer: VM 6.20 under 19.15 XEmacs Lucid (beta101)
Reply-To: CCMODE Maintainer <cc-mode-help@python.org>
X-Attribution: BAW
X-Oblique-Strategy: Subvert your original idea
X-Url: http://www.python.org/~bwarsaw


--BmEdWK/9rIiCFljztd5UnhRW5yGLV2e4AC/N3s3/
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


I know we're close to a release... so sue me! :-)


--BmEdWK/9rIiCFljztd5UnhRW5yGLV2e4AC/N3s3/
Content-Type: text/plain
Content-Description: CC Mode bug patch
Content-Disposition: inline;
	filename="p1"
Content-Transfer-Encoding: 7bit

*** cc-mode.el	1997/03/18 16:43:13	4.381
--- cc-mode.el	1997/03/21 20:25:51
***************
*** 7,12 ****
  ;;          1985 Richard M. Stallman
  ;; Created: a long, long, time ago. adapted from the original c-mode.el
! ;; Version:         4.381
! ;; Last Modified:   1997/03/18 16:43:13
  ;; Keywords: c languages oop
  
--- 7,12 ----
  ;;          1985 Richard M. Stallman
  ;; Created: a long, long, time ago. adapted from the original c-mode.el
! ;; Version:         4.387
! ;; Last Modified:   1997/03/21 20:25:33
  ;; Keywords: c languages oop
  
***************
*** 33,48 ****
  ;;; Commentary:
  
! ;; This package provides modes in GNU Emacs for editing C, C++,
! ;; Objective-C, and Java code. It is intended to be a replacement for
! ;; c-mode.el (a.k.a. BOCM -- Boring Old C-Mode), c++-mode.el,
! ;; cplus-md.el, and cplus-md1.el, all of which are in some way
! ;; ancestors of this file.  A number of important improvements have
! ;; been made, briefly: complete K&R C, ANSI C, `ARM' C++, Objective-C,
! ;; and Java support with consistent indentation across all modes, more
! ;; intuitive indentation controlling variables, compatibility across
! ;; all known Emacsen, nice new features, and tons of bug fixes.  This
! ;; package is called "CC Mode" to distinguish it from its ancestors,
! ;; but there is no cc-mode command.  Usage and programming details are
! ;; contained in an accompanying texinfo manual.
  
  ;; NOTE: This mode does not perform font-locking (a.k.a syntactic
--- 33,49 ----
  ;;; Commentary:
  
! ;; This package provides GNU Emacs major modes for editing C, C++,
! ;; Objective-C, and Java code.  As of the latest Emacs and XEmacs
! ;; releases, it is the default package for editing these languages.
! ;; This package is called "CC Mode", and should be spelled exactly
! ;; this way.  It supports K&R and ANSI C, ANSI C++, Objective-C, and
! ;; Java, with a consistent indentation model across all modes.  This
! ;; indentation model is intuitive and very flexible, so that almost
! ;; any desired style of indentation can be supported.  Installation,
! ;; usage, and programming details are contained in an accompanying
! ;; texinfo manual.
! 
! ;; CC Mode's immediate ancestors were, c++-mode.el, cplus-md.el, and
! ;; cplus-md1.el..
  
  ;; NOTE: This mode does not perform font-locking (a.k.a syntactic
***************
*** 69,88 ****
  ;; follow this advice :-).
  
- ;; As of this writing (24-Feb-1997), CC Mode comes with the latest
- ;; Emacs and XEmacs distributions (19.34 and 19.14 respectively), but
- ;; is no longer pre-loaded by default.  To use the latest version of
- ;; CC Mode, you need only make sure that this copy of cc-mode.el is
- ;; found first on your load-path.
- 
- ;; If your Emacs is pre-loaded with any version of cc-mode.el,
- ;; c-mode.el, or c++-mode.el, you will need to consult the
- ;; cc-mode.texinfo manual for details on upgrading your Emacs.
- 
- ;; There are four major mode entry points provided by this package,
- ;; one for editing C++ code, one for editing C code (both K&R and
- ;; ANSI), one for editing Objective-C code, and one for editing Java
- ;; code.  The commands are M-x c-mode, M-x c++-mode, M-x objc-mode,
- ;; and M-x java-mode.
- 
  ;; Many, many thanks go out to all the folks on the beta test list.
  ;; Without their patience, testing, insight, code contributions, and
--- 70,73 ----
***************
*** 422,427 ****
    "*List of behaviors for electric pound insertion.
  Only currently supported behavior is `alignleft'.")
  (defvar c-label-minimum-indentation 1
!   "*Minimum indentation for labels and case tags in `gnu' style.")
  
  (defvar c-progress-interval 5
--- 407,418 ----
    "*List of behaviors for electric pound insertion.
  Only currently supported behavior is `alignleft'.")
+ 
  (defvar c-label-minimum-indentation 1
!   "*Minimum indentation for lines inside of top-level constructs.
! This variable typically only affects code using the `gnu' style, which
! mandates a minimum of one space in front of every line inside
! top-level constructs.  Specifically, the function
! `c-gnu-impose-minimum' on your `c-special-indent-hook' is what
! enforces this.")
  
  (defvar c-progress-interval 5
***************
*** 1240,1247 ****
    "friend[ \t]+\\|template[ \t]*<.+>[ \t]*friend[ \t]+"
    "Regexp describing friend declarations in C++ classes.")
! (defconst c-C++-comment-start-regexp "/[/*]"
!   "Dual comment value for `c-comment-start-regexp'.")
! (defconst c-C-comment-start-regexp "/\\*"
!   "Single comment style value for `c-comment-start-regexp'.")
  
  (defconst c-ObjC-method-key
--- 1231,1242 ----
    "friend[ \t]+\\|template[ \t]*<.+>[ \t]*friend[ \t]+"
    "Regexp describing friend declarations in C++ classes.")
! 
! ;; comment starter definitions for various languages.  the language
! ;; modes will set c-comment-start-regexp to this value.
! (defconst c-C++-comment-start-regexp "/[/*]")
! (defconst c-C-comment-start-regexp "/[*]")
! ;; We need to match all 3 Java style comments
! ;; 1) Traditional C block; 2) javadoc /** ...; 3) C++ style
! (defconst c-Java-comment-start-regexp "/\\(/\\|[*][*]?\\)")
  
  (defconst c-ObjC-method-key
***************
*** 1454,1458 ****
   	comment-multi-line nil
   	c-conditional-key c-Java-conditional-key
!  	c-comment-start-regexp c-C++-comment-start-regexp
    	c-class-key c-Java-class-key
  	c-method-key c-Java-method-key
--- 1449,1453 ----
   	comment-multi-line nil
   	c-conditional-key c-Java-conditional-key
!  	c-comment-start-regexp c-Java-comment-start-regexp
    	c-class-key c-Java-class-key
  	c-method-key c-Java-method-key
***************
*** 1598,1601 ****
--- 1593,1601 ----
  
  ;; macros must be defined before first use
+ (defmacro c-add-syntax (symbol &optional relpos)
+   ;; a simple macro to append the syntax in symbol to the syntax list.
+   ;; try to increase performance by using this macro
+   (` (setq syntax (cons (cons (, symbol) (, relpos)) syntax))))
+ 
  (defmacro c-point (position)
    ;; Returns the value of point at certain commonly referenced POSITIONs.
***************
*** 2612,2616 ****
  				    (search-backward "/*"))
  				  (if (and (not c-hanging-comment-starter-p)
! 					   (looking-at "/\\*[ \t]*$"))
  				      (forward-line 1))
  				  ;; Protect text before the comment
--- 2612,2618 ----
  				    (search-backward "/*"))
  				  (if (and (not c-hanging-comment-starter-p)
! 					   (looking-at
! 					    (concat c-comment-start-regexp
! 						    "[ \t]*$")))
  				      (forward-line 1))
  				  ;; Protect text before the comment
***************
*** 3858,3866 ****
  ;; defuns for calculating the syntactic state and indenting a single
  ;; line of C/C++/ObjC code
- (defmacro c-add-syntax (symbol &optional relpos)
-   ;; a simple macro to append the syntax in symbol to the syntax list.
-   ;; try to increase performance by using this macro
-   (` (setq syntax (cons (cons (, symbol) (, relpos)) syntax))))
- 
  (defun c-most-enclosing-brace (state)
    ;; return the bufpos of the most enclosing brace that hasn't been
--- 3860,3863 ----
***************
*** 4938,4943 ****
  		  (goto-char here)
  		  (back-to-indentation)
! 		  (if (re-search-forward "[*]+/" (c-point 'eol) t)
! 		      (forward-comment -1)
  		    (goto-char (cdr langelem))
  		    (back-to-indentation))))
--- 4935,4941 ----
  		  (goto-char here)
  		  (back-to-indentation)
! 		  (if (looking-at "[*]+/")
! 		      (progn (goto-char (match-end 0))
! 			     (forward-comment -1))
  		    (goto-char (cdr langelem))
  		    (back-to-indentation))))
***************
*** 5206,5210 ****
  ;; defuns for submitting bug reports
  
! (defconst c-version "4.381"
    "CC Mode version number.")
  (defconst c-mode-help-address
--- 5204,5208 ----
  ;; defuns for submitting bug reports
  
! (defconst c-version "4.387"
    "CC Mode version number.")
  (defconst c-mode-help-address
***************
*** 5227,5231 ****
    ;; load in reporter
    (let ((reporter-prompt-for-summary-p t)
! 	(reporter-dont-compact-list '(c-offsets-alist)))
      (and
       (if (y-or-n-p "Do you want to submit a report on CC Mode? ")
--- 5225,5232 ----
    ;; load in reporter
    (let ((reporter-prompt-for-summary-p t)
! 	(reporter-dont-compact-list '(c-offsets-alist))
! 	(style c-indentation-style)
! 	(hook c-special-indent-hook)
! 	(c-features c-emacs-features))
      (and
       (if (y-or-n-p "Do you want to submit a report on CC Mode? ")
***************
*** 5254,5257 ****
--- 5255,5259 ----
  		   'c-hanging-comment-starter-p
  		   'c-hanging-comment-ender-p
+ 		   'c-indent-comments-syntactically-p
  		   'c-tab-always-indent
  		   'c-recognize-knr-p
***************
*** 5266,5278 ****
         (lambda ()
  	 (insert
! 	  "Buffer Style: " c-indentation-style "\n\n"
! 	  (if c-special-indent-hook
  	      (concat "\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
  		      "c-special-indent-hook is set to '"
! 		      (format "%s" c-special-indent-hook)
  		      ".\nPerhaps this is your problem?\n"
  		      "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n\n")
  	    "\n")
! 	  (format "c-emacs-features: %s\n" c-emacs-features)
  	  )))
        nil
--- 5268,5280 ----
         (lambda ()
  	 (insert
! 	  "Buffer Style: " style "\n\n"
! 	  (if hook
  	      (concat "\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
  		      "c-special-indent-hook is set to '"
! 		      (format "%s" hook)
  		      ".\nPerhaps this is your problem?\n"
  		      "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n\n")
  	    "\n")
! 	  (format "c-emacs-features: %s\n" c-features)
  	  )))
        nil

--BmEdWK/9rIiCFljztd5UnhRW5yGLV2e4AC/N3s3/--

