scroll to most distant future reference

Emanuel Berg via General discussion about ERC <[email protected]>
Newsgroups gmane.emacs.erc.general
Message-ID <[email protected]>
;;; -*- lexical-binding: t -*-

(require 'erc)

(defun next-mention (&optional nick)
  (interactive)
  (let ((nck (or nick erc-nick))
        (ori (point))
        (beg (point-min))
        (end (point-max)) )
    (if (re-search-backward (format "<%s>" nck) beg t)
        (goto-char (match-end 0))
      (goto-char beg) )
    (if (re-search-forward nck end t)
        (goto-char (match-beginning 0))
      (goto-char ori) )))
(defalias 'nm #'next-mention)

https://dataswamp.org/~incal/emacs-init/erc/erc-scroll.el

-- 
underground experts united
https://dataswamp.org/~incal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.