auctex-devel
[Top][All Lists]
Advanced

[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 14:32:01 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux)

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

> Ralf Angeli <address@hidden> writes:
>
>> * David Kastrup (2005-04-09) writes:
>>
>>> Anyway, would not something like
>>>
>>> (save-excursion
>>>   (let ((oldpoint (point)))
>>>     (move-beginning-of-line)
>>>     (if (or (< (vertical-motion 1) 1)
>>
>> (vertical-motion 1) returns something smaller than 1 when invoked on
>> a wrapped line?
>
> Who said that?

Sorry, I misunderstood the code.

Maybe because it will not work in every case.  Here is the full
version again:

(save-excursion
  (let ((oldpoint (point)))
    (move-beginning-of-line)
    (if (or (< (vertical-motion 1) 1)
            (> (point) oldpoint))
        col
      (backward-char)
      (current-column))))

IIUC the code assumes that point is located on the second screen line
of a wrapped line.  Because if it was not, (point) would be greater
than oldpoint in the if-statement and col would be returned.  Problem
is that this assumption cannot be made because the function could be
called with point anywhere on the line.

-- 
Ralf





reply via email to

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