[Top][All Lists]

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

Re: momentary-string-display

From: Kevin Rodgers
Subject: Re: momentary-string-display
Date: Wed, 03 Jan 2007 01:53:42 -0700
User-agent: Thunderbird (Macintosh/20061207)

Richard Stallman wrote:
Could you please try your changed version with various commands that use
momentary-string-display, and see if it fully works?

The only calls to momentary-string-display are in ada-prj.el,
fortran.el, pascal.el, and table.el; but I don't use any of those
libraries, so I wouldn't be able to tell whether the function is
working the same, better, or worse in those contexts.

As for this code,

    !       ;; If the message end is off screen, recenter now.
    !       (if (< (window-end nil t) insert-end)
    !           (recenter (/ (window-height) 2)))
    !       ;; If that pushed message start off the screen,
    !       ;; scroll to start it at the top of the screen.
    !       (move-to-window-line 0)
    !       (if (> (point) pos)
    !           (progn
    !             (goto-char pos)
    !             (recenter 0))))

you could replace it with some reasonable heuristic that
doesn't go wrong very often.

As I meant to say, the same heuristic can be used by replacing the
reference to insert-end with (+ pos (length string)) -- as long as
the new call to overlay-put causes a redisplay that updates window-end
just as the original call to insert does.

Is there a problem with the current heuristic?  I think now that I
should have left that code in (with insert-end replaced as described).

Kevin Rodgers
Denver, Colorado, USA

reply via email to

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