Hi Keita,
Ikumi Keita <[email protected]> writes:
> In this case, the end position of "\verb|sed do|" sits before fill
> column, so the conditional of `when' after the comment "Determine if
> macro end is behind fill column." evaluates to nil. I suppose that this
> code presumes that \verb|...| always has a space after it.
>
> I think it's a good chance to accomplish an idea suggested in the above
> comment, to make use of `fill-nobreak-predicate'; we no longer have to
> cater for XEmacs.
Thanks for looking into this. I agree, we should switch to
`fill-nobreak-predicate'. But have a look at this example:
--8<---------------cut here---------------start------------->8---
\documentclass{article}
\begin{document}
Move point to ! and do
C-c RET verb RET RET
write some text RET SPC
Some text -!
And it gives you:
Some text -\verb|write
more text|
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% fill-column: 25
%%% End:
--8<---------------cut here---------------end--------------->8---
Emacs add a line-break inside \verb which is fixed when I hit 'M-q'.
Maybe we should add this
(add-to-list (make-local-variable 'fill-nobreak-predicate)
#'LaTeX-verbatim-p t)
to `LaTeX-common-initialization'?
> How about the attached patch? This temporally adds `LaTeX-verbatim-p' to
> `fill-nobreak-predicate' to avoid space inside \verb|...| when
> `fill-move-to-break-point' is called.
See above.
> Note that it would fail when the user uses tex-font.el or disables
> font lock, because `LaTeX-verbatim-p' depends on the facilities of
> font-latex.el.
Yes, but I think we can live with that :-)
Best, Arash
_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex