emacs-devel
[Top][All Lists]
Advanced

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

Re: bug#9782: 24.0.90; move-to-window-line not taking header line into a


From: Dmitry Gutov
Subject: Re: bug#9782: 24.0.90; move-to-window-line not taking header line into account
Date: Sun, 05 May 2013 06:59:48 +0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5

On 05.05.2013 6:47, Eli Zaretskii wrote:
From: Dmitry Gutov <address@hidden>
Cc: address@hidden
Date: Sun, 05 May 2013 01:12:52 +0400

What do you suggest would be a better way to get the window row of a
buffer position, save that value, and then move to that row later?

Currently, company calls (cdr (posn-actual-col-row posn)) to retrieve
the row, and `move-to-window-line' to get to it.

Simply adjusting the row number for presence of `header-line-format'
won't do, because company strives to support Emacs 23 (and maybe even
22), and `post-actual-col-row' behavior was different before the
revision 106022.

Why is that a problem to have special code for specific Emacs
versions?

It's ugly, for one thing. If you don't have any better suggestions, I'll do that, I guess.

But it's a seemingly reasonable piece of code, it worked, and your change made it break in some peculiar special case important to some users. That might imply that the code doesn't make sense on some higher level.

So I thought you could suggest how that code could be written better/faster/stronger instead.



reply via email to

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