Mercurial > hg > xemacs-beta
diff lisp/gnuserv.el @ 5884:5a93f519accc
If not waiting for C-x #, don't memorise the device, #'gnuserv-edit-files
lisp/ChangeLog addition:
2015-04-03 Aidan Kehoe <kehoea@parhasard.net>
* gnuserv.el (gnuserv-edit-files):
No need to memorise the device created for the sake of C-x #, if
the client is not waiting for us.
Fixes a bug in the following situation:
-- Start gnuserv from an XEmacs within screen
-- Call gnuclient with an X11 display available, connecting
successfully to that XEmacs and creating an X11 frame
-- Then call gnuclient file-name.txt, save the file, then type C-x
#; this deletes all the frames on the device, which it shouldn't.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Fri, 03 Apr 2015 00:27:59 +0100 |
parents | bbe4146603db |
children |
line wrap: on
line diff
--- a/lisp/gnuserv.el Fri Apr 03 00:15:18 2015 +0100 +++ b/lisp/gnuserv.el Fri Apr 03 00:27:59 2015 +0100 @@ -466,9 +466,6 @@ :frame new-frame))) (select-frame frame) (setq gnuserv-current-client nil) - ;; If the device was created by this client, push it to the list. - (and (not (eql old-device-num (length (device-list)))) - (push device gnuserv-devices)) (and (frame-iconified-p frame) (deiconify-frame frame)) ;; Visit all the listed files. @@ -503,6 +500,10 @@ (t ;; Else, the client gets a vote. (push client gnuserv-clients) + ;; If the device was created for this client, and we are memorizing + ;; the client, memorize the device too. + (and (not (eql old-device-num (length (device-list)))) + (push device gnuserv-devices)) ;; Explain buffer exit options. If dest-frame is nil, the ;; user can exit via `delete-frame'. OTOH, if FLAGS are nil ;; and there are some buffers, the user can exit via