[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Smie-auto-fill doesn’t respect comment-auto-fill-only-comments
From: |
Tom Tromey |
Subject: |
Re: Smie-auto-fill doesn’t respect comment-auto-fill-only-comments |
Date: |
Mon, 29 May 2017 15:20:35 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
> (let (compos comin)
> - ;; If we are not inside a comment and we only auto-fill comments,
> - ;; don't do anything (unless no comment syntax is defined).
> + ;; If we are not inside a comment don't do anything (unless no
> + ;; comment syntax is defined).
> (unless (and comment-start
> - comment-auto-fill-only-comments
> (not (called-interactively-p 'interactive))
> (not (save-excursion
> (prog1 (setq compos (comment-beginning))
Stefan> I think we want to remove the whole test: this `unless` is there
Stefan> specifically in order to do nothing if we're outside of comments and
Stefan> comment-auto-fill-only-comments is non-nil. But now the
Stefan> "comment-auto-fill-only-comments is non-nil" case is already handled
Stefan> outside, so we can just always do the auto-fill as if
Stefan> comment-auto-fill-only-comments were nil.
I looked at this, but I don't really understand this code, and there
were more spots in the function that seemed to be affected by the setq
in the snippet above; so consequently I think someone else ought to do
this, and for my part I'm dropping the patch.
thanks,
Tom