changeset 38713:0e498f6c5404

(executable-set-magic): If executable-find returns a quoted file name, unquote it before inserting it.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 07 Aug 2001 09:46:41 +0000
parents cf3448e30109
children d0fff85bebaa
files lisp/progmodes/executable.el
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/executable.el	Tue Aug 07 08:55:12 2001 +0000
+++ b/lisp/progmodes/executable.el	Tue Aug 07 09:46:41 2001 +0000
@@ -210,13 +210,19 @@
    (let* ((name (read-string "Name or file name of interpreter: "))
 	  (arg (read-string (format "Argument for %s: " name))))
      (list name arg (eq executable-query 'function) t)))
+
   (setq interpreter (if (file-name-absolute-p interpreter)
 			interpreter
 		      (or (executable-find interpreter)
-			  (error "Interpreter %s not recognized" interpreter)))
-	argument (concat interpreter
+			  (error "Interpreter %s not recognized"
+				 interpreter))))
+
+  (setq argument (concat (if (string-match "\\`/:" interpreter)
+			     (replace-match "" nil nil interpreter)
+			   interpreter)
 			 (and argument (string< "" argument) " ")
 			 argument))
+
   (or buffer-read-only
       (if buffer-file-name
 	  (string-match executable-magicless-file-regexp
@@ -253,7 +259,7 @@
 ;;;	      (eq executable-insert t)
 ;;;	      (set-buffer-modified-p buffer-modified-p))
 	  )))
-  interpreter)
+    interpreter)