1
0
Fork 0

[oni-core] Go to the end of the line if a comment isn't found

This commit is contained in:
Tom Willemse 2022-02-24 01:55:05 -08:00
parent ace4d24a7e
commit 04bc3f3b7e

View file

@ -79,12 +79,14 @@
(if (and comment-start (if (and comment-start
(not (looking-at (regexp-quote comment-start))) (not (looking-at (regexp-quote comment-start)))
(comment-search-forward eolpos t)) (comment-search-forward eolpos t))
(progn (condition-case _
(search-backward-regexp (concat "[^ \t" comment-start "]")) (progn
(forward-char) (search-backward-regexp (concat "[^ \t" comment-start "]"))
(when (or (bolp) (forward-char)
(= start (point))) (when (or (bolp)
(end-of-line))) (= start (point)))
(end-of-line)))
(search-failed (end-of-line)))
(end-of-line)))) (end-of-line))))
;;; From Bastien Guerrys Emacs configuraiton: ;;; From Bastien Guerrys Emacs configuraiton: