Added a shortcut to delete all the buffer down to the signature excluded.
authorFrancois Fleuret <francois@fleuret.org>
Wed, 5 Jun 2019 13:57:11 +0000 (15:57 +0200)
committerFrancois Fleuret <francois@fleuret.org>
Wed, 5 Jun 2019 13:57:11 +0000 (15:57 +0200)
vm

diff --git a/vm b/vm
index eb25a97..49104ac 100644 (file)
--- 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)