summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lisp.el
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2012-02-23 03:13:48 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2012-02-23 03:13:48 -0500
commit8e911f6f933455fd1d6709dd60965fb9191e81d6 (patch)
tree8709f04aead0c35946b1fd0a20895328cc7e0ff4 /lisp/emacs-lisp/lisp.el
parent2dbe4d71064b2010411c522620fbcfb216642f07 (diff)
downloademacs-8e911f6f933455fd1d6709dd60965fb9191e81d6.tar.gz
emacs-8e911f6f933455fd1d6709dd60965fb9191e81d6.tar.bz2
emacs-8e911f6f933455fd1d6709dd60965fb9191e81d6.zip
* lisp/emacs-lisp/lisp.el (beginning-of-defun-raw): Don't call end-of-defun
when it might call us back infinitely. Fixes: debbugs:10797
Diffstat (limited to 'lisp/emacs-lisp/lisp.el')
-rw-r--r--lisp/emacs-lisp/lisp.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index 8c53ad58612..4efdc3240cd 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -257,9 +257,8 @@ is called as a function to find the defun's beginning."
(if (> arg 0)
(dotimes (i arg)
(funcall beginning-of-defun-function))
- ;; Better not call end-of-defun-function directly, in case
- ;; it's not defined.
- (end-of-defun (- arg))))))
+ (dotimes (i (- arg))
+ (funcall end-of-defun-function))))))
((or defun-prompt-regexp open-paren-in-column-0-is-defun-start)
(and (< arg 0) (not (eobp)) (forward-char 1))