comparison .elisp/settings/90.keybindings.el @ 345:b9c8655f12f0

emacs: only call server-edit during my save function if the buffer was actually a server buffer
author Augie Fackler <raf@durin42.com>
date Wed, 10 Sep 2014 14:57:26 -0400
parents 745e7cc9c2cd
children 1cda3348f36b
comparison
equal deleted inserted replaced
344:4e83916a4303 345:b9c8655f12f0
52 (local-set-key "\M-r" 52 (local-set-key "\M-r"
53 'execute-extended-command))) 53 'execute-extended-command)))
54 54
55 (defun server-save-buffer-and-finish () 55 (defun server-save-buffer-and-finish ()
56 (interactive) 56 (interactive)
57 (save-buffer) (server-edit)) 57 (save-buffer)
58 (if server-buffer-clients (server-edit)))
58 (add-hook 'server-switch-hook 59 (add-hook 'server-switch-hook
59 '(lambda ()(local-set-key "\M-s" 'server-save-buffer-and-finish ))) 60 '(lambda ()(local-set-key "\M-s" 'server-save-buffer-and-finish )))