-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtao-a.lisp
1718 lines (1440 loc) · 51.5 KB
/
tao-a.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;; -*- Mode: Lisp; Package: TAO; -*-
(tao:common-lisp)
(in-package #:tao-internal)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun *abolish (funct arity)
(mapc #'tao.logic::retract-clause
(remove-if-not (lambda (x)
(and (= arity (length (cdr (car x))))
(eq funct (car (car x)))))
(tao.logic::get-clauses funct)))
(fmakunbound funct)
(fmakunbound (tao.logic::make-predicate funct arity))
T))
(define
"abolish"
(macro (funct arity)
`(*abolish ',funct ',arity))
:documentation
"形式 : abolish funct arity
次の 2 つの条件を満足する全ての宣言を削除する。
宣言の先頭の主ファンクタが funct の値と等しいこと。
宣言の先頭の引数の数が arity の値と等しいこと。
retract 参照。"
:example
"(assert (himitsu)) -> himitsu
(assert (himitsu _x)) -> himitsu
(assert (himitsu _x _y)) -> himitsu
(assert (himitsu 2 3) -> himitsu
(assert (himitsu _x _y _z)) -> himitsu
(abolish himitsu 3) -> t
(himitsu _x _y _z) は削除
(abolish himitsu 2) -> t
(himitsu _x _y) と (himitsu 2 3) は削除")
(define
"abort"
#'abort
:documentation
"形式 : abort terno
ターミナル番号 terno から、現在実行して得られた全ての結果を捨て、
トップレベルに戻る。"
:example
"")
(define
"abs"
#'abs
:documentation
"形式 : abs number
number の絶対値を返す。"
:example
"(abs 10) -> 10
(abs -10) -> 10")
(define
"acons"
#'acons
:documentation
"形式 : acons key data a-list
key と data の対を、連想リスト a-list に加える。
(acons key data a-list) = (cons (cons key data) a-list)"
:example
"(!x '((aka . red) (shiro . white))) ->
((aka . red) (shiro . white))
(acons 'kuro 'black x) ->
((kuro . black) (aka . red) (shiro . white))")
(define
"acos"
#'acos
:documentation
"形式 : acos number
number の逆余弦 (arc cosine) を返す。
number の絶対値が 1 より大きい場合、複素数を返す。"
:example
"(acos -1.0f0) -> 3.1415926535898f0
(acos 1.0f0) -> 0.0f0
(acos 0.5f0)-> 1.0471975511966f0
(acos 2.0f0) -> #c(0.0f0 1.31635789692481f0)")
(define
"acosh"
#'acosh
:documentation
"形式 : acosh number
number の逆双曲的余弦 (hyperbolic arc cosine) を返す。
number が 1 未満の場合、複素数の値を返す。"
:example
"(acosh 1.0f0) -> 0.0f0
(acosh 0.5f0) -> #c(0.0f0 1.0471975511966f0)
(acos -0.5f0) -> #c(0.0f0 2.0946951023932f0)")
(define
"addprop"
(expr (sym value key)
(let* ((origval (get sym key))
(newval (cons value origval)))
(setf (get sym key) newval)
newval))
:documentation
"形式 : addprop p-list value key
属性リスト p-list に、key があれば、value を key の属性値と連結 (cons)
し、その結果を返す。なければ、key の属性値を value として p-list に
加え、その結果を返す。
(addprop symbol value indicator) =
(putprop symbol (cons value (get symbol indicator)) indicator)"
:example
"(!(plist 'aaa) '(a 1 b 2 c 3)) -> (a 1 b 2 c 3)
(addprop 'aaa 4 'c) -> (4 . 3)
(plist 'aaa) -> (a 1 b 2 c (4 . 3))
(addprop 'aaa 5 'd) -> (5)
(plist 'aaa) -> (d (5) a 1 b 2 c (4 . 3))")
(define
"adjoin"
#'adjoin
:documentation
"形式 : adjoin item list &key :test :test-not :key
list に、要素 item を追加する。ただし、その要素は、まだ list の要素に
含まれていないもの。関数 member,cons 参照。"
:example
"(adjoin 2 '(1 3))->(2 1 3)
(adjoin 2 '(1 2 3))->(1 2 3)")
(define
"adjust-array"
#'adjust-array
:documentation
"形式 : adjust-array array dimensions
&key :element-type :initial-element :initial-contents
:fill-pointer :displaced-to :displaced-index-offset
配列 array と同一の型と次元を持ち、大きさ dimensions を持つ配列を返す。
:element-type はエラーチェックのために指定する。:initial-element は追加
される要素の初期値を指定する。:fill-pointer は array がフィルポインタを
持っているとき、非負整数ならそれが変更後のフィルポインタになり、t なら
array のフィルポインタが変更後のフィルポインタになる。:displaced-to と
:displaced-index-offset は変更後の配列が displaced かどうか、displaced
ならどの配列に対するもので、どのように要素が対応するかを、make-array の
場合と同様に指定する。:displaced-to が nil なら array が displaced で
あっても変更後は普通の (要素を持った) 配列となる。"
:example
"(!x (make-array '(2 5) :adjustable t)) ->
{vector}53313(common:array . 4)
(adjust-array x '(3 3)) -> {vector}53313(common:array . 4)
(adjust-array x 10) -> (\"not same rank\" adjust-array (10))")
(define
"adjustable-array-p"
#'adjustable-array-p
:documentation
"形式 : adjustable-array-p array
配列 array が可変であれば t、そうでなければ nil を返す。"
:example
"(!x (make-array '(2 5) :adjustable t))
-> {vector}53313(common:array . 4)
(adjustable-array-p x) -> t
(!y (make-array '(5 5)))
-> {applobj}70768(#!array . 10)
(adjustable-array-p y) -> nil")
(define
"advise"
(expr nil)
:documentation
"形式 : advise terno &opt local-echo
この関数が端末 A で呼ばれ、terno を端末 B のターミナル番号とする。
端末 A のユーザは端末 B を使うことができ、端末 B のユーザにアドバイス
できる。端末 A で入力されたコマンドやフォームは、端末 B で入力された
のと同様に実行される。"
:example
"")
(define
"all-deleted-files"
(expr nil)
:documentation
"形式 : all-deleted-files &opt pathname
ディレクトリ pathname 中で削除された全ファイルのリストを返す。
pathname の既定値は、カレントディレクトリ。ただし、pathname の
バージョン番号を省略すると、最新に削除されたバージョンが指定される。
pathname バージョン番号がワイルドカードなら、削除された全バージョンが
リストされる。"
:example
"(delete-file \"ts.tao\") -> (\"bs:<dire>ts.tao.2\")
(delete-file \"tss.tao\") -> (\"bs:<dire>tss.tao.5\")
(all-delete-files) ->
(\"bs:<dire>tss.tao.5\" \"bs:<dire>ts.tao.2\")
(expunge-files) -> (2 files 221 byte are expunged)
(all-delete-files) -> ()")
(define
"all-directories"
(expr nil)
:documentation
"形式 : all-directories &opt pathname flag
デバイスまたはディレクトリ pathname 中に現存する全ディレクトリのリスト
を返す。flag の値が nil (既定値) なら \"bs:<dir>\"のように文字列表示で
リストを返す。そうでなければデバイス名とディレクトリ名のドットペアの
リストを返す。"
:example
"(all-directories \"bs:\") -> (\"bs:<dir1>\" \"bs:<dir2>\" ... )
(all-directories \"bs:\" t) ->
((\"bs\" . \"dir1\") (\"bs\" . \"dir2\") ... )")
(define
"all-files"
(expr (&optional (pathname *default-pathname-defaults*) flag)
(declare (ignore flag))
(directory (merge-pathnames #P"*.*" pathname)))
:documentation
"形式 : all-files &opt pathname flag
デバイスまたはディレクトリ pathname 中の、全てのファイルのリストを返す。
pathname の既定値はカレントディレクトリ。flag の値が nil (既定値) なら、
ファイル名にはバージョン番号が付けられるが、nil でなければバージョン
番号は省略される。"
:example
"(all-files \"cs:<dir1>\" t) -> (\"cs:<dir1>file1.tao\"
\"cs:<dir1>file2.tao\"
... )")
(define
"all-processes"
(expr nil)
:documentation
"現在プロセスプールにある全てのプロセスのリストを返す。"
:example
"(all-processes) ->
({udo}259534process {udo}2558221process {udo}2557603process)")
(define
"alpha-char-p"
#'alpha-char-p
:documentation
"形式 : alpha-char-p char
char が、英字 (大文字及び小文字) であれば char を返し、そうでなければ
nil を返す。standard-char-p 参照。"
:example
"(alpha-char-p \"a\") -> \"a\"
(alpha-char-p \"1\") -> nil
(alpha-char-p \"ab\") -> エラー")
(define
"alphanumericp"
#'alphanumericp
:documentation
"形式 : alphanumericp char
char が英字 (大文字及び小文字) 又は数字ならば char を返し、
そうでなければ nil を返す。
(alphanumericp x) =
(or (alpha-char-p x) (not (null (digit-char-p x))))
standard-char-p 参照。"
:example
"(alphanumericp \"a\") -> \"a\"
(alphanumericp \"1\") -> \"1\"
(alphanumericp \"@\") -> nil")
(define
"and"
(cl-macro and)
:documentation
"形式 : and &rest form1 form2 ... formN
あるフォームの評価結果が nil になるまで左から右へ順に評価し、nil と
なれば and の値は nil。最後まで nil と評価されなければ formN の値を返す。"
:example
"(and ((x mod 5) = 0) ((x mod 7) = 0)) -> 0
(and (stringp x) (prins x))")
(define
"and#"
(locative-operator nil)
:documentation
"形式 : loc1 abd# loc2
2 つの引数のビット and 操作を行う。"
:example
"(signed-integer-locatives p q r s) -> (p q r s)
(p <- #5252) -> 2730
(q <- #2525) -> 1365
(r <- #2522) -> 1362
(s <- (p and# q )) -> 0
s -> 0
(r <- (p and# r)) -> 2
r -> 2
(q <- (p + q and# 1234)) -> 1234
q -> 1234")
(define
"ansi$backspace"
(expr nil)
:documentation
"カーソルを現在の位置から 1 カラム左に移動させる。"
:example
"(defun fa () (prin1 1234567890)
(ansi$backspace) (prin1 'abc) (terpri)) -> fa
fa -> 123456789abc")
(define "ansi$bell" (expr nil) :documentation "ターミナルのベルを鳴らす。" :example "")
(define
"ansi$caution"
(expr nil)
:documentation
"ユーザに適切な注意を促す。注意の促し方は、ansi$set-caution-type
で決められる。"
:example
"(ansi$set-caution-type :bell) -> :bell
(ansi$caution) -> bas:caution (ベルが鳴る)")
(define
"ansi$clear-all-tab-stop"
(expr nil)
:documentation
"全てのタブストップロケーションを削除する。
ansi$clear-tab-stop ansi$set-tab-stop 参照。"
:example
"")
(define
"ansi$clear-tab-stop"
(expr nil)
:documentation
"現在カーソル位置のタブストップを削除する。
関数 ansi$clear-all-tab-stop,ansi$set-tab-stop 参照。"
:example
"")
(define
"ansi$cr"
(expr nil)
:documentation
"カーソルを現在の行の先頭に移動させる。"
:example
"(defun fa () (prin1 1234567890)
(ansi$cr) (prin1 'abc) (terpri)) -> fa
fa -> abc34567890")
(define
"ansi$crlf"
(expr nil)
:documentation
"カーソルを新しい次行の先頭に移動させる。"
:example
"(defun fa () (prin1 1234567890)
(ansi$crlf) (prin1 'abc) (terpri)) -> fa
fa -> 12334567890
abc")
(define
"ansi$cursor-down"
(expr nil)
:documentation
"形式 : ansi$cursor-down &opt integer
カーソルを現在の位置から integer 行下に移動させる。
integer の既定値は 1 。"
:example
"")
(define "ansi$cursor-home" (expr nil) :documentation "カーソルをホームポジション (最上段の左端) に移動させる。" :example "")
(define
"ansi$cursor-left"
(expr nil)
:documentation
"形式 : ansi$cursor-left &opt integer
カーソルを現在位置から integer カラム左へ移動させる。
integer の既定値は 1 。"
:example
"(defun fa () (prin1 1234567890)
(ansi$cursor-left 5) (prin1 'abc) (terpri)) -> fa
fa -> 123345abc90")
(define
"ansi$cursor-position"
(expr nil)
:documentation
"形式 : ansi$cursor-position integer1 integer2
カーソルを integer1 行 integer2 カラムへ移動させる。"
:example
"")
(define
"ansi$cursor-position-p"
(expr nil)
:documentation
"カーソルの位置をリストにして返す。第 1 要素は行 No を、第 2 要素は
列 No を表す。"
:example
"(ansi$cursor-position-p) -> (23 0) (23 行 0 カラム)")
(define
"ansi$cursor-right"
(expr nil)
:documentation
"形式 : ansi$cursor-right &opt integer
カーソルを現在位置から integer カラム右へ移動させる。
integer の既定値は 1 。"
:example
"(defun fa () (prin1 12345)
(ansi$cursor-right 5) (prin1 'abc) (terpri)) -> fa
fa -> 123345 abc")
(define
"ansi$cursor-up"
(expr nil)
:documentation
"形式 : ansi$cursor-up &opt integer
カーソルを現在位置から integer 行上へ移動させる。
integer の既定値は 1 。"
:example
"")
(define
"ansi$enter-keypad-application-mode"
(expr nil)
:documentation
"ユーザは下表で決められたスペシャルモードでのキーパット使用ができる。
+-------+--------------------------------+
| | meanings |
| keys |-------------+------------------|
| | normal mode | application mode |
|-------|-------------|------------------|
| , | , | ESC 0 l |
| - | - | ESC 0 m |
| . | . | ESC 0 n |
| 0 | 0 | ESC 0 p |
| 1 | 1 | ESC 0 q |
| 2 | 2 | ESC 0 r |
| 3 | 3 | ESC 0 s |
| 4 | 4 | ESC 0 t |
| 5 | 5 | ESC 0 u |
| 6 | 6 | ESC 0 v |
| 7 | 7 | ESC 0 w |
| 8 | 8 | ESC 0 x |
| 9 | 9 | ESC 0 y |
| ENTER | RETURN key | ESC 0 M |
| PF1 | ESC P | ESC 0 P |
| PF2 | ESC Q | ESC 0 Q |
| PF3 | ESC R | ESC 0 R |
| PF4 | ESC S | ESC 0 S |
+-------+-------------+------------------+"
:example
"")
(define "ansi$enter-keypad-numeric-mode" (expr nil) :documentation "ユーザはノーマルモードでのキーパット使用ができる。" :example "")
(define
"ansi$erase-entire-line"
(expr nil)
:documentation
"カーソルの現在カラム位置に関係なく、カーソルのある行の先頭から末尾
までを削除する。"
:example
"(defun fa () (prin1 12345) (ansi$erase-entire-line)
(prin1 'abc) (terpri)) -> fa
fa -> abc")
(define "ansi$erase-entire-screen" (expr nil) :documentation "スクリーン上の全ての文字を削除する。" :example "")
(define
"ansi$erase-from-tol"
(expr nil)
:documentation
"現在カーソルのある行の先頭からカーソルの現在カラム位置までを削除
する。"
:example
"(defun fa () (prin1 12345) (ansi$erase-from-tol)
(prin1 'abc) (terpri)) -> fa
fa -> abc")
(define "ansi$erase-from-tos" (expr nil) :documentation "スクリーンの最上部から現在カーソル位置まで全ての文字を削除する。" :example "")
(define "ansi$erase-to-eol" (expr nil) :documentation "カーソルの現在カラム位置から行の末尾までを削除する。" :example "")
(define "ansi$erase-to-eos" (expr nil) :documentation "現在カーソル位置から画面の終わり (最下の右端) までを削除する。" :example "")
(define
"ansi$file-out"
(expr nil)
:documentation
"形式 : ansi$file-out &opt file
現在の画面全体を file (既定値は screen.txt) に書き出す。
関数 screen を起動した後にのみ有効。"
:example
"")
(define
"ansi$form-feed"
(expr nil)
:documentation
"改行する。ansi$lf と同じ。"
:example
"(defun fa () (prin1 1234567890) (ansi$form-feed)
(prin1 'abc) (terpri)) -> fa
fa -> 1234567890
abc")
(define
"ansi$get-character"
(expr nil)
:documentation
"関数 screen が起動されていれば、現在カーソル位置の文字を返し、
そうでなければ、nil を返す。"
:example
"")
(define
"ansi$get-line"
(expr nil)
:documentation
"関数 screen が起動されていれば、現在カーソルのある行を文字列として
返し、そうでなければ、nil を返す。"
:example
"")
(define
"ansi$index"
(expr nil)
:documentation
"カーソルを 1 行下に移動させる。カーソルのある行が一番下なら、画面
を 1 行スクロールアップする。"
:example
"(defun fa () (prin1 1234567890) (ansi$index)
(prin1 'abc) (terpri)) -> fa
fa -> 1234567890
abc")
(define "ansi$init" (expr nil) :documentation "ターミナルを初期化する。" :example "")
(define
"ansi$lf"
(expr nil)
:documentation
"改行する。"
:example
"(defun fa () (prin1 1234567890) (ansi$lf)
(prin1 'abc) (terpri)) -> fa
fa -> 1234567890
abc")
(define
"ansi$new-line"
(expr nil)
:documentation
"カーソルを 1 行下に移動する。カーソルが一番下の行にあるなら、画面
を 1 行スクロールアップする。"
:example
"(defun fa () (prin1 1234567890) (ansi$new-line)
(prin1 'abc) (terpri)) -> fa
fa -> 1234567890
abc")
(define
"ansi$reset-cursor-application-mode"
(expr nil)
:documentation
"カーソルアプリケーションモードから抜ける。
ansi$set-cursor-application-mode 参照。"
:example
"")
(define
"ansi$reset-to-normal-screen-mode"
(expr nil)
:documentation
"反転画面モードから抜け、通常の画面モードにする。
ansi$set-to-reverse-screen-mode 参照。"
:example
"")
(define
"ansi$restore-cursor"
(expr nil)
:documentation
"カーソルをセーブしてあった位置に復帰させる。ansi$save-cursor 参照。"
:example
"(defun fa () (ansi$save-cursor) (prin1 1234567890)
(ansi$restore-cursor) (prin1 'abc) (terpri)) -> fa
fa -> abc4567890")
(define
"ansi$reverse-index"
(expr nil)
:documentation
"カーソルを 1 行上に移動させる。カーソルが 1 番上の行にあるときは、
画面を 1 行スクロールダウンさせる。"
:example
"(defun fa () (terpri) (prin1 1234567890)
(ansi$reverse-index) (prin1 'abc) (terpri)) -> fa
fa -> abc
1234567890")
(define "ansi$rubout" (expr nil) :documentation "カーソルを 1 文字戻し、カーソルの新しい位置の文字を削除する。" :example "")
(define
"ansi$save-cursor"
(expr nil)
:documentation
"現在のカーソルの状態をセーブする。"
:example
"(defun fa () (ansi$save-cursor) (prin1 1234567890)
(ansi$restore-cursor) (prin1 'abc) (terpri)) -> fa
fa -> abc4567890")
(define "ansi$screen-height" (expr nil) :documentation "現在の画面の高さを返す。" :example "(ansi$screen-height) -> 24")
(define "ansi$screen-width" (expr nil) :documentation "現在の画面の幅を返す。" :example "(ansi$screen-width) -> 80")
(define
"ansi$scroll-down"
(expr nil)
:documentation
"形式 : ansi$scroll-down &opt integer
画面を integer 行スクロールダウンさせる。integer の既定値は、1 。"
:example
"")
(define
"ansi$scroll-up"
(expr nil)
:documentation
"形式 : ansi$scroll-up &opt integer
画面を integer 行スクロールアップさせる。 integer の既定値は、1 。"
:example
"")
(define
"ansi$set-caution-type"
(expr nil)
:documentation
"形式 : ansi$set-caution-type type
caution タイプ type を設定する。type には、:nop, :flush, :bell がある。
ansi$caution を参照。"
:example
"")
(define
"ansi$set-character-attribute"
(expr nil)
:documentation
"形式 : ansi$set-character-attribute &rest property
文字の属性 property を変更する。以降の文字はこの属性に従って表示される。
property には以下のものがある。属性の複数設定も可能。
:under 下線 :bold 強調 :blink 点滅
:reverse 反転 :normal 通常モード"
:example
"")
(define
"ansi$set-cursor-application-mode"
(expr nil)
:documentation
"カーソルの通常モードをやめ、カーソルのアプリケーションモードにする。
下表にエスケープシーケンスを示す。通常のキーボードには、up arrow、
down arrow、right arrow、left arrow、home arrow の 5 つの cursor key
がある。ansi$reset-cursor-application-mode 参照。
+-------------+--------------------------------+
| | meanings |
| keys |-------------+------------------|
| | normal mode | application mode |
|-------------|-------------|------------------|
| up arrow | ESC [ A | ESC 0 A |
| down arrow | ESC [ B | ESC 0 B |
| right arrow | ESC [ C | ESC 0 C |
| left arrow | ESC [ D | ESC 0 D |
| HOME | ESC [ H | ESC [ H |
+-------------+-------------+------------------+"
:example
"")
(define
"ansi$set-cursor-attribute"
(expr nil)
:documentation
"形式 : ansi$set-cursor-attribute &rest property
カーソルの属性 property を変更する。property には、以下のものがある。
:visible :invisible カーソルを表示するかしないか
:under :block アンダーラインかブロック形か
:blink :nonblink 点滅するかしないか"
:example
"")
(define
"ansi$set-line-attribute"
(expr nil)
:documentation
"形式 : ansi$set-line-attribute &rest property
行の属性 property を変更する。property には以下のものがある。
:ss (:single-width-single-height)
カーソルがある行を普通の行として指定。
:ds (:double-width-single-height)
カーソルのある行を 2 倍幅の文字が表示される行として指定。
:ddt (:double-width-double-height-top-half)
2 倍幅 2 倍高の文字を表示する上半分の行としてカーソルのある行を指定。
:ddb (:double-width-double-height-bottom-half)
2 倍幅 2 倍高の文字を表示する下半分の行としてカーソルのある行を指定。"
:example
"")
(define
"ansi$set-scroll-region"
(expr nil)
:documentation
"形式 : ansi$set-scroll-region &opt integer1 integer2
画面のスクロール領域を設定する。integer1 行から integer2 行までが
スクロール領域になる。"
:example
"")
(define "ansi$set-tab-stop" (expr nil) :documentation "現在のカーソル位置よりタブを設定する。" :example "")
(define
"ansi$set-to-reverse-screen-mode"
(expr nil)
:documentation
"反転スクリーンモード (全ての文字が反転表示) にする。
ansi$reset-to-normal-screen-mode 参照。"
:example
"")
(define
"ansi$special-graphics"
(expr nil)
:documentation
"通常の小文字キーをたたくことによってグラフィック文字を表示可能に
する。このモードでユーザはターミナルに小文字を表示することはできない。
ansi$standard-character 参照。"
:example
"")
(define "ansi$standard-character" (expr nil) :documentation "グラフィックモードを中止し通常のモードにする。" :example "")
(define
"ansi$tab"
(expr nil)
:documentation
"カーソルを次のタブストップまで移動させる。"
:example
"(defun fa () (prin1 1234567890) (ansi$tab)
(prin1 'abc) (terpri)) -> fa
fa -> 1234567890 abc")
(define
"ansi$vertical-tab"
(expr nil)
:documentation
"改行する。ansi$lf と同じ。"
:example
"(defun fa () (prin1 1234567890) (ansi$vertical-tab)
(prin1 'abc) (terpri)) -> fa
fa -> 1234567890
abc")
(define
"append"
#'append
:documentation
"形式 : append &rest list1 list2 ... listN
list1 list2 ... listN を連結したリストを返す。concatenate nconc 参照。"
:example
"(append) -> nil
(append '(1 2 3)) -> (1 2 3)
(append '(1 2 3) '(4 5 6)) -> (1 2 3 4 5 6)
(append '(1 2) '(3 4) '(5 6)) -> (1 2 3 4 5 6)
(append '(a b) nil '(c d)) -> (a b c d)")
(define
"append!"
(macro nil)
:documentation
"形式 : append! list1 list2
list2 と list1 を連結したリストを list1 の値とする。
(append! list1 list2) = (!list1 (append list2 list1))"
:example
"(!x '(a b))
(!y '(c d))
(append! x y) -> (c d a b)
x -> (c d a b)
y -> (c d)")
(define
"append2"
(subr nil)
:documentation
"形式 : append2 list1 list2
list1 と list2 を結合したリストを返す。
(append list1 list2) より速い。 [list1 .. list2] と同じ。"
:example
"(append2 '(1 2 3) '(4 5)) -> (1 2 3 4 5)
['(a b c) .. '(d e)] -> (a b c d e)")
(define
"applobj"
(class function)
:documentation
"インスタンスが、他のオブジェクトに適用することのできるオブジェクト。
関数そのものが applobj のインスタンス。"
:example
"")
(define
"applobj-of"
(subr (func)
(typecase func
(function func)
(symbol (and (fboundp func)
(fdefinition func)))
(otherwise nil)))
:documentation
"形式 : applobj-of func
関数オブジェクト func があればそれを返し、なければ nil を返す。"
:example
"(applobj-of 'member) -> {applobj}25431(#!subr-simple . 6)
(applobj-of 'fkjdfd) -> nil
(applobj-of {applobj}25431(#!subr-simple . 6))
-> {applobj}25431(#!subr-simple . 6)")
(define
"applobjp"
(subr (obj)
(typecase obj
(function obj)
(otherwise nil)))
:documentation
"形式 : applobjp func
関数 func が以下の 14 タイプの関数オブジェクトなら、func を返し、
それ以外なら nil を返す。
#!&+ applobj #!&+dyn applobj
#!array applobj #!closure applobj
#!expr applobj #!exprdyn applobj
#!expr-simple applobj #!exprdyn-simple applobj
#!hclauses applobj #!macro applobj
#!subr applobj #!subr-simple applobj
#!subst applobj #!unit-clauses applobj"
:example
"(applobjp (lambda (x) (ncons x)))
-> {applobj}12345(#!exprdyn . 6)
(applobjp (&+ ((_x . _)) _x)) -> {applobj}54321(#!&+ . 6)
(applobjp 'car) -> nil")
(define
"apply"
(subr (func list)
(apply func list))
:documentation
"形式 : apply func list
関数 func を list に適用する。"
:example
"(apply '+ (list 1 2 3 4 5 6 7 8 9)) -> 45
(apply (lambda (x y) (list y x)) (list 123 456)) -> (456 123)")
(define
"common:apply"
#'cl:apply
:documentation
"形式 : common:apply func arg1 &rest arg2 ... argN
引数 arg1 arg2 ... argN に関数 func を適用する。"
:example
"(common:apply '+ (list 1 2 3 4 5 6 7 8 9)) -> 45
(common:apply 'max 1 2 '(3 4 5)) -> 5")
(define
"apply*"
;; 3:35pm Monday, 6 August 2007
(subr (func &rest args)
(apply func args))
:documentation
"形式 : apply* func &rest arg1 arg2 ... argN
arg1 arg2 ... argN を評価した後、それらの値に関数 func を適用する。"
:example
"(apply* '+ 1 2 3 4 5 6 7 8 9) -> 45
(apply* (lambda (x y) (list y x)) 123 456) -> (456 123)
(apply* (lambda (x y) (list y x)) 'b 'a) -> (a b)")
(define
"applyhook"
(expr nil)
:documentation
"形式 : applyhook func1 list func2 func3 &opt env
変数 *evalhook* と *applyhook* を 関数 func2 と func3 にそれぞれ
バインドし、list のすべての要素を引数として func1 を呼び出し、func1 の
返す全値を返す。デバッグを助けるためのフック機能を使うことができる。"
:example
"")
(define
"apropos"
#'apropos
:documentation
"形式 : apropos string &opt pkg
パッケージ pkg において、印字名の中に string を副文字列として含む
シンボルをすべて検索し、それらのシンボル名を印字する。
pkg が省略されると、カレントパッケージにリンクされる全てのパッケージを
検索する。"
:example
"(apropos \"str\" sys:bas-package) は、次のものをプリントする。
bas:*print-no-string-marker*
*print-string-marker
...
write-string write-to-string wstrhbo wstrhl")
(define
"apropos-list"
#'apropos-list
:documentation
"形式 : apropos-list string &opt pkg
パッケージ pkg において、印字名の中に string を副文字列として含む
シンボルをすべて検索し、それらのシンボル名のリストを返す。
pkg が省略されると、カレントパッケージにリンクされる全てのパッケージを
検索する。"
:example