emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100570: Handle missing add-log-cu


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100570: Handle missing add-log-current-defun-function in Which Func mode (Bug#8260)
Date: Sun, 08 May 2011 14:29:35 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 100570
author: Ralph Schleicher <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: emacs-23
timestamp: Sun 2011-05-08 14:29:35 -0400
message:
  Handle missing add-log-current-defun-function in Which Func mode (Bug#8260)
  
  * lisp/progmodes/which-func.el (which-function): Use
  add-log-current-defun instead of add-log-current-defun-function,
  which might not be defined.
modified:
  lisp/ChangeLog
  lisp/progmodes/which-func.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-04-25 17:58:27 +0000
+++ b/lisp/ChangeLog    2011-05-08 18:29:35 +0000
@@ -1,3 +1,9 @@
+2011-05-08  Ralph Schleicher  <address@hidden>
+
+       * 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  <address@hidden>
 
        * net/tramp.el (tramp-process-actions): Add POS argument.  Delete

=== modified file 'lisp/progmodes/which-func.el'
--- a/lisp/progmodes/which-func.el      2011-01-02 23:50:46 +0000
+++ b/lisp/progmodes/which-func.el      2011-05-08 18:29:35 +0000
@@ -270,7 +270,7 @@
 (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 @@
                   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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]