From xemacs-m  Thu Feb  6 14:39:23 1997
Received: from steadfast.teradyne.com (steadfast.teradyne.com [131.101.1.200])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id OAA19879
	for <xemacs-beta@xemacs.org>; Thu, 6 Feb 1997 14:39:22 -0600 (CST)
Received: from engine.ecf.teradyne.com (engine.ecf.teradyne.com [131.101.192.6]) by steadfast.teradyne.com (8.7.1/8.7.1) with ESMTP id PAA24575 for <xemacs-beta@xemacs.org>; Thu, 6 Feb 1997 15:42:28 -0500 (EST)
Received: from midnight.eng.ecf.teradyne.com (midnight.ecf.teradyne.com [131.101.192.49]) by engine.ecf.teradyne.com (8.7.1/8.7.1) with SMTP id VAA29630; Thu, 6 Feb 1997 21:38:45 +0100 (MET)
Received: by midnight.eng.ecf.teradyne.com (SMI-8.6/SMI-SVR4)
	id VAA05292; Thu, 6 Feb 1997 21:38:45 +0100
To: XEmacs Beta Mailing List <xemacs-beta@xemacs.org>
Subject: executable.el incorrectly updates magic number (used by sh-script.el)
X-Face: 4[iHdXiTu\V3u[~\I)<f9HC);%~nG8`oUqv#uzvs6=\V{AjN6Sn
 c/qi;YLwRmEbt8Y*=j5n(urqY@chPh@J'D"QlqD!C8>*}#kYF[-tYl3VZga/HSOP|K,{L
 Rtu@f0y/=O&Cu}\:~d|P$JON?pn?j,&CnPb1z#/TL9bkAJwyol&a:SvYj-VYbM=Dtxhk9
 =w|R6U3_;SH&B<Mfy6Q%#
Mime-Version: 1.0 (generated by tm-edit 7.101)
Content-Type: text/plain; charset=US-ASCII
From: Adrian Aichner <aichner@ecf.teradyne.com>
Date: 06 Feb 1997 21:38:44 +0100
Message-ID: <rxsvi85pt4b.fsf@midnight.ecf.teradyne.com>
Lines: 50
X-Mailer: Red Gnus v0.84/XEmacs 20.0


Enter sh-mode (loads from sh-script.el) in  a buffer.

Set shell either by
M-x sh-set-shell (supplying sh when prompted)
or
C-c :

You'll get a magic number like

#! /usr/bin/sh

Now, while still in the buffer, try changing it. Use the above
sequence but supply csh instead. You will be asked whether you would
like to change to '#! /usr/bin/csh' but the replacement will actually
be

/usr/bin/csh

This is of course missing executable-prefix.

Here is my patch for executable.el:

*** /tmp/executable.el.orig	Thu Feb  6 21:31:14 1997
--- /tmp/executable.el	Thu Feb  6 21:31:14 1997
***************
*** 211,217 ****
  			     (y-or-n-p (concat "Replace magic number by `"
  					       executable-prefix argument "'? "))))
  		       (progn
! 			 (replace-match argument t t nil 1)
  			 (message "Magic number changed to `%s'"
  				  (concat executable-prefix argument)))))
  	    (insert executable-prefix argument ?\n)
--- 211,218 ----
  			     (y-or-n-p (concat "Replace magic number by `"
  					       executable-prefix argument "'? "))))
  		       (progn
! 			 (replace-match (concat executable-prefix argument)
! 					t t nil 1)
  			 (message "Magic number changed to `%s'"
  				  (concat executable-prefix argument)))))
  	    (insert executable-prefix argument ?\n)


-- 
  Teradyne GmbH               Adrian Aichner Applications Engineer
  Semiconductor Test Group    Telephone      +49/89/418 61 (0)-208
  Dingolfinger Strasse 2      Fax            +49/89/418 61-217
  D-81673 M"UNCHEN            E-mail         aichner@ecf.teradyne.com

