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