Mercurial > emacs
changeset 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 | f68570724a41 |
children | c17fcf610133 24e2a1f40d57 fe07c47cf7a7 |
files | lisp/ChangeLog lisp/progmodes/cc-cmds.el |
diffstat | 2 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Wed May 12 08:25:16 2010 +0000 +++ b/lisp/ChangeLog Wed May 12 11:06:12 2010 +0000 @@ -1,3 +1,8 @@ +2010-05-12 Alan Mackenzie <acm@muc.de> + + * progmodes/cc-cmds.el (c-beginning-of-defun, c-end-of-defun): + Push the mark at the start of these functions when appropriate. + 2010-05-12 Stefan Monnier <monnier@iro.umontreal.ca> * minibuffer.el (completion-cycle-threshold): New custom var.
--- 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))