|
Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
;; This file:
;; http://angg.twu.net/elisp/eev-telega.el.html
;; http://angg.twu.net/elisp/eev-telega.el
;; (find-angg "elisp/eev-telega.el")
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;;
;; (defun e () (interactive) (find-angg "elisp/eev-telega.el"))
;; (load (buffer-file-name))
(defun ee-goto-eol-telega ()
"The \"eol telega\" is the eol modulo the timestamp.
This function goes to the end of the line and then uses
`skip-chars-backward' to move to the left of the timestamp."
(interactive)
(end-of-line)
(skip-chars-backward "0-9:✔"))
(defun ee-goto-eol ()
"A hacky replacement for the default `ee-goto-eol'."
(interactive)
(if (eq major-mode 'telega-chat-mode)
(ee-goto-eol-telega)
(end-of-line)))
;; (defun ee-eval-sexp-eol-telega (&optional arg)
;; "Like ee-eval-sexp-eol', but uses `ee-goto-eol-telega'."
;; (interactive "P")
;; (ee-goto-eol-telega)
;; (ee-eval-last-sexp arg))
;;
;; (defun ee-eval-sexp-eol-hacky (&optional arg)
;; "Like ee-eval-sexp-eol', but when the major mode is
;; `telega-chat-mode' it uses `ee-goto-eol-telega' to go to the
;; \"eol telega\" insted of using `end-of-line', that goes to the
;; normal eol."
;; (interactive "P")
;; (if (eq major-mode 'telega-chat-mode)
;; (ee-eval-sexp-eol-telega arg)
;; (ee-eval-sexp-eol arg)))
;;
;; ;; (find-ekeymapdescr eev-mode-map)
;; ;; (define-key eev-mode-map (kbd "M-e") 'ee-eval-sexp-eol)
;; (define-key eev-mode-map (kbd "M-e") 'ee-eval-sexp-eol-hacky)
;; Tests:
;; (+ 1 2) 1:23
;; (eek "<up> <<ee-eval-sexp-eol-telega>>")
;; (+ 1 2) 1:23✔
;; (eek "<up> <<ee-eval-sexp-eol-telega>>")
;; Local Variables:
;; coding: utf-8-unix
;; End: