Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!umd5!purdue!decwrl!hplabs!hp-pcd!uoregon!omepd!mipos3!cadev4!pinkas From: pinkas@cadev4.intel.com (Israel Pinkas ~) Newsgroups: comp.emacs Subject: delete file/process in server.el Message-ID: <2112@mipos3.intel.com> Date: 26 Apr 88 20:42:57 GMT Sender: nobody@mipos3.intel.com Reply-To: pinkas@cadev4.UUCP () Distribution: na Organization: Corporate CAD, INTeL Corporation, Santa Clara, CA Lines: 48 In server.el, as distributed, the following code (in 18.48 and 18.50) exists in start-server: ;; kill it dead! (if server-process (progn (set-process-sentinel server-process nil) (condition-case () (delete-process server-process) (error nil)))) (condition-case () (delete-file "~/.emacs_server") (error nil)) As distributed, the server process exits when the server socket already exists. condition-case is documented as follows: condition-case: Regain control when an error is signaled. (condition-case VAR BODYFORM HANDLERS...) executes BODYFORM and returns its value if no error happens. Each element of HANDLERS looks like (CONDITION-NAME BODY...) where the BODY is made of Lisp expressions. The handler is applicable to an error if CONDITION-NAME is one of the error's condition names. When a handler handles an error, control returns to the condition-case and the handler BODY... is executed with VAR bound to (SIGNALED-CONDITIONS . SIGNAL-DATA). The value of the last BODY form is returned from the condition-case. See SIGNAL for more info. My understanding is that the first argument to condition-case should be a variable, which () isn't. When I replace the () with i in the delete-file line, the server process does not die upon startup. So... Is there any reason that () was used? Or is it a simple typo? If so, could somebody make sure that it gets into future releases? Alternately, since nothing is being done when an a signal (error) occurs, is there a better function to use? Something that will simplely ignore the error resulting from the file not being existent? -Israel -------------------------------------- Disclaimer: The above are my personal opinions, and in no way represent the opinions of Intel Corporation. In no way should the above be taken to be a statement of Intel. UUCP: {amdcad,decwrl,hplabs,oliveb,pur-ee,qantel}!intelca!mipos3!cadev4!pinkas ARPA: pinkas%cadev4.intel.com@relay.cs.net CSNET: pinkas%cadev4.intel.com