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

Contents of /climacs/packages.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.114 - (show annotations)
Sun Sep 3 21:23:29 2006 UTC (7 years, 7 months ago) by thenriksen
Branch: MAIN
Changes since 1.113: +1 -0 lines
Implement `frame-current-buffer' and define and export `current-mark'.
1 ;;; -*- Mode: Lisp; Package: COMMON-LISP-USER -*-
2
3 ;;; (c) copyright 2004-2005 by
4 ;;; Robert Strandh (strandh@labri.fr)
5 ;;; (c) copyright 2005 by
6 ;;; Matthieu Villeneuve (matthieu.villeneuve@free.fr)
7 ;;; (c) copyright 2006 by
8 ;;; Troels Henriksen (athas@sigkill.dk)
9
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 (in-package :cl-user)
28
29 (defpackage :climacs-buffer
30 (:use :clim-lisp :flexichain :binseq)
31 (:export #:buffer #:standard-buffer
32 #:mark #:left-sticky-mark #:right-sticky-mark
33 #:standard-left-sticky-mark #:standard-right-sticky-mark
34 #: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 #:offset #:mark< #:mark<= #:mark= #:mark> #:mark>=
39 #:forward-object
40 #:backward-object
41 #:forward-line-start #:backward-line-start
42 #:forward-line-end #:backward-line-end
43 #: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 #:buffer-line-number #:buffer-column-number
48 #:line-number #:column-number
49 #:insert-buffer-object #:insert-buffer-sequence
50 #:buffer-substring
51 #:insert-object #:insert-sequence
52 #:delete-buffer-range #:delete-range
53 #:delete-region
54 #:buffer-object #:buffer-sequence
55 #:object-before #:object-after #:region-to-sequence
56 #:low-mark #:high-mark #:modified-p #:clear-modify
57 #:binseq-buffer #:obinseq-buffer #:binseq2-buffer
58 #:persistent-left-sticky-mark #:persistent-right-sticky-mark
59 #:persistent-left-sticky-line-mark #:persistent-right-sticky-line-mark
60 #:p-line-mark-mixin #:buffer-line-offset
61 #: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
66 (defpackage :climacs-kill-ring
67 (:use :clim-lisp :flexichain)
68 (:export #:kill-ring
69 #:empty-kill-ring
70 #:kill-ring-length #:kill-ring-max-size
71 #:append-next-p
72 #:reset-yank-position #:rotate-yank-position #:kill-ring-yank
73 #:kill-ring-standard-push #:kill-ring-concatenating-push
74 #:kill-ring-reverse-concatenating-push
75 #:*kill-ring*)
76 (:documentation "An implementation of a kill ring."))
77
78 (defpackage :climacs-base
79 (:use :clim-lisp :climacs-buffer :climacs-kill-ring :esa-buffer)
80 (:export #:as-offsets
81 #:do-buffer-region
82 #:do-buffer-region-lines
83 #:previous-line #:next-line
84 #:open-line
85 #:delete-line
86 #:empty-line-p
87 #:line-indentation
88 #:buffer-display-column
89 #:number-of-lines-in-region
90 #:constituentp
91 #:just-n-spaces
92 #:buffer-whitespacep
93 #:buffer-region-case
94 #:name-mixin #:name
95 #:buffer-looking-at #:looking-at
96 #:buffer-search-forward #:buffer-search-backward
97 #:buffer-re-search-forward #:buffer-re-search-backward
98 #:search-forward #:search-backward
99 #:re-search-forward #:re-search-backward
100 #:downcase-buffer-region #:downcase-region
101 #:upcase-buffer-region #:upcase-region
102 #:capitalize-buffer-region #:capitalize-region
103 #:tabify-region #:untabify-region)
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
113 (defpackage :climacs-abbrev
114 (:use :clim-lisp :clim :climacs-buffer :climacs-base)
115 (:export #:abbrev-expander #:dictionary-abbrev-expander #:dictionary
116 #:expand-abbrev #:abbrev-mixin #:possibly-expand-abbrev
117 #:add-abbrev))
118
119 (defpackage :climacs-syntax
120 (:use :clim-lisp :clim :climacs-buffer :climacs-base :flexichain)
121 (:export #:syntax #:define-syntax #:*default-syntax*
122 #:eval-option
123 #:define-option-for-syntax
124 #:current-attributes-for-syntax
125 #:make-attribute-line
126 #:syntax-from-name
127 #:update-syntax #:update-syntax-for-display
128 #:grammar #:grammar-rule #:add-rule
129 #:parser #:initial-state
130 #:advance-parse
131 #:parse-tree #:start-offset #:end-offset
132 #:lexer #:nb-lexemes #:lexeme #:insert-lexeme
133 #:incremental-lexer #:next-lexeme
134 #:delete-invalid-lexemes #:inter-lexeme-object-p
135 #:skip-inter-lexeme-objects #:update-lex
136 #:parse-stack-top #:target-parse-tree #:parse-state-empty-p
137 #:parse-stack-next #:parse-stack-symbol
138 #:parse-stack-parse-trees #:map-over-parse-trees
139 #:no-such-operation #:no-expression
140 #:name-for-info-pane
141 #:display-syntax-name
142 #:syntax-line-indentation
143 #:forward-expression #:backward-expression
144 #:eval-defun
145 #:beginning-of-definition #:end-of-definition
146 #:redisplay-pane-with-syntax
147 #:backward-paragraph #:forward-paragraph
148 #:backward-sentence #:forward-sentence
149 #:forward-list #:backward-list
150 #:down-list #:up-list
151 #:backward-down-list #:backward-up-list
152 #:syntax-line-comment-string
153 #:line-comment-region #:comment-region
154 #:line-uncomment-region #:uncomment-region
155 #:word-constituentp
156 #:whitespacep
157 #:page-delimiter
158 #:paragraph-delimiter)
159 (:documentation "The Climacs syntax protocol. Contains
160 functions that can be used to implement higher-level operations
161 on buffer contents."))
162
163 (defpackage :undo
164 (:use :clim-lisp)
165 (:export #:no-more-undo
166 #:undo-tree #:standard-undo-tree
167 #:undo-record #:standard-undo-record
168 #:add-undo #:flip-undo-record #:undo #:redo))
169
170 (defpackage :climacs-pane
171 (:use :clim-lisp :clim :climacs-buffer :climacs-base :climacs-abbrev
172 :climacs-syntax :flexichain :undo :esa-buffer :esa-io)
173 (:export #:climacs-buffer #:needs-saving
174 #:filepath #:file-saved-p #:file-write-time
175 #:read-only-p #:buffer-read-only
176 #:climacs-pane #:point #:mark
177 #:clear-cache
178 #:redisplay-pane #:full-redisplay
179 #:display-cursor
180 #:display-region
181 #:offset-to-screen-position
182 #:page-down #:page-up
183 #:top #:bot
184 #:tab-space-count #:space-width #:tab-width
185 #:indent-tabs-mode
186 #:auto-fill-mode #:auto-fill-column
187 #:isearch-state #:search-string #:search-mark
188 #:search-forward-p #:search-success-p
189 #:isearch-mode #:isearch-states #:isearch-previous-string
190 #:query-replace-state #:string1 #:string2 #:buffers #:mark
191 #:query-replace-mode
192 #:region-visible-p
193 #:with-undo
194 #:url
195 #:climacs-textual-view #:+climacs-textual-view+))
196
197 (defpackage :climacs-motion
198 (:use :clim-lisp :climacs-base :climacs-buffer :climacs-syntax)
199 (:export #:forward-to-word-boundary #:backward-to-word-boundary
200 #:define-motion-fns
201 #:beep-limit-action #:revert-limit-action #:error-limit-action
202 #:motion-limit-error
203 #:make-diligent-motor
204
205 ;; Lines
206 #:forward-one-line
207 #:backward-one-line
208 #:forward-line
209 #:backward-line
210
211 ;; Words
212 #:forward-one-word
213 #:backward-one-word
214 #:forward-word
215 #:backward-word
216
217 ;; Pages
218 #:forward-one-page
219 #:backward-one-page
220 #:forward-page
221 #:backward-page
222
223 ;; Expressions
224 #:forward-one-expression
225 #:backward-one-expression
226 #:forward-expression
227 #:backward-expression
228
229 ;; Definitions
230 #:forward-one-definition
231 #:backward-one-definition
232 #:forward-definition
233 #:backward-definition
234
235 ;; Up
236 #:forward-one-up
237 #:backward-one-up
238 #:forward-up
239 #:backward-up
240
241 ;; Down
242 #:forward-one-down
243 #:backward-one-down
244 #:forward-down
245 #:backward-down
246
247 ;; Paragraphs
248 #:forward-one-paragraph
249 #:backward-one-paragraph
250 #:forward-paragraph
251 #:backward-paragraph
252
253 ;; Sentences
254 #:forward-one-sentence
255 #:backward-one-sentence
256 #:forward-sentence
257 #:backward-sentence)
258 (:documentation "Functions and facilities for moving a mark
259 around by syntactical elements. The functions in this package
260 are syntax-aware, and their behavior is based on the semantics
261 defined by the syntax of the buffer, that the mark they are
262 manipulating belong to. These functions are also directly used
263 to implement the motion commands."))
264
265 (defpackage :climacs-editing
266 (:use :clim-lisp :climacs-base :climacs-buffer
267 :climacs-syntax :climacs-motion :climacs-pane :climacs-kill-ring)
268 (:export #:transpose-objects
269
270 ;; Lines
271 #:forward-delete-line #:backward-delete-line
272 #:forward-kill-line #:backward-kill-line
273 #:transpose-lines
274 #:forward-delete-line-start #:backward-delete-line-start
275 #:forward-kill-line-start #:backward-kill-line-start
276 #:transpose-line-starts
277
278 ;; Words
279 #:forward-delete-word #:backward-delete-word
280 #:forward-kill-word #:backward-kill-word
281 #:transpose-words
282
283 ;; Pages
284 #:forward-delete-page #:backward-delete-page
285 #:forward-kill-page #:backward-kill-page
286 #:transpose-page
287
288 ;; Expressions
289 #:forward-delete-expression #:backward-delete-expression
290 #:forward-kill-expression #:backward-kill-expression
291 #:transpose-expressions
292
293 ;; Definitions
294 #:forward-delete-definition #:backward-delete-definition
295 #:forward-kill-definition #:backward-kill-definition
296 #:transpose-definitions
297
298 ;; Paragraphs
299 #:forward-delete-paragraph #:backward-delete-paragraph
300 #:forward-kill-paragraph #:backward-kill-paragraph
301 #:transpose-paragraphs
302
303 ;; Sentences
304 #:forward-delete-sentence #:backward-delete-sentence
305 #:forward-kill-sentence #:backward-kill-sentence
306 #:transpose-sentences)
307 (:documentation "Functions and facilities for changing the
308 buffer contents by syntactical elements. The functions in this package
309 are syntax-aware, and their behavior is based on the semantics
310 defined by the syntax of the buffer, that the mark they are
311 manipulating belong to. These functions are also directly used
312 to implement the editing commands."))
313
314 (defpackage :climacs-fundamental-syntax
315 (:use :clim-lisp :clim :climacs-buffer :climacs-base
316 :climacs-syntax :flexichain :climacs-pane)
317 (:export #:fundamental-syntax))
318
319 (defpackage :climacs-gui
320 (:use :clim-lisp :clim :climacs-buffer :climacs-base
321 :climacs-abbrev :climacs-syntax :climacs-motion
322 :climacs-kill-ring :climacs-pane :clim-extensions
323 :undo :esa :climacs-editing :climacs-motion :esa-buffer :esa-io)
324 ;;(:import-from :lisp-string)
325 (:export #:climacs ; Frame.
326
327 #:extended-pane
328 #:climacs-info-pane
329 #:typeout-pane
330 #:kill-ring
331
332 ;; GUI functions follow.
333 #:current-window
334 #:current-point
335 #:current-buffer
336 #:current-point
337 #:current-mark
338 #:point
339 #:syntax
340 #:mark
341 #:buffers
342 #:insert-character
343 #:display-window
344 #:split-window
345 #:typeout-window
346 #:delete-window
347 #:other-window
348 #:buffer-pane-p
349
350 ;; Some configuration variables
351 #:*bg-color*
352 #:*fg-color*
353 #:*info-bg-color*
354 #:*info-fg-color*
355 #:*mini-bg-color*
356 #:*mini-fg-color*
357 #:*with-scrollbars*
358
359 ;; The command tables
360 #:global-climacs-table #:keyboard-macro-table #:climacs-help-table
361 #:base-table #:buffer-table #:case-table #:comment-table
362 #:deletion-table #:development-table #:editing-table
363 #:fill-table #:indent-table #:info-table #:marking-table
364 #:movement-table #:pane-table #:search-table #:self-insert-table
365 #:window-table
366
367 ;; Other stuff
368 #:dabbrev-expansion-mark
369 #:original-prefix
370 #:prefix-start-offset
371 #:overwrite-mode
372 #:goal-column
373 ))
374
375 (defpackage :climacs-core
376 (:use :clim-lisp :climacs-base :climacs-buffer :climacs-fundamental-syntax
377 :climacs-syntax :climacs-motion :climacs-pane :climacs-kill-ring
378 :climacs-editing :climacs-gui :clim :climacs-abbrev :esa :esa-buffer :esa-io)
379 (:export #:display-string
380 #:object-equal
381 #:object=
382 #:no-upper-p
383 #:case-relevant-test
384
385 #:goto-position
386 #:goto-line
387
388 #:possibly-fill-line
389 #:insert-character
390 #:back-to-indentation
391 #:delete-horizontal-space
392 #:indent-current-line
393 #:insert-pair
394
395 #:downcase-word #:upcase-word #:capitalize-word
396
397 #:indent-region
398 #:fill-line #:fill-region
399
400 #:indent-line #:delete-indentation
401
402 #:set-syntax
403
404 #:switch-to-buffer
405 #:make-new-buffer
406 #:make-new-named-buffer
407 #:erase-buffer
408 #:kill-buffer
409
410 #:filepath-filename
411 #:update-attribute-line
412 #:evaluate-attribute-line
413 #:directory-pathname-p
414 #:find-file #:find-file-read-only
415 #:directory-of-buffer
416 #:set-visited-filename
417 #:check-file-times
418 #:save-buffer
419
420 #:input-from-stream
421 #:save-buffer-to-stream
422 #:make-buffer-from-stream)
423 (:documentation "Package for editor functionality that is
424 syntax-aware, but yet not specific to certain
425 syntaxes. Contains stuff like indentation, filling and other
426 features that require a fairly high-level view of the
427 application, but are not solely GUI-specific."))
428
429 (defpackage :climacs-commands
430 (:use :clim-lisp :clim :climacs-base :climacs-buffer
431 :climacs-syntax :climacs-motion :climacs-editing
432 :climacs-gui :esa :climacs-kill-ring :climacs-pane
433 :climacs-abbrev :undo :climacs-core)
434 (:export #:define-motion-commands
435 #:define-deletion-commands
436 #:define-editing-commands)
437 (:documentation "This package is meant to contain Climacs'
438 command definitions, as well as some useful automatic
439 command-defining facilities."))
440
441 (defpackage :climacs-html-syntax
442 (:use :clim-lisp :clim :climacs-buffer :climacs-base
443 :climacs-syntax :flexichain :climacs-pane :climacs-fundamental-syntax))
444
445 (defpackage :climacs-prolog-syntax
446 (:use :clim-lisp :clim :climacs-buffer :climacs-base
447 :climacs-syntax :flexichain :climacs-pane :climacs-core :climacs-fundamental-syntax)
448 (:shadow #:atom #:close #:exp #:integer #:open #:variable))
449
450 (defpackage :climacs-cl-syntax
451 (:use :clim-lisp :clim :climacs-buffer :climacs-base
452 :climacs-syntax :flexichain :climacs-pane :climacs-fundamental-syntax)
453 (:export))
454
455 (defpackage :climacs-lisp-syntax
456 (:use :clim-lisp :clim :clim-extensions :climacs-buffer :climacs-base
457 :climacs-syntax :climacs-fundamental-syntax :flexichain :climacs-pane :climacs-gui
458 :climacs-motion :climacs-editing :climacs-core)
459 (:export #:lisp-string
460 #:edit-definition))
461
462 (defpackage :climacs
463 (:use :clim-lisp :clim :clim-sys :clim-extensions :climacs-gui)
464 (:export #:climacs
465 #:climacs-rv
466 #:edit-definition)
467 (:documentation "Package containing entry points to Climacs."))

  ViewVC Help
Powered by ViewVC 1.1.5