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

Last change on this file since 15445 was 15445, checked in by svspire, 7 years ago

New variable hemlock:*kill-ring-pushes-to-clipboard*.
Set to true for kill operations to push to system clipboard (default),
nil to leave system clipboard unaffected by kills.

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