comparison lisp/emacs-lisp/lisp.el @ 56876:3dcc647295da

(beginning-of-defun, end-of-defun): Do not push mark if inhibit-mark-movement is non-nil.
author Juri Linkov <juri@jurta.org>
date Thu, 02 Sep 2004 09:43:38 +0000
parents eb9d99ced391
children bca93997a4d7 3219f94257bc
comparison
equal deleted inserted replaced
56875:db0f95a55fd4 56876:3dcc647295da
174 174
175 If variable `beginning-of-defun-function' is non-nil, its value 175 If variable `beginning-of-defun-function' is non-nil, its value
176 is called as a function to find the defun's beginning." 176 is called as a function to find the defun's beginning."
177 (interactive "p") 177 (interactive "p")
178 (and (eq this-command 'beginning-of-defun) 178 (and (eq this-command 'beginning-of-defun)
179 (or (eq last-command 'beginning-of-defun) (push-mark))) 179 (or inhibit-mark-movement (eq last-command 'beginning-of-defun)
180 (push-mark)))
180 (and (beginning-of-defun-raw arg) 181 (and (beginning-of-defun-raw arg)
181 (progn (beginning-of-line) t))) 182 (progn (beginning-of-line) t)))
182 183
183 (defun beginning-of-defun-raw (&optional arg) 184 (defun beginning-of-defun-raw (&optional arg)
184 "Move point to the character that starts a defun. 185 "Move point to the character that starts a defun.
224 225
225 If variable `end-of-defun-function' is non-nil, its value 226 If variable `end-of-defun-function' is non-nil, its value
226 is called as a function to find the defun's end." 227 is called as a function to find the defun's end."
227 (interactive "p") 228 (interactive "p")
228 (and (eq this-command 'end-of-defun) 229 (and (eq this-command 'end-of-defun)
229 (or (eq last-command 'end-of-defun) (push-mark))) 230 (or inhibit-mark-movement (eq last-command 'end-of-defun)
231 (push-mark)))
230 (if (or (null arg) (= arg 0)) (setq arg 1)) 232 (if (or (null arg) (= arg 0)) (setq arg 1))
231 (if end-of-defun-function 233 (if end-of-defun-function
232 (if (> arg 0) 234 (if (> arg 0)
233 (dotimes (i arg) 235 (dotimes (i arg)
234 (funcall end-of-defun-function)) 236 (funcall end-of-defun-function))