aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/obsolete
diff options
context:
space:
mode:
authorSam Steingold2001-11-27 15:52:52 +0000
committerSam Steingold2001-11-27 15:52:52 +0000
commit8a9463543d5b82409a24e23905d271cdebf70059 (patch)
tree503c81c7058491327cc13ab0eff04ed5dc6dd855 /lisp/obsolete
parentc6aedc9284492c790448cce23b0e5cc134885148 (diff)
downloademacs-8a9463543d5b82409a24e23905d271cdebf70059.tar.gz
emacs-8a9463543d5b82409a24e23905d271cdebf70059.zip
Converted backquote to the new style.
Diffstat (limited to 'lisp/obsolete')
-rw-r--r--lisp/obsolete/c-mode.el168
-rw-r--r--lisp/obsolete/cplus-md.el168
2 files changed, 166 insertions, 170 deletions
diff --git a/lisp/obsolete/c-mode.el b/lisp/obsolete/c-mode.el
index 2be4ea9ed18..a76d963283a 100644
--- a/lisp/obsolete/c-mode.el
+++ b/lisp/obsolete/c-mode.el
@@ -207,99 +207,97 @@ regardless of where in the line point is when the TAB command is used."
207 207
208;; This is actually the expression for C++ mode, but it's used for C too. 208;; This is actually the expression for C++ mode, but it's used for C too.
209(defvar c-imenu-generic-expression 209(defvar c-imenu-generic-expression
210 (` 210 `((nil
211 ((nil 211 ,(concat
212 (, 212 "^" ; beginning of line is required
213 (concat
214 "^" ; beginning of line is required
215 "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>" 213 "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>"
216 "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no 214 "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no
217 "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right? 215 "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right?
218 216
219 "\\(" ; last type spec including */& 217 "\\(" ; last type spec including */&
220 "[a-zA-Z0-9_:]+" 218 "[a-zA-Z0-9_:]+"
221 "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace 219 "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace
222 "\\)?" ; if there is a last type spec 220 "\\)?" ; if there is a last type spec
223 "\\(" ; name; take that into the imenu entry 221 "\\(" ; name; take that into the imenu entry
224 "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor... 222 "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor...
225 ; (may not contain * because then 223 ; (may not contain * because then
226 ; "a::operator char*" would become "char*"!) 224 ; "a::operator char*" would become "char*"!)
227 "\\|" 225 "\\|"
228 "\\([a-zA-Z0-9_:~]*::\\)?operator" 226 "\\([a-zA-Z0-9_:~]*::\\)?operator"
229 "[^a-zA-Z1-9_][^(]*" ; ...or operator 227 "[^a-zA-Z1-9_][^(]*" ; ...or operator
230 " \\)" 228 " \\)"
231 "[ \t]*([^)]*)[ \t\n]*[^ ;]" ; require something other than a ; after 229 "[ \t]*([^)]*)[ \t\n]*[^ ;]" ; require something other than a ; after
232 ; the (...) to avoid prototypes. Can't 230 ; the (...) to avoid prototypes. Can't
233 ; catch cases with () inside the parentheses 231 ; catch cases with () inside the parentheses
234 ; surrounding the parameters 232 ; surrounding the parameters
235 ; (like "int foo(int a=bar()) {...}" 233 ; (like "int foo(int a=bar()) {...}"
236 234
237 )) 6) 235 ) 6)
238 ("Class" 236 ("Class"
239 (, (concat 237 ,(concat
240 "^" ; beginning of line is required 238 "^" ; beginning of line is required
241 "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>" 239 "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>"
242 "class[ \t]+" 240 "class[ \t]+"
243 "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get 241 "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get
244 "[ \t]*[:{]" 242 "[ \t]*[:{]"
245 )) 2) 243 ) 2)
246;; Example of generic expression for finding prototypes, structs, unions, enums. 244 ;; Example of generic expression for finding prototypes, structs, unions, enums.
247;; Uncomment if you want to find these too. It will be a bit slower gathering 245 ;; Uncomment if you want to find these too. It will be a bit slower gathering
248;; the indexes. 246 ;; the indexes.
249; ("Prototypes" 247 ; ("Prototypes"
250; (, 248 ; (,
251; (concat 249 ; (concat
252; "^" ; beginning of line is required 250 ; "^" ; beginning of line is required
253; "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>" 251 ; "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>"
254; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no 252 ; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no
255; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right? 253 ; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right?
256 254
257; "\\(" ; last type spec including */& 255 ; "\\(" ; last type spec including */&
258; "[a-zA-Z0-9_:]+" 256 ; "[a-zA-Z0-9_:]+"
259; "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace 257 ; "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace
260; "\\)?" ; if there is a last type spec 258 ; "\\)?" ; if there is a last type spec
261; "\\(" ; name; take that into the imenu entry 259 ; "\\(" ; name; take that into the imenu entry
262; "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor... 260 ; "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor...
263; ; (may not contain * because then 261 ; ; (may not contain * because then
264; ; "a::operator char*" would become "char*"!) 262 ; ; "a::operator char*" would become "char*"!)
265; "\\|" 263 ; "\\|"
266; "\\([a-zA-Z0-9_:~]*::\\)?operator" 264 ; "\\([a-zA-Z0-9_:~]*::\\)?operator"
267; "[^a-zA-Z1-9_][^(]*" ; ...or operator 265 ; "[^a-zA-Z1-9_][^(]*" ; ...or operator
268; " \\)" 266 ; " \\)"
269; "[ \t]*([^)]*)[ \t\n]*;" ; require ';' after 267 ; "[ \t]*([^)]*)[ \t\n]*;" ; require ';' after
270; ; the (...) Can't 268 ; ; the (...) Can't
271; ; catch cases with () inside the parentheses 269 ; ; catch cases with () inside the parentheses
272; ; surrounding the parameters 270 ; ; surrounding the parameters
273; ; (like "int foo(int a=bar());" 271 ; ; (like "int foo(int a=bar());"
274; )) 6) 272 ; )) 6)
275; ("Struct" 273 ; ("Struct"
276; (, (concat 274 ; (, (concat
277; "^" ; beginning of line is required 275 ; "^" ; beginning of line is required
278; "\\(static[ \t]+\\)?" ; there may be static or const. 276 ; "\\(static[ \t]+\\)?" ; there may be static or const.
279; "\\(const[ \t]+\\)?" 277 ; "\\(const[ \t]+\\)?"
280; "struct[ \t]+" 278 ; "struct[ \t]+"
281; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get 279 ; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get
282; "[ \t]*[{]" 280 ; "[ \t]*[{]"
283; )) 3) 281 ; )) 3)
284; ("Enum" 282 ; ("Enum"
285; (, (concat 283 ; (, (concat
286; "^" ; beginning of line is required 284 ; "^" ; beginning of line is required
287; "\\(static[ \t]+\\)?" ; there may be static or const. 285 ; "\\(static[ \t]+\\)?" ; there may be static or const.
288; "\\(const[ \t]+\\)?" 286 ; "\\(const[ \t]+\\)?"
289; "enum[ \t]+" 287 ; "enum[ \t]+"
290; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get 288 ; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get
291; "[ \t]*[{]" 289 ; "[ \t]*[{]"
292; )) 3) 290 ; )) 3)
293; ("Union" 291 ; ("Union"
294; (, (concat 292 ; (, (concat
295; "^" ; beginning of line is required 293 ; "^" ; beginning of line is required
296; "\\(static[ \t]+\\)?" ; there may be static or const. 294 ; "\\(static[ \t]+\\)?" ; there may be static or const.
297; "\\(const[ \t]+\\)?" 295 ; "\\(const[ \t]+\\)?"
298; "union[ \t]+" 296 ; "union[ \t]+"
299; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get 297 ; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get
300; "[ \t]*[{]" 298 ; "[ \t]*[{]"
301; )) 3) 299 ; )) 3)
302 )) 300 )
303 "Imenu generic expression for C mode. See `imenu-generic-expression'.") 301 "Imenu generic expression for C mode. See `imenu-generic-expression'.")
304 302
305(defun c-mode () 303(defun c-mode ()
@@ -1439,7 +1437,7 @@ If within a string or comment, move by sentences instead of statements."
1439 (parse-partial-sexp beg (point) 1437 (parse-partial-sexp beg (point)
1440 nil nil state))) 1438 nil nil state)))
1441 (and (not (nth 3 new-state)) (not (nth 5 new-state)))) 1439 (and (not (nth 3 new-state)) (not (nth 5 new-state))))
1442 (indent-for-comment))))))))))) 1440 (indent-for-comment)))))))))))))
1443 1441
1444;; Look at all comment-start strings in the current line after point. 1442;; Look at all comment-start strings in the current line after point.
1445;; Return t if one of them starts a real comment. 1443;; Return t if one of them starts a real comment.
diff --git a/lisp/obsolete/cplus-md.el b/lisp/obsolete/cplus-md.el
index 1b0c0e0b946..8df342ba4d2 100644
--- a/lisp/obsolete/cplus-md.el
+++ b/lisp/obsolete/cplus-md.el
@@ -174,99 +174,97 @@ list. Nil indicates to just after the paren."
174 :group 'old-c++) 174 :group 'old-c++)
175 175
176(defvar c++-imenu-generic-expression 176(defvar c++-imenu-generic-expression
177 (` 177 `((nil
178 ((nil 178 ,(concat
179 (, 179 "^" ; beginning of line is required
180 (concat
181 "^" ; beginning of line is required
182 "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>" 180 "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>"
183 "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no 181 "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no
184 "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right? 182 "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right?
185 183
186 "\\(" ; last type spec including */& 184 "\\(" ; last type spec including */&
187 "[a-zA-Z0-9_:]+" 185 "[a-zA-Z0-9_:]+"
188 "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace 186 "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace
189 "\\)?" ; if there is a last type spec 187 "\\)?" ; if there is a last type spec
190 "\\(" ; name; take that into the imenu entry 188 "\\(" ; name; take that into the imenu entry
191 "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor... 189 "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor...
192 ; (may not contain * because then 190 ; (may not contain * because then
193 ; "a::operator char*" would become "char*"!) 191 ; "a::operator char*" would become "char*"!)
194 "\\|" 192 "\\|"
195 "\\([a-zA-Z0-9_:~]*::\\)?operator" 193 "\\([a-zA-Z0-9_:~]*::\\)?operator"
196 "[^a-zA-Z1-9_][^(]*" ; ...or operator 194 "[^a-zA-Z1-9_][^(]*" ; ...or operator
197 " \\)" 195 " \\)"
198 "[ \t]*([^)]*)[ \t\n]*[^ ;]" ; require something other than a ; after 196 "[ \t]*([^)]*)[ \t\n]*[^ ;]" ; require something other than a ; after
199 ; the (...) to avoid prototypes. Can't 197 ; the (...) to avoid prototypes. Can't
200 ; catch cases with () inside the parentheses 198 ; catch cases with () inside the parentheses
201 ; surrounding the parameters 199 ; surrounding the parameters
202 ; (like "int foo(int a=bar()) {...}" 200 ; (like "int foo(int a=bar()) {...}"
203 201
204 )) 6) 202 ) 6)
205 ("Class" 203 ("Class"
206 (, (concat 204 ,(concat
207 "^" ; beginning of line is required 205 "^" ; beginning of line is required
208 "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>" 206 "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>"
209 "class[ \t]+" 207 "class[ \t]+"
210 "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get 208 "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get
211 "[ \t]*[:{]" 209 "[ \t]*[:{]"
212 )) 2) 210 ) 2)
213;; Example of generic expression for finding prototypes, structs, unions, enums. 211 ;; Example of generic expression for finding prototypes, structs, unions, enums.
214;; Uncomment if you want to find these too. It will be a bit slower gathering 212 ;; Uncomment if you want to find these too. It will be a bit slower gathering
215;; the indexes. 213 ;; the indexes.
216; ("Prototypes" 214 ; ("Prototypes"
217; (, 215 ; (,
218; (concat 216 ; (concat
219; "^" ; beginning of line is required 217 ; "^" ; beginning of line is required
220; "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>" 218 ; "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a "template <...>"
221; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no 219 ; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; type specs; there can be no
222; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right? 220 ; "\\([a-zA-Z0-9_:]+[ \t]+\\)?" ; more than 3 tokens, right?
223 221
224; "\\(" ; last type spec including */& 222 ; "\\(" ; last type spec including */&
225; "[a-zA-Z0-9_:]+" 223 ; "[a-zA-Z0-9_:]+"
226; "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace 224 ; "\\([ \t]*[*&]+[ \t]*\\|[ \t]+\\)" ; either pointer/ref sign or whitespace
227; "\\)?" ; if there is a last type spec 225 ; "\\)?" ; if there is a last type spec
228; "\\(" ; name; take that into the imenu entry 226 ; "\\(" ; name; take that into the imenu entry
229; "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor... 227 ; "[a-zA-Z0-9_:~]+" ; member function, ctor or dtor...
230; ; (may not contain * because then 228 ; ; (may not contain * because then
231; ; "a::operator char*" would become "char*"!) 229 ; ; "a::operator char*" would become "char*"!)
232; "\\|" 230 ; "\\|"
233; "\\([a-zA-Z0-9_:~]*::\\)?operator" 231 ; "\\([a-zA-Z0-9_:~]*::\\)?operator"
234; "[^a-zA-Z1-9_][^(]*" ; ...or operator 232 ; "[^a-zA-Z1-9_][^(]*" ; ...or operator
235; " \\)" 233 ; " \\)"
236; "[ \t]*([^)]*)[ \t\n]*;" ; require ';' after 234 ; "[ \t]*([^)]*)[ \t\n]*;" ; require ';' after
237; ; the (...) Can't 235 ; ; the (...) Can't
238; ; catch cases with () inside the parentheses 236 ; ; catch cases with () inside the parentheses
239; ; surrounding the parameters 237 ; ; surrounding the parameters
240; ; (like "int foo(int a=bar());" 238 ; ; (like "int foo(int a=bar());"
241; )) 6) 239 ; )) 6)
242; ("Struct" 240 ; ("Struct"
243; (, (concat 241 ; (, (concat
244; "^" ; beginning of line is required 242 ; "^" ; beginning of line is required
245; "\\(static[ \t]+\\)?" ; there may be static or const. 243 ; "\\(static[ \t]+\\)?" ; there may be static or const.
246; "\\(const[ \t]+\\)?" 244 ; "\\(const[ \t]+\\)?"
247; "struct[ \t]+" 245 ; "struct[ \t]+"
248; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get 246 ; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get
249; "[ \t]*[{]" 247 ; "[ \t]*[{]"
250; )) 3) 248 ; )) 3)
251; ("Enum" 249 ; ("Enum"
252; (, (concat 250 ; (, (concat
253; "^" ; beginning of line is required 251 ; "^" ; beginning of line is required
254; "\\(static[ \t]+\\)?" ; there may be static or const. 252 ; "\\(static[ \t]+\\)?" ; there may be static or const.
255; "\\(const[ \t]+\\)?" 253 ; "\\(const[ \t]+\\)?"
256; "enum[ \t]+" 254 ; "enum[ \t]+"
257; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get 255 ; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get
258; "[ \t]*[{]" 256 ; "[ \t]*[{]"
259; )) 3) 257 ; )) 3)
260; ("Union" 258 ; ("Union"
261; (, (concat 259 ; (, (concat
262; "^" ; beginning of line is required 260 ; "^" ; beginning of line is required
263; "\\(static[ \t]+\\)?" ; there may be static or const. 261 ; "\\(static[ \t]+\\)?" ; there may be static or const.
264; "\\(const[ \t]+\\)?" 262 ; "\\(const[ \t]+\\)?"
265; "union[ \t]+" 263 ; "union[ \t]+"
266; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get 264 ; "\\([a-zA-Z0-9_]+\\)" ; this is the string we want to get
267; "[ \t]*[{]" 265 ; "[ \t]*[{]"
268; )) 3) 266 ; )) 3)
269 )) 267 )
270 "Imenu generic expression for C++ mode. See `imenu-generic-expression'.") 268 "Imenu generic expression for C++ mode. See `imenu-generic-expression'.")
271 269
272(defun c++-mode () 270(defun c++-mode ()
@@ -721,7 +719,7 @@ Returns nil if line starts inside a string, t if in a comment."
721 (if (eq (preceding-char) ?\)) 719 (if (eq (preceding-char) ?\))
722 (forward-sexp -1)) 720 (forward-sexp -1))
723 ;; Get initial indentation of the line we are on. 721 ;; Get initial indentation of the line we are on.
724 (current-indentation)))))))))) 722 (current-indentation)))))))))))
725 723
726(defun c++-backward-to-noncomment (lim) 724(defun c++-backward-to-noncomment (lim)
727 (let (opoint stop) 725 (let (opoint stop)
@@ -880,7 +878,7 @@ Returns nil if line starts inside a string, t if in a comment."
880 (point)) t) 878 (point)) t)
881 (progn 879 (progn
882 (indent-for-comment) 880 (indent-for-comment)
883 (beginning-of-line)))))))))) 881 (beginning-of-line)))))))))))
884 882
885(defun fill-c++-comment () 883(defun fill-c++-comment ()
886 "Fill a comment contained in consecutive lines containing point. 884 "Fill a comment contained in consecutive lines containing point.