emacs-devel
[Top][All Lists]
Advanced

[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: Stefan Monnier
Subject: Re: Smie-auto-fill doesn’t respect comment-auto-fill-only-comments
Date: Tue, 02 May 2017 15:18:43 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> Could this just setq auto-fill-function to a function that wraps (the
> captured value of) normal-auto-fill-function?  That would avoid using advice.

Not sure what you mean: "a function that wraps (the captured value of)
normal-auto-fill-function" is exactly what add-function creates.
[ Tho my patch is buggy, it should say

         (add-function :around (local auto-fill-function)
  i.s.o
         (add-function :around normal-auto-fill-function
]

But maybe a cleaner patch would change the C code so it doesn't (funcall
auto-fill-function) directly but instead it calls a fixed Elisp function
which does the comment-auto-fill-only-comments check and then funcalls
auto-fill-function.  This would probably make it desirable to
move auto-fill-function from buffer.c to simple.el or fill.el.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]