diff options
-rw-r--r-- | oni-core.el | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/oni-core.el b/oni-core.el index 7dd14f7..d507a84 100644 --- a/oni-core.el +++ b/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: |