erc-discuss
[Top][All Lists]
Advanced

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

Re: [Erc-discuss] <space> to scroll to next page?


From: Edward O'Connor
Subject: Re: [Erc-discuss] <space> to scroll to next page?
Date: Fri, 25 Nov 2011 09:29:26 -0800

> I'm using erc on a linux text console. From Gnus and other emacs
> programs my fingers are used to scroll to the next page while reading
> by pressing <space>.
>
> Unfortunately I have to press <PageDown> when reading through an
> high traffic erc buffer.
>
> I would like the space bar to go down to next page unless the point
> is in the writable area of an erc buffer, where it should insert a space
> char.
>
> How do I do that?

This is how I do it:

(defun ted-erc-spc-dwim ()
  "DWIMmy behavior for the SPC key in ERC."
  (interactive)
  (condition-case nil (insert " ")
    (text-read-only
     (condition-case nil (scroll-up)
       (end-of-buffer (recenter 0))))))

(define-key erc-mode-map (kbd "SPC") 'ted-erc-spc-dwim)



reply via email to

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