diff options
| -rw-r--r-- | lisp/emacs-lisp/lisp.el | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 6952ef4cf49..09aa51055e0 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el | |||
| @@ -339,12 +339,18 @@ is called as a function to find the defun's beginning." | |||
| 339 | 339 | ||
| 340 | ((or defun-prompt-regexp open-paren-in-column-0-is-defun-start) | 340 | ((or defun-prompt-regexp open-paren-in-column-0-is-defun-start) |
| 341 | (and (< arg 0) (not (eobp)) (forward-char 1)) | 341 | (and (< arg 0) (not (eobp)) (forward-char 1)) |
| 342 | (and (re-search-backward (if defun-prompt-regexp | 342 | (and (let (found) |
| 343 | (concat (if open-paren-in-column-0-is-defun-start | 343 | (while |
| 344 | "^\\s(\\|" "") | 344 | (and (setq found |
| 345 | "\\(?:" defun-prompt-regexp "\\)\\s(") | 345 | (re-search-backward |
| 346 | "^\\s(") | 346 | (if defun-prompt-regexp |
| 347 | nil 'move arg) | 347 | (concat (if open-paren-in-column-0-is-defun-start |
| 348 | "^\\s(\\|" "") | ||
| 349 | "\\(?:" defun-prompt-regexp "\\)\\s(") | ||
| 350 | "^\\s(") | ||
| 351 | nil 'move arg)) | ||
| 352 | (nth 8 (syntax-ppss)))) | ||
| 353 | found) | ||
| 348 | (progn (goto-char (1- (match-end 0))) | 354 | (progn (goto-char (1- (match-end 0))) |
| 349 | t))) | 355 | t))) |
| 350 | 356 | ||