[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: could mark-paragraph scroll the window?
From: |
Deniz Dogan |
Subject: |
Re: could mark-paragraph scroll the window? |
Date: |
Tue, 4 Jan 2011 14:35:12 +0100 |
2011/1/4 Kevin Rodgers <kevin.d.rodgers@gmail.com>:
> 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)))
>
This code works very strangely when I try it.
--
Deniz Dogan