Skip to content

Instantly share code, notes, and snippets.

@fukusaka
Created May 12, 2010 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fukusaka/398756 to your computer and use it in GitHub Desktop.
Save fukusaka/398756 to your computer and use it in GitHub Desktop.
% Reference Card for GNU Emacs
% Copyright (C) 1987, 1993, 1996, 1997, 2001, 2002, 2003, 2004, 2005,
% 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
% Author: Stephen Gildea <gildea@stop.mail-abuse.org>
% This file is part of GNU Emacs.
% GNU Emacs is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
% GNU Emacs is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
% You should have received a copy of the GNU General Public License
% along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
% This file is intended to be processed by plain TeX (TeX82).
%
% The final reference card has six columns, three on each side.
% This file can be used to produce it in any of three ways:
% 1 column per page
% produces six separate pages, each of which needs to be reduced to 80%.
% This gives the best resolution.
% 2 columns per page
% produces three already-reduced pages.
% You will still need to cut and paste.
% 3 columns per page
% produces two pages which must be printed sideways to make a
% ready-to-use 8.5 x 11 inch reference card.
% For this you need a dvi device driver that can print sideways.
% Which mode to use is controlled by setting \columnsperpage.
%
% To compile and print this document:
% tex refcard.tex
% dvips -t landscape refcard.dvi
%
% Thanks to Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik
% for their many good ideas.
%**start of header
\newcount\columnsperpage
\newcount\letterpaper
% This file can be printed with 1, 2, or 3 columns per page.
% Specify how many you want here.
\columnsperpage=3
% Set letterpaper to 0 for A4 paper, 1 for letter (US) paper. Useful
% only when columnsperpage is 2 or 3.
\letterpaper=0
% PDF output layout. 0 for A4, 1 for letter (US), a `l' is added for
% a landscape layout.
\input pdflayout.sty
\pdflayout=(0l)
% Nothing else needs to be changed below this line.
\def\versionemacs{23} % version of Emacs this is for
\def\year{2010} % copyright year
% 日本語版
% ftp://ftp.ki.nu/pub/emacs-20/refcard/refcardja.tex から派生
\def\versionnumberja{2006/01/24}
\def\shortcopyrightnotice{\vskip 1ex plus 2 fill
\centerline{\small \copyright\ \year\ Free Software Foundation, Inc.
Permissions on back.}}
\def\shortcopyrightnoticeja{\vskip 1ex plus 2 fill
\centerline{\small (based on (日本語版) \versionnumberja{} makoto@ki.nu)}}
\def\copyrightnotice{
\vskip 1ex plus 2 fill\begingroup\small
\centerline{Copyright \copyright\ \year\ Free Software Foundation, Inc.}
\centerline{For GNU Emacs version \versionemacs}
\centerline{Designed by Stephen Gildea}
Permission is granted to make and distribute modified or unmodified
copies of this card provided the copyright notice and this permission
notice are preserved on all copies.
For copies of the GNU Emacs manual, see:
{\tt http://www.gnu.org/software/emacs/\#Manuals}
\endgroup}
% make \bye not \outer so that the \def\bye in the \else clause below
% can be scanned without complaint.
\def\bye{\par\vfill\supereject\end}
\newdimen\intercolumnskip %horizontal space between columns
\newbox\columna %boxes to hold columns already built
\newbox\columnb
\def\ncolumns{\the\columnsperpage}
\message{[\ncolumns\space
column\if 1\ncolumns\else s\fi\space per page]}
\def\scaledmag#1{ scaled \magstep #1}
% This multi-way format was designed by Stephen Gildea October 1986.
% Note that the 1-column format is fontfamily-independent.
\if 1\ncolumns %one-column format uses normal size
\hsize 4in
\vsize 10in
\voffset -.7in
\font\titlefont=\fontname\tenbf \scaledmag3
\font\headingfont=\fontname\tenbf \scaledmag2
\font\headingfontj=goth10 \scaledmag2
\font\smallfont=\fontname\sevenrm
\font\smallfontj=min7
\font\smallsy=\fontname\sevensy
\footline{\hss\folio}
\def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}}
\else %2 or 3 columns uses prereduced size
\hsize 3.2in
\if 1\the\letterpaper
\vsize 7.95in
\else
\vsize 7.65in
\fi
\hoffset -.75in
\voffset -.745in
\font\titlefont=cmbx10 \scaledmag2
\font\headingfont=cmbx10 \scaledmag1
\font\headingfontj=goth10 \scaledmag1
\font\smallfont=cmr6
\font\smallfontj=min6
\font\smallsy=cmsy6
\font\eightrm=cmr8
\font\eightbf=cmbx8
\font\eightit=cmti8
\font\eighttt=cmtt8
\font\eightmi=cmmi8
\font\eightsy=cmsy8
\font\eightmin=min8
\textfont0=\eightrm
\textfont1=\eightmi
\textfont2=\eightsy
\def\rm{\eightrm\eightmin}
\def\bf{\eightbf\eightmin}
\def\it{\eightit\eightmin}
\def\tt{\eighttt\eightmin}
\if 1\the\letterpaper
\normalbaselineskip=.8\normalbaselineskip
\else
\normalbaselineskip=.7\normalbaselineskip
\fi
\normallineskip=.8\normallineskip
\normallineskiplimit=.8\normallineskiplimit
\normalbaselines\rm %make definitions take effect
\if 2\ncolumns
\let\maxcolumn=b
\footline{\hss\rm\folio\hss}
\def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}}
\else \if 3\ncolumns
\let\maxcolumn=c
\nopagenumbers
\else
\errhelp{You must set \columnsperpage equal to 1, 2, or 3.}
\errmessage{Illegal number of columns per page}
\fi\fi
\intercolumnskip=.46in
\def\abc{a}
\output={% %see The TeXbook page 257
% This next line is useful when designing the layout.
%\immediate\write16{Column \folio\abc\space starts with \firstmark}
\if \maxcolumn\abc \multicolumnformat \global\def\abc{a}
\else\if a\abc
\global\setbox\columna\columnbox \global\def\abc{b}
%% in case we never use \columnb (two-column mode)
\global\setbox\columnb\hbox to -\intercolumnskip{}
\else
\global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi}
\def\multicolumnformat{\shipout\vbox{\makeheadline
\hbox{\box\columna\hskip\intercolumnskip
\box\columnb\hskip\intercolumnskip\columnbox}
\makefootline}\advancepageno}
\def\columnbox{\leftline{\pagebody}}
\def\bye{\par\vfill\supereject
\if a\abc \else\null\vfill\eject\fi
\if a\abc \else\null\vfill\eject\fi
\end}
\fi
% we won't be using math mode much, so redefine some of the characters
% we might want to talk about
\catcode`\^=12
\catcode`\_=12
\chardef\\=`\\
\chardef\{=`\{
\chardef\}=`\}
\hyphenation{mini-buf-fer}
\parindent 0pt
\parskip 1ex plus .5ex minus .5ex
\def\small{\smallfont\smallfontj\textfont2=\smallsy\baselineskip=.8\baselineskip}
% newcolumn - force a new column. Use sparingly, probably only for
% the first column of a page, which should have a title anyway.
\outer\def\newcolumn{\vfill\eject}
% title - page title. Argument is title text.
\outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex}
% section - new major section. Argument is section name.
\outer\def\section#1{\par\filbreak
\vskip 3ex plus 2ex minus 2ex {\headingfont \headingfontj #1}\mark{#1}%
\vskip 2ex plus 1ex minus 1.5ex}
\newdimen\keyindent
% beginindentedkeys...endindentedkeys - key definitions will be
% indented, but running text, typically used as headings to group
% definitions, will not.
\def\beginindentedkeys{\keyindent=1em}
\def\endindentedkeys{\keyindent=0em}
\endindentedkeys
% paralign - begin paragraph containing an alignment.
% If an \halign is entered while in vertical mode, a parskip is never
% inserted. Using \paralign instead of \halign solves this problem.
\def\paralign{\vskip\parskip\halign}
% \<...> - surrounds a variable name in a code example
\def\<#1>{{\it #1\/}}
% kbd - argument is characters typed literally. Like the Texinfo command.
\def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows
% beginexample...endexample - surrounds literal text, such a code example.
% typeset in a typewriter font with line breaks preserved
\def\beginexample{\par\leavevmode\begingroup
\obeylines\obeyspaces\parskip0pt\tt}
{\obeyspaces\global\let =\ }
\def\endexample{\endgroup}
% key - definition of a key.
% \key{description of key}{key-name}
% prints the description left-justified, and the key-name in a \kbd
% form near the right margin.
\def\key#1#2{\leavevmode\hbox to \hsize{\vtop
{\hsize=.75\hsize\rightskip=1em
\hskip\keyindent\relax#1}%
\kbd{#2}\hfil}}
\newbox\metaxbox
\setbox\metaxbox\hbox{\kbd{M-x }}
\newdimen\metaxwidth
\metaxwidth=\wd\metaxbox
% metax - definition of a M-x command.
% \metax{description of command}{M-x command-name}
% Tries to justify the beginning of the command name at the same place
% as \key starts the key name. (The "M-x " sticks out to the left.)
\def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize
{\hskip\keyindent\relax#1\hfil}%
\hskip -\metaxwidth minus 1fil
\kbd{#2}\hfil}}
% threecol - like "key" but with two key names.
% for example, one for doing the action backward, and one for forward.
\def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\hfil\quad
&\kbd{#3}\hfil\quad\cr}
% 表記法
%\def\wfile{譜}
\def\wfile{ファイル}
%\def\wbuffer{作業領域}
\def\wbuffer{バッファ}
%\def\wmark{印}
\def\wmark{マーク}
%\def\wpoint{点■}
\def\wpoint{カーソル位置}
%\def\wkey{鍵}
\def\wkey{キー}
%\def\wminbuffer{入力窓}
\def\wminbuffer{ミニバッファ}
%\def\wkeymacro{鍵盤手続}
\def\wkeymacro{キーボードマクロ}
%\def\wsexp{{\bf S 式}}
\def\wsexp{S式}
%\def\wtag{名札}
\def\wtag{タグ}
\def\wwindow{窓}
%\def\wwindow{ウィンドウ}
%**end of header
\title{GNU Emacs Reference Card}
\centerline{(for version \versionemacs)}
\section{Emacs を開始する}
\metax{GNU Emacs を開始する}{\kbd{emacs} と入力(等) }
\metax{名前を指定して編集開始・終了}{→ \wfile の操作 Files}
\section{Emacs を終了する}
\key{Emacs を中断する(X の時はアイコン化)}{C-z}
\key{Emacs を完全に終了する}{C-x C-c}
\section{\wfile の操作 Files }
\key{開く (read)} {C-x C-f}
\key{保存 (save) } {C-x C-s}
\key{{\bf 全て}の\wfile を保存する}{C-x s}
\key{他の\wfile を\wbuffer に読込む(insert) }{C-x i}
\key{別の\wfile を編集開始}{C-x C-v}
\key{名前を付けて保存}{C-x C-w}
\key{版管理(RCS)のための持出し・登録}{C-x C-q}
\section{説明を読む Getting Help}
\kbd{C-h} (か \kbd{F1}) を入力してその説明に従う。
初めて使うのなら、\kbd{C-h t} と入力して、
説明入門編({\bf tutorial})を開始する
\key{説明の\wwindow を消す}{C-x 1}
\key{説明の次の\wwindow に行く}{C-M-v}
\key{ ... についての説明 (apropos)}{C-h a}
\key{キー → 関数の対応を表示} {C-h k}
\key{関数についての説明} {C-h f}
\key{現在のモードの説明} {C-h m}
\section{問題からの復旧 Error Recovery}
\key{入力・あるいは実行を中断 (abort) } {C-g}
\metax{システム障害で失った\wfile を取戻す} {M-x recover-session}
\key{変更を元に戻す (undo)} {\hss C-x u, C-_ {\rm or} C-/ }
\metax{\wbuffer を編集開始時の状態に戻す} {M-x revert-buffer}
\key{乱れた画面を再描画} {C-l}
\section{順次検索 Incremental Search}
\key{前方検索}{C-s}
\key{後方検索}{C-r}
\key{正規表現で検索}{C-M-s}
\key{正規表現で逆方向検索}{C-M-r}
\key{直前検索一致文字列を選択 prev}{M-p}
\key{次に見つかる検索一致文字列を選択 next}{M-n}
\key{順次検索を終了}{RET}
\key{最終入力文字による移動を取消}{DEL}
\key{検索を中止}{C-g}
検索を繰返すには\kbd{C-s} か \kbd{C-r} を入力するとその向きに続ける。
検索中に \kbd{C-g} を入力すると最後の検索だけを中止する
\shortcopyrightnotice
\section{移動 Motion}
\paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
\threecol{【{\bf 移動の単位}】}{$\leftarrow$ {\bf 戻る}}{{\bf 進む} $\rightarrow$}
\threecol{文字}{C-b}{C-f}
\threecol{単語}{M-b}{M-f}
\threecol{行}{C-p}{C-n}
\threecol{行頭・行末}{C-a}{C-e}
\threecol{文章}{M-a}{M-e}
\threecol{段落}{M-\{}{M-\}}
\threecol{頁}{C-x [}{C-x ]}
\threecol{\wsexp}{C-M-b}{C-M-f}
\threecol{関数}{C-M-a}{C-M-e}
\threecol{\wbuffer の最初・最後}{M-<}{M->}
}
\key{次の画面に移動}{C-v}
\key{前の画面に移動}{M-v}
\key{左に移動}{C-x <}
\key{右に移動}{C-x >}
\key{現在行を画面の中央に表示するように移動}{C-u C-l}
\section{切取と消去 Killing and Deleting}
\paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
\threecol{【{\bf 切取・消去の対象}】}
{$\leftarrow$ {\bf 前を}}{{\bf 後を} $\leftarrow$}
\threecol{文字(切取でなく消去)} {DEL}{C-d}
\threecol{単語}{M-DEL}{M-d}
\threecol{行(端まで)}{M-0 C-k}{C-k}
\threecol{文}{C-x DEL}{M-k}
\threecol{\wsexp}{M-- C-M-k}{C-M-k}
}
\key{範囲を切取}{C-w}
\key{範囲を切取保存/({\bf kill ring})に複写}{M-w}
\key{{\it「文字」}まで切取}{M-z 「文字」}
\key{最後に切取ったものを貼付} {C-y}
\key{直前の貼付を一つ前の切取保存と取替}{M-y}
(範囲{\bf region} = \wmark と\wpoint の間)
\section{\wmark を付ける Marking }
\key{\wpoint に\wmark mark を付ける}{C-@ {\rm or} C-SPC}
\key{\wmark と\wpoint を交換}{C-x C-x}
\key{\wmark を引数の数の語だけ減らす}{M-@}
\key{段落に\wmark を付ける}{M-h}
\key{頁に\wmark を付ける}{C-x C-p}
\key{\wsexp に\wmark を付ける}{C-M-@}
\key{関数に\wmark を付ける}{C-M-h}
\key{\wbuffer 全体に\wmark を付ける}{C-x h}
\section{対話置換 Query Replace}
\key{対話形式での文字列置換を開始}{M-\%}
\metax{正規表現を使って同じく置換}{M-x query-replace-regexp}
【その後の入力として有効な\wkey は】
\key{一つ置換える。次に行く}{SPC}
\key{一つ置換える。とどまる}{,}
\key{置換えないで次に行く}{DEL}
\key{残りを全て置換えてしまう}{!}
\key{一つ前の置換を元に戻す}{^}
\key{対話置換から抜ける}{RET}
\key{再帰編集に入る。(抜けるには \kbd{C-M-c})}{C-r}
\section{複数\wwindow Multiple Windows}
(左右に二つ書いてある場合、右側は他の枠に作用する)
{\setbox0=\hbox{\kbd{0}}\advance\hsize by 0\wd0
\paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
\threecol{ }{\wwindow に作用}{枠に作用}
\threecol{他の\wwindow を全て消す}{C-x 1\ \ \ \ }{C-x 5 1}
\threecol{上下に二つの\wwindow を開ける}{C-x 2\ \ \ \ }{C-x 5 2}
\threecol{この\wwindow を消す}{C-x 0\ \ \ \ }{C-x 5 0}
}}
\key{左右に二つの\wwindow を開ける}{C-x 3}
\key{他の\wwindow の中を上下に移動する scroll}{C-M-v}
{\setbox0=\hbox{\kbd{0}}\advance\hsize by 2\wd0
\paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
\threecol{\wpoint を他の\wwindow に移動}{C-x o}{C-x 5 o}
\threecol{他の\wwindow の\wbuffer を選択する}{C-x 4 b}{C-x 5 b}
\threecol{他の\wwindow に\wbuffer を表示する}{C-x 4 C-o}{C-x 5 C-o}
\threecol{他の\wwindow で\wfile を開ける}{C-x 4 f}{C-x 5 f}
\threecol{他の\wwindow で\wfile を書込禁止で開ける}{C-x 4 r}{C-x 5 r}
\threecol{他の\wwindow で Dired を開ける}{C-x 4 d}{C-x 5 d}
\threecol{他の\wwindow で\wtag を探す}{C-x 4 .}{C-x 5 .}
}}
\key{\wwindow を上下に大きくする}{C-x ^}
\key{\wwindow の左右を狭くする}{C-x \{}
\key{\wwindow の左右を広くする}{C-x \}}
\section{整形 Formatting}
\key{現在行を段落しする (モードによる)}{TAB}
\key{範囲を段落しする (モードによる)}{C-M-\\}
\key{\wsexp を段落しする (モードによる)}{C-M-q}
\key{範囲を引数だけ必ず段落しする}{C-x TAB}
\key{\wpoint の後に改行を挿入}{C-o}
\key{行の残りを一つの行に下に移動}{C-M-o}
\key{\wpoint の上下の空白行を削除}{C-x C-o}
\key{直前行(引数付で次行)とつないで一行に}{M-^}
\key{\wpoint の両側の全ての空白を削除}{M-\\}
\key{\wpoint の位置にちょうど一つの空白を挿入}{M-SPC}
\key{段落を整形}{M-q}
\key{整形幅 fill column を設定}{C-x f}
\key{先頭文字列 fill-prefix を設定}{C-x .}
\key{face を設定}{M-o}
\section{大小文字変換 Case Change}
\key{単語を大文字にする upper}{M-u}
\key{単語を小文字にする lower }{M-l}
\key{単語の最初の文字を大文字にする Capitalize}{M-c}
\key{範囲を大文字にする}{C-x C-u}
\key{範囲を小文字にする}{C-x C-l}
\section{\wminbuffer The Minibuffer}
\wminbuffer では次の\wkey が使用出来る:
\key{可能な限り補完する}{TAB}
\key{一語だけ補完する}{SPC}
\key{補完した上で実行する}{RET}
\key{補完の候補を表示}{?}
\key{直前の入力を取戻す}{M-p}
\key{何を入力するか、或いは初期値を取戻す}{M-n}
\key{正規表現で履歴を後方検索}{M-r}
\key{正規表現で履歴を前方検索}{M-s}
\key{操作を中止}{C-g}
\kbd{C-x ESC ESC} と入力すると、直前の操作を呼出して編集(変更)
出来る。
\kbd{F10} を使えば、メニュー棒を表示する
\newcolumn
\title{GNU Emacs Reference Card}
\section{\wbuffer Buffers}
\key{他の\wbuffer を(名前で)呼出す}{C-x b}
\key{全ての\wbuffer 名を表示する}{C-x C-b}
\key{いまの\wbuffer を捨てる}{C-x k}
\section{前後の入替 Transposing}
\key{{\bf 文字}を入替える}{C-t}
\key{{\bf 単語}を入替える}{M-t}
\key{{\bf 行}を入替える}{C-x C-t}
\key{{\bf \wsexp}を入替える}{C-M-t}
\section{スペルチェック Spelling Check}
\key{現在の単語を調べる}{M-\$}
\metax{範囲にある全ての単語を調べる}{M-x ispell-region}
\metax{\wbuffer の全ての単語を調べる}{M-x ispell-buffer}
\section{\wtag Tags}
\key{\wtag 定義を探す}{M-.}
\key{次の\wtag を探す}{C-u M-.}
\metax{新しい\wtag 定義の\wfile を指定}{M-x visit-tags-table}
\metax{\wtag 表の全ての\wfile を正規表現検索}{M-x tags-search}
\metax{全ての\wfile で対話置換を実行}{M-x tags-query-replace}
\key{\wtag 検索や対話置換を続ける}{M-,}
\section{シェル Shells}
\key{シェル操作を実行する}{M-!}
\key{シェル操作を範囲に対して実行}{M-|}
\key{範囲をシェル操作でフィルタにかける}{C-u M-|}
\key{シェル\wwindow \kbd{*shell*} を開け対話を開始する}{M-x shell}
\section{長方形 Rectangles}
\key{長方形をレジスタに写す}{C-x r r}
\key{長方形を切取る}{C-x r k}
\key{長方形を貼付ける}{C-x r y}
\key{長方形を挿入(現在文字を右にずらす)}{C-x r o}
\key{長方形領域を空白にする}{C-x r c}
\key{長方形領域の各行に同じ文字列を挿入}{C-x r t}
\section{単語登録 Abbrevs}
\key{全モード用登録を追加}{C-x a g}
\key{モード限定登録を追加}{C-x a l}
\key{この登録に全モード定義を追加}{C-x a i g}
\key{この登録にモード限定定義を追加}{C-x a i l}
\key{明示的に登録を展開}{C-x a e}
\key{直前の単語を動的に展開}{M-/}
\section{正規表現 Regular Expressions}
\key{改行を除く全ての一文字に一致}{. {\rm(dot)}}
\key{無か一つ以上の繰返に一致}{*}
\key{一つ以上の繰返に一致}{+}
\key{無か一つだけの繰返}{?}
\key{正規表現で使う文字{\it c\/}をそのまま使う時}{\\{\it c}}
\key{「または」(``or'')演算子}{\\|}
\key{グループ化、算術かっこ}{\\( {\rm$\ldots$} \\)}
\key{{\it n\/}番目のグループに一致した文字列と同じもの}{\\{\it n}}
\key{単語の区切}{\\b}
\key{単語の区切でない}{\\B}
\paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
\threecol{【一致するもの】}{{\bf 開始に一致}}{{\bf 終了に一致}}
\threecol{行}{^}{\$}
%%% $}
\threecol{単語}{\\<}{\\>}
\threecol{\wbuffer }{\\`}{\\'}
\threecol{【文字の種類】}{{\bf それらに一致}}{{\bf それら以外に一致}}
\threecol{明示的に指定}{[ {\rm$\ldots$} ]}{[^ {\rm$\ldots$} ]}
\threecol{単語形式}{\\w}{\\W}
\threecol{{\it c}という形式の文字}{\\s{\it c}}{\\S{\it c}}
}
\section{国際文字集合}
\metax{第一言語を指定}{C-x RET l}
\metax{全ての入力方法を表示}{M-x list-input-methods}
\key{入力方法の入切}{C-\\}
\key{次の操作の coding system を指定}{C-x RET c}
\metax{全ての coding systems を表示}{M-x list-coding-systems}
\metax{coding system の先頭に追加}{M-x prefer-coding-system}
\section{情報 Info}
\key{情報 (Info) を開始する}{C-h i}
\key{指定した関数・変数の情報を探す}{C-h S}
\beginindentedkeys
【節 node の中での移動】
\key{先に進む}{SPC}
\key{前に戻る}{DEL}
\key{節の最初に行く}{. {\rm (dot)}}
【節と節を行き来する】
\key{次の節 next}{n}
\key{前の節 previous}{p}
\key{一つ上に戻る up}{u}
\key{項目を名前で選ぶ menu}{m}
\key{{\it n\/}(1--9) 番目の項目を選ぶ }{{\it n}}
\key{相互参照 cross reference に従う (\kbd{l}で戻る)}{f}
\key{最後に見た節に戻る last}{l}
\key{案内節 directory node に戻る}{d}
\key{個々の情報の最上位に移動 top}{t}
\key{名前で指定して任意節に移動 go}{g}
【その他】
\key{説明入門編{\bf tutorial}を開始}{h}
\key{インデックスから選択して移動}{i}
\key{節を正規表現で検索}{s}
\key{情報 Info を終了}{q}
\endindentedkeys
\shortcopyrightnoticeja
\section{一文字変数(レジスタ) Registers}
\key{範囲をレジスタに保存}{C-x r s}
\key{レジスタ内容を\wbuffer に挿入}{C-x r i}
\key{\wpoint をレジスタに保存}{C-x r SPC}
\key{レジスタに保存してある値(位置)に移動}{C-x r j}
\section{\wkeymacro Keyboard Macros}
\key{\wkeymacro の登録を開始}{C-x (}
\key{\wkeymacro の登録を終了}{C-x )}
\key{最後に登録した\wkeymacro を実行}{C-x e}
\key{最後に登録した\wkeymacro に追加}{C-u C-x (}
\metax{最後の登録に名前を付ける}{M-x name-last-kbd-macro}
\metax{Lisp 定義形式で\wbuffer に挿入}{M-x insert-kbd-macro}
\section{Emacs Lisp の取扱い操作}
\key{\wpoint の前までの {\bf \wsexp}を評価する}{C-x C-e}
\key{\wpoint の {\bf defun}を評価する}{C-M-x}
\metax{範囲を評価する}{M-x eval-region}
\key{入力\wwindow で式を評価する}{M-:}
\metax{load-pathから\wfile を読む}{M-x load-library}
\section{簡単な個人環境設定}
\metax{変数とフェース faces の設定}{M-x customize}
% The intended audience here is the person who wants to make simple
% customizations and knows Lisp syntax.
【全体に有効な\wkey の割当を Emacs Lisp で設定する例】
\beginexample%
(global-set-key (kbd "C-c g") 'search-forward)
(global-set-key (kbd "M-\#") 'query-replace-regexp)
\endexample
\section{コマンドの書き方}
\beginexample%
(defun \<操作名> (\<引数>)
"\<説明>"
(interactive "\<型>")
\<本体>)
\endexample
【例】
\beginexample%
(defun this-line-to-top-of-window (line)
"行を画面の一番上に表示するように移動。
引数付の時は引数の行に点を設定"
(interactive "P")
(recenter (if (null line)
0
(prefix-numeric-value line))))
\endexample
ここで、
\kbd{interactive} の型とはどのように引数を取るかを表わす。
\kbd{C-h f interactive} とすれば詳しい説明が得られる。
\copyrightnotice
\bye
% Local variables:
% compile-command: "pdftex refcard"
% End:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment