In some text modes, where TAB inserts a tab, this indents to the
column specified by the function `current-left-margin'."
(interactive "*")
- (let ((pos (point))
+ ;; Use a marker because the call to 'newline' below could insert some
+ ;; text, e.g., if 'abbrev-mode' is turned on.
+ (let ((pos (point-marker))
(electric-indent-mode nil))
;; Be careful to insert the newline before indenting the line.
;; Otherwise, the indentation might be wrong.