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

Contents of /climacs/packages.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.119 - (hide annotations)
Tue Sep 12 19:49:18 2006 UTC (7 years, 7 months ago) by thenriksen
Branch: MAIN
Changes since 1.118: +1 -0 lines
Try to naively unbreak typeout panes a little more. Also some fixes
related to accepting buffers.
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 thenriksen 1.118 (defpackage :climacs-utils
30     (:use :clim-lisp)
31     (:export #:with-gensyms
32     #:once-only
33     #:unlisted
34     #:fully-unlisted
35     #:listed))
36    
37 strandh 1.1 (defpackage :climacs-buffer
38 abakic 1.41 (:use :clim-lisp :flexichain :binseq)
39 strandh 1.1 (:export #:buffer #:standard-buffer
40     #:mark #:left-sticky-mark #:right-sticky-mark
41     #:standard-left-sticky-mark #:standard-right-sticky-mark
42 rstrandh 1.50 #:clone-mark
43     #:no-such-offset #:offset-before-beginning #:offset-after-end
44     #:invalid-motion #:motion-before-beginning #:motion-after-end
45     #:size #:number-of-lines
46 strandh 1.1 #:offset #:mark< #:mark<= #:mark= #:mark> #:mark>=
47 thenriksen 1.100 #:forward-object
48     #:backward-object
49     #:forward-line-start #:backward-line-start
50     #:forward-line-end #:backward-line-end
51 strandh 1.1 #:beginning-of-buffer #:end-of-buffer
52     #:beginning-of-buffer-p #:end-of-buffer-p
53     #:beginning-of-line #:end-of-line
54     #:beginning-of-line-p #:end-of-line-p
55 mvilleneuve 1.31 #:buffer-line-number #:buffer-column-number
56 strandh 1.1 #:line-number #:column-number
57 strandh 1.3 #:insert-buffer-object #:insert-buffer-sequence
58 thenriksen 1.90 #:buffer-substring
59 abakic 1.24 #:insert-object #:insert-sequence
60 strandh 1.3 #:delete-buffer-range #:delete-range
61 strandh 1.1 #:delete-region
62 strandh 1.3 #:buffer-object #:buffer-sequence
63 rstrandh 1.7 #:object-before #:object-after #:region-to-sequence
64 abakic 1.41 #:low-mark #:high-mark #:modified-p #:clear-modify
65 abakic 1.56 #:binseq-buffer #:obinseq-buffer #:binseq2-buffer
66 abakic 1.51 #:persistent-left-sticky-mark #:persistent-right-sticky-mark
67 abakic 1.56 #:persistent-left-sticky-line-mark #:persistent-right-sticky-line-mark
68     #:p-line-mark-mixin #:buffer-line-offset
69 thenriksen 1.103 #:delegating-buffer #:implementation)
70     (:documentation "An implementation of the Climacs buffer
71     protocol. This package is quite low-level, not syntax-aware,
72     not CLIM-aware and not user-oriented at all."))
73 abakic 1.51
74 thenriksen 1.100 (defpackage :climacs-kill-ring
75     (:use :clim-lisp :flexichain)
76     (:export #:kill-ring
77 thenriksen 1.109 #:empty-kill-ring
78 thenriksen 1.100 #:kill-ring-length #:kill-ring-max-size
79     #:append-next-p
80     #:reset-yank-position #:rotate-yank-position #:kill-ring-yank
81     #:kill-ring-standard-push #:kill-ring-concatenating-push
82 thenriksen 1.107 #:kill-ring-reverse-concatenating-push
83     #:*kill-ring*)
84 thenriksen 1.103 (:documentation "An implementation of a kill ring."))
85 strandh 1.1
86     (defpackage :climacs-base
87 thenriksen 1.118 (:use :clim-lisp :climacs-buffer :climacs-kill-ring :esa-buffer :climacs-utils)
88 thenriksen 1.105 (:export #:as-offsets
89     #:do-buffer-region
90 thenriksen 1.87 #:do-buffer-region-lines
91 rstrandh 1.25 #:previous-line #:next-line
92 thenriksen 1.102 #:open-line
93     #:delete-line
94 mvilleneuve 1.35 #:empty-line-p
95     #:line-indentation
96 mvilleneuve 1.36 #:buffer-display-column
97 rstrandh 1.11 #:number-of-lines-in-region
98 thenriksen 1.100 #:constituentp
99 thenriksen 1.101 #:just-n-spaces
100 thenriksen 1.115 #:move-to-column
101 thenriksen 1.102 #:buffer-whitespacep
102 mvilleneuve 1.43 #:buffer-region-case
103 rstrandh 1.20 #:name-mixin #:name
104 abakic 1.49 #:buffer-looking-at #:looking-at
105 rstrandh 1.20 #:buffer-search-forward #:buffer-search-backward
106 abakic 1.73 #:buffer-re-search-forward #:buffer-re-search-backward
107     #:search-forward #:search-backward
108 thenriksen 1.100 #:re-search-forward #:re-search-backward
109 thenriksen 1.102 #:downcase-buffer-region #:downcase-region
110     #:upcase-buffer-region #:upcase-region
111     #:capitalize-buffer-region #:capitalize-region
112 thenriksen 1.107 #:tabify-region #:untabify-region)
113 thenriksen 1.103 (:documentation "Basic functionality built on top of the buffer
114     protocol. Here is where we define slightly higher level
115     functions, that can be directly implemented in terms of the
116     buffer protocol, but that are not, strictly speaking, part of
117     that protocol. The functions in this package are not
118     syntax-aware, and are thus limited in what they can do. They
119     percieve the buffer as little more than a sequence of
120     characters."))
121 strandh 1.1
122 strandh 1.2 (defpackage :climacs-abbrev
123     (:use :clim-lisp :clim :climacs-buffer :climacs-base)
124     (:export #:abbrev-expander #:dictionary-abbrev-expander #:dictionary
125 rstrandh 1.27 #:expand-abbrev #:abbrev-mixin #:possibly-expand-abbrev
126     #:add-abbrev))
127 strandh 1.2
128 rstrandh 1.8 (defpackage :climacs-syntax
129 thenriksen 1.118 (:use :clim-lisp :clim :climacs-buffer :climacs-base :flexichain :climacs-utils)
130 thenriksen 1.113 (:export #:syntax #:define-syntax #:*default-syntax*
131 thenriksen 1.88 #:eval-option
132     #:define-option-for-syntax
133 thenriksen 1.110 #:current-attributes-for-syntax
134     #:make-attribute-line
135 dmurray 1.78 #:syntax-from-name
136 rstrandh 1.46 #:update-syntax #:update-syntax-for-display
137 rstrandh 1.57 #:grammar #:grammar-rule #:add-rule
138     #:parser #:initial-state
139 rstrandh 1.53 #:advance-parse
140 rstrandh 1.57 #:parse-tree #:start-offset #:end-offset
141     #:lexer #:nb-lexemes #:lexeme #:insert-lexeme
142     #:incremental-lexer #:next-lexeme
143     #:delete-invalid-lexemes #:inter-lexeme-object-p
144     #:skip-inter-lexeme-objects #:update-lex
145 rstrandh 1.55 #:parse-stack-top #:target-parse-tree #:parse-state-empty-p
146 rstrandh 1.53 #:parse-stack-next #:parse-stack-symbol
147     #:parse-stack-parse-trees #:map-over-parse-trees
148 rstrandh 1.63 #:no-such-operation #:no-expression
149 dmurray 1.82 #:name-for-info-pane
150 thenriksen 1.111 #:display-syntax-name
151 mvilleneuve 1.35 #:syntax-line-indentation
152 rstrandh 1.63 #:forward-expression #:backward-expression
153 rstrandh 1.64 #:eval-defun
154 dmurray 1.74 #:beginning-of-definition #:end-of-definition
155 rstrandh 1.58 #:redisplay-pane-with-syntax
156 dmurray 1.74 #:backward-paragraph #:forward-paragraph
157     #:backward-sentence #:forward-sentence
158 dmurray 1.75 #:forward-list #:backward-list
159     #:down-list #:up-list
160     #:backward-down-list #:backward-up-list
161 rstrandh 1.72 #:syntax-line-comment-string
162     #:line-comment-region #:comment-region
163 thenriksen 1.100 #:line-uncomment-region #:uncomment-region
164     #:word-constituentp
165     #:whitespacep
166     #:page-delimiter
167 thenriksen 1.103 #:paragraph-delimiter)
168     (:documentation "The Climacs syntax protocol. Contains
169     functions that can be used to implement higher-level operations
170     on buffer contents."))
171 ejohnson 1.12
172 rstrandh 1.40 (defpackage :undo
173 thenriksen 1.103 (:use :clim-lisp)
174 rstrandh 1.40 (:export #:no-more-undo
175     #:undo-tree #:standard-undo-tree
176     #:undo-record #:standard-undo-record
177     #:add-undo #:flip-undo-record #:undo #:redo))
178    
179 rstrandh 1.32 (defpackage :climacs-pane
180     (:use :clim-lisp :clim :climacs-buffer :climacs-base :climacs-abbrev
181 thenriksen 1.118 :climacs-syntax :flexichain :undo :esa-buffer :esa-io :climacs-utils)
182 dmurray 1.92 (:export #:climacs-buffer #:needs-saving
183     #:filepath #:file-saved-p #:file-write-time
184 dmurray 1.79 #:read-only-p #:buffer-read-only
185 rstrandh 1.32 #:climacs-pane #:point #:mark
186 thenriksen 1.89 #:clear-cache
187 rstrandh 1.32 #:redisplay-pane #:full-redisplay
188 dmurray 1.77 #:display-cursor
189 dmurray 1.93 #:display-region
190 thenriksen 1.113 #:offset-to-screen-position
191 rstrandh 1.32 #:page-down #:page-up
192 rstrandh 1.54 #:top #:bot
193     #:tab-space-count #:space-width #:tab-width
194 mvilleneuve 1.35 #:indent-tabs-mode
195 mvilleneuve 1.36 #:auto-fill-mode #:auto-fill-column
196 mvilleneuve 1.44 #:isearch-state #:search-string #:search-mark
197     #:search-forward-p #:search-success-p
198 mvilleneuve 1.38 #:isearch-mode #:isearch-states #:isearch-previous-string
199 thenriksen 1.106 #:query-replace-state #:string1 #:string2 #:buffers #:mark
200 mvilleneuve 1.42 #:query-replace-mode
201 dmurray 1.93 #:region-visible-p
202 rstrandh 1.40 #:with-undo
203 mretzlaff 1.80 #:url
204     #:climacs-textual-view #:+climacs-textual-view+))
205 rstrandh 1.53
206 thenriksen 1.100 (defpackage :climacs-motion
207 thenriksen 1.103 (:use :clim-lisp :climacs-base :climacs-buffer :climacs-syntax)
208 thenriksen 1.100 (:export #:forward-to-word-boundary #:backward-to-word-boundary
209     #:define-motion-fns
210     #:beep-limit-action #:revert-limit-action #:error-limit-action
211     #:motion-limit-error
212     #:make-diligent-motor
213    
214     ;; Lines
215     #:forward-one-line
216     #:backward-one-line
217     #:forward-line
218     #:backward-line
219    
220     ;; Words
221     #:forward-one-word
222     #:backward-one-word
223     #:forward-word
224     #:backward-word
225    
226     ;; Pages
227     #:forward-one-page
228     #:backward-one-page
229     #:forward-page
230     #:backward-page
231    
232     ;; Expressions
233     #:forward-one-expression
234     #:backward-one-expression
235     #:forward-expression
236     #:backward-expression
237    
238     ;; Definitions
239     #:forward-one-definition
240     #:backward-one-definition
241     #:forward-definition
242     #:backward-definition
243    
244     ;; Up
245     #:forward-one-up
246     #:backward-one-up
247     #:forward-up
248     #:backward-up
249    
250     ;; Down
251     #:forward-one-down
252     #:backward-one-down
253     #:forward-down
254     #:backward-down
255    
256     ;; Paragraphs
257     #:forward-one-paragraph
258     #:backward-one-paragraph
259     #:forward-paragraph
260     #:backward-paragraph
261    
262     ;; Sentences
263     #:forward-one-sentence
264     #:backward-one-sentence
265     #:forward-sentence
266 thenriksen 1.103 #:backward-sentence)
267     (:documentation "Functions and facilities for moving a mark
268     around by syntactical elements. The functions in this package
269     are syntax-aware, and their behavior is based on the semantics
270     defined by the syntax of the buffer, that the mark they are
271     manipulating belong to. These functions are also directly used
272     to implement the motion commands."))
273 thenriksen 1.100
274     (defpackage :climacs-editing
275 thenriksen 1.103 (:use :clim-lisp :climacs-base :climacs-buffer
276 thenriksen 1.100 :climacs-syntax :climacs-motion :climacs-pane :climacs-kill-ring)
277     (:export #:transpose-objects
278    
279     ;; Lines
280     #:forward-delete-line #:backward-delete-line
281     #:forward-kill-line #:backward-kill-line
282     #:transpose-lines
283     #:forward-delete-line-start #:backward-delete-line-start
284     #:forward-kill-line-start #:backward-kill-line-start
285     #:transpose-line-starts
286    
287     ;; Words
288     #:forward-delete-word #:backward-delete-word
289     #:forward-kill-word #:backward-kill-word
290     #:transpose-words
291    
292     ;; Pages
293     #:forward-delete-page #:backward-delete-page
294     #:forward-kill-page #:backward-kill-page
295     #:transpose-page
296    
297     ;; Expressions
298     #:forward-delete-expression #:backward-delete-expression
299     #:forward-kill-expression #:backward-kill-expression
300     #:transpose-expressions
301    
302     ;; Definitions
303     #:forward-delete-definition #:backward-delete-definition
304     #:forward-kill-definition #:backward-kill-definition
305     #:transpose-definitions
306    
307     ;; Paragraphs
308     #:forward-delete-paragraph #:backward-delete-paragraph
309     #:forward-kill-paragraph #:backward-kill-paragraph
310     #:transpose-paragraphs
311    
312     ;; Sentences
313     #:forward-delete-sentence #:backward-delete-sentence
314     #:forward-kill-sentence #:backward-kill-sentence
315 thenriksen 1.106 #:transpose-sentences)
316 thenriksen 1.103 (:documentation "Functions and facilities for changing the
317     buffer contents by syntactical elements. The functions in this package
318     are syntax-aware, and their behavior is based on the semantics
319     defined by the syntax of the buffer, that the mark they are
320     manipulating belong to. These functions are also directly used
321     to implement the editing commands."))
322 thenriksen 1.100
323 thenriksen 1.113 (defpackage :climacs-fundamental-syntax
324     (:use :clim-lisp :clim :climacs-buffer :climacs-base
325     :climacs-syntax :flexichain :climacs-pane)
326     (:export #:fundamental-syntax))
327    
328 thenriksen 1.84 (defpackage :climacs-gui
329 thenriksen 1.106 (:use :clim-lisp :clim :climacs-buffer :climacs-base
330     :climacs-abbrev :climacs-syntax :climacs-motion
331     :climacs-kill-ring :climacs-pane :clim-extensions
332 thenriksen 1.112 :undo :esa :climacs-editing :climacs-motion :esa-buffer :esa-io)
333 thenriksen 1.106 ;;(:import-from :lisp-string)
334     (:export #:climacs ; Frame.
335    
336     #:extended-pane
337     #:climacs-info-pane
338 thenriksen 1.107 #:typeout-pane
339     #:kill-ring
340 thenriksen 1.106
341     ;; GUI functions follow.
342     #:current-window
343     #:current-point
344     #:current-buffer
345     #:current-point
346 thenriksen 1.114 #:current-mark
347 thenriksen 1.119 #:any-buffer
348 thenriksen 1.106 #:point
349     #:syntax
350     #:mark
351 thenriksen 1.108 #:buffers
352 thenriksen 1.117 #:active-group
353     #:groups
354 thenriksen 1.106 #:insert-character
355     #:display-window
356 thenriksen 1.107 #:split-window
357     #:typeout-window
358     #:delete-window
359     #:other-window
360 thenriksen 1.108 #:buffer-pane-p
361 thenriksen 1.104
362 thenriksen 1.106 ;; Some configuration variables
363     #:*bg-color*
364     #:*fg-color*
365     #:*info-bg-color*
366     #:*info-fg-color*
367     #:*mini-bg-color*
368     #:*mini-fg-color*
369     #:*with-scrollbars*
370    
371     ;; The command tables
372     #:global-climacs-table #:keyboard-macro-table #:climacs-help-table
373     #:base-table #:buffer-table #:case-table #:comment-table
374     #:deletion-table #:development-table #:editing-table
375     #:fill-table #:indent-table #:info-table #:marking-table
376     #:movement-table #:pane-table #:search-table #:self-insert-table
377     #:window-table
378    
379     ;; Other stuff
380     #:dabbrev-expansion-mark
381     #:original-prefix
382     #:prefix-start-offset
383     #:overwrite-mode
384     #:goal-column
385     ))
386    
387     (defpackage :climacs-core
388 thenriksen 1.113 (:use :clim-lisp :climacs-base :climacs-buffer :climacs-fundamental-syntax
389 thenriksen 1.106 :climacs-syntax :climacs-motion :climacs-pane :climacs-kill-ring
390 thenriksen 1.118 :climacs-editing :climacs-gui :clim :climacs-abbrev :esa :esa-buffer :esa-io
391     :climacs-utils)
392 thenriksen 1.108 (:export #:display-string
393     #:object-equal
394     #:object=
395     #:no-upper-p
396     #:case-relevant-test
397    
398     #:goto-position
399 thenriksen 1.106 #:goto-line
400    
401     #:possibly-fill-line
402 thenriksen 1.104 #:insert-character
403 thenriksen 1.106 #:back-to-indentation
404     #:delete-horizontal-space
405     #:indent-current-line
406     #:insert-pair
407    
408     #:downcase-word #:upcase-word #:capitalize-word
409    
410     #:indent-region
411     #:fill-line #:fill-region
412    
413 thenriksen 1.108 #:indent-line #:delete-indentation
414    
415     #:set-syntax
416    
417     #:switch-to-buffer
418 thenriksen 1.112 #:make-new-buffer
419     #:make-new-named-buffer
420 thenriksen 1.108 #:erase-buffer
421     #:kill-buffer
422    
423     #:filepath-filename
424 thenriksen 1.110 #:update-attribute-line
425     #:evaluate-attribute-line
426 thenriksen 1.108 #:directory-pathname-p
427 thenriksen 1.112 #:find-file #:find-file-read-only
428 thenriksen 1.108 #:directory-of-buffer
429 thenriksen 1.112 #:set-visited-filename
430 thenriksen 1.108 #:check-file-times
431 thenriksen 1.112 #:save-buffer
432    
433     #:input-from-stream
434     #:save-buffer-to-stream
435 thenriksen 1.116 #:make-buffer-from-stream
436    
437     #:*killed-rectangle*
438     #:map-rectangle-lines
439     #:extract-and-delete-rectangle-line
440     #:insert-rectangle-at-mark
441     #:clear-rectangle-line
442     #:open-rectangle-line
443     #:replace-rectangle-line
444     #:insert-in-rectangle-line
445 thenriksen 1.117 #:delete-rectangle-line-whitespace
446    
447     #:group
448     #:group-element
449     #:standard-group
450     #:current-buffer-group
451     #:add-group
452     #:get-group
453     #:get-active-group
454     #:deselect-group
455     #:with-group-buffers
456     #:define-group
457     #:group-not-found
458     #:group-buffers
459     #:ensure-group-buffers
460     #:select-group
461     #:display-group-contents)
462 thenriksen 1.106 (:documentation "Package for editor functionality that is
463     syntax-aware, but yet not specific to certain
464     syntaxes. Contains stuff like indentation, filling and other
465     features that require a fairly high-level view of the
466     application, but are not solely GUI-specific."))
467 thenriksen 1.100
468 thenriksen 1.103 (defpackage :climacs-commands
469 thenriksen 1.100 (:use :clim-lisp :clim :climacs-base :climacs-buffer
470 thenriksen 1.103 :climacs-syntax :climacs-motion :climacs-editing
471 thenriksen 1.106 :climacs-gui :esa :climacs-kill-ring :climacs-pane
472     :climacs-abbrev :undo :climacs-core)
473 thenriksen 1.103 (:export #:define-motion-commands
474     #:define-deletion-commands
475     #:define-editing-commands)
476     (:documentation "This package is meant to contain Climacs'
477     command definitions, as well as some useful automatic
478     command-defining facilities."))
479 thenriksen 1.84
480 rstrandh 1.53 (defpackage :climacs-html-syntax
481     (:use :clim-lisp :clim :climacs-buffer :climacs-base
482 thenriksen 1.113 :climacs-syntax :flexichain :climacs-pane :climacs-fundamental-syntax))
483 rstrandh 1.32
484 crhodes 1.60 (defpackage :climacs-prolog-syntax
485     (:use :clim-lisp :clim :climacs-buffer :climacs-base
486 thenriksen 1.113 :climacs-syntax :flexichain :climacs-pane :climacs-core :climacs-fundamental-syntax)
487 tmoore 1.85 (:shadow #:atom #:close #:exp #:integer #:open #:variable))
488 pfong 1.61
489     (defpackage :climacs-cl-syntax
490 rstrandh 1.63 (:use :clim-lisp :clim :climacs-buffer :climacs-base
491 thenriksen 1.113 :climacs-syntax :flexichain :climacs-pane :climacs-fundamental-syntax)
492 rstrandh 1.63 (:export))
493    
494     (defpackage :climacs-lisp-syntax
495 tmoore 1.85 (:use :clim-lisp :clim :clim-extensions :climacs-buffer :climacs-base
496 thenriksen 1.113 :climacs-syntax :climacs-fundamental-syntax :flexichain :climacs-pane :climacs-gui
497 thenriksen 1.118 :climacs-motion :climacs-editing :climacs-core :climacs-utils)
498 thenriksen 1.104 (:export #:lisp-string
499     #:edit-definition))
500    
501     (defpackage :climacs
502     (:use :clim-lisp :clim :clim-sys :clim-extensions :climacs-gui)
503     (:export #:climacs
504     #:climacs-rv
505     #:edit-definition)
506     (:documentation "Package containing entry points to Climacs."))

  ViewVC Help
Powered by ViewVC 1.1.5