-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinternals.texi
1570 lines (1384 loc) · 76.7 KB
/
internals.texi
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
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
@c Copyright (C) 1990, 1991, 1992, 1993, 1998 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@setfilename ../info/internals
@node GNU Emacs Internals, Standard Errors, Tips, Top
@comment node-name, next, previous, up
@c @appendix GNU Emacs Internals
@appendix GNU Emacsの内部
@c This chapter describes how the runnable Emacs executable is dumped with
@c the preloaded Lisp libraries in it, how storage is allocated, and some
@c internal aspects of GNU Emacs that may be of interest to C programmers.
本章では、Lispライブラリをあらかじめロードした実用的なEmacsの実行形式の
ダンプ方法、メモリ領域の割り当て方、
Cプログラマに興味があるようなGNU Emacsの内部について述べます。
@menu
* Building Emacs:: How to the dumped Emacs is made.
* Pure Storage:: A kludge to make preloaded Lisp functions sharable.
* Garbage Collection:: Reclaiming space for Lisp objects no longer used.
* Memory Usage:: Info about total size of Lisp objects made so far.
* Writing Emacs Primitives:: Writing C code for Emacs.
* Object Internals:: Data formats of buffers, windows, processes.
@end menu
@node Building Emacs
@c @appendixsec Building Emacs
@appendixsec Emacsの構築方法
@c @cindex building Emacs
@cindex Emacsの構築方法
@pindex temacs
@c This section explains the steps involved in building the Emacs
@c executable. You don't have to know this material to build and install
@c Emacs, since the makefiles do all these things automatically. This
@c information is pertinent to Emacs maintenance.
本節では、Emacsの実行形式を構築する手順を説明します。
メイクファイルが自動的にこれらすべてを行うので、
Emacsを構築してインストールするために本節のことがらを
読者が知っている必要はありません。
本節の内容は、Emacsの保守者向けです。
@c Compilation of the C source files in the @file{src} directory
@c produces an executable file called @file{temacs}, also called a
@c @dfn{bare impure Emacs}. It contains the Emacs Lisp interpreter and I/O
@c routines, but not the editing commands.
ディレクトリ@file{src}のCソースファイル群をコンパイルすると、
@file{temacs}と呼ばれる実行形式ファイルが作られます。
これは@dfn{裸のインピュアEmacs}(bare impure Emacs)とも呼びます。
これには、Emacs Lispインタープリタと入出力ルーティンが含まれますが、
編集コマンドは入っていません。
@cindex @file{loadup.el}
@c The command @w{@samp{temacs -l loadup}} uses @file{temacs} to create
@c the real runnable Emacs executable. These arguments direct
@c @file{temacs} to evaluate the Lisp files specified in the file
@c @file{loadup.el}. These files set up the normal Emacs editing
@c environment, resulting in an Emacs that is still impure but no longer
@c bare.
コマンド@w{@samp{temacs -l loadup}}で、
実用的なEmacsの実行形式を作るために@file{temacs}を使います。
これらの引数は、@file{temacs}に対して
ファイル@file{loadup.el}で指定したLispファイル群を評価するように指示します。
これらのファイルはEmacsの通常の編集環境を作り上げ、
その結果、Emacsは裸ではありませんがまだインピュアです。
@c It takes a substantial time to load the standard Lisp files. Luckily,
@c you don't have to do this each time you run Emacs; @file{temacs} can
@c dump out an executable program called @file{emacs} that has these files
@c preloaded. @file{emacs} starts more quickly because it does not need to
@c load the files. This is the Emacs executable that is normally
@c installed.
標準のLispファイル群をロードするにはかなり時間が必要です。
しかし、読者がEmacsを実行するたびにこれを行う必要はありません。
@file{temacs}は、必要なファイルをあらかじめロードした@file{emacs}という
実行形式プログラムとしてダンプできます。
@file{emacs}はファイル群をロードする必要がないので素早く起動します。
これが通常インストールされるEmacsの実行形式です。
@c To create @file{emacs}, use the command @samp{temacs -batch -l loadup
@c dump}. The purpose of @samp{-batch} here is to prevent @file{temacs}
@c from trying to initialize any of its data on the terminal; this ensures
@c that the tables of terminal information are empty in the dumped Emacs.
@c The argument @samp{dump} tells @file{loadup.el} to dump a new executable
@c named @file{emacs}.
@file{emacs}を作るにはコマンド@samp{temacs -batch -l loadup dump}を使います。
ここでの@samp{-batch}の目的は、
@file{temacs}が端末に関するデータを初期化しないようにするためです。
これにより、ダンプしたEmacsでは端末情報の表が空であることを保証できます。
引数@samp{dump}は、@file{emacs}という名前の新たな実行形式を
ダンプするように@file{loadup.el}に指示します。
@c Some operating systems don't support dumping. On those systems, you
@c must start Emacs with the @samp{temacs -l loadup} command each time you
@c use it. This takes a substantial time, but since you need to start
@c Emacs once a day at most---or once a week if you never log out---the
@c extra time is not too severe a problem.
ダンプできないオペレーティングシステムもあります。
そのようなシステムでは、Emacsを使うたびに
コマンド@samp{temacs -l loadup}でEmacsを起動する必要があります。
これにはかなり時間がかかりますが、多くても1日に1回、あるいは、
ログアウトしなのであれば週に1回Emacsを起動する必要があるだけでしょうから、
余分な時間は重大問題にはならないでしょう。
@cindex @file{site-load.el}
@c You can specify additional files to preload by writing a library named
@c @file{site-load.el} that loads them. You may need to increase the value
@c of @code{PURESIZE}, in @file{src/puresize.h}, to make room for the
@c additional data. (Try adding increments of 20000 until it is big
@c enough.) However, the advantage of preloading additional files
@c decreases as machines get faster. On modern machines, it is usually not
@c advisable.
あらかじめロードしておく追加のファイルは、
それらをロードする@file{site-load.el}という名前のライブラリを
書くことで指定できます。
追加データのための領域を確保するために
@file{src/puresize.h}の@code{PURESIZE}の値を増やす必要があるかもしれません。
(十分な大きさになるまで20000ずつ増やして試すこと。)
しかし、マシンが速くなればなるほど、あらかじめロードしておくファイルを
追加することの利点は減少します。
最近のマシンでは、このようにする必要はないでしょう。
@c After @file{loadup.el} reads @file{site-load.el}, it finds the
@c documentation strings for primitive and preloaded functions (and
@c variables) in the file @file{etc/DOC} where they are stored, by calling
@c @code{Snarf-documentation} (@pxref{Accessing Documentation}).
@file{loadup.el}が@file{site-load.el}を読み終えると、
@code{Snarf-documentation}(@pxref{Accessing Documentation})を呼び出して、
基本関数やあらかじめロードした関数(および変数)の説明文字列を
それらの説明文字列を格納したファイル@file{etc/DOC}から探します。
@cindex @file{site-init.el}
@c You can specify other Lisp expressions to execute just before dumping
@c by putting them in a library named @file{site-init.el}. This file is
@c executed after the documentation strings are found.
ダンプする直前に実行すべきList式を指定するには、
@file{site-init.el}という名前のライブラリにそれらのLisp式を入れておきます。
このファイルは、説明文字列を探し終えてから実行されます。
@c If you want to preload function or variable definitions, there are
@c three ways you can do this and make their documentation strings
@c accessible when you subsequently run Emacs:
関数定義や変数定義をあらかじめロードしたいときには、
それを行ってあとでEmacsを実行したときにそれらの説明文字列を
参照できるようにする方法が3つあります。
@itemize @bullet
@item
@c Arrange to scan these files when producing the @file{etc/DOC} file,
@c and load them with @file{site-load.el}.
ファイル@file{etc/DOC}を作成するときに
それらのファイルが走査されるようにしておき、
@file{site-load.el}でそれらのファイルをロードする。
@item
@c Load the files with @file{site-init.el}, then copy the files into the
@c installation directory for Lisp files when you install Emacs.
@file{site-init.el}でファイルをロードし、
Emacsをインストールするときにそれらのファイルを
Lispファイル向けのインストールディレクトリへコピーする。
@item
@c Specify a non-@code{nil} value for
@c @code{byte-compile-dynamic-docstrings} as a local variable in each these
@c files, and load them with either @file{site-load.el} or
@c @file{site-init.el}. (This method has the drawback that the
@c documentation strings take up space in Emacs all the time.)
それらの各ファイルでローカル変数として
@code{byte-compile-dynamic-docstrings}の値に@code{nil}以外を指定し、
@file{site-load.el}か@file{site-init.el}でそれらのファイルをロードする。
(これには、それらの説明文字列がつねにEmacsの領域を占めてしまう
欠点がある。)
@end itemize
@c It is not advisable to put anything in @file{site-load.el} or
@c @file{site-init.el} that would alter any of the features that users
@c expect in an ordinary unmodified Emacs. If you feel you must override
@c normal features for your site, do it with @file{default.el}, so that
@c users can override your changes if they wish. @xref{Start-up Summary}.
無変更の普通のEmacsにユーザーが期待する機能を変更するようなものを
@file{site-load.el}や@file{site-init.el}に入れることは勧められません。
読者のサイトでは普通の機能に優先させるべきであると思うときには、
@file{default.el}でそれを行います。
そうすれば、ユーザーは好みに応じて読者が行った変更を無効にできます。
@xref{Start-up Summary}。
@defun dump-emacs to-file from-file
@cindex unexec
@c This function dumps the current state of Emacs into an executable file
@c @var{to-file}. It takes symbols from @var{from-file} (this is normally
@c the executable file @file{temacs}).
この関数は、Emacsの現在の状態を
実行形式ファイル@var{to-file}へダンプする。
@var{from-file}(これは普通は実行形式ファイル@file{temacs})から
シンボルを取り出す。
@c If you want to use this function in an Emacs that was already dumped,
@c you must run Emacs with @samp{-batch}.
すでにダンプしたEmacsでこの関数を使うときには、
@samp{-batch}を指定してEmacsを実行すること。
@end defun
@node Pure Storage
@c @appendixsec Pure Storage
@appendixsec ピュアメモリ
@c @cindex pure storage
@cindex ピュアメモリ
@c Emacs Lisp uses two kinds of storage for user-created Lisp objects:
@c @dfn{normal storage} and @dfn{pure storage}. Normal storage is where
@c all the new data created during an Emacs session is kept; see the
@c following section for information on normal storage. Pure storage is
@c used for certain data in the preloaded standard Lisp files---data that
@c should never change during actual use of Emacs.
Emacs Lispでは、ユーザーが作成したLispオブジェクト向けに
2種類のメモリ、@dfn{普通メモリ}(normal storage)と
@dfn{ピュアメモリ}(pure storage)を使います。
普通メモリは、Emacsセッション中に新たに作成されるすべてのデータを置く場所です。
普通メモリに関する情報は以下の節を参照してください。
ピュアメモリは、あらかじめロードした標準Lispファイル群の特定のデータ、
つまり、Emacsの実行中にけっして変化しないデータを収めるために使います。
@c Pure storage is allocated only while @file{temacs} is loading the
@c standard preloaded Lisp libraries. In the file @file{emacs}, it is
@c marked as read-only (on operating systems that permit this), so that
@c the memory space can be shared by all the Emacs jobs running on the
@c machine at once. Pure storage is not expandable; a fixed amount is
@c allocated when Emacs is compiled, and if that is not sufficient for the
@c preloaded libraries, @file{temacs} crashes. If that happens, you must
@c increase the compilation parameter @code{PURESIZE} in the file
@c @file{src/puresize.h}. This normally won't happen unless you try to
@c preload additional libraries or add features to the standard ones.
ピュアメモリは、@file{temacs}があらかじめロードする標準Lispライブラリを
ロードしている最中にのみ割り当てられます。
ファイル@file{emacs}では読み出し専用
(これができるオペレーティングシステムでは)と印が付けられ、
当該マシンで同時に実行されているすべてのEmacsのジョブで
メモリ領域を共有できるようにします。
ピュアメモリは拡張できません。
Emacsをコンパイルしたときに固定サイズが割り当てられ、
あらかじめロードするライブラリに対して十分な大きさがないと
@file{temacs}はクラッシュします。
その場合には、ファイル@file{src/puresize.h}のコンパイルパラメータ
@code{PURESIZE}を増やす必要があります。
あらかじめロードするライブラリを追加したり標準機能に機能を追加しなければ、
そのようなことは普通は起こらないはずです。
@defun purecopy object
@c This function makes a copy of @var{object} in pure storage and returns
@c it. It copies strings by simply making a new string with the same
@c characters in pure storage. It recursively copies the contents of
@c vectors and cons cells. It does not make copies of other objects such
@c as symbols, but just returns them unchanged. It signals an error if
@c asked to copy markers.
この関数は、ピュアメモリ内に@var{object}をコピーしそれを返す。
文字列のコピーでは、ピュアメモリ内に同じ文字の新たな文字列を単純に作る。
ベクトルやコンスセルの内容は再帰的にコピーする。
シンボルなどの他のオブジェクトはコピーせずに無変更でそれらを返す。
マーカをコピーしようとするとエラーを通知する。
@c This function is a no-op except while Emacs is being built and dumped;
@c it is usually called only in the file @file{emacs/lisp/loaddefs.el}, but
@c a few packages call it just in case you decide to preload them.
この関数は、Emacsを構築してダンプするとき以外ではなにもしない。
普通はファイル@file{emacs/lisp/loaddefs.el}でのみ呼び出されるが、
あらかじめロードするとこれを呼び出すようなパッケージも少数だがある。
@end defun
@defvar pure-bytes-used
@c The value of this variable is the number of bytes of pure storage
@c allocated so far. Typically, in a dumped Emacs, this number is very
@c close to the total amount of pure storage available---if it were not,
@c we would preallocate less.
この変数の値は、割り当て済みのピュアメモリのバイト数である。
典型的には、ダンプしたEmacsでは
この値は利用可能なピュアメモリの総量にとても近い。
そうでない場合には、あらかじめロードしたライブラリが少ないのであろう。
@end defvar
@defvar purify-flag
@c This variable determines whether @code{defun} should make a copy of the
@c function definition in pure storage. If it is non-@code{nil}, then the
@c function definition is copied into pure storage.
この変数は、@code{defun}が関数定義をピュアメモリに
コピーすべきかどうかを決定する。
@code{nil}以外であると、関数定義をピュアメモリにコピーする。
@c This flag is @code{t} while loading all of the basic functions for
@c building Emacs initially (allowing those functions to be sharable and
@c non-collectible). Dumping Emacs as an executable always writes
@c @code{nil} in this variable, regardless of the value it actually has
@c before and after dumping.
Emacsを構築中の初期段階ですべての基本的な関数をロード中には
(これらの関数を共有してガベッジコレクションの対象にしないように)、
このフラグは@code{t}である。
実行形式としてEmacsをダンプするときには、
ダンプ前後の実際の値には関係なくこの変数には@code{nil}を書く。
@c You should not change this flag in a running Emacs.
実行中のEmacsでこのフラグを変更するべきではない。
@end defvar
@node Garbage Collection
@c @appendixsec Garbage Collection
@appendixsec ガベッジコレクション
@c @cindex garbage collector
@cindex ガベッジコレクション
@c @cindex memory allocation
@cindex メモリ割り当て
@c When a program creates a list or the user defines a new function (such
@c as by loading a library), that data is placed in normal storage. If
@c normal storage runs low, then Emacs asks the operating system to
@c allocate more memory in blocks of 1k bytes. Each block is used for one
@c type of Lisp object, so symbols, cons cells, markers, etc., are
@c segregated in distinct blocks in memory. (Vectors, long strings,
@c buffers and certain other editing types, which are fairly large, are
@c allocated in individual blocks, one per object, while small strings are
@c packed into blocks of 8k bytes.)
プログラムがリストを作成したり、(ライブラリをロードするなどして)
ユーザーが新たに関数を定義すると、
それらのデータは普通メモリへ置かれます。
普通メモリが足りなくなると、Emacsはオペレーティングシステムに
1kバイトの倍数のブロックでメモリ割り当てを要求します。
各ブロックは1つの種類のLispオブジェクトに使いますから、
シンボル、コンスセル、マーカなどはメモリの異なるブロックに分離されます。
(ベクトル、長い文字列、バッファ、特定の編集向けデータ型などの
比較的大きなものは各オブジェクトごとに独立のブロックを割り当てるが、
短い文字列は8kバイトのブロックに詰め込む。)
@c It is quite common to use some storage for a while, then release it by
@c (for example) killing a buffer or deleting the last pointer to an
@c object. Emacs provides a @dfn{garbage collector} to reclaim this
@c abandoned storage. (This name is traditional, but ``garbage recycler''
@c might be a more intuitive metaphor for this facility.)
あるメモリ部分をしばらく使ってから、
(たとえば)バッファを削除したり
オブジェクトに対する最後の参照を削除するなどして
当該メモリを解放することはよくあることです。
Emacsには、このような放置されたメモリを回収する
@dfn{ガベッジコレクタ}(garbage collector)があります。
(この名前は伝統的だが、
『ガベッジリサイクル』のほうがこの機能を直観的に表すかもしれない。)
@c The garbage collector operates by finding and marking all Lisp objects
@c that are still accessible to Lisp programs. To begin with, it assumes
@c all the symbols, their values and associated function definitions, and
@c any data presently on the stack, are accessible. Any objects that can
@c be reached indirectly through other accessible objects are also
@c accessible.
ガベッジコレクタは、Lispプログラムから現時点で参照可能な
すべてのLispオブジェクトを探して印を付けることで動作します。
まず、すべてのシンボル、それらの値、それらに関連付けられた関数定義、
および、スタック上の任意のデータは参照可能であると仮定します。
参照可能なオブジェクトから間接的に辿れる任意のオブジェクトも
参照可能です。
@c When marking is finished, all objects still unmarked are garbage. No
@c matter what the Lisp program or the user does, it is impossible to refer
@c to them, since there is no longer a way to reach them. Their space
@c might as well be reused, since no one will miss them. The second
@c (``sweep'') phase of the garbage collector arranges to reuse them.
印付けが終ったときには、無印であるすべてのオブジェクトは
ゴミ(ガベッジ)です。
Lispプログラムやユーザーがなにをしようと、
無印のオブジェクトに辿り着く方法はないのでそれらを参照することは不可能です。
無印のオブジェクトを使っているものはいないので、
それらのメモリ領域は再利用できます。
ガベッジコレクタの2段目の動作(『掃く』(sweep))は、
無印のオブジェクトのメモリ領域を再利用できるようにすることです。
@c @cindex free list
@cindex 自由リスト
@c The sweep phase puts unused cons cells onto a @dfn{free list}
@c for future allocation; likewise for symbols and markers. It compacts
@c the accessible strings so they occupy fewer 8k blocks; then it frees the
@c other 8k blocks. Vectors, buffers, windows, and other large objects are
@c individually allocated and freed using @code{malloc} and @code{free}.
掃き作業では、未使用のコンスセルを@dfn{自由リスト}(free list)に入れて、
将来の割り当てに備えます。
シンボルやマーカについても同様です。
参照可能な文字列は8kバイトのブロックより小さな領域を占めるように詰め込み、
不要になった8kバイトのブロックは解放します。
ベクトル、バッファ、ウィンドウ、他の大きなオブジェクトは、
@code{malloc}や@code{free}を使って個別に割り当てたり解放します。
@c @cindex CL note---allocate more storage
@cindex CLに関した注意−−メモリ領域の追加
@quotation
@c @b{Common Lisp note:} Unlike other Lisps, GNU Emacs Lisp does not
@c call the garbage collector when the free list is empty. Instead, it
@c simply requests the operating system to allocate more storage, and
@c processing continues until @code{gc-cons-threshold} bytes have been
@c used.
@b{Common Lispに関した注意:}@code{ }
他のLispと異なり、GNU Emacs Lispでは、
自由リストが空になってもガベッジコレクタを呼び出さない。
そのかわりに、オペレーティングシステムにメモリ割り当てを単純に要求し、
@code{gc-cons-threshold}バイトを使い尽くすまでは処理を継続する。
@c This means that you can make sure that the garbage collector will not
@c run during a certain portion of a Lisp program by calling the garbage
@c collector explicitly just before it (provided that portion of the
@c program does not use so much space as to force a second garbage
@c collection).
つまり、ガベッジコレクタを明示的に呼び出した直後のLispプログラムの部分では、
(プログラムのその部分で2度目にガベッジコレクタを呼び出すほど
多くのメモリを使わないと仮定すれば)
その部分を実行中にはガベッジコレクタが呼ばれないことを保証できるのである。
@end quotation
@c @deffn Command garbage-collect
@deffn コマンド garbage-collect
@c This command runs a garbage collection, and returns information on
@c the amount of space in use. (Garbage collection can also occur
@c spontaneously if you use more than @code{gc-cons-threshold} bytes of
@c Lisp data since the previous garbage collection.)
このコマンドはガベッジコレクタを実行し、
使用中のメモリ量に関する情報を返す。
(まえのガベッジコレクタの起動後に
@code{gc-cons-threshold}バイト以上のLispデータを使うと
自発的なガベッジコレクタの起動を引き起こす。)
@c @code{garbage-collect} returns a list containing the following
@c information:
@code{garbage-collect}が返すリストにはつぎの情報が含まれる。
@example
@group
((@var{used-conses} . @var{free-conses})
(@var{used-syms} . @var{free-syms})
@end group
(@var{used-miscs} . @var{free-miscs})
@var{used-string-chars}
@var{used-vector-slots}
(@var{used-floats} . @var{free-floats})
(@var{used-intervals} . @var{free-intervals}))
@end example
@c Here is an example:
例を示す。
@example
@group
(garbage-collect)
@result{} ((106886 . 13184) (9769 . 0)
(7731 . 4651) 347543 121628
(31 . 94) (1273 . 168))
@end group
@end example
@c Here is a table explaining each element:
各要素の意味はつぎのとおりである。
@table @var
@item used-conses
@c The number of cons cells in use.
使用中のコンスセルの個数。
@item free-conses
@c The number of cons cells for which space has been obtained from the
@c operating system, but that are not currently being used.
オペレーティングシステムから得たメモリであるが
現在未使用なコンスセルの個数。
@item used-syms
@c The number of symbols in use.
使用中のシンボルの個数。
@item free-syms
@c The number of symbols for which space has been obtained from the
@c operating system, but that are not currently being used.
オペレーティングシステムから得たメモリであるが
現在未使用なシンボルの個数。
@item used-miscs
@c The number of miscellaneous objects in use. These include markers and
@c overlays, plus certain objects not visible to users.
その他の使用中のオブジェクトの個数。
マーカ、オーバレイ、ユーザーに見えないある種のオブジェクトを含む。
@item free-miscs
@c The number of miscellaneous objects for which space has been obtained
@c from the operating system, but that are not currently being used.
オペレーティングシステムから得たメモリであるが
現在未使用なその他のオブジェクトの個数。
@item used-string-chars
@c The total size of all strings, in characters.
使用中の文字列の総文字数。
@item used-vector-slots
@c The total number of elements of existing vectors.
存在するベクトルの要素の総個数。
@item used-floats
@c @c Emacs 19 feature
@c The number of floats in use.
使用中の浮動小数点数の個数。
@item free-floats
@c @c Emacs 19 feature
@c The number of floats for which space has been obtained from the
@c operating system, but that are not currently being used.
オペレーティングシステムから得たメモリであるが
現在未使用な浮動小数点数の個数。
@item used-intervals
@c The number of intervals in use. Intervals are an internal
@c data structure used for representing text properties.
使用中のインターバルの個数。
インターバルとはテキスト属性を表現するために使う内部データ構造である。
@item free-intervals
@c The number of intervals for which space has been obtained
@c from the operating system, but that are not currently being used.
オペレーティングシステムから得たメモリであるが
現在未使用なインターバルの個数。
@end table
@end deffn
@defopt garbage-collection-messages
@c If this variable is non-@code{nil}, Emacs displays a message at the
@c beginning and end of garbage collection. The default value is
@c @code{nil}, meaning there are no such messages.
この変数が@code{nil}以外であると、
Emacsはガベッジコレクションの始まりと終りにメッセージを表示する。
デフォルト値は@code{nil}であり、そのようなメッセージを表示しない。
@end defopt
@defopt gc-cons-threshold
@c The value of this variable is the number of bytes of storage that must
@c be allocated for Lisp objects after one garbage collection in order to
@c trigger another garbage collection. A cons cell counts as eight bytes,
@c a string as one byte per character plus a few bytes of overhead, and so
@c on; space allocated to the contents of buffers does not count. Note
@c that the subsequent garbage collection does not happen immediately when
@c the threshold is exhausted, but only the next time the Lisp evaluator is
@c called.
この変数の値は、ガベッジコレクションのあとで
つぎにガベッジコレクションを起こすまでに
Lispオブジェクトに割り当てるべきメモリバイト数である。
コンスセルは8バイト、
文字列は1文字1バイトと数バイトのオーバヘッドといった具合である。
バッファの内容に割り当てたメモリ量は数えない。
この閾値を越えてもただちにつぎのガベッジコレクションは起こらず、
つぎにLispのエバリュエータが呼ばれときに起きる。
@c The initial threshold value is 400,000. If you specify a larger
@c value, garbage collection will happen less often. This reduces the
@c amount of time spent garbage collecting, but increases total memory use.
@c You may want to do this when running a program that creates lots of
@c Lisp data.
最初の閾値は400,000である。
より大きな値を指定すると、ガベッジコレクションの起動回数が少なくなる。
ガベッジコレクションに費す時間を減少できるが、
全体のメモリ使用量を増加させる。
大量のLispデータを作成するようなプログラムを実行するときに設定する。
@c You can make collections more frequent by specifying a smaller value,
@c down to 10,000. A value less than 10,000 will remain in effect only
@c until the subsequent garbage collection, at which time
@c @code{garbage-collect} will set the threshold back to 10,000.
10,000までの小さな値を指定すると、
ガベッジコレクションの回数を増やせる。
10,000未満の値が意味を持つのはつぎにガベッジコレクションが起きるまでである。
@code{garbage-collect}は閾値を10,000に戻す。
@end defopt
@c The value return by @code{garbage-collect} describes the amount of
@c memory used by Lisp data, broken down by data type. By contrast, the
@c function @code{memory-limit} provides information on the total amount of
@c memory Emacs is currently using.
@code{garbage-collect}が返す値は、データ型ごとのLispデータのメモリ使用量です。
対照的に、関数@code{memory-limit}は、
Emacsが現在使用中のメモリ総量に関する情報を与えます。
@c Emacs 19 feature
@defun memory-limit
@c This function returns the address of the last byte Emacs has allocated,
@c divided by 1024. We divide the value by 1024 to make sure it fits in a
@c Lisp integer.
この関数は、Emacsが最後に割り当てた最終バイトのアドレスを
1024で割ったものを返す。
値を1024で割るのは、Lispの整数に収めるためである。
@c You can use this to get a general idea of how your actions affect the
@c memory usage.
読者の操作がメモリ使用量にどのように影響するかを調べるのに使える。
@end defun
@node Memory Usage
@c @section Memory Usage
@section メモリ使用量
@c These functions and variables give information about the total amount
@c of memory allocation that Emacs has done, broken down by data type.
@c Note the difference between these and the values returned by
@c @code{(garbage-collect)}; those count objects that currently exist, but
@c these count the number or size of all allocations, including those for
@c objects that have since been freed.
これらの変数は、Emacsが割り当てたデータ型ごとのメモリ総量に関する
情報を与えます。
これらと@code{(garbage-collect)}が返す値との違いに注意してください。
@code{(garbage-collect)}の値は現存するオブジェクトを数えますが、
これらの変数は、すでに解放したオブジェクトを含めて
割り当てたオブジェクトの個数やサイズを数えます。
@defvar cons-cells-consed
@c The total number of cons cells that have been allocated so far
@c in this Emacs session.
このEmacsセッションでこれまでに割り当てたコンスセルの総数。
@end defvar
@defvar floats-consed
@c The total number of floats that have been allocated so far
@c in this Emacs session.
このEmacsセッションでこれまでに割り当てた浮動小数点数の総数。
@end defvar
@defvar vector-cells-consed
@c The total number of vector cells that have been allocated so far
@c in this Emacs session.
このEmacsセッションでこれまでに割り当てたベクトルセルの総数。
@end defvar
@defvar symbols-consed
@c The total number of symbols that have been allocated so far
@c in this Emacs session.
このEmacsセッションでこれまでに割り当てたシンボルの総数。
@end defvar
@defvar string-chars-consed
@c The total number of string characters that have been allocated so far
@c in this Emacs session.
このEmacsセッションでこれまでに割り当てた文字列の総文字数。
@end defvar
@defvar misc-objects-consed
@c The total number of miscellaneous objects that have been allocated so
@c far in this Emacs session. These include markers and overlays, plus
@c certain objects not visible to users.
このEmacsセッションでこれまでに割り当てたその他のオブジェクトの総数。
マーカやオーバレイ、ユーザーに見えないある種のオブジェクトを含む。
@end defvar
@defvar intervals-consed
@c The total number of intervals that have been allocated so far
@c in this Emacs session.
このEmacsセッションでこれまでに割り当てたインターバルの総数。
@end defvar
@node Writing Emacs Primitives
@c @appendixsec Writing Emacs Primitives
@appendixsec Emacs基本関数の書き方
@c @cindex primitive function internals
@cindex 基本関数の内部
@c Lisp primitives are Lisp functions implemented in C. The details of
@c interfacing the C function so that Lisp can call it are handled by a few
@c C macros. The only way to really understand how to write new C code is
@c to read the source, but we can explain some things here.
Lisp基本関数は、Cで実装したLisp関数です。
Lispから呼び出すためのCの関数とのインターフェイスの詳細は、
数個のCのマクロで処理しています。
新たにCのコードを書く方法をほんとうに理解する唯一の方法は、
ソースを読むことですが、ここではその一部を説明します。
@c An example of a special form is the definition of @code{or}, from
@c @file{eval.c}. (An ordinary function would have the same general
@c appearance.)
スペシャルフォームの例は、@file{eval.c}から引用した@code{or}の定義です。
(普通の関数も同じように見える。)
@c @cindex garbage collection protection
@cindex ガベッジコレクションを抑制する
@smallexample
@group
DEFUN ("or", For, Sor, 0, UNEVALLED, 0,
"Eval args until one of them yields non-nil; return that value.\n\
The remaining args are not evalled at all.\n\
@end group
@group
If all args return nil, return nil.")
(args)
Lisp_Object args;
@{
register Lisp_Object val;
Lisp_Object args_left;
struct gcpro gcpro1;
@end group
@group
if (NULL (args))
return Qnil;
args_left = args;
GCPRO1 (args_left);
@end group
@group
do
@{
val = Feval (Fcar (args_left));
if (!NULL (val))
break;
args_left = Fcdr (args_left);
@}
while (!NULL (args_left));
@end group
@group
UNGCPRO;
return val;
@}
@end group
@end smallexample
@c Let's start with a precise explanation of the arguments to the
@c @code{DEFUN} macro. Here is a template for them:
マクロ@code{DEFUN}の引数の詳しい説明から始めます。
その雛型はつぎのとおりです。
@example
DEFUN (@var{lname}, @var{fname}, @var{sname}, @var{min}, @var{max}, @var{interactive}, @var{doc})
@end example
@table @var
@item lname
@c This is the name of the Lisp symbol to define as the function name; in
@c the example above, it is @code{or}.
関数名として定義するLispシンボルの名前である。
上の例では、@code{or}である。
@item fname
@c This is the C function name for this function. This is
@c the name that is used in C code for calling the function. The name is,
@c by convention, @samp{F} prepended to the Lisp name, with all dashes
@c (@samp{-}) in the Lisp name changed to underscores. Thus, to call this
@c function from C code, call @code{For}. Remember that the arguments must
@c be of type @code{Lisp_Object}; various macros and functions for creating
@c values of type @code{Lisp_Object} are declared in the file
@c @file{lisp.h}.
この関数のCの関数としての名前である。
この関数をCのコードから呼び出すときに使う名前である。
慣習により、Lispでの名前のまえに@samp{F}を付けるが、
Lispでの名前のダッシュ(@samp{-})はすべて下線に置き換える。
したがって、Cのコードからこの関数を呼び出すには、@code{For}を呼び出す。
引数は@code{Lisp_Object}型である必要があることに注意してほしい。
ファイル@file{lisp.h}では、
@code{Lisp_Object}型の値を作成するためのさまざまなマクロや関数を宣言してある。
@item sname
@c This is a C variable name to use for a structure that holds the data for
@c the subr object that represents the function in Lisp. This structure
@c conveys the Lisp symbol name to the initialization routine that will
@c create the symbol and store the subr object as its definition. By
@c convention, this name is always @var{fname} with @samp{F} replaced with
@c @samp{S}.
これは、Lispでの関数を表現するsubrオブジェクト向けのデータを保持する
構造体に使うCの変数名である。
この構造体は、シンボルを作成しその定義としてsubrオブジェクトを保存する
初期化ルーティンへLispのシンボル名を運ぶ構造体である。
慣習により、この名前はつねに
@var{fname}の@samp{F}を@samp{S}に置き換えたものである。
@item min
@c This is the minimum number of arguments that the function requires. The
@c function @code{or} allows a minimum of zero arguments.
関数が必要とする引数の最小の個数である。
関数@code{or}は最小0個の引数を許す。
@item max
@c This is the maximum number of arguments that the function accepts, if
@c there is a fixed maximum. Alternatively, it can be @code{UNEVALLED},
@c indicating a special form that receives unevaluated arguments, or
@c @code{MANY}, indicating an unlimited number of evaluated arguments (the
@c equivalent of @code{&rest}). Both @code{UNEVALLED} and @code{MANY} are
@c macros. If @var{max} is a number, it may not be less than @var{min} and
@c it may not be greater than seven.
関数が許す引数の最大の個数に制限があるときの引数の最大の個数である。
あるいは、評価していない引数を受け取るスペシャルフォームであることを
表す@code{UNEVALLED}、
評価済みの引数を何個でも受け取ることを表す@code{MANY}
(@code{&rest}に等価)でもよい。
@code{UNEVALLED}も@code{MANY}もマクロである。
@var{max}が数であるときには、
それは@var{min}より小さくなく、かつ、7より大きくないこと。
@item interactive
@c This is an interactive specification, a string such as might be used as
@c the argument of @code{interactive} in a Lisp function. In the case of
@c @code{or}, it is 0 (a null pointer), indicating that @code{or} cannot be
@c called interactively. A value of @code{""} indicates a function that
@c should receive no arguments when called interactively.
この関数の対話指定であり、
Lisp関数において@code{interactive}の引数に使う文字列である。
@code{or}の場合には0(空ポインタ)であり、
@code{or}は対話的に呼び出せないことを表す。
値@code{""}は、対話的に呼び出されると
この関数は引数を受け取らないことを表す。
@item doc
@c This is the documentation string. It is written just like a
@c documentation string for a function defined in Lisp, except you must
@c write @samp{\n\} at the end of each line. In particular, the first line
@c should be a single sentence.
説明文字列である。
各行末に@samp{\n\}と書く必要があることを除けば、
Lispで定義する関数の説明文字列のように書く。
特に、最初の行は1つの文であること。
@end table
@c After the call to the @code{DEFUN} macro, you must write the argument
@c name list that every C function must have, followed by ordinary C
@c declarations for the arguments. For a function with a fixed maximum
@c number of arguments, declare a C argument for each Lisp argument, and
@c give them all type @code{Lisp_Object}. When a Lisp function has no
@c upper limit on the number of arguments, its implementation in C actually
@c receives exactly two arguments: the first is the number of Lisp
@c arguments, and the second is the address of a block containing their
@c values. They have types @code{int} and @w{@code{Lisp_Object *}}.
マクロ@code{DEFUN}の呼び出しのあとには、
Cの関数に必須な引数名の並びを書き、引数に対する普通のCの宣言を続けます。
引数の最大個数が固定されている関数では、
各Lisp引数向けにCの引数宣言を書き、
それらをすべて@code{Lisp_Object}型にします。
Lisp関数に引数の個数に上限がないとき、
それを実装するCの関数は実際には2つの引数を受け取ります。
第1引数はLisp引数の個数であり、
第2引数はそれらの値を収めたブロックのアドレスです。
引数の型は@code{int}と@w{@code{Lisp_Object *}}です。
@c Within the function @code{For} itself, note the use of the macros
@c @code{GCPRO1} and @code{UNGCPRO}. @code{GCPRO1} is used to ``protect''
@c a variable from garbage collection---to inform the garbage collector that
@c it must look in that variable and regard its contents as an accessible
@c object. This is necessary whenever you call @code{Feval} or anything
@c that can directly or indirectly call @code{Feval}. At such a time, any
@c Lisp object that you intend to refer to again must be protected somehow.
@c @code{UNGCPRO} cancels the protection of the variables that are
@c protected in the current function. It is necessary to do this explicitly.
関数@code{For}自身の内側では、
マクロ@code{GCPRO1}と@code{UNGCPRO}を使っていることに注意してください。
@code{GCPRO1}は、ガベッジコレクションから変数を『保護』するために使います。
つまり、ガベッジコレクタに対してこの変数を調べてその内容を
参照可能なオブジェクトとみなすように指示します。
@code{Feval}や@code{Feval}を直接/間接的に呼び出すものを呼ぶときには、
このようにする必要があります。
そのような場面では、再度参照する意図がある任意のLispオブジェクトは
保護する必要があります。
@code{UNGCPRO}は、この関数での変数の保護を取り消します。
これは明示的に行う必要があります。
@c For most data types, it suffices to protect at least one pointer to
@c the object; as long as the object is not recycled, all pointers to it
@c remain valid. This is not so for strings, because the garbage collector
@c can move them. When the garbage collector moves a string, it relocates
@c all the pointers it knows about; any other pointers become invalid.
@c Therefore, you must protect all pointers to strings across any point
@c where garbage collection may be possible.
ほとんどのデータ型では、少なくともそのオブジェクトへの1つのポインタを
保護すれば十分であり、そのオブジェクトに循環がない限り、
そのオブジェクトへのすべてのポインタは正しく保たれます。
文字列にはこれはあてはまりません。
ガベッジコレクタがそれらを移動するからです。
ガベッジコレクタが文字列を移動すると、
それに対する既知のポインタをすべて再配置し、
それ以外のポインタは不正になります。
したがって、ガベッジコレクタが動く可能性のある任意の部分では、
文字列へのすべてのポインタを保護する必要があります。
@c The macro @code{GCPRO1} protects just one local variable. If you want
@c to protect two, use @code{GCPRO2} instead; repeating @code{GCPRO1} will
@c not work. Macros @code{GCPRO3} and @code{GCPRO4} also exist.
マクロ@code{GCPRO1}は1つのローカル変数のみを保護します。
2つ保護したい場合にはかわりに@code{GCPRO2}を使います。
@code{GCPRO1}を繰り返しても働きません。
@code{GCPRO3}や@code{GCPRO4}のマクロもあります。
@c These macros implicitly use local variables such as @code{gcpro1}; you
@c must declare these explicitly, with type @code{struct gcpro}. Thus, if
@c you use @code{GCPRO2}, you must declare @code{gcpro1} and @code{gcpro2}.
@c Alas, we can't explain all the tricky details here.
これらのマクロは@code{gcpro1}などのローカル変数を暗黙のうちに使いますが、
読者はこれらを型@code{struct gcpro}で明示的に宣言する必要があります。
したがって、@code{GCPRO2}を使う場合には、
@code{gcpro1}と@code{gcpro2}を宣言する必要があります。
残念ですが、ここではすべての詳細は説明しきれません。
@c You must not use C initializers for static or global variables unless
@c they are never written once Emacs is dumped. These variables with
@c initializers are allocated in an area of memory that becomes read-only
@c (on certain operating systems) as a result of dumping Emacs. @xref{Pure
@c Storage}.
Emacsをいったんダンプしたあとでも静的やグローバルな変数に書き込むのであれば、
それらの変数にはCの初期化構文を使ってはいけません。
初期化構文を伴うそれらの変数は、Emacsをダンプすると
(オペレーティングシステムによっては)その結果として
読み出し専用のメモリ領域に割り当てられます。
@xref{Pure Storage}。
@c Do not use static variables within functions---place all static
@c variables at top level in the file. This is necessary because Emacs on
@c some operating systems defines the keyword @code{static} as a null
@c macro. (This definition is used because those systems put all variables
@c declared static in a place that becomes read-only after dumping, whether
@c they have initializers or not.)
関数の内側では静的変数を使わずに、
すべての静的変数はファイルのトップレベルに置きます。
オペレーティングシステムによっては
Emacsはキーワード@code{static}を空のマクロと定義することもあるので、
これは必要なことなのです。
(このような定義を使うのは、そのようなシステムは、
初期化構文があろうとなかろうと静的と宣言した変数を
ダンプ後には読み出し専用にしてしまうからである。)
@c Defining the C function is not enough to make a Lisp primitive
@c available; you must also create the Lisp symbol for the primitive and
@c store a suitable subr object in its function cell. The code looks like
@c this:
Cの関数を定義しただけではLisp基本関数としては使えません。
基本関数に対するLispシンボルを作成し、
その関数セルに適切なsubrオブジェクトを保存する必要があります。
そのコードはつぎのようになります。
@example
defsubr (&@var{subr-structure-name});
@end example
@noindent
@c Here @var{subr-structure-name} is the name you used as the third
@c argument to @code{DEFUN}.
ここで、@var{subr-structure-name}は@code{DEFUN}の第3引数に使った名前です。
@c If you add a new primitive to a file that already has Lisp primitives
@c defined in it, find the function (near the end of the file) named
@c @code{syms_of_@var{something}}, and add the call to @code{defsubr}
@c there. If the file doesn't have this function, or if you create a new
@c file, add to it a @code{syms_of_@var{filename}} (e.g.,
@c @code{syms_of_myfile}). Then find the spot in @file{emacs.c} where all
@c of these functions are called, and add a call to
@c @code{syms_of_@var{filename}} there.
すでにLisp基本関数が定義されているファイルに新たな基本関数を追加するときには、
(ファイルの末尾近くで)@code{syms_of_@var{something}}という名前の関数を探し、
それに@code{defsubr}の呼び出しを追加します。
ファイルにこの関数がなかったり、新たなファイルを作成した場合には、
@code{syms_of_@var{filename}}(たとえば@code{syms_of_myfile})を追加します。
そして、ファイル@file{emacs.c}でこれらの関数を呼び出している箇所を探して、
そこに@code{syms_of_@var{filename}}の呼び出しを追加します。
@c The function @code{syms_of_@var{filename}} is also the place to define
@c any C variables that are to be visible as Lisp variables.
@c @code{DEFVAR_LISP} makes a C variable of type @code{Lisp_Object} visible
@c in Lisp. @code{DEFVAR_INT} makes a C variable of type @code{int}
@c visible in Lisp with a value that is always an integer.
@c @code{DEFVAR_BOOL} makes a C variable of type @code{int} visible in Lisp
@c with a value that is either @code{t} or @code{nil}.
関数@code{syms_of_@var{filename}}は、
Lisp変数として見える任意のCの変数を定義する場所でもあります。
@code{DEFVAR_LISP}は、Lispから見える@code{Lisp_Object}型のCの変数を作ります。
@code{DEFVAR_INT}は、Lispからはつねに整数を値として見える
@code{int}型のCの変数を作ります。
@code{DEFVAR_BOOL}は、Lispからは@code{t}か@code{nil}を値として見える
@code{int}型のCの変数を作ります。
@c If you define a file-scope C variable of type @code{Lisp_Object},
@c you must protect it for garbage-collection by calling @code{staticpro}
@c in @code{syms_of_@var{filename}}, like this:
ファイルだけに有効な@code{Lisp_Object}型のCの変数を定義した場合には、
つぎのようにして、@code{syms_of_@var{filename}}の中で@code{staticpro}を
呼び出してその変数をガベッジコレクションから保護する必要があります。
@example
staticpro (&@var{variable});
@end example
@c Here is another example function, with more complicated arguments.
@c This comes from the code in @file{window.c}, and it demonstrates the use
@c of macros and functions to manipulate Lisp objects.
つぎは、少々複雑な引数を取る別の関数の例です。
これは@file{window.c}から取ったもので、
マクロとLispオブジェクトを操作する関数の使い方を例示します。
@smallexample
@group
DEFUN ("coordinates-in-window-p", Fcoordinates_in_window_p,
Scoordinates_in_window_p, 2, 2,
"xSpecify coordinate pair: \nXExpression which evals to window: ",
"Return non-nil if COORDINATES is in WINDOW.\n\
COORDINATES is a cons of the form (X . Y), X and Y being distances\n\
...
@end group
@group
If they are on the border between WINDOW and its right sibling,\n\
`vertical-line' is returned.")
(coordinates, window)
register Lisp_Object coordinates, window;
@{