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

Contents of /climacs/packages.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.111 - (hide annotations)
Fri Aug 11 21:59:05 2006 UTC (7 years, 8 months ago) by thenriksen
Branch: MAIN
Changes since 1.110: +1 -0 lines
* Added `display-syntax-name' generic function so syntaxes can do more
  than just return a string for their info-pane.

* Changed package display for Lisp syntax so the package specified by
  the `in-package' form preceding point will be displayed, whether or
  not the package can be found in the image. If it cannot be found,
  the specified package name will be displayed in italics in the
  info-pane.

* Changed `with-syntax-package' to rebind `*package*' instead of just
  being a glorified `let'-wrapper.

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

  ViewVC Help
Powered by ViewVC 1.1.5