X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=elisp.git;a=blobdiff_plain;f=vm;h=be89663f13d7cf416f6d5db4650e84b322820e5f;hp=75e3b13afd9a221c7706665585266b555187bd34;hb=44da93db15b7b045e0513ab4cee0a0c8361d7ac9;hpb=fc2642e34fec0d82c0d8ce6d6bc9e6859fadac7e diff --git a/vm b/vm index 75e3b13..be89663 100644 --- a/vm +++ b/vm @@ -31,6 +31,24 @@ (add-to-list 'recentf-exclude "/tmp/mymail-vm-.*\.mbox") ) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; Store and restore the window configuration + +(defadvice vm (before ff/store-window-configuration nil activate) + (unless (boundp '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) + (set-window-configuration ff/window-configuration-before-vm) + (makunbound 'ff/window-configuration-before-vm) + ) +) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + (setq-default vm-summary-show-threads t) ;; (setq vm-preview-lines nil) @@ -688,7 +706,8 @@ instance, someone in bbdb named \"Paul Smith\" would generate an alias (when (>= emacs-major-version 22) (bbdb-insinuate-vm) - (ff/mail-aliases-from-bbdb)) + (ff/mail-aliases-from-bbdb) + ) ) (defun ff/pipe-to-tmp () (interactive)