# HG changeset patch # User Aidan Kehoe # Date 1428017279 -3600 # Node ID 5a93f519accc9d69a7e852c25b37a5cbe86fb436 # Parent d93195c2c906d4ee6d31b1820085f43b2cd0de58 If not waiting for C-x #, don't memorise the device, #'gnuserv-edit-files lisp/ChangeLog addition: 2015-04-03 Aidan Kehoe * 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. diff -r d93195c2c906 -r 5a93f519accc lisp/ChangeLog --- a/lisp/ChangeLog Fri Apr 03 00:15:18 2015 +0100 +++ b/lisp/ChangeLog Fri Apr 03 00:27:59 2015 +0100 @@ -1,3 +1,15 @@ +2015-04-03 Aidan Kehoe + + * 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. + 2015-04-01 Aidan Kehoe When calling #'string-match with a REGEXP without regular diff -r d93195c2c906 -r 5a93f519accc lisp/gnuserv.el --- 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