emacs-erc
[Top][All Lists]
Advanced

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

Re: ERC top/bottom 2*blank lines


From: Emanuel Berg
Subject: Re: ERC top/bottom 2*blank lines
Date: Wed, 23 Dec 2020 02:05:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> (defun erc-scroll-to-top () [...]
> (defun erc-scroll-to-bottom () [...]
>
> https://dataswamp.org/~incal/emacs-init/erc-my.el

Oh, there is already a `erc-scroll-to-bottom'.

(defun erc-scroll-to-top-no-blanks ()
  (interactive)
  (goto-char (point-min))
  (when (and (looking-at "^$")
             (re-search-forward "[[:graph:]]" (point-max) t) )
    (beginning-of-line)
    (recenter 0) ))

(defun erc-scroll-to-bottom-no-blanks ()
  (interactive)
  (goto-char (point-max))
  (when (and (looking-at "^$")
             (re-search-backward "[[:graph:]]" (point-min) t) )
    (beginning-of-line)
    (recenter -1) ))

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




reply via email to

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