Mercurial > emacs
comparison lisp/emacs-lisp/lisp.el @ 6420:09fadfc6384e
(beginning-of-defun-raw): Don't err when called at end of buffer.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Sat, 19 Mar 1994 04:07:37 +0000 |
parents | 70bf65b6aae9 |
children | 7aa70fb3afa8 |
comparison
equal
deleted
inserted
replaced
6419:e5ce725b661d | 6420:09fadfc6384e |
---|---|
143 (defun beginning-of-defun-raw (&optional arg) | 143 (defun beginning-of-defun-raw (&optional arg) |
144 "Move point to the character that starts a defun. | 144 "Move point to the character that starts a defun. |
145 This is identical to beginning-of-defun, except that point does not move | 145 This is identical to beginning-of-defun, except that point does not move |
146 to the beginning of the line when `defun-prompt-regexp' is non-nil." | 146 to the beginning of the line when `defun-prompt-regexp' is non-nil." |
147 (interactive "p") | 147 (interactive "p") |
148 (and arg (< arg 0) (forward-char 1)) | 148 (and arg (< arg 0) (not (eobp)) (forward-char 1)) |
149 (and (re-search-backward (if defun-prompt-regexp | 149 (and (re-search-backward (if defun-prompt-regexp |
150 (concat "^\\s(\\|" | 150 (concat "^\\s(\\|" |
151 "\\(" defun-prompt-regexp "\\)\\s(") | 151 "\\(" defun-prompt-regexp "\\)\\s(") |
152 "^\\s(") | 152 "^\\s(") |
153 nil 'move (or arg 1)) | 153 nil 'move (or arg 1)) |