# HG changeset patch # User Alan Mackenzie # Date 1273662372 0 # Node ID 75f27a9b3b3aa5501bdce70b08a44d9ac1b689d1 # Parent f68570724a418e744b690129fc513101871321ab * progmodes/cc-cmds.el (c-beginning-of-defun, c-end-of-defun): Push the mark at the start of these functions when appropriate. diff -r f68570724a41 -r 75f27a9b3b3a lisp/ChangeLog --- 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 + + * 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 * minibuffer.el (completion-cycle-threshold): New custom var. diff -r f68570724a41 -r 75f27a9b3b3a lisp/progmodes/cc-cmds.el --- 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))