]> git.eshelyaron.com Git - emacs.git/commitdiff
(cc-imenu-objc-function): Use bufsubst-fun as a variable, not as a function.
authorRichard M. Stallman <rms@gnu.org>
Mon, 22 Dec 1997 07:10:19 +0000 (07:10 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 22 Dec 1997 07:10:19 +0000 (07:10 +0000)
lisp/progmodes/cc-menus.el

index 832b3f8fb7c9a01fbb99c24b531ac56b73af79ba..d840b744b42e4d40fb67aaceb109ee862de71f50 100644 (file)
@@ -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 
        ;;