comparison lisp/emacs-lisp/lisp.el @ 97431:02fedff190ed

(beginning-of-defun): Doc fix.
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 11 Aug 2008 21:38:17 +0000
parents 90a2847062be
children b7077a582a3d
comparison
equal deleted inserted replaced
97430:d76aacb7f6e4 97431:02fedff190ed
179 Ideally it should move to a point right before an open-paren which encloses 179 Ideally it should move to a point right before an open-paren which encloses
180 the body of the defun.") 180 the body of the defun.")
181 181
182 (defun beginning-of-defun (&optional arg) 182 (defun beginning-of-defun (&optional arg)
183 "Move backward to the beginning of a defun. 183 "Move backward to the beginning of a defun.
184 With ARG, do it that many times. Negative arg -N 184 With ARG, do it that many times. Negative ARG means move forward
185 means move forward to Nth following beginning of defun. 185 to the ARGth following beginning of defun.
186 Returns t unless search stops due to beginning or end of buffer. 186
187 187 If search is successful, return t; point ends up at the beginning
188 If variable `beginning-of-defun-function' is non-nil, its value 188 of the line where the search succeeded. Otherwise, return nil.
189 is called as a function to find the defun's beginning. 189
190 190 When `open-paren-in-column-0-is-defun-start' is non-nil, a defun
191 Normally a defun is assumed to start where there is a char with 191 is assumed to start where there is a char with open-parenthesis
192 open-parenthesis syntax at the beginning of a line. If 192 syntax at the beginning of a line. If `defun-prompt-regexp' is
193 `defun-prompt-regexp' is non-nil, then a string which matches 193 non-nil, then a string which matches that regexp may also precede
194 that regexp may precede the open-parenthesis, and point ends up 194 the open-parenthesis. If `defun-prompt-regexp' and
195 at the beginning of the line. 195 `open-paren-in-column-0-is-defun-start' are both nil, this
196 196 function instead finds an open-paren at the outermost level.
197 If `defun-prompt-regexp' and `open-paren-in-column-0-is-defun-start' 197
198 are both nil, the function instead finds an open-paren at the 198 If the variable `beginning-of-defun-function' is non-nil, its
199 outermost level." 199 value is called as a function, with argument ARG, to find the
200 defun's beginning.
201
202 Regardless of the values of `defun-prompt-regexp' and
203 `beginning-of-defun-function', point always moves to the
204 beginning of the line whenever the search is successful."
200 (interactive "p") 205 (interactive "p")
201 (or (not (eq this-command 'beginning-of-defun)) 206 (or (not (eq this-command 'beginning-of-defun))
202 (eq last-command 'beginning-of-defun) 207 (eq last-command 'beginning-of-defun)
203 (and transient-mark-mode mark-active) 208 (and transient-mark-mode mark-active)
204 (push-mark)) 209 (push-mark))