(old-indent (current-indentation)))
;; Indent the line.
- (or (not (eq (funcall indent-line-function) 'noindent))
+ (or (not (eq (indent--funcall-widened indent-line-function) 'noindent))
(indent--default-inside-comment)
(when (or (<= (current-column) (current-indentation))
(not (eq tab-always-indent 'complete)))
- (save-restriction
- (widen)
- (funcall (default-value 'indent-line-function)))))
+ (indent--funcall-widened (default-value 'indent-line-function))))
(cond
;; If the text was already indented right, try completion.
(< (point) end-marker))
(indent-rigidly (point) end-marker indentation-change))))))))))
+(defun indent--funcall-widened (func)
+ (save-restriction
+ (widen)
+ (funcall func)))
+
(defun insert-tab (&optional arg)
(let ((count (prefix-numeric-value arg)))
(if (and abbrev-mode