[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
|
@ -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))
|
||||||
|
(condition-case _
|
||||||
(progn
|
(progn
|
||||||
(search-backward-regexp (concat "[^ \t" comment-start "]"))
|
(search-backward-regexp (concat "[^ \t" comment-start "]"))
|
||||||
(forward-char)
|
(forward-char)
|
||||||
(when (or (bolp)
|
(when (or (bolp)
|
||||||
(= start (point)))
|
(= start (point)))
|
||||||
(end-of-line)))
|
(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