;;; cc-lobotomy.el --- excise portions of cc-mode's brain... for speed
-;; Copyright (C) 1985,1987,1992-200
0 Free Software Foundation, Inc.
+;; Copyright (C) 1985,1987,1992-200 Free Software Foundation, Inc.
;; Author: 1995 Barry A. Warsaw
;; Maintainer: Unmaintained
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; along with this program; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;; This will redefine certain cc-mode functions and affect all cc-mode
-;; This file is completely unsupported! I have no idea whether this
-;; will work with such things as cc-mode-18.el.
+;; This file is completely unsupported! Although it has been patched
+;; superficially to keep pace with the rest of CC Mode, it hasn't been
+;; tested for a long time.
- (if (and (boundp 'byte-compile-current-file)
- (stringp byte-compile-current-file))
- (cons (file-name-directory byte-compile-current-file)
+ (if (and (boundp 'byte-compile-dest-file)
+ (stringp byte-compile-dest-file))
+ (cons (file-name-directory byte-compile-dest-file) load-path)
- (load "cc-defs" nil t)))
+ (require 'cc-bytecomp)))
(defvar cc-lobotomy-pith-list ()
(fset 'c-inside-bracelist-p 'cc-inside-bracelist-p-lobotomized)
fset 'c-submit-bug-report 'cc-submit-bug-report- lobotomized))
;; cannot be the first non-whitespace on a line.
(defun cc-in-literal-lobotomized (&optional lim)
- (if (and (boundp 'c-in-literal-cache)
+ (if (and (vectorp c-in-literal-cache)
(= (point) (aref c-in-literal-cache 0)))
(aref c-in-literal-cache 1)
;; quickly check for cpp macro. this breaks if the `#' character
((nth 4 state) (if (nth 7 state) 'c++ 'c))
;; cache this result if the cache is enabled
- (and (boundp 'c-in-literal-cache)
- (setq c-in-literal-cache (vector (point) rtn)))
+ (if (not c-in-literal-cache)
+ (setq c-in-literal-cache (vector (point) rtn)))
(defun cc-narrow-out-enclosing-class-lobotomized (dummy1 dummy2) nil)
(defun cc-inside-bracelist-p-lobotomized (dummy1 dummy2) nil)
-(defun cc-submit-bug-report-lobotomized ()
- "Submit via mail a bug report on cc-mode."
- (let ((reporter-prompt-for-summary-p t)
- (reporter-dont-compact-list '(c-offsets-alist)))
- (y-or-n-p "Do you want to submit a report on cc-mode? ")
- (concat "cc-mode " c-version " ("
- (cond ((eq major-mode 'c++-mode) "C++")
- ((eq major-mode 'c-mode) "C")
- ((eq major-mode 'objc-mode) "ObjC"))
- ;; report only the vars that affect indentation
- (if (not (boundp 'defun-prompt-regexp))
- (delq 'defun-prompt-regexp vars)
- (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"
- (format "c-emacs-features: %s\n" c-emacs-features)
- "You are using cc-lobotomy.el. You realize that by doing\n"
- "so you have already made the decision to trade off accuracy\n"
- "for speed? Don't set your hopes too high that your problem\n"
+(defun cc-lobo-bug-report-blurb ()
+ "\nYou are using cc-lobotomy.el. You realize that by doing\n"
+ "so you have already made the decision to trade off accuracy\n"
+ "for speed? Don't set your hopes too high that your problem\n"
;;; cc-lobotomy.el ends here