help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: could mark-paragraph scroll the window?


From: Kevin Rodgers
Subject: Re: could mark-paragraph scroll the window?
Date: Tue, 04 Jan 2011 00:18:44 -0700
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7

On 12/29/10 3:03 PM, Eric Abrahamsen wrote:
Is there any chance that mark-paragraph (which marks consecutive
paragraphs when used repeatedly) could scroll the window once the
marking extends below the visible area? I find this command very useful,
but not being able to see where it's going is very limiting.

Could I make a local version that does what I want?

Perhaps something like this:

(defadvice mark-paragraph (after region-end-visible activate)
  "When called interactively, temporarily display the end of the marked region
if it is not visible in the selected window."
  (when (and (called-interactively-p 'any)
             ;; (eq this-command last-command)
             (not (pos-visible-in-window-p (region-end))))
    (exchange-point-and-mark)
    (sit-for 1)
    (exchange-point-and-mark)))

--
Kevin Rodgers
Denver, Colorado, USA




reply via email to

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