From c9caf7eea3a5b1ddc280aedd4ed0e8e78bbb103b Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Wed, 5 Jun 2019 15:57:11 +0200 Subject: [PATCH] Added a shortcut to delete all the buffer down to the signature excluded. --- vm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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) -- 2.20.1