diff options
| author | Ralph Schleicher | 2011-05-08 14:29:35 -0400 |
|---|---|---|
| committer | Chong Yidong | 2011-05-08 14:29:35 -0400 |
| commit | 6eea50c73be34e865dabf14cbd2d0e7c4f64e6a0 (patch) | |
| tree | 4894167c7d95671446f3b8d336ce6a13c913229f | |
| parent | bc3bea9cf0a5a074fc16aa16d4145567d4c5d183 (diff) | |
| download | emacs-6eea50c73be34e865dabf14cbd2d0e7c4f64e6a0.tar.gz emacs-6eea50c73be34e865dabf14cbd2d0e7c4f64e6a0.zip | |
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.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/progmodes/which-func.el | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 69e88468eb8..3bbc9e2f377 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2011-05-08 Ralph Schleicher <rs@ralph-schleicher.de> | ||
| 2 | |||
| 3 | * progmodes/which-func.el (which-function): Use | ||
| 4 | add-log-current-defun instead of add-log-current-defun-function, | ||
| 5 | which might not be defined (Bug#8260). | ||
| 6 | |||
| 1 | 2011-04-25 Michael Albinus <michael.albinus@gmx.de> | 7 | 2011-04-25 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 8 | ||
| 3 | * net/tramp.el (tramp-process-actions): Add POS argument. Delete | 9 | * net/tramp.el (tramp-process-actions): Add POS argument. Delete |
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 0d622f14393..6b794d36099 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el | |||
| @@ -270,7 +270,7 @@ It calls them sequentially, and if any returns non-nil, | |||
| 270 | (defun which-function () | 270 | (defun which-function () |
| 271 | "Return current function name based on point. | 271 | "Return current function name based on point. |
| 272 | Uses `which-func-functions', `imenu--index-alist' | 272 | Uses `which-func-functions', `imenu--index-alist' |
| 273 | or `add-log-current-defun-function'. | 273 | or `add-log-current-defun'. |
| 274 | If no function name is found, return nil." | 274 | If no function name is found, return nil." |
| 275 | (let ((name | 275 | (let ((name |
| 276 | ;; Try the `which-func-functions' functions first. | 276 | ;; Try the `which-func-functions' functions first. |
| @@ -319,9 +319,8 @@ If no function name is found, return nil." | |||
| 319 | imstack (cdr imstack)))))) | 319 | imstack (cdr imstack)))))) |
| 320 | 320 | ||
| 321 | ;; Try using add-log support. | 321 | ;; Try using add-log support. |
| 322 | (when (and (null name) (boundp 'add-log-current-defun-function) | 322 | (when (null name) |
| 323 | add-log-current-defun-function) | 323 | (setq name (add-log-current-defun))) |
| 324 | (setq name (funcall add-log-current-defun-function))) | ||
| 325 | ;; Filter the name if requested. | 324 | ;; Filter the name if requested. |
| 326 | (when name | 325 | (when name |
| 327 | (if which-func-cleanup-function | 326 | (if which-func-cleanup-function |