cc-mode / cc-lobotomy.el

Diff from to

File cc-lobotomy.el

 ;;; cc-lobotomy.el --- excise portions of cc-mode's brain... for speed
-;; Copyright (C) 1985,1987,1992-2001 Free Software Foundation, Inc.
+;; Copyright (C) 1985,1987,1992-2003 Free Software Foundation, Inc.
 ;; Author:     1995 Barry A. Warsaw
 ;; Maintainer: Unmaintained
 		  (stringp byte-compile-dest-file))
 	     (cons (file-name-directory byte-compile-dest-file) load-path)
-    (require 'cc-bytecomp)))
+    (load "cc-bytecomp" nil t)))
 (cc-require 'cc-defs)
 (cc-require 'cc-engine)
 ;; This is a faster version of c-in-literal.  It trades speed for one
 ;; approximation, namely that within other literals, the `#' character
-;; cannot be the first non-whitespace on a line.
-(defun cc-in-literal-lobotomized (&optional lim)
+;; cannot be the first non-whitespace on a line.  This only happens if
+;; detect-cpp is non-nil, which isn't very often.
+(defun cc-in-literal-lobotomized (&optional lim detect-cpp)
   ;; first check the cache
   (if (and (vectorp c-in-literal-cache)
 	   (= (point) (aref c-in-literal-cache 0)))
     (let* (state
 	   (char-at-boi (char-after (c-point 'boi)))
 	   (rtn (cond
-		 ((and char-at-boi (= char-at-boi ?#))
+		 ((and detect-cpp char-at-boi (= char-at-boi ?#))
 		 ((nth 3 (setq state (save-excursion