[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
|
||||
(not (looking-at (regexp-quote comment-start)))
|
||||
(comment-search-forward eolpos t))
|
||||
(progn
|
||||
(search-backward-regexp (concat "[^ \t" comment-start "]"))
|
||||
(forward-char)
|
||||
(when (or (bolp)
|
||||
(= start (point)))
|
||||
(end-of-line)))
|
||||
(condition-case _
|
||||
(progn
|
||||
(search-backward-regexp (concat "[^ \t" comment-start "]"))
|
||||
(forward-char)
|
||||
(when (or (bolp)
|
||||
(= start (point)))
|
||||
(end-of-line)))
|
||||
(search-failed (end-of-line)))
|
||||
(end-of-line))))
|
||||
|
||||
;;; From Bastien Guerry’s Emacs configuraiton:
|
||||
|
|
Loading…
Reference in a new issue