Mercurial > emacs
diff lisp/progmodes/cc-cmds.el @ 108515:75f27a9b3b3a
* progmodes/cc-cmds.el (c-beginning-of-defun, c-end-of-defun):
Push the mark at the start of these functions when appropriate.
author | Alan Mackenzie <acm@muc.de> |
---|---|
date | Wed, 12 May 2010 11:06:12 +0000 |
parents | 1786f2e6a856 |
children | a854e7a0e7eb |
line wrap: on
line diff
--- a/lisp/progmodes/cc-cmds.el Wed May 12 08:25:16 2010 +0000 +++ b/lisp/progmodes/cc-cmds.el Wed May 12 11:06:12 2010 +0000 @@ -1501,6 +1501,11 @@ (interactive "p") (or arg (setq arg 1)) + (or (not (eq this-command 'c-beginning-of-defun)) + (eq last-command 'c-beginning-of-defun) + (and transient-mark-mode mark-active) + (push-mark)) + (c-save-buffer-state (beginning-of-defun-function end-of-defun-function (start (point)) @@ -1604,6 +1609,11 @@ (interactive "p") (or arg (setq arg 1)) + (or (not (eq this-command 'c-end-of-defun)) + (eq last-command 'c-end-of-defun) + (and transient-mark-mode mark-active) + (push-mark)) + (c-save-buffer-state (beginning-of-defun-function end-of-defun-function (start (point))