🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.lisp.x
Article #221

Re: Xlisp built in editor?

#221
From: Tim Mikkelsen
Date: Tue, 13 Oct 1992 19:00
45 lines
1469 bytes
In case you don't have it, here is the file "EDIT.LSP": 

;;;
;;; file: EDIT.LSP
;;;

;;;(setq *breakenable* t)
;;;(setq *tracenable* t)

;;;
;;; This variable is the default file to edit
;;;

(defvar edit-file 'nil)

(defvar editor "emacs")

;;;
;;; edit a file using the specified editor
;;; if the file editted was a lisp file (.lsp) load it
;;;

(defun edit (&optional file)
    (read-char) ; get rid of newline sitting in input stream
    (and (not file)
         (null edit-file)
         (setq file (get-filename)))
    (if (not (stringp file))
	(setq file edit-file))
    (if (not (stringp editor))
	(setq editor (get-editor)))
    (system (strcat editor " " file))
    (setq edit-file file)
    (let ((len (length edit-file)))
	(if (string= (string-downcase (subseq edit-file (- len 4))) ".lsp")
	    (load edit-file))))

(defun get-filename ()
	(princ "File: ")
	(read-line))

(defun get-editor ()
	(princ "Editor: ")
	(read-line))
Technical Details
Message-ID: <1170018@hpfcbig.SDE.HP.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!iggy.GW.Vitalink.COM!cs.widener.edu!eff!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!scd.hp.com!hplextra!hpfcso!hpfcbig!tim
References: <1992Oct5.020318.25900@exucom.com>

Show Full Headers
Complete Article Headers
From: tim@hpfcbig.SDE.HP.COM (Tim Mikkelsen)
Date: Tue, 13 Oct 1992 19:00:56 GMT
Subject: Re: Xlisp built in editor?
Message-ID: <1170018@hpfcbig.SDE.HP.COM>
Organization: HP SESD, Fort Collins, CO
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!iggy.GW.Vitalink.COM!cs.widener.edu!eff!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!scd.hp.com!hplextra!hpfcso!hpfcbig!tim
Newsgroups: comp.lang.lisp.x
References: <1992Oct5.020318.25900@exucom.com>
Lines: 45