; lisp/so-long.el: Prevent potential error if comment-use-syntax is nil
* lisp/so-long.el (so-long-detected-long-line-p): Ensure that `comment-start-skip' and `comment-end-skip' are both set if `comment-use-syntax' is nil, as `comment-forward' requires them to be bound in this scenario.
This commit is contained in:
parent
986c12b20f
commit
8576297b2a
1 changed files with 3 additions and 1 deletions
|
@ -1047,7 +1047,9 @@ This is the default value of `so-long-predicate'."
|
|||
(let ((count 0) start)
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(when so-long-skip-leading-comments
|
||||
(when (and so-long-skip-leading-comments
|
||||
(or comment-use-syntax ;; Refer to `comment-forward'.
|
||||
(and comment-start-skip comment-end-skip)))
|
||||
;; Skip the shebang line, if any. This is not necessarily comment
|
||||
;; syntax, so we need to treat it specially.
|
||||
(when (looking-at "#!")
|
||||
|
|
Loading…
Add table
Reference in a new issue