(sh-indent-line): Cope if no previous noncomment line.

This commit is contained in:
Richard M. Stallman 1996-01-17 22:41:21 +00:00
parent 9b30450ef0
commit b46c06dea5

View file

@ -849,11 +849,12 @@ in ALIST."
Lines containing only comments are considered empty."
(interactive)
(let ((previous (save-excursion
(while (progn
(line-move -1)
(back-to-indentation)
(or (eolp)
(eq (following-char) ?#))))
(while (and (not (bobp))
(progn
(forward-line -1)
(back-to-indentation)
(or (eolp)
(eq (following-char) ?#)))))
(current-column)))
current)
(save-excursion