-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlispworks.lisp
More file actions
114 lines (94 loc) · 3.65 KB
/
lispworks.lisp
File metadata and controls
114 lines (94 loc) · 3.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
;;;; -*- mode:lisp; coding:utf-8 -*-
;;;;****************************************************************************
;;;;FILE: lispworks.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Lispworks Common Lisp
;;;;USER-INTERFACE: None
;;;;DESCRIPTION
;;;;
;;;; The Lispworks init file.
;;;;
;;;;AUTHORS
;;;; <PJB> Pascal J. Bourguignon <pjb@informatimago.com>
;;MODIFICATIONS
;;;; 2013-09-08 <PJB> Created.
;;;;BUGS
;;;;LEGAL
;;;; GPL
;;;;
;;;; Copyright Pascal Bourguignon 2013 - 2013
;;;; mailto:pjb@informatimago.com
;;;;
;;;; This program is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU General Public License
;;;; as published by the Free Software Foundation; either version
;;;; 2 of the License, or (at your option) any later version.
;;;;
;;;; This program is distributed in the hope that it will be
;;;; useful, but WITHOUT ANY WARRANTY; without even the implied
;;;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
;;;; PURPOSE. See the GNU General Public License for more details.
;;;;
;;;; You should have received a copy of the GNU General Public
;;;; License along with this program; if not, write to the Free
;;;; Software Foundation, Inc., 59 Temple Place, Suite 330,
;;;; Boston, MA 02111-1307 USA
;;;;****************************************************************************
;; (lw:set-default-character-element-type 'cl:character)
;;----------------------------------------------------------------------
;; Setting environment -- COMMON-LISP part --
;; ------------------------------------------
(in-package "COMMON-LISP-USER")
(SETQ *LOAD-VERBOSE* NIL)
;; For now, let's keep using the lispworks packages in CL-USER
(let ((used-packages (package-use-list "COMMON-LISP-USER")))
(unwind-protect
(LOAD (MERGE-PATHNAMES
(MAKE-PATHNAME :DIRECTORY '(:RELATIVE "RC") :NAME "COMMON" :TYPE "LISP"
:CASE :COMMON)
(USER-HOMEDIR-PATHNAME)
NIL))
(use-package used-packages "COMMON-LISP-USER")))
(in-package "COM.INFORMATIMAGO.PJB")
(export '(EDIT QUIT))
;;----------------------------------------------------------------------
;; Setting environment -- Lispworks specific --
;; ------------------------------------------
;;----------------------------------------------------------------------
;; EDIT --
;; -------
;; editor-name is redefined in config.lisp to be:
;; (defun editor-name () (or (getenv "EDITOR") *editor*))
(DEFUN GET-FIRST-WORD (STRING)
"
RETURN: The first word of the string, or the empty string.
"
(DO ((I 0)
(J 0)
(FOUND NIL)
(DONE NIL))
(DONE (IF FOUND (SUBSEQ STRING I J) ""))
(IF (<= (LENGTH STRING) I)
(SETQ DONE T FOUND NIL)
(IF (<= J I)
(IF (ALPHA-CHAR-P (CHAR STRING I))
(SETQ J (1+ I))
(INCF I))
(IF (<= (LENGTH STRING) J)
(SETQ DONE T FOUND T)
(IF (ALPHA-CHAR-P (CHAR STRING J))
(INCF J)
(SETQ DONE T FOUND T)))))))
(defun edit (&optional (x nil x-p))
(declare (ignore x x-p))
(apply (function ed) x))
(defun quit () (lispworks:quit))
(defun really-quit () (lispworks:quit))
;;; (setf (current-directory) ...)
(in-package "COMMON-LISP-USER")
(use-package "COM.INFORMATIMAGO.PJB")
(setf *print-right-margin* 110)
;;----------------------------------------------------------------------
(format *trace-output* "~&~A loaded~%" *load-pathname*)
;;----------------------------------------------------------------------
;;; THE END ;;;;