;;; -*- lexical-binding: t -*- ;; ;; this file: ;; https://dataswamp.org/~incal/emacs-init/messages.el (require 'mode-line) (defun messages-buffer-mode-hook-f () (lines) ) (add-hook 'messages-buffer-mode-hook #'messages-buffer-mode-hook-f) (defun insert-last-message () (interactive) (let ((msg (with-current-buffer (messages-buffer) (let ((end (goto-char (point-max))) (beg (re-search-backward "^[[:space:]]*[[:graph:]]+")) ) (buffer-substring beg end) )))) (insert msg) )) (defalias 'ilm #'insert-last-message) (defun echo-point () (interactive) (message "%d" (point)) ) (provide 'messages)