Jeff Abrahamson on Fri, 28 Dec 2001 09:10:13 +0100 |
Thought this might be helpful to some, given some of the mutt discussions we've had. I use mutt with emacsclient at home, but from work I don't maintain an X connection (not reliable enough), so I set editor=emacs instead. I want f12 to finish editing no matter what. If it's emacsclient, it should clean up so I don't have a lot of old compose buffers hanging around, even at the bottom of the window stack. This bit of elisp does the trick. (global-set-key [f12] (lambda () "Finish editing and return to caller." (interactive) (let ((buf (current-buffer))) (save-buffer buf) (if (getenv "DISPLAY") (progn (server-edit) (kill-buffer buf)) (progn (save-buffers-kill-emacs)))))) Users of xemacs would have to specify the "f12" slightly differently. -- Jeff Jeff Abrahamson <http://www.purple.com/jeff/> Buy my boyfriend's new novel: The Big Book of Misunderstanding <http://www.misunderstanding.net/buystuff.html> ______________________________________________________________________ Philadelphia Linux Users Group - http://www.phillylinux.org Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce General Discussion - http://lists.phillylinux.org/mail/listinfo/plug
|
|