;; 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
;; Maintainer: FSF
+;; Package: emacs
;; This file is part of GNU Emacs.
but the functions `indent-relative' and `indent-relative-maybe' are
special; we don't actually use them here."
(interactive)
+ (syntax-propertize (line-end-position))
(if (memq indent-line-function
'(indent-relative indent-relative-maybe))
;; These functions are used for tabbing, but can't be used for
(goto-char start)
(while (< (point) end)
(or (and (bolp) (eolp))
- (funcall indent-line-function))
+ (indent-according-to-mode))
(forward-line 1))
(move-marker end nil))))
(setq column (prefix-numeric-value column))
(or (eolp)
(indent-to column 0))
(forward-line 1))
- (move-marker end nil))))
+ (move-marker end nil)))
+ ;; In most cases, reindenting modifies the buffer, but it may also
+ ;; leave it unmodified, in which case we have to deactivate the mark
+ ;; by hand.
+ (deactivate-mark))
(defun indent-relative-maybe ()
"Indent a new line like previous nonblank line.