source: trunk/source/cocoa-ide/hemlock/src/package.lisp @ 12859

Last change on this file since 12859 was 12859, checked in by gz, 10 years ago

Make sure that all hemlock functions defined outside of hemlock are in the hemlock-ext package, to make it easier to keep track of them

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 17.0 KB
Line 
1(in-package :cl-user)
2
3(defpackage :hemlock-interface
4  (:use)
5  (:export
6   ;; Symbols from the CIM, by chapter:
7
8   ;; Representation of Text
9   #:linep
10   #:line-string
11   #:line-previous
12   #:line-next
13   #:line-buffer
14   #:line-length
15   #:line-character
16   #:line-plist
17   #:line-signature
18   #:markp
19   #:mark-line
20   #:mark-charpos
21   #:mark-kind
22   #:mark-buffer
23   #:mark-absolute-position
24   #:previous-character
25   #:next-character
26   #:mark
27   #:copy-mark
28   #:delete-mark
29   #:with-mark
30   #:move-to-position
31   #:move-to-absolute-position
32   #:move-mark
33   #:line-start
34   #:line-end
35   #:buffer-start
36   #:buffer-end
37   #:mark-before
38   #:mark-after
39   #:character-offset
40   #:line-offset
41   #:region
42   #:regionp
43   #:make-empty-region
44   #:copy-region
45   #:region-to-string
46   #:string-to-region
47   #:line-to-region
48   #:region-start
49   #:region-end
50   #:region-bounds
51   #:set-region-bounds
52   #:count-lines
53   #:count-characters
54
55   ;; charprops
56   #:next-charprop-value
57   #:previous-charprop-value
58   #:set-charprop-value
59   #:find-charprop-value
60   #:next-charprops
61   #:previous-charprops
62   #:set-charprops
63   #:charprops-in-region
64   #:apply-charprops
65   #:find-charprops
66   #:find-charprops-change
67   #:charprop-equal
68   #:charprops-get
69   #:charprops-set
70   #:charprops-equal
71   #:charprops-as-plist
72   #:charprops-as-hash
73   #:charprops-names
74   #:set-buffer-charprops
75   #:buffer-charprops
76
77   ;; Buffers
78   #:current-buffer
79   #:current-point-for-insertion
80   #:current-point-for-deletion
81   #:current-point-unless-selection
82   #:current-point-collapsing-selection
83   #:current-point-extending-selection
84   #:current-point-for-selection-start
85   #:current-point-for-selection-end
86   #:current-point
87   #:current-mark
88   #:pop-buffer-mark
89   #:push-buffer-mark
90   #:push-new-buffer-mark
91   #:all-buffers
92   #:make-buffer
93   #:bufferp
94   #:buffer-name
95   #:buffer-region
96   #:buffer-pathname
97   #:buffer-write-date
98   #:buffer-point
99   #:buffer-mark
100   #:buffer-start-mark
101   #:buffer-end-mark
102   #:buffer-writable
103   #:buffer-modified
104   #:buffer-signature
105   #:buffer-variables
106   #:buffer-modes
107   #:buffer-delete-hook
108   #:buffer-package
109   #:delete-buffer
110   #:with-writable-buffer
111   #:make-modeline-field
112   #:modeline-field-p
113   #:modeline-field-name
114   #:modeline-field
115   #:modeline-field-function
116   #:modeline-field-width
117   #:buffer-modeline-fields
118   #:buffer-modeline-field-p
119   #:update-modeline-fields
120
121   ;; Altering and Searching Text
122   #:insert-character
123   #:insert-string
124   #:insert-region
125   #:ninsert-region
126   #:delete-characters
127   #:delete-region
128   #:delete-and-save-region
129   #:filter-region
130   #:start-line-p
131   #:end-line-p
132   #:empty-line-p
133   #:blank-line-p
134   #:blank-before-p
135   #:blank-after-p
136   #:same-line-p
137   #:mark<
138   #:mark<=
139   #:mark=
140   #:mark/=
141   #:mark>=
142   #:mark>
143   #:line<
144   #:line<=
145   #:line>=
146   #:line>
147   #:lines-related
148   #:first-line-p
149   #:last-line-p
150   #:kill-region
151   #:kill-characters
152   #:*ephemerally-active-command-types*
153   #:activate-region
154   #:deactivate-region
155   #:region-active-p
156   #:check-region-active
157   #:current-region
158   #:new-search-pattern
159   #:search-pattern-p
160   #:get-search-pattern
161   #:find-pattern
162   #:replace-pattern
163   #:*last-search-string*
164   #:collapse-if-selection
165
166   ;; Hemlock Variables
167   #:*global-variable-names*
168   #:current-variable-tables
169   #:defhvar
170   #:variable-value
171   #:variable-documentation
172   #:variable-hooks
173   #:variable-name
174   #:string-to-variable
175   #:value
176   #:setv
177   #:hlet
178   #:hemlock-bound-p
179   #:delete-variable
180   #:add-hook
181   #:remove-hook
182   #:invoke-hook
183
184   ;; Commands
185   #:*command-names*
186   #:defcommand
187   #:make-command
188   #:commandp
189   #:command-documentation
190   #:command-function
191   #:command-name
192   #:bind-key
193   #:command-bindings
194   #:delete-key-binding
195   #:get-command
196   #:map-bindings
197   #:key-translation
198   #:last-command-type
199   #:prefix-argument
200
201   ;; Modes
202   #:*mode-names*
203   #:defmode
204   #:mode-documentation
205   #:buffer-major-mode
206   #:buffer-minor-mode
207   #:mode-variables
208   #:mode-major-p
209
210   ;; Character attributes
211   #:*character-attribute-names*
212   #:defattribute
213   #:character-attribute-name
214   #:character-attribute-documentation
215   #:character-attribute
216   #:character-attribute-p
217   #:shadow-attribute
218   #:unshadow-attribute
219   #:find-attribute
220   #:find-not-attribute
221   #:reverse-find-attribute
222   #:reverse-find-not-attribute
223   #:character-attribute-hooks
224
225   ;; Controlling the Display
226   #:current-view
227   #:hemlock-view-p
228   #:hemlock-view-buffer
229   #:mark-column
230   #:move-to-column
231   #:set-scroll-position
232
233   ;; Logical Key Events
234   #:*logical-key-event-names*
235   #:define-logical-key-event
236   #:logical-key-event-key-events
237   #:logical-key-event-name
238   #:logical-key-event-documentation
239   #:logical-key-event-p
240
241   ;; The Echo Area
242   #:clear-echo-area
243   #:message
244   #:loud-message
245   #:beep
246   #:command-case
247   #:prompt-for-buffer
248   #:prompt-for-key-event
249   #:prompt-for-key
250   #:prompt-for-file
251   #:prompt-for-integer
252   #:prompt-for-keyword
253   #:prompt-for-expression
254   #:prompt-for-string
255   #:prompt-for-variable
256   #:prompt-for-y-or-n
257   #:prompt-for-yes-or-no
258   #:parse-for-something
259
260   ;; Files
261   #:define-file-option
262   #:define-file-type-hook
263   #:process-file-options
264   #:pathname-to-buffer-name
265   #:buffer-default-pathname
266   #:read-file
267   #:write-file
268   #:write-buffer-file
269   #:read-buffer-file
270  ;; #:find-file-buffer
271
272   ;;# Hemlock's Lisp Environment
273   ;;   #:ed
274   #:*key-event-history*
275   #:last-key-event-typed
276   #:last-char-typed
277   #:make-hemlock-output-stream
278   #:hemlock-output-stream-p
279   #:make-hemlock-region-stream
280   #:hemlock-region-stream-p
281   #:with-input-from-region
282   #:with-output-to-mark
283   #:with-pop-up-display
284   #:editor-error
285   #:handle-lisp-errors
286   #:in-lisp
287   #:do-alpha-chars
288
289   ;; Higher-Level Text Primitives
290   #:indent-region
291   #:indent-region-for-commands
292   #:delete-horizontal-space
293   #:pre-command-parse-check
294   #:form-offset
295   #:top-level-offset
296   #:mark-top-level-form
297   #:defun-region
298   #:inside-defun-p
299   #:start-defun-p
300   #:forward-up-list
301   #:backward-up-list
302   #:valid-spot
303   #:defindent
304   #:word-offset
305   #:sentence-offset
306   #:paragraph-offset
307   #:mark-paragraph
308   #:fill-region
309   #:fill-region-by-paragraphs
310
311   ;; Utilities
312   #:make-string-table
313   #:string-table-p
314   #:string-table-separator
315   #:delete-string
316   #:clrstring
317   #:getstring
318   #:complete-string
319   #:find-ambiguous
320   #:find-containing
321   #:do-strings
322   #:make-ring
323   #:ringp
324   #:ring-length
325   #:ring-ref
326   #:ring-push
327   #:ring-pop
328   #:rotate-ring
329   #:save-for-undo
330   #:make-region-undo
331
332   ;; Miscellaneous
333
334   #:define-keysym
335   #:define-keysym-code
336   #:define-mouse-keysym
337   #:name-keysym
338   #:keysym-names
339   #:keysym-preferred-name
340   #:define-key-event-modifier
341   #:*all-modifier-names*
342   #:make-key-event-bits
343   #:key-event-modifier-mask
344   #:key-event-bits-modifiers
345   #:make-key-event
346   #:key-event-p
347   #:key-event-bits
348   #:key-event-keysym
349   #:char-key-event
350   #:key-event-char
351   #:key-event-bit-p
352   #:do-alpha-key-events
353   #:pretty-key-string
354   ))
355
356;; Functions defined externally (i.e. used by but not defined in hemlock).  In theory,
357;; these (and codes for the symbolic keysyms in keysym-defs.lisp, q.v.) is all you need
358;; to implement to port the IDE to a different window system.
359(defpackage :hemlock-ext
360  (:use)
361  ;;
362  (:export
363   #:invoke-modifying-buffer-storage
364   #:invoke-allowing-buffer-display
365   #:note-selection-set-by-search
366   #:buffer-note-font-change
367   #:buffer-note-insertion
368   #:buffer-note-modification
369   #:buffer-note-deletion
370   #:buffer-encoding-name
371   #:scroll-view
372   #:ensure-selection-visible
373   #:report-hemlock-error
374   #:top-listener-output-stream
375   #:top-listener-input-stream
376   #:invalidate-modeline
377   #:note-buffer-saved
378   #:note-buffer-unsaved
379   #:read-only-listener-p
380   #:all-hemlock-views
381   #:open-hemlock-buffer
382   #:save-hemlock-buffer
383   #:revert-hemlock-buffer
384   #:open-sequence-dialog
385   #:execute-in-file-view
386   #:change-active-pane
387   #:send-string-to-listener
388   #:buffer-process-description
389   #:raise-buffer-view
390   #:string-to-clipboard
391   ))
392
393(defpackage :hi
394  (:use :common-lisp :hemlock-interface)
395  (:nicknames :hemlock-internals)
396  (:import-from
397   ;; gray streams
398   #+EXCL  :excl
399   #+CLISP :gray
400   #+CMU   :ext
401   #+sbcl  :sb-gray
402   #+scl   :ext
403   #+clozure :gray
404   ;;
405   ;; Note the patch i received from DTC mentions character-output and
406   ;; character-input-stream here, so we actually see us faced to
407   ;; provide for compatibility classes. --GB
408   #-scl   #:fundamental-character-output-stream
409   #-scl   #:fundamental-character-input-stream
410   ;; There is conditionalization in streams.lisp, see above --GB
411   #+scl   #:character-output-stream
412   #+scl   #:character-input-stream
413   
414   #:stream-write-char
415   #-scl   #:stream-write-string     ; wonder what that is called --GB
416   #:stream-read-char
417   #:stream-listen
418   #:stream-unread-char
419   #:stream-clear-input
420   #:stream-finish-output
421   #:stream-force-output
422   #:stream-line-column)
423  (:import-from :ccl
424                #:delq #:memq #:assq
425                #:getenv
426                #:fixnump)
427  (:import-from :gui
428                #:log-debug)
429  ;; ** TODO: get rid of this.  The code that uses it assumes it guarantees atomicity,
430  ;; and it doesn't.
431  (:import-from :ccl #:without-interrupts)
432  ;;
433  (:export
434   #:*FAST*                             ;hmm not sure about this one
435   
436   ;; Imported
437   #:delq #:memq #:assq #:getenv #:fixnump #:log-debug
438
439   ;; hemlock-ext.lisp
440   #:hemlock-char-code-limit
441   #:file-writable #:default-directory #:complete-file #:ambiguous-files
442
443   ;; rompsite.lisp
444   #:editor-describe-function
445   #:merge-relative-pathnames
446   ;;
447   ;; Export default-font to prevent a name conflict that occurs due to
448   ;; the Hemlock variable "Default Font" defined in SITE-INIT below.
449   ;;
450   #:default-font
451   #:*beep-function* #:beep
452
453   ;;
454   #:mark #:mark-line #:mark-charpos #:mark-column #:move-to-column
455   #:markp #:region #:region-start #:region-end
456   #:regionp #:buffer #:bufferp #:buffer-modes #:buffer-point #:buffer-writable
457   #:buffer-delete-hook #:buffer-variables #:buffer-write-date
458   #:region #:regionp #:region-start #:region-end
459   #:commandp #:command #:command-function
460   #:command-documentation #:modeline-field #:modeline-field-p
461
462   ;; from macros.lisp
463   #:invoke-hook #:value #:setv #:hlet #:string-to-variable #:add-hook #:remove-hook
464   #:defcommand #:with-mark #:use-buffer #:editor-error
465   #:editor-error-format-string #:editor-error-format-arguments #:do-strings
466   #:command-case #:reprompt #:with-output-to-mark #:with-input-from-region
467   #:handle-lisp-errors #:with-pop-up-display
468
469   ;; from views.lisp
470   #:hemlock-view #:current-view #:hemlock-view-buffer
471   #:current-prefix-argument-state #:last-key-event-typed #:last-char-typed
472   #:invoke-command
473   #:abort-to-toplevel #:abort-current-command
474   #:set-scroll-position
475   #:native-key-event-p
476
477   ;; from line.lisp
478   #:line #:linep #:line-previous #:line-next #:line-plist #:line-signature
479
480   ;; from ring.lisp
481   #:ring #:ringp #:make-ring #:ring-push #:ring-pop #:ring-length #:ring-ref
482   #:rotate-ring
483
484   ;; from table.lisp
485   #:string-table #:string-table-p #:make-string-table
486   #:string-table-separator #:getstring
487   #:find-ambiguous #:complete-string #:find-containing
488   #:delete-string #:clrstring #:do-strings
489
490   ;; buffer.lisp
491   #:buffer-modified #:buffer-region #:buffer-name #:buffer-pathname
492   #:buffer-major-mode #:buffer-minor-mode #:buffer-modeline-fields
493   #:buffer-modeline-field-p #:current-buffer #:current-point
494   #:defmode #:mode-major-p #:mode-variables #:mode-documentation
495   #:make-buffer #:delete-buffer #:with-writable-buffer #:buffer-start-mark
496   #:buffer-end-mark #:*buffer-list*
497
498   ;; charmacs.lisp
499   #:syntax-char-code-limit #:search-char-code-limit #:do-alpha-chars
500
501   ;; charprops.lisp
502   #:next-charprop-value #:previous-charprop-value
503   #:set-charprop-value #:find-charprop-value #:next-charprops
504   #:previous-charprops #:set-charprops #:charprops-in-region
505   #:apply-charprops #:find-charprops #:find-charprops-change
506   #:charprop-equal #:charprops-get #:charprops-set #:charprops-equal
507   #:charprops-as-plist #:charprops-as-hash #:charprops-names
508   #:set-buffer-charprops #:buffer-charprops
509
510   ;; key-event.lisp
511   #:define-keysym-code #:define-mouse-keysym #:define-modifier-bit
512   #:*all-modifier-names* #:*modifier-translations*
513   #:make-key-event #:char-key-event #:do-alpha-key-events
514   #:key-event-modifier-mask #:key-event-char #:key-event-bit-p
515   #:pretty-key-string
516
517   ;; echo.lisp
518   #:*echo-area-stream*
519   #:clear-echo-area #:message #:loud-message
520   #:current-echo-parse-state #:exit-echo-parse
521   #:eps-parse-type #:eps-parse-starting-mark #:eps-parse-input-region
522   #:eps-parse-verification-function #:eps-parse-string-tables
523   #:eps-parse-default #:eps-parse-help #:eps-parse-key-handler
524   #:prompt-for-buffer #:prompt-for-file #:prompt-for-integer
525   #:prompt-for-keyword #:prompt-for-expression #:prompt-for-string
526   #:prompt-for-variable #:prompt-for-yes-or-no #:prompt-for-y-or-n
527   #:prompt-for-key-event #:prompt-for-key
528   #:*logical-key-event-names*
529   #:logical-key-event-p #:logical-key-event-documentation
530   #:logical-key-event-name #:logical-key-event-key-events
531   #:define-logical-key-event #:current-variable-tables
532
533
534   ;; commands
535   #:make-prefix-argument-state #:prefix-argument-resetting-state
536
537 
538   ;; files.lisp
539   #:read-file #:write-file
540
541
542   ;; font.lisp
543   #:font-mark #:delete-font-mark #:delete-line-font-marks #:move-font-mark
544   #:window-font
545
546   ;; htext1.lisp
547   #:line-length #:line-buffer #:line-string #:line-character #:mark #:mark-kind
548   #:copy-mark #:delete-mark #:move-to-position #:mark-absolute-position
549   #:move-to-absolute-position #:buffer-selection-range #:region #:make-empty-region
550   #:start-line-p #:end-line-p #:empty-line-p #:blank-line-p #:blank-before-p
551   #:blank-after-p #:same-line-p #:mark< #:mark<= #:mark> #:mark>= #:mark= #:mark/=
552   #:line< #:line<= #:line> #:line>= #:first-line-p #:last-line-p #:buffer-signature
553   #:lines-related
554
555
556   ;; htext2.lisp
557   #:region-to-string #:string-to-region #:line-to-region
558   #:previous-character #:next-character #:count-lines
559   #:count-characters #:line-start #:line-end #:buffer-start
560   #:buffer-end #:move-mark #:mark-before #:mark-after
561   #:character-offset #:line-offset #:region-bounds
562   #:set-region-bounds #:*print-region*
563
564
565   ;; htext3.lisp
566   #:insert-character #:insert-string #:insert-region #:ninsert-region
567   #:paste-characters
568
569   ;; htext4.lisp
570   #:delete-characters #:delete-region #:delete-and-save-region #:copy-region
571   #:filter-region
572
573
574   ;; interp.lisp
575   #:bind-key #:delete-key-binding #:get-command #:map-bindings
576   #:make-command #:command-name #:command-bindings #:last-command-type
577   #:prefix-argument #:key-translation
578
579
580   ;; main.lisp
581   #:*global-variable-names* #:*mode-names* #:*buffer-names*
582   #:*character-attribute-names* #:*command-names* #:*buffer-list*
583   #:after-editor-initializations
584
585   ;; search1.lisp
586   #:search-pattern #:search-pattern-p #:find-pattern #:replace-pattern
587   #:new-search-pattern
588
589   ;; modeline.lisp
590   #:modeline-field-width
591   #:modeline-field-function #:make-modeline-field
592   #:update-modeline-field #:modeline-field-name #:modeline-field
593
594   ;; streams.lisp
595   #:make-hemlock-output-stream
596   #:hemlock-region-stream #:hemlock-region-stream-p
597   #:hemlock-output-stream #:make-hemlock-region-stream
598   #:hemlock-output-stream-p #:make-kbdmac-stream
599   #:modify-kbdmac-stream
600
601   ;; syntax.lisp
602   #:character-attribute-name
603   #:defattribute #:character-attribute-documentation #:character-attribute
604   #:character-attribute-hooks #:character-attribute-p #:shadow-attribute
605   #:unshadow-attribute #:find-attribute #:reverse-find-attribute
606
607   ;; vars.lisp
608   #:variable-value #:variable-hooks #:variable-documentation #:variable-name
609   #:hemlock-bound-p #:defhvar #:delete-variable
610
611   #:input-stream-reading-line
612
613   ))
614
615
616(defpackage :hemlock
617  (:use :common-lisp :hemlock-interface :hemlock-internals :hemlock-ext)
618  )
619
620
621;; $Log$
622;; Revision 1.2  2005/08/01 10:54:17  gb
623;; Don't export CHECK-REGION-QUERY-SIZE.
624;;
625;; Revision 1.1.1.1  2003/10/19 08:57:16  gb
626;; recovered 0.14 sources
627;;
628;; Revision 1.1.2.1  2003/08/10 19:11:33  gb
629;; New files, imported from upstream CVS as of 03/08/09.
630;;
631;; Revision 1.9  2003/08/05 19:58:21  gilbert
632;; - we now have a HEMLOCK-INTERFACE package which exports symbols mentioned
633;;   in the Command Implementors Manual.
634;;
635;; Revision 1.8  2003/07/28 20:35:32  jdz
636;; BEEP function now works.
637;;
638;; Revision 1.7  2003/07/27 10:11:06  jdz
639;; HEMLOCK-EXT package is now used by HEMLOCK.  Conflicting symbols from
640;; EXTENSIONS package in CMUCL are shadowed.
641;;
642;; Revision 1.6  2003/05/12 11:01:48  gbyers
643;; Conditionalize (Gray streams package) for OpenMCL.
644;;
645;; Revision 1.5  2003/03/26 07:50:10  gilbert
646;; Port to SCL by Douglas Crosher
647;;
648;; Revision 1.4  2003/03/06 21:38:58  gilbert
649;; The symbol *FAST* is now exported from HI (no idea if that is the
650;; right thing to do) and imported into HEMLOCK. Fixes bug:
651;; auto-save.lisp was not compiling.
652;;
Note: See TracBrowser for help on using the repository browser.