Commit 62035afd authored by Dan Nicolaescu's avatar Dan Nicolaescu
Browse files

(c-indent-line-or-region): Only indent the

region if in transient-mark-mode.
parent 259b63b4
2007-09-26 Dan Nicolaescu <dann@ics.uci.edu>
* progmodes/cc-cmds.el (c-indent-line-or-region): Only indent the
region if in transient-mark-mode.
2007-09-26 Juanma Barranquero <lekktu@gmail.com>
* calc/calc-ext.el (calc-init-extensions, calc-reset):
......
......@@ -3074,7 +3074,8 @@ non-nil."
indent the current line syntactically."
;; Emacs has a variable called mark-active, XEmacs uses region-active-p
(interactive)
(if (c-region-is-active-p)
(if (and transient-mark-mode mark-active
(not (eq (region-beginning) (region-end))))
(c-indent-region (region-beginning) (region-end))
(c-indent-line)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment