comparison lisp/progmodes/cc-menus.el @ 20507:07a8c7f7cfe8

(cc-imenu-objc-function): Use bufsubst-fun as a variable, not as a function.
author Richard M. Stallman <rms@gnu.org>
date Mon, 22 Dec 1997 07:10:19 +0000
parents ac6d8d01e311
children 704b7ccba694
comparison
equal deleted inserted replaced
20506:c096aa581013 20507:07a8c7f7cfe8
277 (prtlen (length "@protocol")) 277 (prtlen (length "@protocol"))
278 bufsubst-fun) 278 bufsubst-fun)
279 ;; 279 ;;
280 ;; Does this emacs has buffer-substring-no-properties? 280 ;; Does this emacs has buffer-substring-no-properties?
281 ;; 281 ;;
282 (fset 'bufsubst-fun (if (fboundp 'buffer-substring-no-properties) 282 (setq bufsubst-fun (if (fboundp 'buffer-substring-no-properties)
283 (symbol-function 'buffer-substring-no-properties) 283 (symbol-function 'buffer-substring-no-properties)
284 (symbol-function 'buffer-substring))) 284 (symbol-function 'buffer-substring)))
285 (goto-char (point-max)) 285 (goto-char (point-max))
286 (imenu-progress-message stupid 0) 286 (imenu-progress-message stupid 0)
287 ;; 287 ;;
288 (while (re-search-backward cc-imenu-objc-generic-expression nil t) 288 (while (re-search-backward cc-imenu-objc-generic-expression nil t)
289 (imenu-progress-message stupid) 289 (imenu-progress-message stupid)
291 OBJC 291 OBJC
292 (cond 292 (cond
293 ((match-beginning C3) C3) 293 ((match-beginning C3) C3)
294 ((match-beginning C2) C2) 294 ((match-beginning C2) C2)
295 ((match-beginning C1) C1)))) 295 ((match-beginning C1) C1))))
296 (setq str (bufsubst-fun (match-beginning langnum) (match-end langnum))) 296 (setq str (funcall bufsubst-fun
297 (match-beginning langnum) (match-end langnum)))
297 ;; 298 ;;
298 (cond 299 (cond
299 ;; 300 ;;
300 ;; C 301 ;; C
301 ;; 302 ;;