diff options
| author | Glenn Morris | 2009-01-11 03:07:50 +0000 |
|---|---|---|
| committer | Glenn Morris | 2009-01-11 03:07:50 +0000 |
| commit | 304515db3bacdb803004943ed9cec03cab644dc2 (patch) | |
| tree | c4dcff3f26e133aed6062a74f2643407b590a1b9 | |
| parent | 93da04c0addaec106d1aa47b0a00a703dac5883a (diff) | |
| download | emacs-304515db3bacdb803004943ed9cec03cab644dc2.tar.gz emacs-304515db3bacdb803004943ed9cec03cab644dc2.zip | |
Fix comment typo, and some trailing whitespace.
| -rw-r--r-- | lisp/progmodes/cc-menus.el | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el index e15060bf84b..bfd93a6b4d0 100644 --- a/lisp/progmodes/cc-menus.el +++ b/lisp/progmodes/cc-menus.el | |||
| @@ -130,7 +130,7 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") | |||
| 130 | "[ \t]*([^)]*)[ \t]*)[ \t]*[^ \t;]" ; see above | 130 | "[ \t]*([^)]*)[ \t]*)[ \t]*[^ \t;]" ; see above |
| 131 | ) 1))) | 131 | ) 1))) |
| 132 | ;; Class definitions | 132 | ;; Class definitions |
| 133 | ("Class" | 133 | ("Class" |
| 134 | ,(concat | 134 | ,(concat |
| 135 | "^" ; beginning of line is required | 135 | "^" ; beginning of line is required |
| 136 | "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a `template <...>' | 136 | "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a `template <...>' |
| @@ -142,7 +142,7 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") | |||
| 142 | "\\([ \t\n]\\|\\\\\n\\)*[:{]" | 142 | "\\([ \t\n]\\|\\\\\n\\)*[:{]" |
| 143 | ) 3)) | 143 | ) 3)) |
| 144 | "Imenu generic expression for C++ mode. See `imenu-generic-expression'.") | 144 | "Imenu generic expression for C++ mode. See `imenu-generic-expression'.") |
| 145 | 145 | ||
| 146 | (defvar cc-imenu-c-generic-expression | 146 | (defvar cc-imenu-c-generic-expression |
| 147 | cc-imenu-c++-generic-expression | 147 | cc-imenu-c++-generic-expression |
| 148 | "Imenu generic expression for C mode. See `imenu-generic-expression'.") | 148 | "Imenu generic expression for C mode. See `imenu-generic-expression'.") |
| @@ -167,7 +167,7 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") | |||
| 167 | ) 1)) | 167 | ) 1)) |
| 168 | "Imenu generic expression for Java mode. See `imenu-generic-expression'.") | 168 | "Imenu generic expression for Java mode. See `imenu-generic-expression'.") |
| 169 | 169 | ||
| 170 | ;; *Warning for cc-mode developers* | 170 | ;; *Warning for cc-mode developers* |
| 171 | ;; | 171 | ;; |
| 172 | ;; `cc-imenu-objc-generic-expression' elements depend on | 172 | ;; `cc-imenu-objc-generic-expression' elements depend on |
| 173 | ;; `cc-imenu-c++-generic-expression'. So if you change this | 173 | ;; `cc-imenu-c++-generic-expression'. So if you change this |
| @@ -177,8 +177,8 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") | |||
| 177 | ;; order to know where the each regexp *group \\(foobar\\)* elements | 177 | ;; order to know where the each regexp *group \\(foobar\\)* elements |
| 178 | ;; are started. | 178 | ;; are started. |
| 179 | ;; | 179 | ;; |
| 180 | ;; *-index variables are initialized during `cc-imenu-objc-generic-expression' | 180 | ;; *-index variables are initialized during `cc-imenu-objc-generic-expression' |
| 181 | ;; being initialized. | 181 | ;; being initialized. |
| 182 | ;; | 182 | ;; |
| 183 | 183 | ||
| 184 | ;; Internal variables | 184 | ;; Internal variables |
| @@ -187,10 +187,10 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") | |||
| 187 | (defvar cc-imenu-objc-generic-expression-proto-index nil) | 187 | (defvar cc-imenu-objc-generic-expression-proto-index nil) |
| 188 | (defvar cc-imenu-objc-generic-expression-objc-base-index nil) | 188 | (defvar cc-imenu-objc-generic-expression-objc-base-index nil) |
| 189 | 189 | ||
| 190 | (defvar cc-imenu-objc-generic-expression | 190 | (defvar cc-imenu-objc-generic-expression |
| 191 | (concat | 191 | (concat |
| 192 | ;; | 192 | ;; |
| 193 | ;; For C | 193 | ;; For C |
| 194 | ;; | 194 | ;; |
| 195 | ;; > Special case to match a line like `main() {}' | 195 | ;; > Special case to match a line like `main() {}' |
| 196 | ;; > e.g. no return type, not even on the previous line. | 196 | ;; > e.g. no return type, not even on the previous line. |
| @@ -206,7 +206,7 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") | |||
| 206 | ;; > `int main _PROTO( (int argc,char *argv[]) )'. | 206 | ;; > `int main _PROTO( (int argc,char *argv[]) )'. |
| 207 | ;; Pick a token by (match-string 8) | 207 | ;; Pick a token by (match-string 8) |
| 208 | (if cc-imenu-c-prototype-macro-regexp | 208 | (if cc-imenu-c-prototype-macro-regexp |
| 209 | (concat | 209 | (concat |
| 210 | "\\|" | 210 | "\\|" |
| 211 | (car (cdr (nth 3 cc-imenu-c++-generic-expression))) ; -> index += 1 | 211 | (car (cdr (nth 3 cc-imenu-c++-generic-expression))) ; -> index += 1 |
| 212 | (prog2 (setq cc-imenu-objc-generic-expression-objc-base-index 9) "") | 212 | (prog2 (setq cc-imenu-objc-generic-expression-objc-base-index 9) "") |
| @@ -218,20 +218,20 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") | |||
| 218 | ;; For Objective-C | 218 | ;; For Objective-C |
| 219 | ;; Pick a token by (match-string 8 or 9) | 219 | ;; Pick a token by (match-string 8 or 9) |
| 220 | ;; | 220 | ;; |
| 221 | "\\|\\(" | 221 | "\\|\\(" |
| 222 | "^[-+][:" c-alnum "()*_<>\n\t ]*[;{]" ; Methods | 222 | "^[-+][:" c-alnum "()*_<>\n\t ]*[;{]" ; Methods |
| 223 | "\\|" | 223 | "\\|" |
| 224 | "^@interface[\t ]+[" c-alnum "_]+[\t ]*:" | 224 | "^@interface[\t ]+[" c-alnum "_]+[\t ]*:" |
| 225 | "\\|" | 225 | "\\|" |
| 226 | "^@interface[\t ]+[" c-alnum "_]+[\t ]*([" c-alnum "_]+)" | 226 | "^@interface[\t ]+[" c-alnum "_]+[\t ]*([" c-alnum "_]+)" |
| 227 | "\\|" | 227 | "\\|" |
| 228 | ;; For NSObject, NSProxy and Object... They don't have super class. | 228 | ;; For NSObject, NSProxy and Object... They don't have super class. |
| 229 | "^@interface[\t ]+[" c-alnum "_]+[\t ]*.*$" | 229 | "^@interface[\t ]+[" c-alnum "_]+[\t ]*.*$" |
| 230 | "\\|" | 230 | "\\|" |
| 231 | "^@implementation[\t ]+[" c-alnum "_]+[\t ]*([" c-alnum "_]+)" | 231 | "^@implementation[\t ]+[" c-alnum "_]+[\t ]*([" c-alnum "_]+)" |
| 232 | "\\|" | 232 | "\\|" |
| 233 | "^@implementation[\t ]+[" c-alnum "_]+" | 233 | "^@implementation[\t ]+[" c-alnum "_]+" |
| 234 | "\\|" | 234 | "\\|" |
| 235 | "^@protocol[\t ]+[" c-alnum "_]+" "\\)") | 235 | "^@protocol[\t ]+[" c-alnum "_]+" "\\)") |
| 236 | "Imenu generic expression for ObjC mode. See `imenu-generic-expression'.") | 236 | "Imenu generic expression for ObjC mode. See `imenu-generic-expression'.") |
| 237 | 237 | ||
| @@ -239,13 +239,13 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") | |||
| 239 | ;; Imenu support for objective-c uses functions. | 239 | ;; Imenu support for objective-c uses functions. |
| 240 | (defsubst cc-imenu-objc-method-to-selector (method) | 240 | (defsubst cc-imenu-objc-method-to-selector (method) |
| 241 | "Return the objc selector style string of METHOD. | 241 | "Return the objc selector style string of METHOD. |
| 242 | Example: | 242 | Example: |
| 243 | - perform: (SEL)aSelector withObject: object1 withObject: object2; /* METHOD */ | 243 | - perform: (SEL)aSelector withObject: object1 withObject: object2; /* METHOD */ |
| 244 | => | 244 | => |
| 245 | -perform:withObject:withObject:withObject: /* selector */" | 245 | -perform:withObject:withObject:withObject: /* selector */" |
| 246 | (let ((return "") ; String to be returned | 246 | (let ((return "") ; String to be returned |
| 247 | (p 0) ; Current scanning position in METHOD | 247 | (p 0) ; Current scanning position in METHOD |
| 248 | (pmax (length method)) ; | 248 | (pmax (length method)) ; |
| 249 | char ; Current scanning target | 249 | char ; Current scanning target |
| 250 | (betweenparen 0) ; CHAR is in parentheses. | 250 | (betweenparen 0) ; CHAR is in parentheses. |
| 251 | argreq ; An argument is required. | 251 | argreq ; An argument is required. |
| @@ -266,12 +266,12 @@ Example: | |||
| 266 | argreq nil) | 266 | argreq nil) |
| 267 | (setq return (concat return (char-to-string char))))) | 267 | (setq return (concat return (char-to-string char))))) |
| 268 | ;; Or a white space? | 268 | ;; Or a white space? |
| 269 | ((and inargvar (or (eq ?\ char) (eq ?\n char)) | 269 | ((and inargvar (or (eq ?\ char) (eq ?\n char)) |
| 270 | (setq inargvar nil))) | 270 | (setq inargvar nil))) |
| 271 | ;; Or a method separator? | 271 | ;; Or a method separator? |
| 272 | ;; If a method separator, the next token will be an argument variable. | 272 | ;; If a method separator, the next token will be an argument variable. |
| 273 | ((eq ?: char) | 273 | ((eq ?: char) |
| 274 | (setq argreq t | 274 | (setq argreq t |
| 275 | return (concat return (char-to-string char)))) | 275 | return (concat return (char-to-string char)))) |
| 276 | ;; Or an open parentheses? | 276 | ;; Or an open parentheses? |
| 277 | ((eq ?\( char) | 277 | ((eq ?\( char) |
| @@ -285,7 +285,7 @@ Example: | |||
| 285 | "Remove all spaces and tabs from STR." | 285 | "Remove all spaces and tabs from STR." |
| 286 | (let ((return "") | 286 | (let ((return "") |
| 287 | (p 0) | 287 | (p 0) |
| 288 | (max (length str)) | 288 | (max (length str)) |
| 289 | char) | 289 | char) |
| 290 | (while (< p max) | 290 | (while (< p max) |
| 291 | (setq char (aref str p)) | 291 | (setq char (aref str p)) |
| @@ -302,7 +302,7 @@ Example: | |||
| 302 | ;; | 302 | ;; |
| 303 | ;; OBJC, Cnoreturn, Cgeneralfunc, Cproto are constants. | 303 | ;; OBJC, Cnoreturn, Cgeneralfunc, Cproto are constants. |
| 304 | ;; | 304 | ;; |
| 305 | ;; *Warning for developers* | 305 | ;; *Warning for developers* |
| 306 | ;; These constants depend on `cc-imenu-c++-generic-expression'. | 306 | ;; These constants depend on `cc-imenu-c++-generic-expression'. |
| 307 | ;; | 307 | ;; |
| 308 | (OBJC cc-imenu-objc-generic-expression-objc-base-index) | 308 | (OBJC cc-imenu-objc-generic-expression-objc-base-index) |
| @@ -318,13 +318,13 @@ Example: | |||
| 318 | toplist | 318 | toplist |
| 319 | stupid | 319 | stupid |
| 320 | str | 320 | str |
| 321 | str2 | 321 | str2 |
| 322 | (intflen (length "@interface")) | 322 | (intflen (length "@interface")) |
| 323 | (implen (length "@implementation")) | 323 | (implen (length "@implementation")) |
| 324 | (prtlen (length "@protocol")) | 324 | (prtlen (length "@protocol")) |
| 325 | (func | 325 | (func |
| 326 | ;; | 326 | ;; |
| 327 | ;; Does this emacs has buffer-substring-no-properties? | 327 | ;; Does this emacs have buffer-substring-no-properties? |
| 328 | ;; | 328 | ;; |
| 329 | (if (fboundp 'buffer-substring-no-properties) | 329 | (if (fboundp 'buffer-substring-no-properties) |
| 330 | 'buffer-substring-no-properties | 330 | 'buffer-substring-no-properties |
| @@ -334,7 +334,7 @@ Example: | |||
| 334 | ;; | 334 | ;; |
| 335 | (while (re-search-backward cc-imenu-objc-generic-expression nil t) | 335 | (while (re-search-backward cc-imenu-objc-generic-expression nil t) |
| 336 | (imenu-progress-message stupid) | 336 | (imenu-progress-message stupid) |
| 337 | (setq langnum (if (match-beginning OBJC) | 337 | (setq langnum (if (match-beginning OBJC) |
| 338 | OBJC | 338 | OBJC |
| 339 | (cond | 339 | (cond |
| 340 | ((match-beginning Cproto) Cproto) | 340 | ((match-beginning Cproto) Cproto) |
| @@ -342,7 +342,7 @@ Example: | |||
| 342 | ((match-beginning Cnoreturn) Cnoreturn)))) | 342 | ((match-beginning Cnoreturn) Cnoreturn)))) |
| 343 | (setq str (funcall func (match-beginning langnum) (match-end langnum))) | 343 | (setq str (funcall func (match-beginning langnum) (match-end langnum))) |
| 344 | ;; | 344 | ;; |
| 345 | (cond | 345 | (cond |
| 346 | ;; | 346 | ;; |
| 347 | ;; C | 347 | ;; C |
| 348 | ;; | 348 | ;; |
| @@ -350,7 +350,7 @@ Example: | |||
| 350 | (setq clist (cons (cons str (match-beginning langnum)) clist))) | 350 | (setq clist (cons (cons str (match-beginning langnum)) clist))) |
| 351 | ;; | 351 | ;; |
| 352 | ;; ObjC | 352 | ;; ObjC |
| 353 | ;; | 353 | ;; |
| 354 | ;; An instance Method | 354 | ;; An instance Method |
| 355 | ((eq (aref str 0) ?-) | 355 | ((eq (aref str 0) ?-) |
| 356 | (setq str (concat "-" (cc-imenu-objc-method-to-selector str))) | 356 | (setq str (concat "-" (cc-imenu-objc-method-to-selector str))) |
| @@ -363,10 +363,10 @@ Example: | |||
| 363 | (setq methodlist (cons (cons str | 363 | (setq methodlist (cons (cons str |
| 364 | (match-beginning langnum)) | 364 | (match-beginning langnum)) |
| 365 | methodlist))) | 365 | methodlist))) |
| 366 | ;; Interface or implementation or protocol | 366 | ;; Interface or implementation or protocol |
| 367 | ((eq (aref str 0) ?@) | 367 | ((eq (aref str 0) ?@) |
| 368 | (setq classcount (1+ classcount)) | 368 | (setq classcount (1+ classcount)) |
| 369 | (cond | 369 | (cond |
| 370 | ((and (> (length str) implen) | 370 | ((and (> (length str) implen) |
| 371 | (string= (substring str 0 implen) "@implementation")) | 371 | (string= (substring str 0 implen) "@implementation")) |
| 372 | (setq str (substring str implen) | 372 | (setq str (substring str implen) |
| @@ -384,7 +384,7 @@ Example: | |||
| 384 | (setq toplist (cons nil (cons (cons str | 384 | (setq toplist (cons nil (cons (cons str |
| 385 | methodlist) toplist)) | 385 | methodlist) toplist)) |
| 386 | methodlist nil)))) | 386 | methodlist nil)))) |
| 387 | ;; | 387 | ;; |
| 388 | (imenu-progress-message stupid 100) | 388 | (imenu-progress-message stupid 100) |
| 389 | (if (eq (car toplist) nil) | 389 | (if (eq (car toplist) nil) |
| 390 | (setq toplist (cdr toplist))) | 390 | (setq toplist (cdr toplist))) |