From: Richard M. Stallman Date: Mon, 22 Dec 1997 07:10:19 +0000 (+0000) Subject: (cc-imenu-objc-function): Use bufsubst-fun as a variable, not as a function. X-Git-Tag: emacs-20.3~2567 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f0f68b256fd3673a50f39e0f450b1a927411856f;p=emacs.git (cc-imenu-objc-function): Use bufsubst-fun as a variable, not as a function. --- diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el index 832b3f8fb7c..d840b744b42 100644 --- a/lisp/progmodes/cc-menus.el +++ b/lisp/progmodes/cc-menus.el @@ -279,9 +279,9 @@ Example: ;; ;; Does this emacs has buffer-substring-no-properties? ;; - (fset 'bufsubst-fun (if (fboundp 'buffer-substring-no-properties) - (symbol-function 'buffer-substring-no-properties) - (symbol-function 'buffer-substring))) + (setq bufsubst-fun (if (fboundp 'buffer-substring-no-properties) + (symbol-function 'buffer-substring-no-properties) + (symbol-function 'buffer-substring))) (goto-char (point-max)) (imenu-progress-message stupid 0) ;; @@ -293,7 +293,8 @@ Example: ((match-beginning C3) C3) ((match-beginning C2) C2) ((match-beginning C1) C1)))) - (setq str (bufsubst-fun (match-beginning langnum) (match-end langnum))) + (setq str (funcall bufsubst-fun + (match-beginning langnum) (match-end langnum))) ;; (cond ;;