GNU bug report logs -
#27775
footnotes mode hanging indent [CODE INCLUDED]
Previous Next
Reported by: Boruch Baum <boruch_baum <at> gmx.com>
Date: Thu, 20 Jul 2017 21:18:01 UTC
Severity: minor
Tags: fixed
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #18 received at 27775 <at> debbugs.gnu.org (full text, mbox):
Noam Postavsky <npostavs <at> gmail.com> writes:
> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
>> so I've added a new fill-paragraph function to the Emacs trunk.
>
> Hmm, you did
>
> (define-minor-mode footnote-mode
> ...
> (setq-local fill-paragraph-function #'footnote--fill-paragraph)
>
> But since footnote-mode is a minor mode, isn't it a mistake to just take
> over fill-paragraph-function like that? What if the major mode has
> installed some fill-paragraph-function?
Oh, yeah, that's true. How are minor modes supposed to do the paragraph
filling? Hm... For adaptive fill footnote does:
(unless adaptive-fill-function
;; nil and `ignore' have the same semantics for adaptive-fill-function,
;; but only `ignore' behaves correctly with add/remove-function.
(setq adaptive-fill-function #'ignore))
(remove-function (local 'adaptive-fill-function)
#'footnote--adaptive-fill-function)
[...]
(add-function :around (local 'adaptive-fill-function)
#'footnote--adaptive-fill-function)
and I guess it could do the same for fill-paragraph-function? (It
seems like a mouthful, though -- perhaps there should be a helper
function to do all this?)
Hm! Or will using fill-forward-paragraph-function do the right thing
both for adaptive filling and paragraph filling?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 5 years and 361 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.