Mercurial > emacs
comparison lisp/progmodes/cc-menus.el @ 102100:f4d8e2387c06
* progmodes/cc-menus.el (imenu-progress-message):
Remove bogus cc-bytecomp-defun.
(cc-imenu-objc-function): Don't call `imenu-progress-message'.
Don't let-bind variable `stupid'. (Bug#1638)
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Wed, 18 Feb 2009 09:23:28 +0000 |
parents | b6ec92c16c1d |
children | 7e681be660d6 |
comparison
equal
deleted
inserted
replaced
102099:9460415e0ed4 | 102100:f4d8e2387c06 |
---|---|
45 | 45 |
46 ;; The things referenced in imenu, which we don't require. | 46 ;; The things referenced in imenu, which we don't require. |
47 (cc-bytecomp-defvar imenu-case-fold-search) | 47 (cc-bytecomp-defvar imenu-case-fold-search) |
48 (cc-bytecomp-defvar imenu-generic-expression) | 48 (cc-bytecomp-defvar imenu-generic-expression) |
49 (cc-bytecomp-defvar imenu-create-index-function) | 49 (cc-bytecomp-defvar imenu-create-index-function) |
50 (cc-bytecomp-defun imenu-progress-message) | |
51 | 50 |
52 | 51 |
53 ;; imenu integration | 52 ;; imenu integration |
54 (defvar cc-imenu-c-prototype-macro-regexp nil | 53 (defvar cc-imenu-c-prototype-macro-regexp nil |
55 "RE matching macro names used to conditionally specify function prototypes. | 54 "RE matching macro names used to conditionally specify function prototypes. |
314 (Cproto cc-imenu-objc-generic-expression-proto-index) | 313 (Cproto cc-imenu-objc-generic-expression-proto-index) |
315 langnum | 314 langnum |
316 ;; | 315 ;; |
317 (classcount 0) | 316 (classcount 0) |
318 toplist | 317 toplist |
319 stupid | |
320 str | 318 str |
321 str2 | 319 str2 |
322 (intflen (length "@interface")) | 320 (intflen (length "@interface")) |
323 (implen (length "@implementation")) | 321 (implen (length "@implementation")) |
324 (prtlen (length "@protocol")) | 322 (prtlen (length "@protocol")) |
328 ;; | 326 ;; |
329 (if (fboundp 'buffer-substring-no-properties) | 327 (if (fboundp 'buffer-substring-no-properties) |
330 'buffer-substring-no-properties | 328 'buffer-substring-no-properties |
331 'buffer-substring))) | 329 'buffer-substring))) |
332 (goto-char (point-max)) | 330 (goto-char (point-max)) |
333 (imenu-progress-message stupid 0) | |
334 ;; | 331 ;; |
335 (while (re-search-backward cc-imenu-objc-generic-expression nil t) | 332 (while (re-search-backward cc-imenu-objc-generic-expression nil t) |
336 (imenu-progress-message stupid) | |
337 (setq langnum (if (match-beginning OBJC) | 333 (setq langnum (if (match-beginning OBJC) |
338 OBJC | 334 OBJC |
339 (cond | 335 (cond |
340 ((match-beginning Cproto) Cproto) | 336 ((match-beginning Cproto) Cproto) |
341 ((match-beginning Cgeneralfunc) Cgeneralfunc) | 337 ((match-beginning Cgeneralfunc) Cgeneralfunc) |
383 methodlist)) | 379 methodlist)) |
384 (setq toplist (cons nil (cons (cons str | 380 (setq toplist (cons nil (cons (cons str |
385 methodlist) toplist)) | 381 methodlist) toplist)) |
386 methodlist nil)))) | 382 methodlist nil)))) |
387 ;; | 383 ;; |
388 (imenu-progress-message stupid 100) | |
389 (if (eq (car toplist) nil) | 384 (if (eq (car toplist) nil) |
390 (setq toplist (cdr toplist))) | 385 (setq toplist (cdr toplist))) |
391 | 386 |
392 ;; In this buffer, there is only one or zero @{interface|implementation|protocol}. | 387 ;; In this buffer, there is only one or zero @{interface|implementation|protocol}. |
393 (if (< classcount 2) | 388 (if (< classcount 2) |