diff options
Diffstat (limited to 'lisp/indent.el')
-rw-r--r-- | lisp/indent.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/indent.el b/lisp/indent.el index 4cd669ccf37..2af5a58f6c5 100644 --- a/lisp/indent.el +++ b/lisp/indent.el @@ -76,9 +76,10 @@ that case, indent by aligning to the previous non-blank line." ;; indenting. Replace with something ad-hoc. (let ((column (save-excursion (beginning-of-line) - (skip-chars-backward "\n \t") - (beginning-of-line) - (current-indentation)))) + (if (bobp) 0 + (beginning-of-line 0) + (if (looking-at "[ \t]*$") 0 + (current-indentation)))))) (if (<= (current-column) (current-indentation)) (indent-line-to column) (save-excursion (indent-line-to column)))) |