[Top][All Lists]

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

[AUCTeX-devel] Re: Fontifying of titles...

From: Ralf Angeli
Subject: [AUCTeX-devel] Re: Fontifying of titles...
Date: Sat, 09 Apr 2005 12:08:44 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux)

* David Kastrup (2005-04-09) writes:

> Anyway, here is another idea for "Emergency wrapping": use
> `vertical-motion' for checking that the wrap positions are still in
> the physical screen line.  Maybe this should be done only if used
> interactively, though.
> I was at first afraid that this would wreak havoc when the windows are
> split horizontally, but that case could be catered for by binding
> truncate-partial-width-windows to t.

Something like this could work:

(defun LaTeX-current-fill-column ()
  (let ((col (current-fill-column))
        (truncate-partial-width-windows t)
      (move-to-column col)
      (while (= (line-beginning-position)
                  (vertical-motion -1)
        (setq overfull t)
      (if (and (< (current-column) col) overfull) (current-column) col))))

You can call this instead of `current-fill-column' in
`LaTeX-fill-region-as-para-do'.  It works while debugging with edebug
but fails (i.e. gets only the first line right) when called via
`M-q'.  Dunno why.


reply via email to

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