f90 indentation fix.
[bpt/emacs.git] / lisp / progmodes / which-func.el
index e06dbf4..97e1881 100644 (file)
@@ -1,7 +1,6 @@
 ;;; which-func.el --- print current function in mode line
 
-;; Copyright (C) 1994, 1997, 1998, 2001, 2002, 2003, 2004, 2005, 2006
-;;   2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1997-1998, 2001-2011  Free Software Foundation, Inc.
 
 ;; Author:   Alex Rezinsky <alexr@msil.sps.mot.com>
 ;;           (doesn't seem to be responsive any more)
@@ -207,7 +206,8 @@ It creates the Imenu index for the buffer, if necessary."
          (setq imenu--index-alist
                (save-excursion (funcall imenu-create-index-function))))
     (error
-     (message "which-func-ff-hook error: %S" err)
+     (unless (equal err '(error "This buffer cannot use `imenu-default-create-index-function'"))
+       (message "which-func-ff-hook error: %S" err))
      (setq which-func-mode nil))))
 
 (defun which-func-update ()
@@ -271,7 +271,7 @@ It calls them sequentially, and if any returns non-nil,
 (defun which-function ()
   "Return current function name based on point.
 Uses `which-func-functions', `imenu--index-alist'
-or `add-log-current-defun-function'.
+or `add-log-current-defun'.
 If no function name is found, return nil."
   (let ((name
         ;; Try the `which-func-functions' functions first.
@@ -321,9 +321,8 @@ If no function name is found, return nil."
                               (reverse (cons (car pair) namestack))))))))))))
 
     ;; Try using add-log support.
-    (when (and (null name) (boundp 'add-log-current-defun-function)
-              add-log-current-defun-function)
-      (setq name (funcall add-log-current-defun-function)))
+    (when (null name)
+      (setq name (add-log-current-defun)))
     ;; Filter the name if requested.
     (when name
       (if which-func-cleanup-function
@@ -332,5 +331,4 @@ If no function name is found, return nil."
 
 (provide 'which-func)
 
-;; arch-tag: fa8a55c7-bfe3-4ffc-95ab-01bf21796827
 ;;; which-func.el ends here