From e2c5da005b1b29e1da3c1b2bf1c6de45d3d78b1a Mon Sep 17 00:00:00 2001 From: Pierre Courtieu Date: Wed, 9 Mar 2016 18:40:34 +0100 Subject: Fix #64. Use syntax-ppss in fill-nobreak-predicate. More robust to font-lock tweaks that change font inside comments (whitespace mode etc). --- coq/coq.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/coq/coq.el b/coq/coq.el index bde53667..656d2b54 100644 --- a/coq/coq.el +++ b/coq/coq.el @@ -1480,8 +1480,7 @@ Near here means PT is either inside or just aside of a comment." (set (make-local-variable 'open-paren-in-column-0-is-defun-start) nil) ;; do not break lines in code when filling (set (make-local-variable 'fill-nobreak-predicate) - (lambda () - (not (eq (get-text-property (point) 'face) 'font-lock-comment-face)))) + (lambda () (not (syntax-ppss)))) ;; coq mode specific indentation function (set (make-local-variable 'fill-paragraph-function) 'coq-fill-paragraph-function) -- cgit v1.2.3