Comment.
[emacs.git] / etc / refcards / pt-br-refcard.tex
blob33b19216f9b2344fbd5e06fc2a8bee73cf8446c2
1 % Reference Card for GNU Emacs version 22 on Unix systems
2 %**start of header
3 \newcount\columnsperpage
4 \newcount\letterpaper
6 % This file can be printed with 1, 2, or 3 columns per page (see below).
7 % Specify how many you want here.
9 \columnsperpage=3
11 % Set letterpaper to 0 for A4 paper, 1 for letter (US) paper. Useful
12 % only when columnsperpage is 2 or 3.
14 \letterpaper=0
16 % PDF output layout. 0 for A4, 1 for letter (US), a `l' is added for
17 % a landscape layout.
19 \input pdflayout.sty
20 \pdflayout=(0l)
22 % Nothing else needs to be changed below this line.
23 % Copyright (C) 1987, 1993, 1996, 1997, 2002, 2003, 2004,
24 % 2006, 2007, 2008 Free Software Foundation, Inc.
26 % This file is part of GNU Emacs.
28 % GNU Emacs is free software; you can redistribute it and/or modify
29 % it under the terms of the GNU General Public License as published by
30 % the Free Software Foundation; either version 3, or (at your option)
31 % any later version.
33 % GNU Emacs is distributed in the hope that it will be useful,
34 % but WITHOUT ANY WARRANTY; without even the implied warranty of
35 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36 % GNU General Public License for more details.
38 % You should have received a copy of the GNU General Public License
39 % along with GNU Emacs; see the file COPYING. If not, write to
40 % the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
41 % Boston, MA 02110-1301, USA.
43 % This file is intended to be processed by plain TeX (TeX82).
45 % The final reference card has six columns, three on each side.
46 % This file can be used to produce it in any of three ways:
47 % 1 column per page
48 % produces six separate pages, each of which needs to be reduced to 80%.
49 % This gives the best resolution.
50 % 2 columns per page
51 % produces three already-reduced pages.
52 % You will still need to cut and paste.
53 % 3 columns per page
54 % produces two pages which must be printed sideways to make a
55 % ready-to-use 8.5 x 11 inch reference card.
56 % For this you need a dvi device driver that can print sideways.
57 % Which mode to use is controlled by setting \columnsperpage above.
59 % To compile and print this document:
60 % tex refcard.tex
61 % dvips -t landscape refcard.dvi
63 % Author:
64 % Stephen Gildea
65 % Internet: gildea@stop.mail-abuse.org
67 % Thanks to Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik
68 % for their many good ideas.
70 % If there were room, it would be nice to see a section on Dired.
72 % Translated from English to Portuguese by Rodrigo Real, send comments
73 % and suggestions to rreal@ucpel.tche.br. Thanks to Mario Goulart for
74 % the opinions.
77 \def\versionnumber{2.3}
78 \def\versionyear{2006} % latest update
79 \def\versionemacs{22}
80 \def\year{2008} % latest copyright year
82 \def\shortcopyrightnotice{\vskip 1ex plus 2 fill
83 \centerline{\small \copyright\ \year\ Free Software Foundation, Inc.
84 Permissions on back. v\versionnumber}}
86 \def\copyrightnotice{
87 \vskip 1ex plus 2 fill\begingroup\small
88 \centerline{Copyright \copyright\ \year\ Free Software Foundation, Inc.}
89 \centerline{v\versionnumber{} for GNU Emacs version \versionemacs, \versionyear}
90 \centerline{designed by Stephen Gildea}
92 Permission is granted to make and distribute copies of
93 this card provided the copyright notice and this permission notice
94 are preserved on all copies.
96 For copies of the GNU Emacs manual, write to the Free Software
97 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
99 \endgroup}
101 % make \bye not \outer so that the \def\bye in the \else clause below
102 % can be scanned without complaint.
103 \def\bye{\par\vfill\supereject\end}
105 \newdimen\intercolumnskip %horizontal space between columns
106 \newbox\columna %boxes to hold columns already built
107 \newbox\columnb
109 \def\ncolumns{\the\columnsperpage}
111 \message{[\ncolumns\space
112 column\if 1\ncolumns\else s\fi\space per page]}
114 \def\scaledmag#1{ scaled \magstep #1}
116 % This multi-way format was designed by Stephen Gildea October 1986.
117 % Note that the 1-column format is fontfamily-independent.
118 \if 1\ncolumns %one-column format uses normal size
119 \hsize 4in
120 \vsize 10in
121 \voffset -.7in
122 \font\titlefont=\fontname\tenbf \scaledmag3
123 \font\headingfont=\fontname\tenbf \scaledmag2
124 \font\smallfont=\fontname\sevenrm
125 \font\smallsy=\fontname\sevensy
127 \footline{\hss\folio}
128 \def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}}
129 \else %2 or 3 columns uses prereduced size
130 \hsize 3.2in
131 \if 1\the\letterpaper
132 \vsize 7.95in
133 \else
134 \vsize 7.65in
136 \hoffset -.75in
137 \voffset -.745in
138 \font\titlefont=cmbx10 \scaledmag2
139 \font\headingfont=cmbx10 \scaledmag1
140 \font\smallfont=cmr6
141 \font\smallsy=cmsy6
142 \font\eightrm=cmr8
143 \font\eightbf=cmbx8
144 \font\eightit=cmti8
145 \font\eighttt=cmtt8
146 \font\eightmi=cmmi8
147 \font\eightsy=cmsy8
148 \textfont0=\eightrm
149 \textfont1=\eightmi
150 \textfont2=\eightsy
151 \def\rm{\eightrm}
152 \def\bf{\eightbf}
153 \def\it{\eightit}
154 \def\tt{\eighttt}
155 \if 1\the\letterpaper
156 \normalbaselineskip=.8\normalbaselineskip
157 \else
158 \normalbaselineskip=.7\normalbaselineskip
160 \normallineskip=.8\normallineskip
161 \normallineskiplimit=.8\normallineskiplimit
162 \normalbaselines\rm %make definitions take effect
164 \if 2\ncolumns
165 \let\maxcolumn=b
166 \footline{\hss\rm\folio\hss}
167 \def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}}
168 \else \if 3\ncolumns
169 \let\maxcolumn=c
170 \nopagenumbers
171 \else
172 \errhelp{You must set \columnsperpage equal to 1, 2, or 3.}
173 \errmessage{Illegal number of columns per page}
174 \fi\fi
176 %% \intercolumnskip=.46in
177 \intercolumnskip=.65in
178 \def\abc{a}
179 \output={% %see The TeXbook page 257
180 % This next line is useful when designing the layout.
181 %\immediate\write16{Column \folio\abc\space starts with \firstmark}
182 \if \maxcolumn\abc \multicolumnformat \global\def\abc{a}
183 \else\if a\abc
184 \global\setbox\columna\columnbox \global\def\abc{b}
185 %% in case we never use \columnb (two-column mode)
186 \global\setbox\columnb\hbox to -\intercolumnskip{}
187 \else
188 \global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi}
189 \def\multicolumnformat{\shipout\vbox{\makeheadline
190 \hbox{\box\columna\hskip\intercolumnskip
191 \box\columnb\hskip\intercolumnskip\columnbox}
192 \makefootline}\advancepageno}
193 \def\columnbox{\leftline{\pagebody}}
195 \def\bye{\par\vfill\supereject
196 \if a\abc \else\null\vfill\eject\fi
197 \if a\abc \else\null\vfill\eject\fi
198 \end}
201 % we won't be using math mode much, so redefine some of the characters
202 % we might want to talk about
203 \catcode`\^=12
204 \catcode`\_=12
206 \chardef\\=`\\
207 \chardef\{=`\{
208 \chardef\}=`\}
210 \hyphenation{mini-buf-fer}
212 \parindent 0pt
213 \parskip 1ex plus .5ex minus .5ex
215 \def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip}
217 % newcolumn - force a new column. Use sparingly, probably only for
218 % the first column of a page, which should have a title anyway.
219 \outer\def\newcolumn{\vfill\eject}
221 % title - page title. Argument is title text.
222 \outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex}
224 % section - new major section. Argument is section name.
225 \outer\def\section#1{\par\filbreak
226 \vskip 3ex plus 2ex minus 2ex {\headingfont #1}\mark{#1}%
227 \vskip 2ex plus 1ex minus 1.5ex}
229 \newdimen\keyindent
231 % beginindentedkeys...endindentedkeys - key definitions will be
232 % indented, but running text, typically used as headings to group
233 % definitions, will not.
234 \def\beginindentedkeys{\keyindent=1em}
235 \def\endindentedkeys{\keyindent=0em}
236 \endindentedkeys
238 % paralign - begin paragraph containing an alignment.
239 % If an \halign is entered while in vertical mode, a parskip is never
240 % inserted. Using \paralign instead of \halign solves this problem.
241 \def\paralign{\vskip\parskip\halign}
243 % \<...> - surrounds a variable name in a code example
244 \def\<#1>{{\it #1\/}}
246 % kbd - argument is characters typed literally. Like the Texinfo command.
247 \def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows
249 % beginexample...endexample - surrounds literal text, such a code example.
250 % typeset in a typewriter font with line breaks preserved
251 \def\beginexample{\par\leavevmode\begingroup
252 \obeylines\obeyspaces\parskip0pt\tt}
253 {\obeyspaces\global\let =\ }
254 \def\endexample{\endgroup}
256 % key - definition of a key.
257 % \key{description of key}{key-name}
258 % prints the description left-justified, and the key-name in a \kbd
259 % form near the right margin.
260 \def\key#1#2{\leavevmode\hbox to \hsize{\vtop
261 {\hsize=.75\hsize\rightskip=1em
262 \hskip\keyindent\relax#1}\kbd{#2}\hfil}}
264 \newbox\metaxbox
265 \setbox\metaxbox\hbox{\kbd{M-x }}
266 \newdimen\metaxwidth
267 \metaxwidth=\wd\metaxbox
269 % metax - definition of a M-x command.
270 % \metax{description of command}{M-x command-name}
271 % Tries to justify the beginning of the command name at the same place
272 % as \key starts the key name. (The "M-x " sticks out to the left.)
273 \def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize
274 {\hskip\keyindent\relax#1\hfil}%
275 \hskip -\metaxwidth minus 1fil
276 \kbd{#2}\hfil}}
278 % threecol - like "key" but with two key names.
279 % for example, one for doing the action backward, and one for forward.
280 \def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\hfil\quad
281 &\kbd{#3}\hfil\quad\cr}
284 %**end of header
287 \title{GNU Emacs: Cart\~ao de Refer\^encia}
288 \centerline{(para vers\~ao \versionemacs)}
290 \section{Iniciando o Emacs}
292 Para entrar no GNU Emacs, digite: \kbd{emacs}
294 \section{Saindo do Emacs}
296 \key{suspende ou minimiza o Emacs}{C-z}
297 \key{encerra o Emacs}{C-x C-c}
299 \section{Arquivos}
301 \key{{\bf abre} um arquivo}{C-x C-f}
302 \key{{\bf salva} um arquivo em disco}{C-x C-s}
303 \key{salva {\bf todos} arquivos abertos}{C-x s}
304 \key{{\bf insere} outro arquivo neste buffer}{C-x i}
305 \key{substitui este arquivo por outro}{C-x C-v}
306 \key{salva o buffer em um arquivo especificado}{C-x C-w}
307 \key{alterna o estado de somente leitura do buffer}{C-x C-q}
309 \section{Ajuda (Help)}
311 Tecle \kbd{C-h} (ou \kbd{F1}) e siga as instru{\c{c}}{\~o}es.
313 \key{remove a janela de ajuda}{C-x 1}
314 \key{rola a janela de ajuda}{C-M-v}
316 \key{apropos: mostra comandos que casam com a string}{C-h a}
317 \key{descreve fun{\c{c}}{\~a}o associada a teclas}{C-h k}
318 \key{descreve uma fun{\c{c}}{\~a}o}{C-h f}
319 \key{busca informa{\c{c}}{\~o}es espec{\'\i}ficas do modo}{C-h m}
321 \section{Recuperando-se de Erros}
323 \key{{\bf aborta} uma opera{\c{c}}{\~a}o}{C-g}
324 \metax{{\bf recupera} arquivos ap{\'o}s crash}{M-x recover-session}
325 \metax{desfaz uma altera{\c{c}}{\~a}o ({\bf undo})}{C-x u, C-_ {\rm or} C-/}
326 \metax{restaura um buffer para o arquivo}{M-x revert-buffer}
327 \key{redesenha a tela}{C-l}
329 \section{Busca Incremental}
331 \key{busca para frente}{C-s}
332 \key{busca para tr{\'a}s}{C-r}
333 \key{busca por express{\~a}o regular}{C-M-s}
334 \key{busca por express{\~a}o regular para tr{\'a}s}{C-M-r}
336 \key{seleciona a string de pesquisa anterior}{M-p}
337 \key{seleciona a string seguinte de pesquisa}{M-n}
338 \key{sai da busca incremental}{RET}
339 \key{desfaz o efeito do {\'u}ltimo caracter}{DEL}
340 \key{encerra a busca}{C-g}
342 Use \kbd{C-s} ou \kbd{C-r} novamente para repetir a busca.
343 \kbd{C-g} cancela apenas o que ainda n{\~a}o foi feito.
345 \shortcopyrightnotice
347 \section{Movimenta{\c{c}}{\~a}o}
349 \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
350 \threecol{{\bf avan{\c{c}}ar}}{{\bf tr{\'a}s}}{{\bf frente}}
351 \threecol{um caracter}{C-b}{C-f}
352 \threecol{uma palavra}{M-b}{M-f}
353 \threecol{uma linha}{C-p}{C-n}
354 \threecol{para in{\'\i}cio ou fim de linha}{C-a}{C-e}
355 \threecol{senten{\c{c}}a}{M-a}{M-e}
356 \threecol{par{\'a}grafo}{M-\{}{M-\}}
357 \threecol{p{\'a}gina}{C-x [}{C-x ]}
358 \threecol{sexp}{C-M-b}{C-M-f}
359 \threecol{fun{\c{c}}{\~a}o}{C-M-a}{C-M-e}
360 \threecol{para in{\'\i}cio ou fim do buffer}{M-<}{M->}
363 \key{rolar para pr{\'o}xima tela}{C-v}
364 \key{rolar para tela anterior}{M-v}
365 \key{rolar para esquerda}{C-x <}
366 \key{rolar para direita}{C-x >}
367 \key{rolar a linha corrente para o centro da tela}{C-u C-l}
369 \section{Cortando e Apagando}
371 \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
372 \threecol{{\bf entidade a cortar}}{{\bf tr{\'a}s}}{{\bf frente}}
373 \threecol{caracter (apaga, n{\~a}o corta)}{DEL}{C-d}
374 \threecol{palavra}{M-DEL}{M-d}
375 \threecol{linha (at{\'e} o final)}{M-0 C-k}{C-k}
376 \threecol{senten{\c{c}}a}{C-x DEL}{M-k}
377 \threecol{sexp}{M-- C-M-k}{C-M-k}
380 \key{corta {\bf regi{\~a}o}}{C-w}
381 \key{copia a {\bf regi{\~a}o}}{M-w}
382 \key{cortar at{\'e} a pr{\'o}xima ocorr{\^e}ncia de {\it char}}{M-z {\it char}}
384 \key{colar a {\'u}ltima coisa cortada}{C-y}
385 \key{substitui a {\'u}lt. colagem pela c{\'o}pia anterior}{M-y}
387 \section{Marcando}
389 \key{posiciona a marca aqui}{C-@ {\rm or} C-SPC}
390 \key{troca a marca pelo ponto e vice-versa}{C-x C-x}
392 \key{coloca a marca {\it arg\/} {\bf palavras} adiante}{M-@}
393 \key{marca o {\bf par{\'a}grafo}}{M-h}
394 \key{marca a {\bf p{\'a}gina}}{C-x C-p}
395 \key{marca a {\bf sexp}}{C-M-@}
396 \key{marca uma {\bf fun{\c{c}}{\~a}o}}{C-M-h}
397 \key{marca todo {\bf buffer}}{C-x h}
399 \section{Busca e Substitui{\c{c}}{\~a}o}
401 \key{Substitui interativamente uma string}{M-\%}
402 % query-replace-regexp is bound to C-M-% but that can't be typed on
403 % consoles.
404 \metax{usando express{\~a}o regular}{M-x query-replace-regexp}
406 Respostas v{\'a}lidas no modo de busca e substitui{\c{c}}{\~a}o
408 \key{{\bf substitui} esta, e prossegue}{SPC}
409 \key{substitui esta e entrada e n{\~a}o avan{\c{c}}a}{,}
410 \key{{\bf pula} para a pr{\'o}xima sem substituir}{DEL}
411 \key{substitui em todo o texto restante}{!}
412 \key{{\bf volta} para a palavra anterior}{^}
413 \key{{\bf encerra}}{RET}
414 \key{entra na edi{\c{c}}{\~a}o recursiva (\kbd{C-M-c} para sair)}{C-r}
417 \section{M{\'u}ltiplas Janelas}
419 Quando forem mostrados 2 comandos, o segundo tem comportamento similar
420 para frame.
422 {\setbox0=\hbox{\kbd{0}}\advance\hsize by 0\wd0
423 \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
424 \threecol{elimina todas outras janelas}{C-x 1\ \ \ \ }{C-x 5 1}
425 \threecol{divide a janela, acima e abaixo}{C-x 2\ \ \ \ }{C-x 5 2}
426 \threecol{elimina esta janela}{C-x 0\ \ \ \ }{C-x 5 0}
428 \key{divide a janela, lado a lado}{C-x 3}
430 \key{rola a outra janela}{C-M-v}
432 {\setbox0=\hbox{\kbd{0}}\advance\hsize by 2\wd0
433 \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
434 \threecol{leva o cursor para outra janela}{C-x o}{C-x 5 o}
436 \threecol{seleciona um buffer em outra janela}{C-x 4 b}{C-x 5 b}
437 \threecol{mostra um buffer em outra janela}{C-x 4 C-o}{C-x 5 C-o}
438 \threecol{busca um arquivo em outra janela}{C-x 4 f}{C-x 5 f}
439 \threecol{busca arquivo (ro) em outra janela}{C-x 4 r}{C-x 5 r}
440 \threecol{executa Dired em outra janela}{C-x 4 d}{C-x 5 d}
441 \threecol{busca tag em outra janela}{C-x 4 .}{C-x 5 .}
444 \key{aumenta a janela na vertical}{C-x ^}
445 \key{estreita a janela}{C-x \{}
446 \key{alarga a janela}{C-x \}}
448 \section{Formatando}
450 \key{identa a {\bf linha} corrente (modo)}{TAB}
451 \key{identa a {\bf regi{\~a}o} (modo)}{C-M-\\}
452 \key{identa a {\bf sexp} (modo)}{C-M-q}
453 \key{identa regi{\~a}o rigidamente {\it arg\/} colunas}{C-x TAB}
455 \key{insere uma nova linha ap{\'o}s o ponto}{C-o}
456 \key{move o restante da linha para baixo}{C-M-o}
457 \key{apaga linhas em branco em torno do ponto}{C-x C-o}
458 \key{junta a linha com a anterior}{M-^}
459 \key{apaga todos brancos em torno do ponto}{M-\\}
460 \key{insere um espa{\c{c}}o em branco}{M-SPC}
462 \key{preenche o par{\'a}grafo}{M-q}
463 \key{define a coluna limite de preenchimento}{C-x f}
464 \key{define um prefixo para cada linha}{C-x .}
466 \key{formata fonte}{M-o}
468 \section{Mai{\'u}sculas e Min{\'u}sculas}
470 \key{Palavra para mai{\'u}sculas}{M-u}
471 \key{Palavra para min{\'u}sculas}{M-l}
472 \key{Primeira letra mai{\'u}scula (capitalize)}{M-c}
474 \key{Regi{\~a}o para mai{\'u}sculas}{C-x C-u}
475 \key{Regi{\~a}o para min{\'u}sculas}{C-x C-l}
477 \section{O Minibuffer}
479 As teclas seguintes s{\~a}o definidas no minibuffer.
481 \key{complete o m{\'a}ximo possi{\'\i}vel}{TAB}
482 \key{complete at{\'e} uma palavra}{SPC}
483 \key{complete e execute}{RET}
484 \key{mostre as op{\c{c}}{\~o}es para completar}{?}
485 \key{busca a entrada anterior no minibuffer}{M-p}
486 \key{busca a pr{\'o}xima entrada no minibuffer ou o default}{M-n}
487 \key{busca regexp no hist{\'o}rico para tr{\'a}s}{M-r}
488 \key{busca regexp no hist{\'o}rico para frente}{M-s}
489 \key{encerra o comando}{C-g}
491 Tecle \kbd{C-x ESC ESC} para editar e repetir o {\'u}ltimo comando
492 utilizado. Tecle \kbd{F10} para ativar o menu.
494 \newcolumn
495 \title{GNU Emacs: Cart\~ao de Refer\^encia}
496 \centerline{(para vers\~ao \versionemacs)}
498 \section{Buffers}
500 \key{seleciona outro buffer}{C-x b}
501 \key{lista todos buffers}{C-x C-b}
502 \key{mata um buffer}{C-x k}
504 \section{Transposi{\c{c}}{\~a}o}
506 \key{transp{\~o}e {\bf caracteres}}{C-t}
507 \key{transp{\~o}e {\bf palavras}}{M-t}
508 \key{transp{\~o}e {\bf linhas}}{C-x C-t}
509 \key{transp{\~o}e {\bf sexps}}{C-M-t}
511 \section{Verifica{\c{c}}{\~a}o Ortogr{\'a}fica}
513 \key{verifica a palavra corrente}{M-\$}
514 \metax{verifica todas palavras de uma regi{\~a}o}{M-x ispell-region}
515 \metax{verifica todo o buffer}{M-x ispell-buffer}
517 \section{Tags}
519 \key{busca uma tag (uma defini{\c{c}}{\~a}o)}{M-.}
520 \key{encontra a pr{\'o}xima ocorr{\^e}ncia da tag}{C-u M-.}
521 \metax{especifica um novo arquivo de tags}{M-x visit-tags-table}
523 \metax{busca por regexp em todos arquivos}{M-x tags-search}
524 \metax{busca e subst. em todos arquivos}{M-x tags-query-replace}
525 \key{continua a {\'u}ltima busca ou busca e substitui{\c{c}}{\~a}o}{M-,}
527 \section{Shells}
529 \key{executa um comando do shell}{M-!}
530 \key{executa um comando do shell na regi{\~a}o}{M-|}
531 \key{filtra uma regi{\~a}o por um comando do shell}{C-u M-|}
532 \key{inicia um shell na janela \kbd{*shell*}}{M-x shell}
534 \section{Ret{\^a}ngulos}
536 \key{copia o ret{\^a}ngulo para o registrador}{C-x r r}
537 \key{corta o ret{\^a}ngulo}{C-x r k}
538 \key{cola o ret{\^a}ngulo}{C-x r y}
539 \key{abre o ret{\^a}ngulo, move o texto para direita}{C-x r o}
540 \key{troca por espa{\c{c}}os o conte{\'u}do do ret{\^a}ngulo}{C-x r c}
541 \key{antep{\~o}e uma linha a string}{C-x r t}
543 \section{Abreviaturas}
545 \key{adiciona uma abreviatura global}{C-x a g}
546 \key{adiciona abreviatura ao modo local}{C-x a l}
547 \key{adiciona globalmente expans{\~a}o de abrev.}{C-x a i g}
548 \key{adiciona localmente expans{\~a}o de abrev.}{C-x a i l}
549 \key{explicitamente expande uma abrev}{C-x a e}
551 \key{completa com base em palavras anteriores}{M-/}
554 \section{Express{\~o}es Regulares}
556 \key{qualquer caracter exceto nova linha}{. {\rm(dot)}}
557 \key{zero ou mais repeti{\c{c}}{\~o}es}{*}
558 \key{uma ou mais repeti{\c{c}}{\~o}es}{+}
559 \key{zero ou uma repeti{\c{c}}{\~a}o}{?}
560 \key{protege o caracter especial {\it c\/}}{\\{\it c}}
561 \key{(``or'')}{\\|}
562 \key{agrupamento}{\\( {\rm$\ldots$} \\)}
563 \key{mesmo texto que {\it n\/}-{\'e}simo grupo}{\\{\it n}}
564 \key{quebra de palavra}{\\b}
565 \key{sem quebra de palavra}{\\B}
567 \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
568 \threecol{{\bf entidade}}{{\bf casa in{\'\i}cio}}{{\bf casa fim}}
569 \threecol{linha}{^}{\$}
570 \threecol{palavra}{\\<}{\\>}
571 \threecol{buffer}{\\`}{\\'}
573 \threecol{{\bf classe de caracteres}}{{\bf casa esses}}{{\bf casa os outros}}
574 \threecol{conjunto expl{\'\i}cito}{[ {\rm$\ldots$} ]}{[^ {\rm$\ldots$} ]}
575 \threecol{caracter de sintaxe de palavra}{\\w}{\\W}
576 \threecol{caracter de sintaxe de {\it c}}{\\s{\it c}}{\\S{\it c}}
579 \section{Conjuntos de Carac. Internacionais}
581 \key{especifica uma l{\'\i}ngua principal}{C-x RET l}
582 \metax{mostra todos m{\'e}todos de inser{\c{c}}{\~a}o}{M-x list-input-methods}
583 \key{habilita/desabilita um m{\'e}todo de inser{\c{c}}{\~a}o}{C-\\}
584 \key{determina o sistema de codifica{\c{c}}{\~a}o}{C-x RET c}
585 \metax{mostra sistemas de codifica{\c{c}}{\~a}o}{M-x list-coding-systems}
586 \metax{escolhe a codifica{\c{c}}{\~a}o preferida}{M-x prefer-coding-system}
588 \section{Info}
590 \key{entra no leitor de Info}{C-h i}
591 \key{busca fun{\c{c}}{\~a}o ou arquivo no Info}{C-h S}
592 \beginindentedkeys
594 Movimenta{\c{c}}{\~a}o em um nodo:
596 \key{rola para frente}{SPC}
597 \key{rola para tr{\'a}s}{DEL}
598 \key{in{\'\i}cio do nodo}{. {\rm (dot)}}
600 Movimenta{\c{c}}{\~a}o entre nodos:
602 \key{{\bf pr{\'o}ximo} nodo}{n}
603 \key{nodo {\bf anterior}}{p}
604 \key{mover cima {\bf cima}}{u}
605 \key{seleciona item do menu pelo nome}{m}
606 \key{seleciona {\it n\/}-{\'e}simo item do menu}{{\it n}}
607 \key{segue refer{\^e}ncia cruzada (retorna com \kbd{l})}{f}
608 \key{retorna {\'u}ltimo nodo visitado}{l}
609 \key{retorna ao diret{\'o}rio de nodos}{d}
610 \key{ir para o topo do arquivo Info}{t}
611 \key{ir para qualquer nodo por nome}{g}
613 Outros:
615 \key{executar {\bf tutorial} do Info}{h}
616 \key{busca pelo assunto no {\'\i}ndice}{i}
617 \key{busca por express{\~a}o regular}{s}
618 \key{{\bf sair} Info}{q}
620 \endindentedkeys
622 \section{Registrador}
624 \key{salva regi{\~a}o em um registrador}{C-x r s}
625 \key{insere o conte{\'u}do do registrador no buffer}{C-x r i}
627 \key{salva valor do ponto no registrador}{C-x r SPC}
628 \key{salta para o ponto salvo no registrador}{C-x r j}
630 \section{Macros de Teclado}
632 \key{{\bf inicia} a defini{\c{c}}{\~a}o de uma macro}{C-x (}
633 \key{{\bf encerra} a defini{\c{c}}{\~a}o de uma macro}{C-x )}
634 \key{{\bf executa} a {\'u}ltima macro definida}{C-x e}
635 \key{adiciona a {\'u}ltima macro definida}{C-u C-x (}
636 \metax{nomeia a {\'u}ltima macro definida}{M-x name-last-kbd-macro}
637 \metax{insere uma defini{\c{c}}{\~a}o em Lisp}{M-x insert-kbd-macro}
639 \section{Lidando com Emacs Lisp}
641 \key{avalia {\bf sexp} antes do ponto}{C-x C-e}
642 \key{avalia a {\bf defun} corrente}{C-M-x}
643 \metax{avalia a {\bf regi{\~a}o}}{M-x eval-region}
644 \key{l{\^e} e avalia o minibuffer}{M-:}
645 \metax{carrega do diret{\'o}rio padr{\~a}o do sistema}{M-x load-library}
647 \section{Personaliza{\c{c}}{\~a}o Simples}
649 \metax{personaliza vari{\'a}veis e fontes}{M-x customize}
651 % The intended audience here is the person who wants to make simple
652 % customizations and knows Lisp syntax.
654 Fazendo teclas de atalho globais em Emacs Lisp (exemplos):
656 \beginexample%
657 (global-set-key "\\C-cg" 'goto-line)
658 (global-set-key "\\M-\#" 'query-replace-regexp)
659 \endexample
661 \section{Escrevendo Comandos}
663 \beginexample%
664 (defun \<command-name> (\<args>)
665 "\<documentation>" (interactive "\<template>")
666 \<body>)
667 \endexample
669 Um exemplo:
671 \beginexample%
672 (defun this-line-to-top-of-window (line)
673 "Reposition line point is on to top of window.
674 With ARG, put point on line ARG."
675 (interactive "P")
676 (recenter (if (null line)
678 (prefix-numeric-value line))))
679 \endexample
681 A especifica{\c{c}}{\~a}o \kbd{interactive} explica como ler
682 interativamente argumentos. Tecle \kbd{C-h f interactive} para mais
683 detalhes.
685 \copyrightnotice
687 \bye
689 % Local variables:
690 % compile-command: "pdftex pt-br-refcard"
691 % coding: iso-latin-1
692 % End:
694 % arch-tag: 56bf248c-a1f3-443d-93f7-02d7aea67d94