1. xemacs
  2. ilisp

Source

ilisp / ilisp-hi.el

Diff from to

File ilisp-hi.el

  • Ignore whitespace
 	 'call)
        t)))
 
+;;; 2002-05-20 09:38:07 rurban
+;;; Ivan's ange-ftp hack: "/user@server:~/xx.lisp" => "~/xx.lisp"  
+;;; Reini's cygwin hack: "/cygdrive/r/xx.lisp"     => "r:/xx.lisp"
+(defun file-name-hack (file-name)
+  "Strip ange-ftp and cygwin pathnames prefixes for the native local lisp"
+  (cond ((string-match "/.*?@.*:" file-name)
+	 (substring file-name (match-end 0)))
+	((not (eq system-type 'cygwin32)) file-name) ; verified on XEmacs
+	;; assume cygwin clisp on cygwin (X)Emacs
+	((eq ilisp-dialect 'clisp-hs) file-name)
+	;; => w32 path for non-cygwin lisps only.
+	((string-equal "/cygdrive/" (subseq file-name 0 10))
+	 (concat (subseq file-name 10 11) ":" (subseq file-name 11)))
+	(t file-name)))
+
 ;;;
 (defun compile-file-lisp (file-name &optional extension)
   "Compile a Lisp file in the current inferior LISP and go there."
   (setq lisp-prev-l/c-dir/file (cons (file-name-directory    file-name)
 				     (file-name-nondirectory file-name)))
   (ilisp-init t)
-  ;; Ivan's hack for ange-ftp pathnames...
-  (let ((file-name
-	 (if (string-match "/.*?@.*:" file-name)
-	     (substring file-name (match-end 0))
-	   file-name)))
+  (let ((file-name (file-name-hack file-name)))
     (ilisp-send
      (format (ilisp-value 'ilisp-compile-file-command) file-name
 	     (or extension (ilisp-value 'ilisp-binary-extension)))
         (when (file-readable-p binary)
           (setq file-name binary))))
     (switch-to-lisp t t)
-    ;; Ivan's hack for ange-ftp pathnames...
-    (let ((file-name
-           (if (string-match "/.*?@.*:" file-name)
-               (substring file-name (match-end 0))
-             file-name)))
+    (let ((file-name (file-name-hack file-name)))
       (comint-sender
        (ilisp-process)
        (format (ilisp-value 'ilisp-load-command) file-name))
       (message "Loading %s" file-name))))
 
 
-
 ;;;%Source
 ;;;%File operations
 ;;;
                    (string-equal package "#+") (string-equal package "#-")
                    double-quote-pos;; there is no output  for strings only.
                    (not (and symbol (stringp symbol) (> (length symbol) 0)))
-                   (string-match "^\. " symbol))))
+                   (string-match "^\. " symbol)
+                   (string-match "^\\\\" symbol))))
 
         (goto-char old-point)
         (unless (no-arglist-output-p)