summaryrefslogtreecommitdiff
path: root/lisp/progmodes/meta-mode.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2010-11-09 00:00:46 -0800
committerGlenn Morris <rgm@gnu.org>2010-11-09 00:00:46 -0800
commite814121e1b2f8ef864d695ecb00512be7591fbb4 (patch)
tree3f251040c8d1a4490fca1857539c4b28efa942c3 /lisp/progmodes/meta-mode.el
parent3406534cab44e5433ed13231c8a55da9da58d100 (diff)
downloademacs-e814121e1b2f8ef864d695ecb00512be7591fbb4.tar.gz
* lisp/progmodes/meta-mode.el: (meta-indent-line): Simplify.
Diffstat (limited to 'lisp/progmodes/meta-mode.el')
-rw-r--r--lisp/progmodes/meta-mode.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el
index d40e0d77ef3..294c75c9ccf 100644
--- a/lisp/progmodes/meta-mode.el
+++ b/lisp/progmodes/meta-mode.el
@@ -575,12 +575,11 @@ If the list was changed, sort the list and remove duplicates first."
"Indent the line containing point as Metafont or MetaPost source."
(interactive)
(let ((indent (meta-indent-calculate)))
- (save-excursion
- (if (/= (current-indentation) indent)
- (let ((beg (line-beginning-position))
- (end (progn (back-to-indentation) (point))))
- (delete-region beg end)
- (indent-to indent))))
+ (if (/= (current-indentation) indent)
+ (save-excursion
+ (delete-region (line-beginning-position)
+ (progn (back-to-indentation) (point)))
+ (indent-to indent)))
(if (< (current-column) indent)
(back-to-indentation))))