emacs-erc
[Top][All Lists]
Advanced

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

repeat


From: Emanuel Berg
Subject: repeat
Date: Fri, 12 Nov 2021 00:48:01 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Add this to ERC. Useful!

In general but to give you an example ... bot debug,
query commands ...

Also - a natural command for CLI-type computing!

;;; -*- lexical-binding: t -*-
;;;
;;; this file:
;;;   http://user.it.uu.se/~embe8573/emacs-init/erc/erc-misc.el
;;;   https://dataswamp.org/~incal/emacs-init/erc/erc-misc.el

(require 'erc)
(require 'erc-ring)

;; improved by Felix Dietrich
(defun erc-cmd-R ()
  "Repeat the last message or command."
  (if (and erc-input-ring
           (> (ring-length erc-input-ring) 1) )
      (progn
        (ring-remove erc-input-ring 0)
        (erc-send-input (ring-ref erc-input-ring 0))
        (ring-remove erc-input-ring 0) )
    (message "No past!") ))
    
https://www.youtube.com/watch?v=C03688ZPAe8

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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