aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2001-07-10 19:51:27 +0000
committerGerd Moellmann2001-07-10 19:51:27 +0000
commit19da29f9b5f2c927ab0988b679f3d9eb7d38c5b6 (patch)
treef8645fa955596f71b9a02b39ef2bd06fef74a41f
parent58f8612a80a720f00c25a024ddc72b9abeb24455 (diff)
downloademacs-19da29f9b5f2c927ab0988b679f3d9eb7d38c5b6.tar.gz
emacs-19da29f9b5f2c927ab0988b679f3d9eb7d38c5b6.zip
(c-indent-exp): Keep the indentation of the block
itself, i.e. only indent the contents in it.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/cc-cmds.el6
2 files changed, 10 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 924c35dae6c..7121f7a6a37 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -6,6 +6,11 @@
6 * startup.el (normal-top-level): Don't operate on the initial 6 * startup.el (normal-top-level): Don't operate on the initial
7 frame if we failed to create one. 7 frame if we failed to create one.
8 8
92001-07-10 Martin Stjernholm <bug-cc-mode@gnu.org>
10
11 * cc-cmds.el (c-indent-exp): Keep the indentation of the block
12 itself, i.e. only indent the contents in it.
13
92001-07-10 Markus Rost <rost@math.ohio-state.edu> 142001-07-10 Markus Rost <rost@math.ohio-state.edu>
10 15
11 * mail/rmail.el (rmail-show-message): Show beginning of message in 16 * mail/rmail.el (rmail-show-message): Show beginning of message in
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index 273b7c55652..7e2a0c5acf9 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -1541,10 +1541,14 @@ balanced expression is found."
1541 (if (not start) 1541 (if (not start)
1542 (unless shutup-p 1542 (unless shutup-p
1543 (error "Cannot find start of balanced expression to indent")) 1543 (error "Cannot find start of balanced expression to indent"))
1544 (goto-char start)
1545 (forward-line)
1546 (setq start (point))
1544 (if (not end) 1547 (if (not end)
1545 (unless shutup-p 1548 (unless shutup-p
1546 (error "Cannot find end of balanced expression to indent")) 1549 (error "Cannot find end of balanced expression to indent"))
1547 (c-indent-region start end)))) 1550 (if (< start end)
1551 (c-indent-region start end)))))
1548 (goto-char here) 1552 (goto-char here)
1549 (set-marker here nil)))) 1553 (set-marker here nil))))
1550 1554