From xemacs-m  Tue Jun 24 15:49:54 1997
Received: from jagor.srce.hr (hniksic@jagor.srce.hr [161.53.2.130])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id PAA25692
	for <xemacs-beta@xemacs.org>; Tue, 24 Jun 1997 15:49:52 -0500 (CDT)
Received: (from hniksic@localhost)
          by jagor.srce.hr (8.8.5/8.8.4)
	  id WAA10448; Tue, 24 Jun 1997 22:49:52 +0200 (MET DST)
To: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: Re: [PATCH] Gnuserv update
References: <kigu3in5270.fsf@jagor.srce.hr> <bybu4vg4tg.fsf@midget.math.ethz.ch>
X-Attribution: Hrv
X-Face: Mie8:rOV<\c/~z{s.X4A{!?vY7{drJ([U]0O=W/<W*SMo/Mv:58:*_y~ki>xDi&N7XG
        KV^$k0m3Oe/)'e%3=$PCR&3ITUXH,cK>]bci&<qQ>Ff%x_>1`T(+M2Gg/fgndU%k*ft
        [(7._6e0n-V%|%'[c|q:;}td$#INd+;?!-V=c8Pqf}3J
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 24 Jun 1997 22:49:51 +0200
In-Reply-To: Jan Vroonhof's message of "24 Jun 1997 21:48:43 +0200"
Message-ID: <kigpvtbwwsw.fsf@jagor.srce.hr>
Lines: 218
X-Mailer: Gnus v5.4.59/XEmacs 20.3(beta8) - "Copenhagen"

Jan Vroonhof <vroonhof@math.ethz.ch> writes:

> Do they actually work for you? I just noticed that they didn't for
> me.  Probably becuase these aliases are not defined yet when
> definining the aliases.... Damn...

Hmm, you are right.  OK, I'll move them to front.  The patch is
appended to the end of message.

> P.S. Considering the amount of messages on gnu.emacs.misc on
> gnuclient there seem to be at least some people using it with FSF
> Emacs, so maybe when I have time..

If you do it, could you please keep a separate source file?  The main
reason for rewriting gnuserv.el was the horrible amount of
compatibility kludges in there -- the thing supported Emacs 18, Epoch, 
Lucid Emacs 19, XEmacs 19 and FSF Emacs 19.  Whew!  As a result,
`kill-buffer' would get screwed, `kill-all-local-variables' would get
screwed, loads of stuff wasn't used, etc.  Yuck.

BTW, gnuserv.el should be fairly easy to port to FSF.  I can provide
all the help you need -- only please avoid cluttering our version.


      Stallman

(to the tune of Zombie, by C.)

  Another bug hangs lowly
  Lisp is slowly
  Taken
  Software freedom causes silence
  Who are we mistaking ?
  Mmm, You see,
  It's not me,
  It's not my
  Family,
  Richard Stallman
  and GNU Emacs
  They are fighting

  With extents
  And keymaps
  And opaque oobjects
  In your head
  In your head
  They are leaking

  In your head
  In your he^ad
  Stallman
  Stallman
  Sta^^^llman

  What's in your head
  In your he^ad
  Richard
  Richard
  Richa^^^^arduuo^oh

  Another coder's breaking
  Heart is taken-over
  Assignment, software freedom;
  We must be mistaken

  It's the same old teen
  Since 19.12
  In your head
  In your head
  Specifiers!

  With extents
  And keymaps
  And opaque oobjects
  In your head
  In your head
  They're coredumping

  In your head
  In your he^ad
  Richard
  Richard
  Richard^^^arduo^oh

  What's in your head
  In your he^ad
  RMS
  RMS
  Richa^^rd Stallma^^^^^^^oh eh-eh-ah-ya-ya


With apologies to the Cranberries and the people of the Northern
Ireland.



--- lisp/packages/gnuserv.el.orig	Tue Jun 24 22:44:40 1997
+++ lisp/packages/gnuserv.el	Tue Jun 24 22:44:44 1997
@@ -1,7 +1,7 @@
 ;;; gnuserv.el --- Lisp interface code between Emacs and gnuserv
 ;; Copyright (C) 1989-1997 Free Software Foundation, Inc.
 
-;; Version: 3.4
+;; Version: 3.5
 ;; Author: Andy Norman (ange@hplb.hpl.hp.com), originally based on server.el
 ;;         Hrvoje Niksic <hniksic@srce.hr>
 ;; Maintainer: Jan Vroonhof <vroonhof@math.ethz.ch>,
@@ -89,6 +89,32 @@
   :group 'terminals)
 
 
+
+;; Provide the old variables as aliases, to avoid breaking .emacs
+;; files.  However, they are obsolete and should be converted to the
+;; new forms.  This ugly crock must be before the variable
+;; declaration, or the scheme fails.
+
+(define-obsolete-variable-alias 'server-frame 'gnuserv-frame)
+(define-obsolete-variable-alias 'server-done-function
+  'gnuserv-done-function)
+(define-obsolete-variable-alias 'server-done-temp-file-function
+  'gnuserv-done-temp-file-function)
+(define-obsolete-variable-alias 'server-find-file-function
+  'gnuserv-find-file-function)
+(define-obsolete-variable-alias 'server-program
+  'gnuserv-program)
+(define-obsolete-variable-alias 'server-visit-hook
+  'gnuserv-visit-hook)
+(define-obsolete-variable-alias 'server-done-hook
+  'gnuserv-done-hook)
+(define-obsolete-variable-alias 'server-kill-quietly
+  'gnuserv-kill-quietly)
+(define-obsolete-variable-alias 'server-temp-file-regexp
+  'gnuserv-temp-file-regexp)
+(define-obsolete-variable-alias 'server-make-temp-file-backup
+  'gnuserv-make-temp-file-backup)
+
 ;;;###autoload
 (defcustom gnuserv-frame nil
   "*The frame to be used to display all edited files.
@@ -184,29 +210,6 @@
   :group 'gnuserv)
 
 
-;; The old functions are provided as aliases, to avoid breaking .emacs
-;; files.  However, they are obsolete and should be avoided.
-
-(define-obsolete-variable-alias 'server-frame 'gnuserv-frame)
-(define-obsolete-variable-alias 'server-done-function 'gnuserv-done-function)
-(define-obsolete-variable-alias 'server-done-temp-file-function
-  'gnuserv-done-temp-file-function)
-(define-obsolete-variable-alias 'server-find-file-function
-  'gnuserv-find-file-function)
-(define-obsolete-variable-alias 'server-program
-  'gnuserv-program)
-(define-obsolete-variable-alias 'server-visit-hook
-  'gnuserv-visit-hook)
-(define-obsolete-variable-alias 'server-done-hook
-  'gnuserv-done-hook)
-(define-obsolete-variable-alias 'server-kill-quietly
-  'gnuserv-kill-quietly)
-(define-obsolete-variable-alias 'server-temp-file-regexp
-  'gnuserv-temp-file-regexp)
-(define-obsolete-variable-alias 'server-make-temp-file-backup
-  'gnuserv-make-temp-file-backup)
-
-
 ;;; Internal variables:
 
 (defstruct gnuclient
@@ -288,21 +291,17 @@
 ;; We used to restart the server here, but it's too risky -- if
 ;; something goes awry, it's too easy to wind up in a loop.
 (defun gnuserv-sentinel (proc msg)
+  (let ((msgstring (concat "Gnuserv process %s; restart with `%s'"))
+	(keystring (substitute-command-keys "\\[gnuserv-start]")))
   (case (process-status proc)
     (exit
-     (message
-      (substitute-command-keys
-       "Gnuserv subprocess exited; restart with `\\[gnuserv-start]'"))
+     (message msgstring "exited" keystring)
      (gnuserv-prepare-shutdown))
     (signal
-     (message
-      (substitute-command-keys
-       "Gnuserv subprocess killed; restart with `\\[gnuserv-start]'"))
+     (message msgstring "killed" keystring)
      (gnuserv-prepare-shutdown))
     (closed
-     (message
-      (substitute-command-keys
-       "Gnuserv subprocess closed; restart with `\\[gnuserv-start]'"))
+     (message msgstring "closed" keystring))
      (gnuserv-prepare-shutdown))))
 
 ;; This function reads client requests from our current server.  Every
@@ -466,10 +465,12 @@
 	;; `gnuserv-edit'.
 	(if (and (not (or quick view))
 		 (gnuclient-buffers client))
-	    (message (substitute-command-keys
+	    (message "%s"
+		     (substitute-command-keys
 		      "Type `\\[gnuserv-edit]' to finish editing"))
 	  (or dest-frame
-	      (message (substitute-command-keys
+	      (message "%s"
+		       (substitute-command-keys
 			"Type `\\[delete-frame]' to finish editing")))))))))
 
 

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
Thou Who might be our Father Who perhaps may be in Heaven...
                                                -- Roger Zelazny

