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

Contents of /climacs/packages.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.108 - (hide annotations)
Tue Jul 25 11:38:05 2006 UTC (7 years, 9 months ago) by thenriksen
Branch: MAIN
Changes since 1.107: +29 -8 lines
More refactoring of stuff out from CLIMACS-GUI to CLIMACS-CORE and
CLIMACS-COMMANDS. More reusable functions have been moved from the
*-commands.lisp files to core.lisp.
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.107 #:kill-ring-reverse-concatenating-push
74     #:*kill-ring*)
75 thenriksen 1.103 (:documentation "An implementation of a kill ring."))
76 strandh 1.1
77     (defpackage :climacs-base
78 thenriksen 1.100 (:use :clim-lisp :climacs-buffer :climacs-kill-ring)
79 thenriksen 1.105 (:export #:as-offsets
80     #:do-buffer-region
81 thenriksen 1.87 #:do-buffer-region-lines
82 rstrandh 1.25 #:previous-line #:next-line
83 thenriksen 1.102 #:open-line
84     #:delete-line
85 mvilleneuve 1.35 #:empty-line-p
86     #:line-indentation
87 mvilleneuve 1.36 #:buffer-display-column
88 rstrandh 1.11 #:number-of-lines-in-region
89 thenriksen 1.100 #:constituentp
90 thenriksen 1.101 #:just-n-spaces
91 thenriksen 1.102 #:buffer-whitespacep
92 mvilleneuve 1.43 #:buffer-region-case
93 rstrandh 1.17 #:input-from-stream #:output-to-stream
94 rstrandh 1.20 #:name-mixin #:name
95 abakic 1.49 #:buffer-looking-at #:looking-at
96 rstrandh 1.20 #:buffer-search-forward #:buffer-search-backward
97 abakic 1.73 #:buffer-re-search-forward #:buffer-re-search-backward
98     #:search-forward #:search-backward
99 thenriksen 1.100 #:re-search-forward #:re-search-backward
100 thenriksen 1.102 #:downcase-buffer-region #:downcase-region
101     #:upcase-buffer-region #:upcase-region
102     #:capitalize-buffer-region #:capitalize-region
103 thenriksen 1.107 #:tabify-region #:untabify-region)
104 thenriksen 1.103 (: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 thenriksen 1.107 #:typeout-pane
322     #:kill-ring
323 thenriksen 1.106
324     ;; GUI functions follow.
325     #:current-window
326     #:current-point
327     #:current-buffer
328     #:current-point
329     #:point
330     #:syntax
331     #:mark
332 thenriksen 1.108 #:buffers
333 thenriksen 1.106 #:insert-character
334     #:display-window
335 thenriksen 1.107 #:split-window
336     #:typeout-window
337     #:delete-window
338     #:other-window
339 thenriksen 1.108 #:buffer-pane-p
340 thenriksen 1.104
341 thenriksen 1.106 ;; Some configuration variables
342     #:*bg-color*
343     #:*fg-color*
344     #:*info-bg-color*
345     #:*info-fg-color*
346     #:*mini-bg-color*
347     #:*mini-fg-color*
348     #:*with-scrollbars*
349    
350     ;; The command tables
351     #:global-climacs-table #:keyboard-macro-table #:climacs-help-table
352     #:base-table #:buffer-table #:case-table #:comment-table
353     #:deletion-table #:development-table #:editing-table
354     #:fill-table #:indent-table #:info-table #:marking-table
355     #:movement-table #:pane-table #:search-table #:self-insert-table
356     #:window-table
357    
358     ;; Other stuff
359     #:dabbrev-expansion-mark
360     #:original-prefix
361     #:prefix-start-offset
362     #:overwrite-mode
363     #:goal-column
364     ))
365    
366     (defpackage :climacs-core
367     (:use :clim-lisp :climacs-base :climacs-buffer
368     :climacs-syntax :climacs-motion :climacs-pane :climacs-kill-ring
369 thenriksen 1.108 :climacs-editing :climacs-gui :clim :climacs-abbrev :esa)
370     (:export #:display-string
371     #:object-equal
372     #:object=
373     #:no-upper-p
374     #:case-relevant-test
375    
376     #:goto-position
377 thenriksen 1.106 #:goto-line
378    
379     #:possibly-fill-line
380 thenriksen 1.104 #:insert-character
381 thenriksen 1.106 #:back-to-indentation
382     #:delete-horizontal-space
383     #:indent-current-line
384     #:insert-pair
385    
386     #:downcase-word #:upcase-word #:capitalize-word
387    
388     #:indent-region
389     #:fill-line #:fill-region
390    
391 thenriksen 1.108 #:indent-line #:delete-indentation
392    
393     #:set-syntax
394    
395     #:switch-to-buffer
396     #:make-buffer
397     #:erase-buffer
398     #:kill-buffer
399    
400     #:filepath-filename
401     #:evaluate-attributes-line
402     #:directory-pathname-p
403     #:find-file
404     #:directory-of-buffer
405     #:set-visited-file-name
406     #:check-file-times
407     #:save-buffer)
408 thenriksen 1.106 (:documentation "Package for editor functionality that is
409     syntax-aware, but yet not specific to certain
410     syntaxes. Contains stuff like indentation, filling and other
411     features that require a fairly high-level view of the
412     application, but are not solely GUI-specific."))
413 thenriksen 1.100
414 thenriksen 1.103 (defpackage :climacs-commands
415 thenriksen 1.100 (:use :clim-lisp :clim :climacs-base :climacs-buffer
416 thenriksen 1.103 :climacs-syntax :climacs-motion :climacs-editing
417 thenriksen 1.106 :climacs-gui :esa :climacs-kill-ring :climacs-pane
418     :climacs-abbrev :undo :climacs-core)
419 thenriksen 1.103 (:export #:define-motion-commands
420     #:define-deletion-commands
421     #:define-editing-commands)
422     (:documentation "This package is meant to contain Climacs'
423     command definitions, as well as some useful automatic
424     command-defining facilities."))
425 thenriksen 1.84
426 thenriksen 1.95 (defpackage :climacs-fundamental-syntax
427     (:use :clim-lisp :clim :climacs-buffer :climacs-base
428     :climacs-syntax :flexichain :climacs-pane)
429     (:export #:fundamental-syntax))
430    
431 rstrandh 1.53 (defpackage :climacs-html-syntax
432     (:use :clim-lisp :clim :climacs-buffer :climacs-base
433     :climacs-syntax :flexichain :climacs-pane))
434 rstrandh 1.32
435 crhodes 1.60 (defpackage :climacs-prolog-syntax
436     (:use :clim-lisp :clim :climacs-buffer :climacs-base
437     :climacs-syntax :flexichain :climacs-pane)
438 tmoore 1.85 (:shadow #:atom #:close #:exp #:integer #:open #:variable))
439 pfong 1.61
440     (defpackage :climacs-cl-syntax
441 rstrandh 1.63 (:use :clim-lisp :clim :climacs-buffer :climacs-base
442     :climacs-syntax :flexichain :climacs-pane)
443     (:export))
444    
445     (defpackage :climacs-lisp-syntax
446 tmoore 1.85 (:use :clim-lisp :clim :clim-extensions :climacs-buffer :climacs-base
447 thenriksen 1.108 :climacs-syntax :flexichain :climacs-pane :climacs-gui
448     :climacs-motion :climacs-editing :climacs-core)
449 thenriksen 1.104 (:export #:lisp-string
450     #:edit-definition))
451    
452     (defpackage :climacs
453     (:use :clim-lisp :clim :clim-sys :clim-extensions :climacs-gui)
454     (:export #:climacs
455     #:climacs-rv
456     #:edit-definition)
457     (:documentation "Package containing entry points to Climacs."))

  ViewVC Help
Powered by ViewVC 1.1.5