Index: lisp.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/lisp.el,v retrieving revision 1.74 diff -p -u -w -u -r1.74 lisp.el --- lisp.el 6 Feb 2006 12:20:06 -0000 1.74 +++ lisp.el 24 Feb 2006 18:44:26 -0000 @@ -210,12 +210,14 @@ If variable `beginning-of-defun-function is called as a function to find the defun's beginning." (interactive "p") (if beginning-of-defun-function + (let ((bodf beginning-of-defun-function) + (beginning-of-defun-function nil)) (if (> (setq arg (or arg 1)) 0) (dotimes (i arg) - (funcall beginning-of-defun-function)) + (funcall bodf)) ;; Better not call end-of-defun-function directly, in case ;; it's not defined. - (end-of-defun (- arg))) + (end-of-defun (- arg)))) (and arg (< arg 0) (not (eobp)) (forward-char 1)) (and (re-search-backward (if defun-prompt-regexp (concat (if open-paren-in-column-0-is-defun-start @@ -255,12 +257,14 @@ is called as a function to find the defu (push-mark)) (if (or (null arg) (= arg 0)) (setq arg 1)) (if end-of-defun-function + (let ((eodf end-of-defun-function) + (end-of-defun-function nil)) (if (> arg 0) (dotimes (i arg) - (funcall end-of-defun-function)) + (funcall eodf)) ;; Better not call beginning-of-defun-function ;; directly, in case it's not defined. - (beginning-of-defun (- arg))) + (beginning-of-defun (- arg)))) (let ((first t)) (while (and (> arg 0) (< (point) (point-max))) (let ((pos (point)))