(sh-indent-line): Cope if no previous noncomment line.
This commit is contained in:
parent
9b30450ef0
commit
b46c06dea5
1 changed files with 6 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue