gnu-emacs-sources
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: texinfo-fill-workaround.el -- no break after @: when filling


From: Stefan Monnier
Subject: Re: texinfo-fill-workaround.el -- no break after @: when filling
Date: Sat, 20 Aug 2005 22:12:40 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> Ah, that one's hiding a bit.  I see it's as easy as say

> (add-hook 'texinfo-mode-hook
>           (lambda ()
>             (set (make-local-variable 'fill-nobreak-predicate)
>                  (lambda ()
>                    (string-equal (buffer-substring (- (point) 3) (point))
>                                  "@: ")))))

That looks credible.  I'd point out that fill-nobreak-predicate is a hook in
recent versions of Emacs, in which case add-hook should be used in place of
set/make-local-variable.  Also things like (string-equal (buffer-substring
...) "blabla") are better written using (looking-at "blabla") which saves
you from creating a new string just to throw it away immediately.


        Stefan


reply via email to

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