aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2007-09-26 03:18:21 +0000
committerDan Nicolaescu2007-09-26 03:18:21 +0000
commit62035afde20c85cbc7aa53f8f0eccf67e555434c (patch)
tree311f7577705ed26cb53bf6998be4e8213af6862a
parent259b63b41bcf2490ee3952f2e50e513bf387d200 (diff)
downloademacs-62035afde20c85cbc7aa53f8f0eccf67e555434c.tar.gz
emacs-62035afde20c85cbc7aa53f8f0eccf67e555434c.zip
(c-indent-line-or-region): Only indent the
region if in transient-mark-mode.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/cc-cmds.el3
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c621d257a44..40319a3bb1c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12007-09-26 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * progmodes/cc-cmds.el (c-indent-line-or-region): Only indent the
4 region if in transient-mark-mode.
5
12007-09-26 Juanma Barranquero <lekktu@gmail.com> 62007-09-26 Juanma Barranquero <lekktu@gmail.com>
2 7
3 * calc/calc-ext.el (calc-init-extensions, calc-reset): 8 * calc/calc-ext.el (calc-init-extensions, calc-reset):
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index 48fa7d99f5a..860893bcfa6 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -3074,7 +3074,8 @@ non-nil."
3074indent the current line syntactically." 3074indent the current line syntactically."
3075 ;; Emacs has a variable called mark-active, XEmacs uses region-active-p 3075 ;; Emacs has a variable called mark-active, XEmacs uses region-active-p
3076 (interactive) 3076 (interactive)
3077 (if (c-region-is-active-p) 3077 (if (and transient-mark-mode mark-active
3078 (not (eq (region-beginning) (region-end))))
3078 (c-indent-region (region-beginning) (region-end)) 3079 (c-indent-region (region-beginning) (region-end))
3079 (c-indent-line))) 3080 (c-indent-line)))
3080 3081