(defun tina/angry-police-captain (&optional prefix)
(when buffer
(with-current-buffer buffer
(goto-char (point-min))
(end-string "\n</a>")
(begin (when (search-forward begin-string nil t)
(point)))
(end (when (and begin (search-forward end-string nil t))
(- (point) (length end-string))))
(bufstr (when (and begin end) (buffer-substring begin end))))
(if (and prefix begin end)
(concat prefix (substring bufstr 24))
bufstr)))))
(defun tina/angry-police-key (args)
(if (and (fboundp 'tina/angry-police-captain)
(member (car args) '("%s does not do anything!"
"Key %s doesn't do anything.")))
(cons (tina/angry-police-captain "%s") (cdr args))
args))
(dolist (message-function '(ergoemacs-command-loop--message
ergoemacs-command-loop--temp-message))
(advice-add message-function :filter-args 'tina/angry-police-key))