]> git.eshelyaron.com Git - emacs.git/commitdiff
Handle missing add-log-current-defun-function in Which Func mode (Bug#8260)
authorRalph Schleicher <rs@ralph-schleicher.de>
Sun, 8 May 2011 18:29:35 +0000 (14:29 -0400)
committerChong Yidong <cyd@stupidchicken.com>
Sun, 8 May 2011 18:29:35 +0000 (14:29 -0400)
* lisp/progmodes/which-func.el (which-function): Use
add-log-current-defun instead of add-log-current-defun-function,
which might not be defined.

lisp/ChangeLog
lisp/progmodes/which-func.el

index 69e88468eb82f3aafaa92a5b8d1a183b967c3253..3bbc9e2f37755e826daf45468033b83829ecc863 100644 (file)
@@ -1,3 +1,9 @@
+2011-05-08  Ralph Schleicher  <rs@ralph-schleicher.de>
+
+       * progmodes/which-func.el (which-function): Use
+       add-log-current-defun instead of add-log-current-defun-function,
+       which might not be defined (Bug#8260).
+
 2011-04-25  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp.el (tramp-process-actions): Add POS argument.  Delete
index 0d622f143937cca41c04dbfbd278b97dc202538d..6b794d360997520f4a1dbcbb93b57452c2ca3f6f 100644 (file)
@@ -270,7 +270,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.
@@ -319,9 +319,8 @@ If no function name is found, return nil."
                   imstack   (cdr imstack))))))
 
     ;; 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