annotate lisp/cc-mode/cc-lobotomy.el @ 165:5a88923fcbfe r20-3b9

Import from CVS: tag r20-3b9
author cvs
date Mon, 13 Aug 2007 09:44:42 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
1 ;;; cc-lobotomy.el --- excise portions of cc-mode's brain... for speed
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
2
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
3 ;; Copyright (C) 1985,87,92,93,94,95,96,97 Free Software Foundation, Inc.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
4
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
5 ;; Author: 1995 Barry A. Warsaw
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
6 ;; Maintainer: Unmaintained
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
7 ;; Created: March 1995, split from cc-mode.el
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
8 ;; Version: 5.11
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
9 ;; Keywords: c languages oop
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
10
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
11 ;; This file is not part of GNU Emacs.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
12
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
13 ;; This program is free software; you can redistribute it and/or modify
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
14 ;; it under the terms of the GNU General Public License as published by
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
15 ;; the Free Software Foundation; either version 2 of the License, or
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
16 ;; (at your option) any later version.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
17
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
18 ;; This program is distributed in the hope that it will be useful,
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
21 ;; GNU General Public License for more details.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
22
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
23 ;; You should have received a copy of the GNU General Public License
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
24 ;; along with GNU Emacs; see the file COPYING. If not, write to the
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
25 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
26 ;; Boston, MA 02111-1307, USA.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
27
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
28 ;;; Commentary:
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
29 ;;
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
30 ;; Every effort has been made to improve the performance of
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
31 ;; cc-mode. However, due to the nature of the C, C++, and Objective-C
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
32 ;; language definitions, a trade-off is often required between
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
33 ;; accuracy of construct recognition and speed. I believe it is always
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
34 ;; best to be correct, and that the mode is currently fast enough for
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
35 ;; most normal usage. Others disagree. I have no intention of
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
36 ;; including these hacks in the main distribution. When cc-mode
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
37 ;; version 5 comes out, it will include a rewritten indentation engine
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
38 ;; so that performance will be greatly improved automatically. This
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
39 ;; was not included in this release of version 4 so that Emacs 18
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
40 ;; could still be supported. Note that this implies that cc-mode
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
41 ;; version 5 will *not* work on Emacs 18!
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
42 ;;
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
43 ;; To use, see the variable cc-lobotomy-pith-list and the function
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
44 ;; cc-lobotomize. The variable contains a good explanation of the
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
45 ;; speed/accuracy trade-offs for each option. Set it to what you'd
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
46 ;; like, and call cc-lobotomy in your c-mode-hook.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
47 ;;
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
48 ;; This will redefine certain cc-mode functions and affect all cc-mode
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
49 ;; buffers globally.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
50 ;;
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
51 ;; This file is completely unsupported! I have no idea whether this
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
52 ;; will work with such things as cc-mode-18.el.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
53
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
54
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
55 ;;; Code:
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
56 (require 'cc-mode)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
57
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
58 (defvar cc-lobotomy-pith-list ()
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
59 "*List of things to dumb-ify to speed up cc-mode. Note that each
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
60 incurs a penalty in correct identification of certain code constructs.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
61 Possible values to put on this list:
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
62
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
63 'literal -- `c-in-literal' is lobotomized. This will significantly
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
64 speed up parsing over large lists of cpp macros, as seen
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
65 for instance in header files. The penalty is that you
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
66 cannot put the `#' character as the first non-whitespace
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
67 character on a line inside other multi-line literals
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
68 (i.e. comments or strings)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
69
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
70 'class -- `c-narrow-out-enclosing-class' and `c-search-uplist for
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
71 classkey' are lobotomized. This speeds up some
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
72 indenting inside and around class and struct
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
73 definitions. The penalty is that elements inside of
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
74 classes and structs may not indent correctly.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
75
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
76 'lists -- `c-inside-bracelist-p' is lobotomized. This speeds up
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
77 indenting inside and around brace lists (e.g. aggregate
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
78 initializers, enum lists, etc.). The penalty is that
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
79 elements inside these lists may not indent correctly.")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
80
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
81 (defun cc-lobotomize ()
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
82 "Perform lobotomies on cc-mode as described in `cc-lobotomy-pith-list'."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
83 (let (pithedp)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
84 (if (memq 'literal cc-lobotomy-pith-list)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
85 (progn
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
86 (fset 'c-in-literal 'cc-in-literal-lobotomized)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
87 (setq pithedp t)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
88 (if (memq 'class cc-lobotomy-pith-list)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
89 (progn
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
90 (fset 'c-narrow-out-enclosing-class
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
91 'cc-narrow-out-enclosing-class-lobotomized)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
92 (fset 'c-search-uplist-for-classkey
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
93 'cc-search-uplist-for-classkey-lobotomized)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
94 (setq pithedp t)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
95 (if (memq 'lists cc-lobotomy-pith-list)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
96 (progn
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
97 (fset 'c-inside-bracelist-p 'cc-inside-bracelist-p-lobotomized)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
98 (setq pithedp t)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
99 (if pithedp
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
100 (fset 'c-submit-bug-report 'cc-submit-bug-report-lobotomized))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
101 ))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
102
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
103
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
104 ;; This is a faster version of c-in-literal. It trades speed for one
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
105 ;; approximation, namely that within other literals, the `#' character
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
106 ;; cannot be the first non-whitespace on a line.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
107 (defun cc-in-literal-lobotomized (&optional lim)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
108 ;; first check the cache
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
109 (if (and (boundp 'c-in-literal-cache)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
110 c-in-literal-cache
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
111 (= (point) (aref c-in-literal-cache 0)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
112 (aref c-in-literal-cache 1)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
113 ;; quickly check for cpp macro. this breaks if the `#' character
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
114 ;; appears as the first non-whitespace on a line inside another
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
115 ;; literal.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
116 (let* (state
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
117 (char-at-boi (char-after (c-point 'boi)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
118 (rtn (cond
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
119 ((and char-at-boi (= char-at-boi ?#))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
120 'pound)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
121 ((nth 3 (setq state (save-excursion
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
122 (parse-partial-sexp
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
123 (or lim (c-point 'bod))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
124 (point)))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
125 'string)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
126 ((nth 4 state) (if (nth 7 state) 'c++ 'c))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
127 (t nil))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
128 ;; cache this result if the cache is enabled
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
129 (and (boundp 'c-in-literal-cache)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
130 (setq c-in-literal-cache (vector (point) rtn)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
131 rtn)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
132
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
133 (defun cc-narrow-out-enclosing-class-lobotomized (dummy1 dummy2) nil)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
134
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
135 (defun cc-search-uplist-for-classkey-lobotomized (dummy) nil)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
136
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
137 (defun cc-inside-bracelist-p-lobotomized (dummy1 dummy2) nil)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
138
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
139 (defun cc-submit-bug-report-lobotomized ()
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
140 "Submit via mail a bug report on cc-mode."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
141 (interactive)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
142 ;; load in reporter
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
143 (let ((reporter-prompt-for-summary-p t)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
144 (reporter-dont-compact-list '(c-offsets-alist)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
145 (and
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
146 (y-or-n-p "Do you want to submit a report on cc-mode? ")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
147 (require 'reporter)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
148 (reporter-submit-bug-report
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
149 c-mode-help-address
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
150 (concat "cc-mode " c-version " ("
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
151 (cond ((eq major-mode 'c++-mode) "C++")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
152 ((eq major-mode 'c-mode) "C")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
153 ((eq major-mode 'objc-mode) "ObjC"))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
154 ")")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
155 (let ((vars (list
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
156 ;; report only the vars that affect indentation
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
157 'c-basic-offset
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
158 'c-offsets-alist
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
159 'c-block-comments-indent-p
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
160 'c-cleanup-list
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
161 'c-comment-only-line-offset
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
162 'c-backslash-column
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
163 'c-delete-function
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
164 'c-electric-pound-behavior
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
165 'c-hanging-braces-alist
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
166 'c-hanging-colons-alist
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
167 'c-hanging-comment-ender-p
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
168 'c-tab-always-indent
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
169 'c-recognize-knr-p
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
170 'defun-prompt-regexp
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
171 'tab-width
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
172 )))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
173 (if (not (boundp 'defun-prompt-regexp))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
174 (delq 'defun-prompt-regexp vars)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
175 vars))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
176 (function
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
177 (lambda ()
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
178 (insert
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
179 (if c-special-indent-hook
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
180 (concat "\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
181 "c-special-indent-hook is set to '"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
182 (format "%s" c-special-indent-hook)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
183 ".\nPerhaps this is your problem?\n"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
184 "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n\n")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
185 "\n")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
186 (format "c-emacs-features: %s\n" c-emacs-features)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
187 )))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
188 (function
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
189 (lambda ()
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
190 (insert
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
191 "You are using cc-lobotomy.el. You realize that by doing\n"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
192 "so you have already made the decision to trade off accuracy\n"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
193 "for speed? Don't set your hopes too high that your problem\n"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
194 "will be fixed.\n\n"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
195 )))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
196 "Dear Barry,"
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
197 ))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
198
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
199 (provide 'cc-lobotomy)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
200 ;;; cc-lobotomy.el ends here