[oni-core] Go to the end of the line if a comment isn't found
This commit is contained in:
parent
ace4d24a7e
commit
04bc3f3b7e
1 changed files with 8 additions and 6 deletions
14
oni-core.el
14
oni-core.el
|
@ -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 Guerry’s Emacs configuraiton:
|
;;; From Bastien Guerry’s Emacs configuraiton:
|
||||||
|
|
Loading…
Reference in a new issue