X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=elisp.git;a=blobdiff_plain;f=vm;h=49104acde1c3bd84968b5d44f4f604ed1198ea2e;hp=7326c1b639d9685b1c123d8699b3ad48144e2247;hb=HEAD;hpb=e61bde32719843a643f003ed0e85914495adc3ee diff --git a/vm b/vm index 7326c1b..49104ac 100644 --- a/vm +++ b/vm @@ -35,15 +35,17 @@ ;; Store and restore the window configuration +(setq ff/window-configuration-before-vm nil) + (defadvice vm (before ff/store-window-configuration nil activate) - (unless (boundp 'ff/window-configuration-before-vm) + (unless ff/window-configuration-before-vm (setq ff/window-configuration-before-vm (current-window-configuration))) ) (defadvice vm-quit (after ff/restore-window-configuration nil activate) - (when (boundp 'ff/window-configuration-before-vm) + (when ff/window-configuration-before-vm (set-window-configuration ff/window-configuration-before-vm) - (makunbound 'ff/window-configuration-before-vm) + (setq ff/window-configuration-before-vm nil) ) ) @@ -640,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. @@ -657,8 +672,10 @@ an attachment") (defun ff/first-buffer-in-mode (l m) (if l - (if (eq (save-excursion - (set-buffer (car l)) major-mode) m) + (if (eq + ;; (save-excursion (set-buffer (car l)) major-mode) + (with-current-buffer (car l) major-mode) + m) (car l) (ff/first-buffer-in-mode (cdr l) m)))) @@ -680,7 +697,7 @@ is t." ;; bbdb (load "bbdb") -(load "bbdb-hooks") +;; (load "bbdb-hooks") (when (load "bbdb-vm" t)