From: Francois Fleuret Date: Wed, 5 Jun 2019 13:57:11 +0000 (+0200) Subject: Added a shortcut to delete all the buffer down to the signature excluded. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=c9caf7eea3a5b1ddc280aedd4ed0e8e78bbb103b;p=elisp.git Added a shortcut to delete all the buffer down to the signature excluded. --- diff --git a/vm b/vm index eb25a97..49104ac 100644 --- a/vm +++ b/vm @@ -642,6 +642,19 @@ an attachment") ;; (define-key vm-mail-mode-map [(shift iso-lefttab)] 'mail-mode-smart-tab) (define-key vm-mail-mode-map [(shift iso-lefttab)] 'bbdb-complete-name) +(defun ff/kill-to-signature () (interactive) + (save-excursion + (delete-region + (point) + (progn + (search-forward-regexp "^-- *$") + (- (match-beginning 0) 1)) + ) + ) + ) + +(define-key vm-mail-mode-map [(control c) (k)] 'ff/kill-to-signature) + ;; The definition of "\t" is forced through a hook defined in ;; vm-init.el, so I add mine. This is ugly. @@ -684,7 +697,7 @@ is t." ;; bbdb (load "bbdb") -(load "bbdb-hooks") +;; (load "bbdb-hooks") (when (load "bbdb-vm" t)