/[climacs]/climacs/packages.lisp
ViewVC logotype

Contents of /climacs/packages.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.106 - (hide annotations)
Mon Jul 24 13:24:40 2006 UTC (7 years, 8 months ago) by thenriksen
Branch: MAIN
Changes since 1.105: +77 -50 lines
Final major package-cleanup for now. New package, CLIMACS-CORE,
added. Lots of commands moved from CLIMACS-GUI to CLIMACS-COMMANDS,
reusable functions moved to CLIMACS-CORE.
1 strandh 1.1 ;;; -*- Mode: Lisp; Package: COMMON-LISP-USER -*-
2    
3 mvilleneuve 1.29 ;;; (c) copyright 2004-2005 by
4 strandh 1.6 ;;; Robert Strandh (strandh@labri.fr)
5 mvilleneuve 1.29 ;;; (c) copyright 2005 by
6     ;;; Matthieu Villeneuve (matthieu.villeneuve@free.fr)
7 thenriksen 1.104 ;;; (c) copyright 2006 by
8     ;;; Troels Henriksen (athas@sigkill.dk)
9 strandh 1.1
10     ;;; This library is free software; you can redistribute it and/or
11     ;;; modify it under the terms of the GNU Library General Public
12     ;;; License as published by the Free Software Foundation; either
13     ;;; version 2 of the License, or (at your option) any later version.
14     ;;;
15     ;;; This library is distributed in the hope that it will be useful,
16     ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17     ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18     ;;; Library General Public License for more details.
19     ;;;
20     ;;; You should have received a copy of the GNU Library General Public
21     ;;; License along with this library; if not, write to the
22     ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23     ;;; Boston, MA 02111-1307 USA.
24    
25     ;;; Package definitions for the Climacs editor.
26    
27 thenriksen 1.104 (in-package :cl-user)
28    
29 strandh 1.1 (defpackage :climacs-buffer
30 abakic 1.41 (:use :clim-lisp :flexichain :binseq)
31 strandh 1.1 (:export #:buffer #:standard-buffer
32     #:mark #:left-sticky-mark #:right-sticky-mark
33     #:standard-left-sticky-mark #:standard-right-sticky-mark
34 rstrandh 1.50 #:clone-mark
35     #:no-such-offset #:offset-before-beginning #:offset-after-end
36     #:invalid-motion #:motion-before-beginning #:motion-after-end
37     #:size #:number-of-lines
38 strandh 1.1 #:offset #:mark< #:mark<= #:mark= #:mark> #:mark>=
39 thenriksen 1.100 #:forward-object
40     #:backward-object
41     #:forward-line-start #:backward-line-start
42     #:forward-line-end #:backward-line-end
43 strandh 1.1 #:beginning-of-buffer #:end-of-buffer
44     #:beginning-of-buffer-p #:end-of-buffer-p
45     #:beginning-of-line #:end-of-line
46     #:beginning-of-line-p #:end-of-line-p
47 mvilleneuve 1.31 #:buffer-line-number #:buffer-column-number
48 strandh 1.1 #:line-number #:column-number
49 strandh 1.3 #:insert-buffer-object #:insert-buffer-sequence
50 thenriksen 1.90 #:buffer-substring
51 abakic 1.24 #:insert-object #:insert-sequence
52 strandh 1.3 #:delete-buffer-range #:delete-range
53 strandh 1.1 #:delete-region
54 strandh 1.3 #:buffer-object #:buffer-sequence
55 rstrandh 1.7 #:object-before #:object-after #:region-to-sequence
56 abakic 1.41 #:low-mark #:high-mark #:modified-p #:clear-modify
57 abakic 1.56 #:binseq-buffer #:obinseq-buffer #:binseq2-buffer
58 abakic 1.51 #:persistent-left-sticky-mark #:persistent-right-sticky-mark
59 abakic 1.56 #:persistent-left-sticky-line-mark #:persistent-right-sticky-line-mark
60     #:p-line-mark-mixin #:buffer-line-offset
61 thenriksen 1.103 #:delegating-buffer #:implementation)
62     (:documentation "An implementation of the Climacs buffer
63     protocol. This package is quite low-level, not syntax-aware,
64     not CLIM-aware and not user-oriented at all."))
65 abakic 1.51
66 thenriksen 1.100 (defpackage :climacs-kill-ring
67     (:use :clim-lisp :flexichain)
68     (:export #:kill-ring
69     #:kill-ring-length #:kill-ring-max-size
70     #:append-next-p
71     #:reset-yank-position #:rotate-yank-position #:kill-ring-yank
72     #:kill-ring-standard-push #:kill-ring-concatenating-push
73 thenriksen 1.103 #:kill-ring-reverse-concatenating-push)
74     (:documentation "An implementation of a kill ring."))
75 strandh 1.1
76     (defpackage :climacs-base
77 thenriksen 1.100 (:use :clim-lisp :climacs-buffer :climacs-kill-ring)
78 thenriksen 1.105 (:export #:as-offsets
79     #:do-buffer-region
80 thenriksen 1.87 #:do-buffer-region-lines
81 rstrandh 1.25 #:previous-line #:next-line
82 thenriksen 1.102 #:open-line
83     #:delete-line
84 mvilleneuve 1.35 #:empty-line-p
85     #:line-indentation
86 mvilleneuve 1.36 #:buffer-display-column
87 rstrandh 1.11 #:number-of-lines-in-region
88 thenriksen 1.100 #:constituentp
89 thenriksen 1.101 #:just-n-spaces
90 thenriksen 1.102 #:buffer-whitespacep
91 mvilleneuve 1.43 #:buffer-region-case
92 rstrandh 1.17 #:input-from-stream #:output-to-stream
93 rstrandh 1.20 #:name-mixin #:name
94 abakic 1.49 #:buffer-looking-at #:looking-at
95 rstrandh 1.20 #:buffer-search-forward #:buffer-search-backward
96 abakic 1.73 #:buffer-re-search-forward #:buffer-re-search-backward
97     #:search-forward #:search-backward
98 thenriksen 1.100 #:re-search-forward #:re-search-backward
99 thenriksen 1.102 #:downcase-buffer-region #:downcase-region
100     #:upcase-buffer-region #:upcase-region
101     #:capitalize-buffer-region #:capitalize-region
102     #:tabify-region #:untabify-region
103 thenriksen 1.103 #:*kill-ring*)
104     (:documentation "Basic functionality built on top of the buffer
105     protocol. Here is where we define slightly higher level
106     functions, that can be directly implemented in terms of the
107     buffer protocol, but that are not, strictly speaking, part of
108     that protocol. The functions in this package are not
109     syntax-aware, and are thus limited in what they can do. They
110     percieve the buffer as little more than a sequence of
111     characters."))
112 strandh 1.1
113 strandh 1.2 (defpackage :climacs-abbrev
114     (:use :clim-lisp :clim :climacs-buffer :climacs-base)
115     (:export #:abbrev-expander #:dictionary-abbrev-expander #:dictionary
116 rstrandh 1.27 #:expand-abbrev #:abbrev-mixin #:possibly-expand-abbrev
117     #:add-abbrev))
118 strandh 1.2
119 rstrandh 1.8 (defpackage :climacs-syntax
120 rstrandh 1.16 (:use :clim-lisp :clim :climacs-buffer :climacs-base :flexichain)
121 rstrandh 1.30 (:export #:syntax #:define-syntax
122 thenriksen 1.88 #:eval-option
123     #:define-option-for-syntax
124 dmurray 1.78 #:syntax-from-name
125 rstrandh 1.32 #:basic-syntax
126 rstrandh 1.46 #:update-syntax #:update-syntax-for-display
127 rstrandh 1.57 #:grammar #:grammar-rule #:add-rule
128     #:parser #:initial-state
129 rstrandh 1.53 #:advance-parse
130 rstrandh 1.57 #:parse-tree #:start-offset #:end-offset
131     #:lexer #:nb-lexemes #:lexeme #:insert-lexeme
132     #:incremental-lexer #:next-lexeme
133     #:delete-invalid-lexemes #:inter-lexeme-object-p
134     #:skip-inter-lexeme-objects #:update-lex
135 rstrandh 1.55 #:parse-stack-top #:target-parse-tree #:parse-state-empty-p
136 rstrandh 1.53 #:parse-stack-next #:parse-stack-symbol
137     #:parse-stack-parse-trees #:map-over-parse-trees
138 rstrandh 1.63 #:no-such-operation #:no-expression
139 dmurray 1.82 #:name-for-info-pane
140 mvilleneuve 1.35 #:syntax-line-indentation
141 rstrandh 1.63 #:forward-expression #:backward-expression
142 rstrandh 1.64 #:eval-defun
143 dmurray 1.74 #:beginning-of-definition #:end-of-definition
144 rstrandh 1.58 #:redisplay-pane-with-syntax
145 dmurray 1.74 #:backward-paragraph #:forward-paragraph
146     #:backward-sentence #:forward-sentence
147 dmurray 1.75 #:forward-list #:backward-list
148     #:down-list #:up-list
149     #:backward-down-list #:backward-up-list
150 rstrandh 1.72 #:syntax-line-comment-string
151     #:line-comment-region #:comment-region
152 thenriksen 1.100 #:line-uncomment-region #:uncomment-region
153     #:word-constituentp
154     #:whitespacep
155     #:page-delimiter
156 thenriksen 1.103 #:paragraph-delimiter)
157     (:documentation "The Climacs syntax protocol. Contains
158     functions that can be used to implement higher-level operations
159     on buffer contents."))
160 ejohnson 1.12
161 rstrandh 1.40 (defpackage :undo
162 thenriksen 1.103 (:use :clim-lisp)
163 rstrandh 1.40 (:export #:no-more-undo
164     #:undo-tree #:standard-undo-tree
165     #:undo-record #:standard-undo-record
166     #:add-undo #:flip-undo-record #:undo #:redo))
167    
168 rstrandh 1.32 (defpackage :climacs-pane
169     (:use :clim-lisp :clim :climacs-buffer :climacs-base :climacs-abbrev
170 dmurray 1.96 :climacs-syntax :flexichain :undo)
171 dmurray 1.92 (:export #:climacs-buffer #:needs-saving
172     #:filepath #:file-saved-p #:file-write-time
173 dmurray 1.79 #:read-only-p #:buffer-read-only
174 rstrandh 1.32 #:climacs-pane #:point #:mark
175 thenriksen 1.89 #:clear-cache
176 rstrandh 1.32 #:redisplay-pane #:full-redisplay
177 dmurray 1.77 #:display-cursor
178 dmurray 1.93 #:display-region
179 rstrandh 1.32 #:page-down #:page-up
180 rstrandh 1.54 #:top #:bot
181     #:tab-space-count #:space-width #:tab-width
182 mvilleneuve 1.35 #:indent-tabs-mode
183 mvilleneuve 1.36 #:auto-fill-mode #:auto-fill-column
184 mvilleneuve 1.44 #:isearch-state #:search-string #:search-mark
185     #:search-forward-p #:search-success-p
186 mvilleneuve 1.38 #:isearch-mode #:isearch-states #:isearch-previous-string
187 thenriksen 1.106 #:query-replace-state #:string1 #:string2 #:buffers #:mark
188 mvilleneuve 1.42 #:query-replace-mode
189 dmurray 1.93 #:region-visible-p
190 rstrandh 1.40 #:with-undo
191 mretzlaff 1.80 #:url
192     #:climacs-textual-view #:+climacs-textual-view+))
193 rstrandh 1.53
194 thenriksen 1.100 (defpackage :climacs-motion
195 thenriksen 1.103 (:use :clim-lisp :climacs-base :climacs-buffer :climacs-syntax)
196 thenriksen 1.100 (:export #:forward-to-word-boundary #:backward-to-word-boundary
197     #:define-motion-fns
198     #:beep-limit-action #:revert-limit-action #:error-limit-action
199     #:motion-limit-error
200     #:make-diligent-motor
201    
202     ;; Lines
203     #:forward-one-line
204     #:backward-one-line
205     #:forward-line
206     #:backward-line
207    
208     ;; Words
209     #:forward-one-word
210     #:backward-one-word
211     #:forward-word
212     #:backward-word
213    
214     ;; Pages
215     #:forward-one-page
216     #:backward-one-page
217     #:forward-page
218     #:backward-page
219    
220     ;; Expressions
221     #:forward-one-expression
222     #:backward-one-expression
223     #:forward-expression
224     #:backward-expression
225    
226     ;; Definitions
227     #:forward-one-definition
228     #:backward-one-definition
229     #:forward-definition
230     #:backward-definition
231    
232     ;; Up
233     #:forward-one-up
234     #:backward-one-up
235     #:forward-up
236     #:backward-up
237    
238     ;; Down
239     #:forward-one-down
240     #:backward-one-down
241     #:forward-down
242     #:backward-down
243    
244     ;; Paragraphs
245     #:forward-one-paragraph
246     #:backward-one-paragraph
247     #:forward-paragraph
248     #:backward-paragraph
249    
250     ;; Sentences
251     #:forward-one-sentence
252     #:backward-one-sentence
253     #:forward-sentence
254 thenriksen 1.103 #:backward-sentence)
255     (:documentation "Functions and facilities for moving a mark
256     around by syntactical elements. The functions in this package
257     are syntax-aware, and their behavior is based on the semantics
258     defined by the syntax of the buffer, that the mark they are
259     manipulating belong to. These functions are also directly used
260     to implement the motion commands."))
261 thenriksen 1.100
262     (defpackage :climacs-editing
263 thenriksen 1.103 (:use :clim-lisp :climacs-base :climacs-buffer
264 thenriksen 1.100 :climacs-syntax :climacs-motion :climacs-pane :climacs-kill-ring)
265     (:export #:transpose-objects
266    
267     ;; Lines
268     #:forward-delete-line #:backward-delete-line
269     #:forward-kill-line #:backward-kill-line
270     #:transpose-lines
271     #:forward-delete-line-start #:backward-delete-line-start
272     #:forward-kill-line-start #:backward-kill-line-start
273     #:transpose-line-starts
274    
275     ;; Words
276     #:forward-delete-word #:backward-delete-word
277     #:forward-kill-word #:backward-kill-word
278     #:transpose-words
279    
280     ;; Pages
281     #:forward-delete-page #:backward-delete-page
282     #:forward-kill-page #:backward-kill-page
283     #:transpose-page
284    
285     ;; Expressions
286     #:forward-delete-expression #:backward-delete-expression
287     #:forward-kill-expression #:backward-kill-expression
288     #:transpose-expressions
289    
290     ;; Definitions
291     #:forward-delete-definition #:backward-delete-definition
292     #:forward-kill-definition #:backward-kill-definition
293     #:transpose-definitions
294    
295     ;; Paragraphs
296     #:forward-delete-paragraph #:backward-delete-paragraph
297     #:forward-kill-paragraph #:backward-kill-paragraph
298     #:transpose-paragraphs
299    
300     ;; Sentences
301     #:forward-delete-sentence #:backward-delete-sentence
302     #:forward-kill-sentence #:backward-kill-sentence
303 thenriksen 1.106 #:transpose-sentences)
304 thenriksen 1.103 (:documentation "Functions and facilities for changing the
305     buffer contents by syntactical elements. The functions in this package
306     are syntax-aware, and their behavior is based on the semantics
307     defined by the syntax of the buffer, that the mark they are
308     manipulating belong to. These functions are also directly used
309     to implement the editing commands."))
310 thenriksen 1.100
311 thenriksen 1.84 (defpackage :climacs-gui
312 thenriksen 1.106 (:use :clim-lisp :clim :climacs-buffer :climacs-base
313     :climacs-abbrev :climacs-syntax :climacs-motion
314     :climacs-kill-ring :climacs-pane :clim-extensions
315     :undo :esa :climacs-editing :climacs-motion)
316     ;;(:import-from :lisp-string)
317     (:export #:climacs ; Frame.
318    
319     #:extended-pane
320     #:climacs-info-pane
321    
322     ;; GUI functions follow.
323     #:current-window
324     #:current-point
325     #:current-buffer
326     #:current-point
327     #:point
328     #:syntax
329     #:mark
330     #:insert-character
331     #:switch-to-buffer
332     #:make-buffer
333     #:erase-buffer
334     #:buffer-pane-p
335     #:display-window
336 thenriksen 1.104
337 thenriksen 1.106 ;; Some configuration variables
338     #:*bg-color*
339     #:*fg-color*
340     #:*info-bg-color*
341     #:*info-fg-color*
342     #:*mini-bg-color*
343     #:*mini-fg-color*
344     #:*with-scrollbars*
345    
346     ;; The command tables
347     #:global-climacs-table #:keyboard-macro-table #:climacs-help-table
348     #:base-table #:buffer-table #:case-table #:comment-table
349     #:deletion-table #:development-table #:editing-table
350     #:fill-table #:indent-table #:info-table #:marking-table
351     #:movement-table #:pane-table #:search-table #:self-insert-table
352     #:window-table
353    
354     ;; Other stuff
355     #:dabbrev-expansion-mark
356     #:original-prefix
357     #:prefix-start-offset
358     #:overwrite-mode
359     #:goal-column
360     ))
361    
362     (defpackage :climacs-core
363     (:use :clim-lisp :climacs-base :climacs-buffer
364     :climacs-syntax :climacs-motion :climacs-pane :climacs-kill-ring
365     :climacs-editing :climacs-gui :clim :climacs-abbrev)
366     (:export #:goto-position
367     #:goto-line
368    
369     #:possibly-fill-line
370 thenriksen 1.104 #:insert-character
371 thenriksen 1.106 #:back-to-indentation
372     #:delete-horizontal-space
373     #:indent-current-line
374     #:insert-pair
375    
376     #:downcase-word #:upcase-word #:capitalize-word
377    
378     #:indent-region
379     #:fill-line #:fill-region
380    
381     #:indent-line #:delete-indentation)
382     (:documentation "Package for editor functionality that is
383     syntax-aware, but yet not specific to certain
384     syntaxes. Contains stuff like indentation, filling and other
385     features that require a fairly high-level view of the
386     application, but are not solely GUI-specific."))
387 thenriksen 1.100
388 thenriksen 1.103 (defpackage :climacs-commands
389 thenriksen 1.100 (:use :clim-lisp :clim :climacs-base :climacs-buffer
390 thenriksen 1.103 :climacs-syntax :climacs-motion :climacs-editing
391 thenriksen 1.106 :climacs-gui :esa :climacs-kill-ring :climacs-pane
392     :climacs-abbrev :undo :climacs-core)
393 thenriksen 1.103 (:export #:define-motion-commands
394     #:define-deletion-commands
395     #:define-editing-commands)
396     (:documentation "This package is meant to contain Climacs'
397     command definitions, as well as some useful automatic
398     command-defining facilities."))
399 thenriksen 1.84
400 thenriksen 1.95 (defpackage :climacs-fundamental-syntax
401     (:use :clim-lisp :clim :climacs-buffer :climacs-base
402     :climacs-syntax :flexichain :climacs-pane)
403     (:export #:fundamental-syntax))
404    
405 rstrandh 1.53 (defpackage :climacs-html-syntax
406     (:use :clim-lisp :clim :climacs-buffer :climacs-base
407     :climacs-syntax :flexichain :climacs-pane))
408 rstrandh 1.32
409 crhodes 1.60 (defpackage :climacs-prolog-syntax
410     (:use :clim-lisp :clim :climacs-buffer :climacs-base
411     :climacs-syntax :flexichain :climacs-pane)
412 tmoore 1.85 (:shadow #:atom #:close #:exp #:integer #:open #:variable))
413 pfong 1.61
414     (defpackage :climacs-cl-syntax
415 rstrandh 1.63 (:use :clim-lisp :clim :climacs-buffer :climacs-base
416     :climacs-syntax :flexichain :climacs-pane)
417     (:export))
418    
419     (defpackage :climacs-lisp-syntax
420 tmoore 1.85 (:use :clim-lisp :clim :clim-extensions :climacs-buffer :climacs-base
421 thenriksen 1.100 :climacs-syntax :flexichain :climacs-pane :climacs-gui :climacs-motion :climacs-editing)
422 thenriksen 1.104 (:export #:lisp-string
423     #:edit-definition))
424    
425     (defpackage :climacs
426     (:use :clim-lisp :clim :clim-sys :clim-extensions :climacs-gui)
427     (:export #:climacs
428     #:climacs-rv
429     #:edit-definition)
430     (:documentation "Package containing entry points to Climacs."))

  ViewVC Help
Powered by ViewVC 1.1.5