[表紙] | [目次] | [索引] | [検索] [上端 / 下端] [?] |
This master menu first lists each chapter and index; then it lists every node in every chapter.
訳者まえがき はじめに What to look for. 1. リスト処理 What is Lisp? 2. 評価の練習 Running several programs. 3. 関数定義の書き方 How to write function definitions. 4. バッファ関連の関数 Exploring a few buffer-related functions. 5. 多少複雑な関数 A few, even more complex functions. 6. ナロイングとワイドニング Restricting your and Emacs attention to a region. 7. 基本関数 car
、cdr
、cons
Fundamental functions in Lisp. 8. テキストのカットと保存 Removing text and saving it. 9. リストの実装方法 How lists are implemented in the computer. 10. テキストの取り出し方 Pasting stored text. 11. ループと再帰 How to repeat a process. 12. 正規表現の探索 Regular expression searches. 13. 数え上げ:繰り返しと正規表現 A review of repetition and regexps. 14. defun
内の単語の数え上げCounting words in a defun
.15. グラフの準備 A prototype graph printing function. 16. 個人用ファイル`.emacs' How to write a `.emacs' file. 17. デバッグ How to run the Emacs Lisp debuggers. 18. 結 論 Now you have the basics. A. 関数 the-the
An appendix: how to find reduplicated words. B. キルリングの扱い方 An appendix: how the kill ring works. C. ラベル付きグラフ How to create a graph with labelled axes. 索引 筆者について
-- The Detailed Node Listing ---
Preface
On Reading this Text Read, gain familiarity, pick up habits.... 対象とする読者 For whom this is written. Lispの歴史 初心者へ一言 You can read this as a novice. 謝 辞
List Processing
1.1 Lispのリスト What are lists? 1.2 プログラムの実行 Any list in Lisp is a program ready to run. 1.3 エラーメッセージの生成 Generating an error message. 1.4 シンボル名と関数定義 Names of symbols and function definitions. 1.5 Lispインタープリタ What the Lisp interpreter does. 1.6 評 価 Running a program. 1.7 変 数 Returning a value from a variable. 1.8 引 数 Passing information to a function. 1.9 変数への値の設定 Setting the value of a variable. 1.10 まとめ The major points. 1.11 演習問題
Lisp Lists
1.1.1 Lispのアトム Elemental entities. 1.1.2 リスト内の空白 Formating lists to be readable. 1.1.3 GNU Emacsのリスト入力補佐機能 How GNU Emacs helps you type lists.
The Lisp Interpreter
1.5.1 バイトコンパイル Specially processing code for speed.
Evaluation
1.6.1 内側のリストの評価 Lists within lists...
Variables
1.7.1 値のないシンボルに対するエラーメッセージ The error message for a symbol without a value.
Arguments
1.8.1 引数のデータ型 Types of data passed to a function. 1.8.2 引数としての変数やリストの値 An argument can be the value of a variable or list. 1.8.3 可変個数の引数 Some functions may take a variable number of arguments. 1.8.4 引数に誤った型のオブジェクトを指定 Passing an argument of the wrong type to a function. 1.8.5 関数 message
A useful function for sending messages.
Setting the Value of a Variable
1.9.1 set
の使い方Setting values. 1.9.2 setq
の使い方Setting a quoted value. 1.9.3 数え上げ Using setq
to count.
Practicing Evaluation
How to Evaluate Typing editing commands or C-x C-e causes evaluation. 2.1 バッファ名 Buffers and files are different. 2.2 バッファの取得 Getting a buffer itself, not merely its name. 2.3 バッファの切り替え How to change to another buffer. 2.4 バッファサイズとポイントの位置 Where point is located and the size of the buffer. 2.5 演習問題
How To Write Function Definitions
An Aside about Primitive Functions Some functions are written in C. 3.1 スペシャルフォーム defun
The defun
special form.3.2 関数定義のインストール Install a Function Definition. 3.3 関数を対話的にする Making a function interactive. 3.4 interactive
の他のオプションDifferent options for interactive
.3.5 コードの恒久的インストール Installing code permanently. 3.6 let
Creating and initializing local variables. 3.7 スペシャルフォーム if
What if? 3.8 If--then--else式 If--then--else expressions. 3.9 Lispの真偽値 What Lisp considers false and true. 3.10 save-excursion
Keeping track of point, mark, and buffer. 3.11 復 習 3.12 演習問題
Install a Function Definition
3.2.1 関数定義の変更 How to change a function definition.
Make a Function Interactive
3.3.1 対話的 multiply-by-seven
The interactive version.
let
3.6.1 let
式の構造3.6.2 let
式の例3.6.3 let
式の非初期化変数
Theif
Special Form
3.7.1 関数 type-of-animal
の詳細An example of an if
expression.
save-excursion
3.10.1 save-excursion
式の雛型One slot to fill in.
A Few Buffer--Related Functions
4.1 詳しい情報を得る How to find more information. 4.2 beginning-of-buffer
の簡略した定義Shows goto-char
,point-min
, andpush-mark
.
4.3 mark-whole-buffer
の定義Almost the same as beginning-of-buffer
.4.4 append-to-buffer
の定義Uses save-excursion
andinsert-buffer-substring
.
4.5 復 習 Review. 4.6 演習問題
The Definition ofmark-whole-buffer
4.3.1 mark-whole-buffer
の本体Only three lines of code.
The Definition ofappend-to-buffer
4.4.1 append-to-buffer
のinteractive
式A two part interactive expression. 4.4.2 append-to-buffer
の本体Incorporates a let
expression.4.4.3 append-to-buffer
のsave-excursion
How the save-excursion
works.
A Few More Complex Functions
5.1 copy-to-buffer
の定義With set-buffer
,get-buffer-create
.5.2 insert-buffer
の定義Read-only, and with or
.5.3 beginning-of-buffer
の完全な定義Shows goto-char
,point-min
, andpush-mark
.
5.4 復 習 5.5 &optional
引数の演習問題
The Definition ofinsert-buffer
5.2.1 insert-buffer
のinteractive
式A read-only situation. 5.2.2 関数 insert-buffer
の本体The body has an or
and alet
.5.2.3 or
のかわりにif
を使ったinsert-buffer
Using an if
instead of anor
.5.2.4 or
の本体How the or
expression works.5.2.5 insert-buffer
のlet
式Two save-excursion
expressions.
The Interactive Expression ininsert-buffer
読み出し専用バッファ interactive
式の`b'
Complete Definition ofbeginning-of-buffer
5.3.1 オプションの引数 5.3.2 引数を指定した beginning-of-buffer
Example with optional argument. 5.3.3 beginning-of-buffer
の完全なコード
beginning-of-buffer
with an Argument
大きなバッファでの動作 Division and multiplication in a large buffer. 小さなバッファでの動作 Functions embedded in parentheses.
Narrowing and Widening
The Advantages of Narrowing 6.1 スペシャルフォーム save-restriction
The save-restriction
special form.6.2 what-line
The number of the line that point is on. 6.3 ナロイングの演習問題
car
,cdr
,cons
: Fundamental Functions
Strange Names An historical aside: why the strange names? 7.1 car
とcdr
Functions for extracting part of a list. 7.2 cons
Constructing a list. 7.3 nthcdr
Calling cdr
repeatedly.7.4 setcar
Changing the first element of a list. 7.5 setcdr
Changing the rest of a list. 7.6 演習問題
cons
7.2.1 リストの長さ: length
How to find the length of a list.
Cutting and Storing Text
Storing Text in a List Text is stored in a list. 8.1 zap-to-char
Cutting out text up to a character. 8.2 kill-region
Cutting text out of a region. 8.3 delete-region
:Cへ回り道A digression into C. 8.4 defvar
による変数の初期化How to give a variable an initial value. 8.5 copy-region-as-kill
A definition for copying text. 8.6 復 習 8.7 探索の演習問題
zap-to-char
8.1.1 interactive
式A three part interactive expression. 8.1.2 zap-to-char
の本体A short overview. 8.1.3 関数 search-forward
How to search for a string. 8.1.4 関数 progn
The progn
function.8.1.5 zap-to-char
のまとめUsing point
andsearch-forward
.8.1.6 第18版の実装 The version 18 implementation.
The Version 18 Implementation
progn
式の本体The body of the progn
expression
copy-region-as-kill
8.5.1 copy-region-as-kill
の本体The body of copy-region-as-kill
The Body ofcopy-region-as-kill
関数 kill-append
The kill-append
functioncopy-region-as-kill
の偽の場合の動作The else-part of copy-region-as-kill
How Lists are Implemented
9.1 演習問題
Yanking Text Back
10.1 キルリングの概要 The kill ring is a list. 10.2 変数 kill-ring-yank-pointer
The kill-ring-yank-pointer
variable.10.3 yank
とnthcdr
の演習問題
Loops and Recursion
11.1 while
Causing a stretch of code to repeat. 11.2 再 帰 Causing a function to call itself. 11.3 ループの演習問題
while
11.1.1 while
ループとリストA while
loop that uses a list.11.1.2 例: print-elements-of-list
Uses while
,car
,cdr
.11.1.3 増加カウンタによるループ A loop with an incrementing counter. 11.1.4 減少カウンタによるループ A loop with a decrementing counter.
A Loop with an Incrementing Counter
増加カウンタの例 Counting pebbles in a triangle. 関数定義の各部分 The parts of the function definition. 関数定義をまとめる Putting the function definition together.
Loop with a Decrementing Counter
減少カウンタの例 More pebbles on the beach. 関数の各部分 The parts of the function definition. 関数定義をまとめる Putting the function definition together.
Recursion
11.2.1 リストについての再帰 Using a list as the test whether to recurse. 11.2.2 カウンタの代用としての再帰 Replacing a while
loop with recursion.11.2.3 cond
を用いた再帰の例Recursion example with a different conditional.
Recursion in Place of a Counter
引数が3の場合
Regular Expression Searches
12.1 sentence-end
のための正規表現The regular expression for sentence-end
.12.2 関数 re-search-forward
Very similar to search-forward
.12.3 forward-sentence
A straightforward example of regexp search. 12.4 forward-paragraph
:関数の宝庫A somewhat complex example. 12.5 専用タグファイルの作成方法 How to create your own `TAGS' table. 12.6 復 習 12.7 re-search-forward
の演習問題
forward-sentence
while
ループTwo while
loops.正規表現の探索 A regular expression search.
forward-paragraph
: a Goldmine of Functions
let*
式The let*
expression.先へ進める while
ループThe forward motion while
loop.段落のあいだ Movement between paragraphs. 段落の中 Movement within paragraphs. 詰め込み接頭辞なし When there is no fill prefix. 詰め込み接頭辞あり When there is a fill prefix. まとめ Summary of forward-paragraph
code.
Counting: Repetition and Regexps
Counting words Emacs lacks a word count command. 13.1 関数 count-words-region
Use a regexp, but find a problem. 13.2 再帰による単語の数え上げ Start with case of no words in region. 13.3 演習問題:句読点の数え上げ
Thecount-words-region
Function
13.1.1 count-words-region
の空白に関するバグThe Whitespace Bug in count-words-region
Counting Words in adefun
Divide and Conquer Split a daunting project into parts. 14.1 何を数えるか? What to count? 14.2 単語やシンボルを構成するものは何か? What constitutes a word or symbol? 14.3 関数 count-words-in-defun
Very like count-words
.14.5 ファイルを探す Do you want to look at a file? 14.6 lengths-list-file
の詳細A list of the lengths of many definitions. 14.7 別のファイルの defuns
内の単語の数え上げCounting in definitions in different files. 14.8 別のファイルの再帰による単語の数え上げ Recursively counting in different files. 14.9 グラフ表示用データの準備 Prepare the data for display in a graph.
Count Words indefuns
in Different Files
14.7.1 関数 append
Attaching one list to another.
Prepare the Data for Display in a Graph
14.9.1 リストのソート(整列) Sorting lists. 14.9.2 ファイルのリストの作成 Making a list of files.
Readying a Graph
Printing the Columns of a Graph How to print individual columns. 15.1 関数 graph-body-print
How to print the body of a graph. 15.2 関数 recursive-graph-body-print
15.3 軸表示の必要性 15.4 演習問題
Your `.emacs' File
Emacs's Default Configuration Emacs has sensible defaults. 16.1 サイト全体の初期化ファイル You can write site-wide init files. 16.2 一回だけの作業用の変数の設定 How to set some variables for a session. 16.3 ファイル`.emacs'入門 How to write a .emacs file
.16.4 TextモードとAuto Fillモード Automatically wrap lines. 16.5 メールの別名 Use abbreviations for email addresses. 16.6 Indent Tabsモード(タブによる字下げ) Don't use tabs with TeX 16.7 キーバインド例 Create some personal keybindings. 16.8 ファイルのロード Load (i.e. evaluate) files automatically. 16.9 オートロード Make functions available. 16.10 簡単な拡張: line-to-top-of-window
Define a function; bind it to a key. 16.11 キーマップ More about key binding. 16.12 X11の色指定 Colors in version 19 in X. 16.13 第19版のその他 Automatically resize minibuffer, and more. 16.14 モード行の変更 How to customize your mode line.
Debugging
17.1 debug
How to use the built-in debugger. 17.2 debug-on-entry
Start debugging when you call a function. 17.3 debug-on-quit
と(debug)
Start debugging when you quit with C-g. 17.4 ソースレベルのデバッガ edebug
How to use Edebug, a source level debugger. 17.5 デバッグの演習問題
Handling the Kill Ring
B.1 関数 rotate-yank-pointer
Move a pointer along a list and around. B.2 yank
Paste a copy of a clipped element. B.3 yank-pop
Insert first element pointed to.
Therotate-yank-pointer
Function
B.1.1 rotate-yank-pointer
の本体The Body of rotate-yank-pointer
.
The Body ofrotate-yank-pointer
if
式の偽の場合の動作The else-part of the if
expression.剰余関数 %
The remainder, %
, function.rotate-yank-pointer
における%
の利用Using %
inrotate-yank-pointer
.最後の要素を指す Pointing to the last element.
yank
引数の渡し方 Pass the argument to rotate-yank-pointer
.負の引数を渡す Pass a negative argument.
A Graph with Labelled Axes
Labelled Example Graph How a finished graph should look. C.1 print-graph
の変数リストlet
expression inprint-graph
.C.2 関数 print-Y-axis
Print a label for the vertical axis. C.3 関数 print-X-axis
Print a horizontal label. C.4 グラフ全体の表示 The function to print a complete graph.
Theprint-Y-axis
Function
C.2.1 余りの計算 How to compute the remainder of a division. C.2.2 Y軸の要素の作成 Construct a line for the Y axis. C.2.3 Y軸のコラムの作成 Generate a list of Y axis labels. C.2.4 print-Y-axis
の最終版Print a vertical axis, final version.
Theprint-X-axis
Function
C.3.1 X軸の目盛 Create tic marks for the horizontal axis.
Printing the Whole Graph
C.4.1 print-graph
のテストRun a short test. C.4.2 単語やシンボルの個数のグラフ Executing the final code. C.4.3 グラフ The graph itself!
Graphing Numbers of Words and Symbols
lambda
式How to write an anonymous function. 関数 mapcar
Apply a function to elements of a list. 別のバグ ... もっとも潜在的 Yet another ... of a most insidious type.