Mercurial > emacs
changeset 109608:768a90ad492c
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Sun, 01 Aug 2010 22:48:29 +0000 (2010-08-01) |
parents | 9a965dbf641e (current diff) fa191ba50511 (diff) |
children | d6a756a04dd0 |
files | |
diffstat | 33 files changed, 1809 insertions(+), 339 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/emacs/ChangeLog Fri Jul 30 02:11:29 2010 +0000 +++ b/doc/emacs/ChangeLog Sun Aug 01 22:48:29 2010 +0000 @@ -1,3 +1,8 @@ +2010-07-31 Eli Zaretskii <eliz@gnu.org> + + * files.texi (Visiting): Add more index entries for + large-file-warning-threshold. + 2010-07-29 Jan Dj辰rv <jan.h.d@swipnet.se> * frames.texi (Tool Bars): Add doc for tool-bar-position.
--- a/doc/emacs/files.texi Fri Jul 30 02:11:29 2010 +0000 +++ b/doc/emacs/files.texi Sun Aug 01 22:48:29 2010 +0000 @@ -202,6 +202,8 @@ to reread it. @vindex large-file-warning-threshold +@cindex file, warning when size is large +@cindex size of file, warning when visiting @cindex maximum buffer size exceeded, error message If you try to visit a file larger than @code{large-file-warning-threshold} (the default is 10000000, which is
--- a/doc/misc/ChangeLog Fri Jul 30 02:11:29 2010 +0000 +++ b/doc/misc/ChangeLog Sun Aug 01 22:48:29 2010 +0000 @@ -1,3 +1,12 @@ +2010-08-01 Alan Mackenzie <acm@muc.de> + + Enhance the manual for the latest Java Mode. + + * cc-mode.texi (Syntactic Symbols): New symbols annotation-top-cont and + annotation-var-cont. + (Java Symbols): Page renamed from Anonymous Class Symbol. Document the + two new symbols. + 2010-07-28 Michael Albinus <michael.albinus@gmx.de> * tramp.texi (Traces and Profiles): Describe verbose level 9.
--- a/doc/misc/cc-mode.texi Fri Jul 30 02:11:29 2010 +0000 +++ b/doc/misc/cc-mode.texi Sun Aug 01 22:48:29 2010 +0000 @@ -312,19 +312,19 @@ Syntactic Symbols -* Function Symbols:: -* Class Symbols:: -* Conditional Construct Symbols:: -* Switch Statement Symbols:: -* Brace List Symbols:: -* External Scope Symbols:: -* Paren List Symbols:: -* Literal Symbols:: -* Multiline Macro Symbols:: -* Objective-C Method Symbols:: -* Anonymous Class Symbol:: -* Statement Block Symbols:: -* K&R Symbols:: +* Function Symbols:: +* Class Symbols:: +* Conditional Construct Symbols:: +* Switch Statement Symbols:: +* Brace List Symbols:: +* External Scope Symbols:: +* Paren List Symbols:: +* Literal Symbols:: +* Multiline Macro Symbols:: +* Objective-C Method Symbols:: +* Java Symbols:: +* Statement Block Symbols:: +* K&R Symbols:: Customizing Indentation @@ -3971,6 +3971,9 @@ Topmost definition continuation lines. This is only used in the parts that aren't covered by other symbols such as @code{func-decl-cont} and @code{knr-argdecl}. @ref{Function Symbols}. +@item annotation-top-cont +Topmost definition continuation lines where all previous items are +annotations. @ref{Java Symbols}. @item member-init-intro First line in a member initialization list. @ref{Class Symbols}. @item member-init-cont @@ -3999,6 +4002,9 @@ A statement. @ref{Function Symbols}. @item statement-cont A continuation of a statement. @ref{Function Symbols}. +@item annotation-var-cont +A continuation of a statement where all previous items are +annotations. @ref{Java Symbols}. @item statement-block-intro The first line in a new statement block. @ref{Conditional Construct Symbols}. @@ -4112,23 +4118,23 @@ @item inexpr-class A class definition inside an expression. This is used for anonymous classes in Java. It's also used for anonymous array initializers in -Java. @ref{Anonymous Class Symbol}. +Java. @ref{Java Symbols}. @end table @menu -* Function Symbols:: -* Class Symbols:: -* Conditional Construct Symbols:: -* Switch Statement Symbols:: -* Brace List Symbols:: -* External Scope Symbols:: -* Paren List Symbols:: -* Literal Symbols:: -* Multiline Macro Symbols:: -* Objective-C Method Symbols:: -* Anonymous Class Symbol:: -* Statement Block Symbols:: -* K&R Symbols:: +* Function Symbols:: +* Class Symbols:: +* Conditional Construct Symbols:: +* Switch Statement Symbols:: +* Brace List Symbols:: +* External Scope Symbols:: +* Paren List Symbols:: +* Literal Symbols:: +* Multiline Macro Symbols:: +* Objective-C Method Symbols:: +* Java Symbols:: +* Statement Block Symbols:: +* K&R Symbols:: @end menu @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -4233,7 +4239,7 @@ @noindent The primary syntactic symbol for this line is @code{access-label} as -this a label keyword that specifies access protection in C++. However, +this is a label keyword that specifies access protection in C++. However, because this line is also a top-level construct inside a class definition, the analysis actually shows two syntactic symbols. The other syntactic symbol assigned to this line is @code{inclass}. @@ -4740,7 +4746,7 @@ @xref{Custom Macros}, for more info about the treatment of macros. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Objective-C Method Symbols, Anonymous Class Symbol, Multiline Macro Symbols, Syntactic Symbols +@node Objective-C Method Symbols, Java Symbols, Multiline Macro Symbols, Syntactic Symbols @comment node-name, next, previous, up @subsection Objective-C Method Symbols @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -4767,34 +4773,45 @@ assigned @code{objc-method-call-cont} syntax. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Anonymous Class Symbol, Statement Block Symbols, Objective-C Method Symbols, Syntactic Symbols +@node Java Symbols, Statement Block Symbols, Objective-C Method Symbols, Syntactic Symbols @comment node-name, next, previous, up -@subsection Anonymous Class Symbol (Java) +@subsection Java Symbols @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Java has a concept of anonymous classes which can look something like this: @example - 1: public void watch(Observable o) @{ - 2: o.addObserver(new Observer() @{ - 3: public void update(Observable o, Object arg) @{ - 4: history.addElement(arg); - 5: @} - 6: @}); - 7: @} + 1: @@Test + 2: public void watch(Observable o) @{ + 3: @@NonNull + 4: Observer obs = new Observer() @{ + 5: public void update(Observable o, Object arg) @{ + 6: history.addElement(arg); + 7: @} + 8: @}; + 9: o.addObserver(obs); + 10: @} @end example @ssindex inexpr-class The brace following the @code{new} operator opens the anonymous class. -Lines 3 and 6 are assigned the @code{inexpr-class} syntax, besides the +Lines 5 and 8 are assigned the @code{inexpr-class} syntax, besides the @code{inclass} symbol used in normal classes. Thus, the class will be indented just like a normal class, with the added indentation given to @code{inexpr-class}. An @code{inexpr-class} syntactic element doesn't have an anchor position. +@ssindex annotation-top-cont +@ssindex annotation-var-cont +Line 2 is assigned the @code{annotation-top-cont} syntax, due to it being a +continuation of a topmost introduction with an annotation symbol preceding +the current line. Similarly, line 4 is assigned the @code{annotation-var-cont} +syntax due to it being a continuation of a variable declaration where preceding +the declaration is an annotation. + @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Statement Block Symbols, K&R Symbols, Anonymous Class Symbol, Syntactic Symbols +@node Statement Block Symbols, K&R Symbols, Java Symbols, Syntactic Symbols @comment node-name, next, previous, up @subsection Statement Block Symbols @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
--- a/etc/ChangeLog Fri Jul 30 02:11:29 2010 +0000 +++ b/etc/ChangeLog Sun Aug 01 22:48:29 2010 +0000 @@ -1,3 +1,9 @@ +2010-07-31 Eli Zaretskii <eliz@gnu.org> + + * tutorials/TUTORIAL.he: New file. + + * tutorials/TUTORIAL.translators: Add TUTORIAL.he. + 2010-07-24 Christoph Scholtes <cschol2112@gmail.com> * NEWS: Document new --distfiles configure.bat option and
--- a/etc/NEWS Fri Jul 30 02:11:29 2010 +0000 +++ b/etc/NEWS Sun Aug 01 22:48:29 2010 +0000 @@ -104,6 +104,9 @@ top, left, tight or bottom. The Options => Show/Hide menu has entries for this. +** Emacs uses GTK tooltips by default if built with GTK. You can turn that +off by customizing x-gtk-use-system-tooltips. + ** Lucid menus and dialogs can display antialiased fonts if Emacs is built with Xft.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/tutorials/TUTORIAL.he Sun Aug 01 22:48:29 2010 +0000 @@ -0,0 +1,1037 @@ +廩�廣�廨 廨�廩�� �廩���廩 �-Emacs. �����廬 廩���廩 廨�� �廖�廝 ��廖��. + +廚廡���廬 廨��廬 廩� Emacs �廩廬�廩�廬 ��廡廩 CONTROL (�廚廣��� ��� �廖��� �-CTRL �� CTL) +�� ��廡廩 META (�廚廣��� �廖��� EDIT �� ALT). ��廡�� �廢��� �廬 �� �廩��廬 ��廚廩廨��� +��� 廚廣�, �廩廬�廩 �廡�廢�廨�� �����: + +��<廬�>-C �廩�廣�廬� ��廛 ����廡 �廡廩 CONTROL ��� �廡廩 廣� �廡廩 <廬�>. + ������, C-f �廩�廣�廬�: ��廛 ����廡 CONTROL ��廡廩 廣� f. +��<廬�>-M �廩�廣�廬� ��廛 ����廡 �廡廩 META �� EDIT �� ALT ��� �廡廩 廣� �廡廩 <廬�>. + �� ��廡��廬 ��� �廝 ��� ��廡廩� META �� EDIT �� ALT, �廚廩廨 ��廡�廩 + ��廩�廨廨 �廡廩 ESC ��� ��廡�廩 <廬�>. ��� ��廬�� <ESC> 廣��廨 �廡廩 ESC. + +�廣廨� �廩���: ��� �廢�廬 �-Emacs �廩 ��廡�廩 C-x C-c (廩�� 廬���, �廩��� �����). +��� ��廚廖�廡 廚廡��� ���廢廣 ��廡廩�, �廩 ��廡�廩 C-g. +���廨��廬 ">>" �廡廢� ����� �廖��廬 ��廨��廬 廣��廨�� ��� ��廖�廬 ��廩廬�廩 �廚廡��� ��廩��. +������: +<<廩�廨�廬 廨�廡�廬 廬廬��廖廚�� 廖��� �廩�廨� ���� 廣"� help-with-tutorial>> +[��廢廣 �廣��� ��廩�廨 廨�廡 ���廨�廬 �������廬. ��廡廖� ��廩�� ����] +>> �廡�廩� 廣廬� C-v (�廢� �廣��� ���) 廣"� ��廬廡�� �廣��� ���. (廡����, �廖� ��廬 + 廣"� ���廢� ����廡� 廩� �廡廩 CONTROL ��廡廩� 廣� v.) + �廣廬� �����, 廣���� �廣廩�廬 ��廬 ��� 廚廣� 廩廬廖���� �廡廨�� �廬 ���廢� 廣� ��廖�. + +廩��� �� ��廚�廚� 廩� 廩廬� 廩�廨�廬 ��廩廨 �廬� 廣��廨�� ��廖� ��廩�, �� 廩����� 廨廢�廚�廬 +�廖���廬 �廣廬 廡廨��廬 ��廡廖�. + +��廨 廨�廩�� 廩廣���� ����� ��� ��廢� ���廣 ��廡�� ��� ��廩��� �廬�� ��廡廖�. �廬� +��廨 ���廣�� ��廢� ��廬廡�� �廣��� ���, 廣� C-v. ���廨� �廣��� �廡��� �廡�廩� M-v +(����廡� �廡廩 META ��廡�廩� v �� �廡�廩� ��<ESC>v�� �� ��� ��廡��廬 �廡廩 META +�� EDIT �� ALT). + +>> �廖� 廣廬� ��� 廚廣��� ��廡�廩 M-v ���"� C-v. + + +* 廖���� 廣� ��� +-------------- + +�廩� 廬��廣� �廣����� 廩���� �廢廚��� ���, �廩廬�廩� �廚廡���廬 ����廬: + + ��C-v �廬廡�� �廣��� ��� + ��M-v ���廨 �廣��� �廡��� + ��C-l �廡� 廬廢��� ��廢� ���廩 �廬 ��廡廖�, + �� 廩��廡廖� ��� �廖�� ���廢� ��廨�� �廬廢��� + (廩��� ��: CONTROL-L ��� CONTROL-1.) + +>> �廢�� �廬 �廖�� 廣"� �廬廢��� ���廨� �廬 ��廡廖� ����. ���廨 ��� �廡�廩� C-l. + �廢�� �廬 �廖�� 廩��廬 �廩��� �� 廩��� 廣���� ��� ��廬� ��廡廖�, ��� 廣�廩�� + ��� ��廨�� �廬廢���. + �� 廬廡�廩� C-l 廩��, 廡�廣 ��廡廖� ��� ���� �廡廢� �廣���� 廩� �廬廢���. �廡�廩� + C-l 廩�� ���� ���� �廬�廬�廬 �廬廢���. + +�� �廡廩� PageUp �-PageDn, �� �� 廡����� ��廡��廬 廩���, ������ �廩�廩 �廬��廣� +�廣����� 廩����, ���� �廩���廩 �-C-v �-M-v �廣�� ��廬廨. + +* 廬��廣廬 廖�� �廖�廖�廬 +------------------ + +廬��廣� �廣����� 廩���� ���� 廩���廩�廬, ��� ��廢� ��廬� ����廣 ��廡�� 廖廚廢�廚� +�廬�� ��廡廖� 廩-廣"� �廬廢���? + +��廬� �廣廩�廬 ��廬 ���� �廨���. �廚廩廨 ��廩� ��廩廬�廩 ��廡廩� ��廢��, ���� ���� +�� �廣�� ��廬廨 �� 廬���廡� �廬 ������ �廣� ���廡 �廖���廨�� 廩� ��廡��廬 �廬廩廬�廩� +�廚廡���廬 C-p, C-b, C-f �-C-n. 廚廡���廬 ��� 廩��廬 廣廨� ��廨�廣廬 �廡廩� ��廢��, +���廡��: + + 廩�廨� 廡���廬, C-p + : + : + 廡����, C-f ... ��廡�� 廖�� ����� ... ���廨�, C-b + : + : + �廩�廨� ����, C-n + +>> �廩廬�廩� ��廡廩� C-n �-C-p 廣"� ����廣 �廩�廨� ���廢廣�廬 廩� �����廨��. + �廡�廩� C-l ��� ��廨�� �廬 �����廨�� 廣"� �廬廢���. + +廡� ��廬廨 ����廨 �廬 ��廡廩�� ���� ���廢廣�廬 ����� 廩�� ���廢���: +P �-previous (廡���), N �-Next (���), B �-Backward (���廨�) +�-F �-Forward (廡����). �廡廩� �廬��廣� ��廖�廖��� ���� �廩�廩� �廬�� �� ����. + +>> �廡�廩� C-n ��� 廚廣��� ��� ��廡� �廬 �廖�� �廩�廨� ��. + +>> ���廣� �廬 �廖�� �廬�� �廩�廨� 廣� C-f ���廨-�� ��廣�� 廣� C-p. + 廩��� �� �� 廣�廩� C-p ��廩廨 �廖�� ��廢� ���廢廣 �廩�廨�. + +�� 廩�廨� 廩� �廡�廖 �廖廬���廬 �廬� ����� ��廡廨� Newline. 廬� �� �廚廨�� ��� +�廩�廨� ��� 廩��廨��. (�-�"�, �廩�廨� ���廨��� �廡��廛 廬廖廬��� �廝 ��� �-Newline, +�� Emacs ���� �廡�廡 ���.) + +>> �廖� C-b �廬���廬 廩�廨�. ��� ��廨�� �廖�� ���廣 �廖�廝 �廩�廨� �廡���廬. ��廬, + �廩�� 廩��� �廣 ���廨� ����廝 廣�-廚�� 廬� �-Newline. + +�� C-f ���� ����廝 廣�-廚�� Newline, ����廡 ��� C-b. + +>> �廡�廩� C-b 廣�� ��� 廚廣��� ��� �廡�� �廨�廩� ���� ��廢� �廖��. + 廣廬� �廡�廩� C-f �廖廚廨 廚廣��� ��廨�廩 �廩�� �廖�廝 �廩�廨�. ��� �廡�廩� + C-f 廣�� 廚廣� ��廬 ��� ���廣 �廬���廬 �廩�廨� ����. + +�廩�廖�� ��廢� ������廬 ��廡廖� ���廢�, ��廡� ��廡廖� �廣�廨 ���廡 ���廢� ���廖�� +�廬廢���. ��� 廡�廨��� "�����". ����� ��廚廩廨廬 �-Emacs ����廣 �廬 �廖�� ��廡�� +��廩�� ��廡廖� ���� 廩�廖�� ��廣�� ��廬廢���. + +>> �廖� ����廣 �廬 �廖�� �� ���廛 �廬廢��� 廣"� �廡廩廬 C-n �廩��� �� ��� 廩廡�廨�. + +�� 廬��廣� 廬�-廬� ����廬 ���, 廬���� ���廣 ����� 廩���廬. M-f ��(META-f) ���� +�廬 �廖�� ���� ��廬 廡���� ����� M-b �� ���� ���廨�. + +>> �廡�廩� M-f �-M-b �廖廚廨 廚廣���. + +�� �廖�� ��廢� ���廢廣 ����, M-f �� �廖�廝 �����. �� �廖�� ��廢� ��� 廩廬� ����, +M-f 廣��廨 �廬 ����� ���� ��廣廢廨 �廖�廚�. M-b 廚�廣� ���廚� ���� ������ �廚��. + +>> �廡�廩� 廣廬� M-f �-M-b 廚廣��� ����廬, ��� C-f �-C-b 廚� �廩� ��� 廩廬���� + ��廬廨廩� ��廬�廢�� 廩� M-f �-M-b ��廡���廬 廩���� �廬�� ���� �����. + +廩��� �� ��廡��� 廩��� C-f �-C-b �廢� ��� �-M-f �-M-b ��廢� �廩��. �廣廬�� +廡廨���廬 ��� �廡廩�� 廣� META �廩�廩�� �廚廣���廬 �廡廩�廨�廬 ������廬 廩� 廩廚� (����, +�廩廚���, 廚廖廡��廬) ����� �廡廩�� 廣� CONTROL 廚�廣��� 廣� �����廬 �廖�廖��廬 廩���� +廬����廬 �廖�� ��廡廖� 廩����� 廣�廨��� (廬���, 廩�廨�廬, ���'). + +��廡��� ���廬 廡���廬 �� ���� 廩�廨�廬 ��廩廚���: C-a �-C-e �廣�� �廬���廬 �廩�廨� +�廖�廚�, ��廬���, ����� M-a �-M-e �廣�� �廬���廬 ��廩廚� �廖�廚�. + +>> �廖� 廣廬� 廩廬� �廡廩�廬 廣� C-a ���廨-�� 廩廬� �廡廩�廬 廣� C-e. + �廖� 廩�� M-a ���廨-�� 廩�� M-e. + +廩��� �� 廩��廨� 廣� C-a ���� 廣�廩� ��廨, ����� �� �廡廩� ���廨廬 廣� M-a ���廣� +�廬 �廖�� ��廩廚� ��廖廝. ���� ��� ��� ������� ��廩��廬, ��� �廬�廢�� �廨��廬 +��廣�廬 �廩�� ��廡廨��. + +�廡�� �廖�� �廬�� ��廡廖� �廡廨� "point" ("�廡���"). ����� ��廨�廬, �廖�� �廨�� +�廬 ��廡��� 廩� "point" �廬�� ��廡廖�. + +��� 廖���� 廩� 廚廡���廬 廚廩���廬 ���廣廬 �廖��, ���� 廚廡���廬 廩�廣�廬 ����� +��廩廚��� 廩����: + + ��C-f ��廣 廬� ��� 廡���� + ��C-b ��廣 廬� ��� ���廨� + + ��M-f ��廣 ���� 廡���� + ��M-b ��廣 ���� ���廨� + + ��C-n ��廣 �廩�廨� ���� + ��C-p ��廣 �廩�廨� �廡���廬 + + ��C-a ��廣 �廬���廬 �廩�廨� + ��C-e ��廣 �廖�廝 �廩�廨� + + ��M-a ��廣 廡���� �廖�廝 ��廩廚� + ��M-e ��廣 ���廨� �廬���廬 ��廩廚� + +>> �廖� �廬 �� �廚廡���廬 ���� �廖廚廨 廚廣���, �廩� 廬廨���. + ��� �� �廚廡���廬 ��廚�廢�廬 ���廬廨. + +廩廬� 廚廡���廬 廬��廣� �廩���廬 ��廨廬 �� ��M-<�� ��(META 廚��廬), �廩廨 �廣� �廬���廬 +��廡廖�, �-��M->�� ��(META ��廬廨), �廩廨 �廣� �廖�廝 ��廡廖�. + +�廨�� ��廡���廬 ��廡廩 ">" ��廢� �廣� �廚廖�廡, ��� ��� ��廡�廩� �廩 廢�廨� ����廛 +������廡 �廡廩 Shift. ���廚� ���� �廩 ����廛 廣� Shift ��� ��廡�廩 ��M-<���� +��廨廬 ��� ��廢� M-廚廖�廡. + +>> �廖� 廣廬� ��M-<�� ��� ����廣 �廬���廬 �廩�廣�廨. + ��廨-�� �廡�廩� C-v �廖廚廨 廚廣���, 廣� 廩廬��廣� ����. + +>> 廣�廩�� �廖� ��M->�� ��� ����廣 �廖�廝 �廩�廣�廨. + ���廨 ��� �廡�廩� M-v ��� 廚廣��� ��� ����廨 ����. + +��廬� ����� �廬 �廖�� �� �廣�廨廬 �廡廩� ��廢��, �� �� 廡����� ��廡��廬 廩���. +��� ����� ����廢�� ����� ��廩廬�廩 �-C-b, C-f, C-n �-C-p �廩��廩 廖���廬. +廡��� ��, �� �廣��� 廣� �� �廡��廬. 廩��廬, �廩廬廬廨��� �廣��� 廣� Emacs, 廬廨�� +�� �廩���廩 ��廡廩�� ��� ���廨 ��廬廨 ��廩���廩 ��廢�� (����� 廩��� 廢�廨� ����� +�廬 ��� ����廡 �廣�廡廨� 廩� ��廡��廬). �廩��廩�廬, �廩��廡廩�� ���� ��廚�� ��廨��, +���� ��� 廡� ��廬廨 ����� 廚廡���廬 �廬廡���廬 ��廬廨 廩� 廬��廣廬 �廖��. + +廨�� �廚廡���廬 廩� Emacs �廡���廬 �廨����� ���廨�; 廣��廨 廨�� �廚廡���廬 ��廨����� +�廩�廩 ����� 廩� �廖廚廨 ���廨�廬 廣� �廚廡���. ��� �廖廚廡 �廨����� �廚廡���, �廩 ��廡�廩 +C-u ���廨-�� 廖廚廨�廬, ���廬 �廚�� 廩�廡�廩�� �廬 �廚廡��� 廣廢��. 廣� ��廡��廬 廡��� +�廡廩 META (�� EDIT �� ALT), �廩 �� �廚廩廨�廬 ��廨廬 �廢��� �廨����� ���廨�: +�廡�廩� �廬 �廖廚廨�廬 廬�� ��� ���廡廬 �廡廩 META. ��� ����廢�� 廣� C-u �廩�� 廩��� +�廣��� 廣� �� �廡��廬. ��廨����� ����廨� �廡廨� �� "�廨����� 廡����廬" (prefix +argument) �廩�� �廡�廩�� ��廬� �廚�� �廚廡��� ���� ��� �廬���廖. + +��廩�, C-u 8 C-f ���廣 �廬 �廖�� 8 廬��� 廡����. + +>> �廖� ��廡�廩 C-n �� C-p 廣� �廨����� ���廨�, ��� ����� �廬 �廖�� �� 廩�廨� + �廖���廬 �廚廡��� ��廬 ����. + +廨�� �廚廡���廬 �廚廨廩�廬 �廬 ��廨����� ����廨� ����� ��廨�廬, ��� 廚廡���廬 �廖����廬 +�廩廬�廩�廬 �� �廢�廨�廬 ��廨�廬. ��� 廚廡���廬 (��� �廝 ��廬 ���� ��� 廩����� 廣� ��) +�廩廬�廩�廬 �� ������ -- �����廬� 廩� ��廨�����, ��� 廡廩廨 �廣廨�� ��廖廚廨�, ��廨�廬 +�廚廡��� ��廬��� 廡廢廬 ��廨廬. + +��C-v �-M-v ��廢��� ����� ��� ���廚� ��廨. �廩廚廡���廬 ��� �廡���廬 �廨�����, +�� ������ �廬 �廬廢��� ��廖廚廨 ��� 廩� 廩�廨�廬, ��� ��廚��. ��廩�, C-u 8 C-v +����� �廬 �廬廢��� �-8 廩�廨�廬. + +>> �廖� 廣廬� ��廡�廩 C-u 8 C-v. + +�廬�廢��, �廬廢��� ��廬� 廢廨��� ���� �-8 廩�廨�廬. �� �廨廢���� ����� ���廨�, +�廚廩廨 ��廩�� ��廬 廣"� �廬� �廨����� �-M-v. + +�� �廚廣�廬� �廬 Emacs 廣�-��� �廣廨�廬 ������廬 ���� X �� MS-Windows, �廬� +廢廨���� �廨��廬 廚廖 廢廨 �����, 廩廩�� 廚廖 ����� (scroll bar) �廢��� 廩� ����� +廩� Emacs. (廩��� �� 廩�廩�� 廢��� ����� 廡����� 廚廖�� ��廖廚��. ��� �廡廨��� +"�廩�����" -- "fringes" -- ��廩�廩�� ��廢�廬 廖���� ��廩� 廩�廨� �廖������ +��廨��. 廚廖 ������, �廣��廬�, ��廚�廣 廨廡 �廢� ��� ���� ��� 廡廨�� �廡廢� ����� +�廢� ����.) + +>> �廖� 廣廬� ��廡��廡 ��廚廬�廨 ���廢廣� 廩� �廣��廨 ���廡 �廣���� 廩� ����廨 �����廩 + 廩� 廚廖 ������. 廚廣��� �� ���廨� ����� �廬 ��廡廖� �廩�廣�廨 廩廬��� ��廡�� �� + �廡�廡廬�. + +>> �廖� ��廨�廨 �廬 �廣��廨 �廣�� ����, 廬�� ��� ���廢� 廣� ��廚廬�廨 ���廢廣�. + �廬�廢��, Emacs ����� �廬 ��廡廖� �廣�� ���� ��廬�� �廬��廣廬 �廣��廨. + +�� �廣��廨 廩��� �廢��� �����, 廬���� ��廩廬�廩 �� �� �����廬 ��廡廖�. + +* �� Emacs �廚廖�廡 ����� +---------------------- + +�� Emacs �廚廖�廡 ����� �廚廡���廬, 廬���� ��廚廖�廡 ��廬� ����� 廣"� �廡廩廬 C-g. +廚廡���廬 廩��廢�廣� �廬�廨� �廝 �� ��廬��廬 ��廚廖廡� �廣�廨廬 C-g. + +���廖廝, 廬�廨�� �廡廩廬 C-g ������ ��廨����� ����廨� �� 廬���廬 �廚廡��� 廩�廨� +�廩��廬� ��廡�廩 ��廬�廨�廬�. + +>> �廡�廩� C-u 100 ��� �廢��� �廨����� 廩� 100, ����廨 ��� C-g. 廣廬� �廡�廩� + C-f. ��� 廢廨�� ���廣 廬� ��� ����, 廩�� ����廬� �廬 ��廨����� �廣�廨廬 C-g. + +�� �廡廩廬� <ESC> ��廣�廬, ��廬� ����� �廣�廨廬 C-g. + +* 廚廡���廬 ����廨��廬 +----------------- + +�廖廚廨 廚廡���廬 �-Emacs ����廨��廬 ������ ��� 廩�廩廬�廩�� �廬����� �� �廚廣��� +��廬� ��廨� �廡廨�. + +�� 廬廡�廩� �廬 ��廬 �廚廡���廬 ����, Emacs �廢�� ���廣� ��廬�廨廬 �廬 �廚廡��� ��廩�� +�� ��廢廣 �廬 �廚廡��� �� �����. + +�� ��� �����廬�� ��廖�廬 �廬 �廚廡���, �廡�廩� <SPC> (�廡廩 �廨���) �廬廩��� �廩���. +��廨� ���, �� ����� �廣������� ��廢廣 �廬 �廚廡��� �����廨�廬, �廡�廩� "n" �廬廩��� +�廩��� ���. + +* �����廬 +-------- + +廬廢��廬 Emacs ����� ����� ��廬廨 ����� ���, �廩�� ��� ��� �廢�� �廡廖� �廩��. +����廨 ��廬廨 �廖��廨 ��廢� ��廩廬�廩 ������廬 �廨����. �廣廬 �廨廢���� ��廖��廨 ��廢� +��廚�廨 ������廬 ���廬廨�� �����廨 �廣廨��� ����� ����. ��� ��廨 廚廩�� ���: + + ��C-x 1 ���� ��� ���� (����廨, 廖��廨 �廬 �� ������廬 ���廨��). + +��� ��廚廣�� 廚廡��� ��, �廡�廩� CONTROL-x ����廨�� �廬 �廖廚廨� 1. �廚廡��� C-x 1 +�廨���� �廬 ����� ��廢�� �廬 �廖�� �� 廩��� 廬�廚廖 �廬 �� 廩�� �廬廢���. �廚廡��� +����廬 �廬 廩�廨 ������廬. + +>> ���廣� �廬 �廖�� �廬�� 廩�廨� �� ��廡�廩� C-u 0 C-l. +>> 廣廬� �廡�廩� CONTROL-h k CONTROL-f. + 廩��� �� ��廢� ����� ������ �廢��廢� ���廚�廣 ���� ��廩 廩�� ��廢� + �廬�廣�� 廩� �廚廡��� CONTROL-f. + +>> �廡�廩� C-x 1 �廩��� �� 廩����� 廣� ��廖�廨 廣� C-f �廣��. + +廚廡��� �� 廩��� ��� 廩�廨 �廚廡���廬 廩����� 廣� �� ��� 廩��� ����� 廩�� 廬���. +��� �廬���� 廣� �廬� CONTROL-x. 廚廡���廬 廨��廬 ��� �廬����廬 �-CONTROL-x; ��廡 +���� ��� 廣�廖廡�廬 ������廬, 廡�廢��, ��廢廢�� ���廩��� ����� ��廨��. 廚廡���廬 ��� +�����廬 廩���, 廩��廩� ��廚��� �廨�廣� 廬���. + + +* ���廖� ����廡� +------------- + +�� �廨廢���� �����廖 �廡廖�, 廚廩�� �廡�廩� 廣� ��廡廩�� ��廬�����. 廬��� 廨�����, +���� A, �, 7, * ���' �廬廚廨廩�� 廣"� Emacs ��廡廖� ���� �廬��廖廚�� ��廡廖� +�廡���. �廡�廩� <Return> (�廡廩 ��廨廬 �廨廨) ��� �����廖 �廬 廬� �廩�廨� ���廩� +(Newline). + +����廡廬 �廬� ���廨�� 廩�廡廩廬� �廡�廩� <DelBack>. ��廡廩 廩��� 廡�廨��� �� <DelBack> +���� ��廬廡廨� �廩��廬 廩���� -- "Delete", "DEL" �� "Backspace". ��廨� ��� +��� �廡廩 ���� ����� 廩��廢� �� �廨�廡 ��廡廩 <Return>, ���� �廩�廩 �廬�� ����廡廬 +�廬� ��廨�� �� �廬�����廬 ��廨�廬, �� 廨廡 �-Emacs. + +�� 廡��� ��廡��廬 廩��� �廡廩 ���� 廩廣��� 廨廩�� <Backspace>, �� ���� ��廡廩 �廩廨 +�廩�廩 �-<DelBack>. �� �� ���� �廡廩 ��廨 ��廖��� �-"Delete" ��廡�� ��廨廬 �� +���� �-<DelBack> 廩���. + +���廚� ���� ��廬廨, <DelBack> ���廡 �廬 �廬� 廩廡��� ���廡�� �廖��. + +>> �廡�廩� 廣廬� �廖廚廨 廬���, ���廨-�� ��廡� ��廬� 廣"� �廡廩�廬 ����廬 + 廣� <DelBack>. �� 廬�廩廩� �廩��廬 �廬 �廡��廛 ��� -- �廣�廬廡 ��廡�廨� + 廩� �廩�廣�廨 ��廩�廨 ��� 廩����. �廬� 廣����� 廣� �廣�廬廡 ���廩� 廩���. + +��廩廨 廩�廨� 廩� �廡廖� �廣廩�廬 �廨��� �廩�廨� ��廬 廩� 廬廢���, ��廡 ���廡廖� ��廩�� +�廩�廨廬 廬廢��� ��廖廚廬, ��� "廩�廨廬 ���廩�". 廬� ���廖� ("/") �廖�廝 �廩�廨� (�� +�廛 廣廡�廡� 廡�� ����廨 �廩����� -- "fringe") �廖�� 廩�廩�廨� �廩 廩�廨廬 ��廩�. + +>> �廡�廩� �廡廖� 廣� 廩廬��廣� �廡廢� �廩�廨�, ��� 廬�廩��� ��廡�廩 廣�� �廡廖�. + �廬�廢��, 廬廨�� 廩��廚�廣� 廩�廨廬 ��廩�. + +>> 廣廬� �廡�廩� <DelBack> 廣"� ����廡 �廡廖� 廣� 廩�廩�廨� 廬�廣廩� 廡廢廨� �廖廚�廡 + �廬廬��� �廩�廨� ����廬 廣"� �廬廢���. 廩�廨廬 ���廩� 廬�廣��. + +��廬� ����廡 �廬 廬� �-Newline ��� �� 廬� ��廨. ���廡廬 �-Newline ��� 廩廬� +廩�廨�廬 廬��� �廬 �廩�廨�廬 �廩�廨� ��廬. �� �廩�廨� ��廩���廬 廬��� �廨��� �廨��� +�廬廢���, ��� 廬�廢� 廣� 廩�廨廬 ��廩�. + +>> ���廣� �廬 �廖�� �廬���廬 �廩�廨� ��廡�廩� <DelBack>. �廬�廢��, �廩�廨� 廬廬��� + �� 廡���廬�. + +>> 廣廬� �廡�廩� <Return> ��� �����廨 �廬 �-Newline 廩��廡廬�. + +��廨� �� �廨�� �廚廡���廬 �-Emacs �廚廩廨 �廢��� �廖廚廨 ��廨�廬. �� 廬�� �廡廖� +廩����� �廡��廢廬 廚廡���廬 ��. ��廨� 廣� 廬� �廡廖� ����廖� ��廬� �廖廚廨 廚廣���. + +>> �廖� ��廬 廣�廩�� -- �廡�廩� ��C-u 8 *�� 廣"� �����廖 ********. + +����, ���廬� �廬 ���廚� ��廖�廖� ���廬廨 ���廚�廖 �廩�� �-Emacs ��廬廡� 廩����廬. +�廚廩廨 ����廡 �� ���� ��廝 廩�廨�廬 廩���廬. ���� 廖���� 廚廡���廬 ����廡�: + + ��<Delback> ��廡 廬� 廩�廚�� �廖�� + ��C-d ��廡 廬� �廬�廬 �� ��廨� �廖�� + + ���M-<Delback>�� ���艣 ���� 廩�廚�� �廖�� + ��M-d ���廨 ���� 廩��廨� �廖�� + + ��C-k ���廨 �廡廖� ��廖�� �廣� 廖�廝 �廩�廨� + ��M-k ���廨 �廡廖� 廣� 廖�廝 ��廩廚� ������. + +廩��� �� 廩���廖 ��� <Delback> �-C-d �廣��廬 M-<Delback>�� �-M-d ��廩���� �廬 +��廡��� 廩��� C-f �-M-f (���� <Delback> ����� 廬� �廡廨�, ��� ����� �廬 +��廡��� ��� �廣廬-廣廬�). C-k �-M-k ����� �-C-e �-M-e, �� �廡��� 廩�廨�廬 +��廩廚���. + +���廖廝, 廡���廬 廩��� ����� 廩��廚廩廨廬 ����廨 廡�廣 ��廩�� 廩� �廡廖�. �廩� ��, 廬��廣� +�廡廢� ���� 廩� ��廡 ��廡廖� ��廡�廩� C-@�� �� C-<SPC>�� (��� ���� 廩�� ���). +(<SPC> ��� �廡廩 �廨���.) 廣廬� ���廣� �廬 �廖�� �廡廢� �廩�� 廩� ��廡 ��廡廖� ��廡�廩� +C-w. �廬�廢��, �� ��廡廖� ��� 廩�� ��廡���廬 ���� ����廨. + +>> ���廣� �廬 �廖�� �� ���廬 � �廬���廬 �廚�廖廡� �廡���廬. +>> �廡�廩� C-<SPC>��. ��Emacs 廢廨�� ��廢�� ���廣� ����廨廬 "Mark set" �廬�廬�廬 + �廬廢���. +>> ���廣� �廬 �廖�� �� ���廬 廢 �廩�廨� �廩��� 廩� �廚�廖廡�. +>> �廡�廩� C-w. ��� 廬��廨� �廬 ��廡 ��廡廖� 廩�廬��� �-� ��廖廬��� �廚�� �-廢. + +����� ��� "���廡�" ("deletion") �-"���廨�" ("killing") ��� 廩��廡廖� +"����廨" ��廬� �����廨 �����廖� (��廡�� ��廩��� ��廡廖�), ����� �廡廖� "���廡" �� +��廬� �����廖 ���廩 �廩��� ��. (��� ��廬� ���� �廬 ���廡� -- 廨�� ����.) ����廨 +��廡廖� ����廨 �廡廨� "���廡�" ("yanking"). ���廚� ����, 廚廡���廬 �廩廨 廣����廬 +��廣��� �����廬 �����廬 廩� �廡廖� 廬��� ���廨�廬 �廬 ��廡廖� (�� 廩��廬� ���� �廡��廬 +�廩��廨�) �廣�� �廚廡���廬 廩��廨���廬 廬� ���� �� 廩�廨�廬 廨�廡�廬 �廬�� 廨��� -- +���廡�廬 (�� 廩�� ��廬� �����廡 �廬 ��廡廖� 廩���廡). ��, <Delback> �-C-d ���廡�� +��廩廨 �廚廣���� ��廬� ��� �廨�����, ��� ���廨�� ��廩廨 �廚廣���� ��廬� 廣� �廨�����. + +>> ���廣� �廬 �廖�� �廬���廬 廩�廨� 廩���� 廨�廡�. ��廨-�� �廡�廩� C-k ��� ����廨 + �廬 �� ��廡廖� 廩� ��廬� 廩�廨�. +>> �廡�廩� C-k 廚廣� ��廖廚廬. 廩��� �� 廩��� ���廨 �廬 �-Newline 廩�廖�廝 �廩�廨�. + +廩��� �� 廩-C-k ���� ���廨 �廬 廬���廬 �廩�廨�, �-C-k ��廖廝 ���廨 �� �廬 �廩�廨� +廣廢�� ���廨� �廩�廨 �廩�廨�廬 ���廣 ��廚� �廣��. C-k �廚廨廩 �廬 ��廨����� ����廨� +���廚� �����: ��� ���廨 ��廖廚廨 ��� 廩�廨�廬, ���� �-Newlines 廩���. �� 廩��� +�廖廬� �廚廣�� ���廨廬: C-u 2 C-k ���廨 廩廬� 廩�廨�廬 ���� �-Newlines 廩���, +����� �廡廩� 廣� C-k 廚廣���� �� 廣�廩� ��. + +����廨 ��廡廖� 廩��廨�� �廡廨� "���廡�" ("yanking"). (廬�廩�� 廣� �� �廣� 廩��廚� +廩� �廡廖� �廬��� ��廩��� ���� ��� ��廡�.) ��廬� �����廡 �廬 ��廡廖� 廩��廨廬� +���廬� �廡�� ���� ���廨 �� ��廡�� ��廨 ��廩�� �廬�� ��廡廖� 廩�廬� 廣�廨���, �� +�廚��� �廡��廛 ��廨. ��廬� �����廡 �廬 ��廬� ��廡廖� �廖廚廨 廚廣��� ���� ��廢�廨 +廣�廬廡�� �廨���� ����. 廬�����廬 廣廨��� ��廨�廬 �廩廬�廩�廬 ������� "cutting" +�-"pasting" ��廡�� "killing" �-"yanking" (廨�� �廬 ����� ������� �廚廨廡 +�-"Glossary" 廩� ��廨�� ��廩廬�廩� Emacs). + +�廚廡��� ����廡� ��� C-y. ��� ����廖� �廬 ��廡廖� ����廨 ��廡�� ������ 廩� �廖��. + +>> �廖� ��廬: �廡�廩� C-y ��� ����廨 �廡廖� 廩��廨廬� 廡��� ���. + +�� 廬廡�廩� C-k �廖廚廨 廚廣��� �廨廢廝, �� ��廡廖� 廩��廨廬� ��廨� �� �廩�廨 ����, �� +廩-C-y ���� ����廡 �廬 ���� ��廬 ��廬. + +>> 廣廩� ��廬 廣廬�: �廡�廩� C-k ��� 廚廣���. + +廣�廩�� �����廨 ��廡廖� 廩��廨廬�: + +>> �廡�廩� C-y. ��廨-�� ���廣� �廬 �廖�� ��� 廩�廨�廬 ��廚� ��� ��廡�廩� C-y 廩��. + �廚� 廩廨��廬�, �� 廬���� ��廣廬�廡 ��廡 ���廡廖� ��廡�� ��廡��. + +�� �廣廩�廬 �� �廩 ��� �廡廖� ����廡�, ��� ���廬��� ��廨廬� �廡廖� ��廨? C-y ����廡 +廨廡 �廬 ����廨� ���廨���. ���� ��廡廖� 廩��廨廬� 廡��� ��� ���� ��� ������. ��廬� +����廨� �廣�廨廬 �廚廡��� M-y. ��廨� 廩�廡廩廬� C-y 廩����廡 �廬 ��廡廖� 廩��廨廬� +���廨���, �廡廩� 廣� M-y ����廚� �廬 ��廡廖� �����廡 ��廡廖� 廩��廨廬� �廚廣� �廚�� +���廨���. �廡廩� ���廨廬 ��廩��廬 廣� M-y ����� �廡廖� 廩��廨廬� �廚廣��� 廡����廬 ��廬廨 +���廬廨. �廩廬廨�� 廩��廡廖� �����廡 ��� �� 廩廨廢�廬� �����廡, 廬廚廖�廡� ��廡�廩 M-y +�廬�廩��� �廣廨��� �廨���. ��� 廢�廨� �廩�� 廚廡��� �����廬 �廩� ��. + +�� 廬廡�廩� M-y �廖廚�廡 廚廣��� ��� ��廨 ��, 廬��廣� ��廨� ��廡��廬 ��廬��� (�廡廖� +廩��廨廬� ���廨���). + +>> ��廨� 廩�廨�, ��廨-�� 廬��廣� �廬 �廖�� ��� ����, ���廖�廝 ��廨� 廩�廨� ��廖廚廬. + �廡�廩� C-y ��� ����廨 �廬 �廩�廨� �廩��� 廩��廨廬�. + 廣廬� �廡�廩� M-y ��廩�廨� 廩���廨廬� 廬���廝 �廩�廨� �廨�廩��� 廩��廨廬�. + �廡�廩� M-y �廖廚廨 廚廣��� ��廖廚�廬 �廩��� �� �廬�廢��廬. ��廩��� ��廡�廩 M-y + 廣� 廩�廩�廨� �廩��� 廩��廨廬� 廬�廚�廣 廩��, ��� 廬�廩��� 廣�� �廖廚廨 廚廣���. + �� 廬廨廢�, 廬���� ��廖�廬 M-y 廣� �廨����� ����� �� 廩����. + + +* ����� 廚廣���廬 +-------------- + +�� 廩���廬� �廬 ��廡廖� ��� ����廬� 廩�廩���� ��� �廣�廬, 廬���� ���� �廬 �廩���� +�廣�廨廬 廚廡��廬 ������, C-x u. + +��廨� ���, C-x u ���� �廬 �廩������ 廩��廢廣� 廣"� 廚廡��� ��廬. �廚廣�� ���廨廬 廩� +C-x u �廨廢廝 ����廬 廩������ 廩� 廚廡���廬 廡����廬, ��廬 ��廨� �廩���. + +廩�� ��廢��� ����� ���: 廚廡���廬 廩���� �廩��廬 �廡廖� (��廩� 廚廡���廬 ��廣廬 �廖�� +�廚廡���廬 �����) ���� �廖廚廨�廬 �廬��� 廩����廖�� �廬 廣廢�� �廡��廢�� �廡��廢�廬 廩� +廣� 20, ��� ��廡��� �廬 �廖廚廨 �廚廣��� 廩�廩 ��廡�廩 C-x u ��� ���� ���廖廬 �廡廖�. + +>> ��廨� 廩�廨� �� 廣� C-k, ��廨-�� �廡�廩� C-x u ���� 廬�廚�廣 廩��. + +��C-_�� ���� �廨� ���廚�廬 ��廚廣�� �廬 廚廡��廬 ������. ��� 廚�廣�廬 ����廡 ��� C-x u, +��� 廡�� ��廬廨 ��廡廩� �廖廚廨 廚廣��� ��� ��廨 ��. ��廖廨�� 廩� C-_�� ��� 廩���� +�廡���廬 �� �廨�廨 ����� ��廢� ��廡�廩 ��廬. �� �廖��� �廡���� 廩� C-x u. ��廡���廬 +����廬 ��廬� ��廡�廩 C-_�� 廣"� ���廡廬 CONTROL ��廡廩廬 ���廖� /. + +�廨����� ���廨� �-C-_�� �� �-C-x u �廩�廩 ��廖廚廨 ���廨�廬 廣� �廚廡���. + +��廬� ���� ���廡� 廩� �廡廖� ����廡 ��� 廩��廬� ���� ���廨�. ������� ��� ���廡� +����廨� �廩廚�廣�� 廣� ����廬�� �����廡 �廬 ��廡廖� ����廨 廣� C-y; �� ���� �廩���� +�廣���� ������. + + +* 廡�廢�� +------- + +廣"� 廩��廡廖� 廩廣廨�廬� ��廩�廨, �廩 �廩�� ��廬� �廡��廛. ��廨廬, ��� ��廣�� �廨�廣 +廩廬廢�� �-Emacs. ��� �廩�� �廬 ��廡廖 �廡��廛, �廩 "�廚廬��" ("find") �廬 �廡��廛 +�廚�� 廩�廬����� ��廡�廩 �廡廖�. (廩� ��廨 ��� ��� "�廚廡��" �廬 �廡��廛 - "visit".) + +廚廬��廬 �廡��廛 �廩�廣�廬� 廩廬��� �廡��廛 ��廢� �廬�� Emacs. ������廬 廨��廬 ���廨 +���� �廣廨��廬 �廡��廛 廣廢��. ����, �廩����� 廩��� �廬�� Emacs ���� ��廚��� ��廡 +��廡��廛 廣� 廩�廬� "廩��廨��" �廬 �廡��廛. ��廬, ��� �����廣 ��廢�廨廬 廡��廛 廩���� +廩�� ��廣廨�廬 廩�� �廨廢����. �廚��� �� �廬� 廩��廨�� �廬 �廡��廛, Emacs �廩��廨 �廬 +�廬��� ��廡�廨� �廩� 廩��� ��廡廨� 廩����廨 ��廬廨 廬����� 廩�廩������ �廣廩� ��廣�廬. + +�� 廬���� ���廡 �廬�廬�� 廩� �廬廢���, 廬廨�� 廩� 廩�廨� ����廬 廩�廬���� ��廖廬���廬 +��廡廚�� ���� �廡廢� �廩���� 廩�� �廬�� "TUTORIAL.he". ��廡 �� 廩� �廬廢��� ��廨� +��� �廢�� �廬 廩� �廡��廛 ��廬� �廬� 廚�廡���. �廨�廣 �廬� 廚�廡��� 廡��廛 �廩� +"TUTORIAL.he" 廩��� 廣�廬廡 ������ ���廩� 廩��� 廩� 廩�廣�廨 �廩���廩 �-Emacs. +廚廬��廬 廡��廛 ��廩�� �-Emacs 廬廢�� �廬 廩�� 廩� �廡��廛 ��廡�� ��. + +���� ��� ����� 廩� 廚廬��廬 廡��廛 ��� 廩�廩 �廢��� �廬 廩� �廡��廛 �廩廨 �廨廢���� +�廚廬��. ��� ���廨�� 廩�廚廡��� "廡�廨�廬 �廨����� ���廖�廝" (��廡廨� �� ��廨����� +��� 廩� �廡��廛). ��廨� 廩廬廡�廩� �廬 �廚廡��� + + ��C-x C-f 廚廬� 廡��廛 + +��Emacs ��廡廩 廩廬廡�廩� �廬 廩� �廡��廛. 廩� �廡��廛 廩廬廡�廩� ��廚�廣 �廩�廨� �廬�廬��� 廩� +�廬廢���. 廩�廨� �� �廡廨�廬 "����-��廢廛" ("minibuffer") �廩��� �廩�廩廬 �廖�� �� +廩� 廡��. ��廬� ��廩廬�廩 ��� 廚廡���廬 �廣廨��� �廨����廬 廩� Emacs �廩�廡�廩�� �廬 +廩� �廡��廛 ���廢廛 ��. + +�� �廨� 廖���廬� ��廡�廩 �廬 廩� �廡��廛 (�� �� 廖�� ��廨 廩� 廡�� �����-��廢廛), +��廬� ���� �廬 �廚廡��� �廣�廨廬 C-g. + +>> �廡�廩� C-x C-f ���廨-�� �廡�廩� C-g. �� ���� �廬 �����-��廢廛 ��� ���� + �廬 �廚廡��� C-x C-f 廩�廩廬�廩� �����-��廢廛. �廬�廢�� ��� 廩�廝 廡��廛 �� �廚廬�. + +�廩廖���廬� ��廡�廩 �廬 廩� �廡��廛, �廡�廩� <Return> �廖��� �廬 �廡��. ��-�� 廬��廩 +C-x C-f �廣���� �廬�廢� �廬廚廬� �廬 �廡��廛 廩��廨廬�. �����-��廢廛 �廣�� ��廩廨 +廚廡��廬 �-C-x C-f 廬廖��� �廬 廣���廬�. + +��� 廡廢廨 ��廨-�� 廬��� �廡��廛 ��廚�廣 廣"� �廬廢��� �廬���� ��廢廣 �� 廩������. +�廩廬����� �廩��廨 �廬 �廩������, �廡�廩� �廬 �廚廡��� ����: + + ��C-x C-s 廩��廨 �廬 �廡��廛 + +廚廡��� �� 廩��廨廬 �廡��廛 �廬 ��廡廖� �����廡 �廬�� Emacs. �廚廣� �廨�廩��� 廩廬廚廣��� +廚廡��� ��, Emacs �廩�� �廬 廩� �廡��廛 ��廡�廨� �廩� ��廩 �� 廩��廡�廨 �� ��� +������. �廩� ���廩 ��廢廨 廣"� ��廖廚廬 "~" �廖�廝 �廩� ��廡�廨� 廩� �廡��廛. + +�廩�廩��廨� �廖廬���廬, Emacs �廢�� �廩�廨� �廬�廬��� �廬 廩� �廡��廛 廩�廩�廨. �廖� +�廩��廨 �廣廬�� ������廬 廣"� �����廣 ����� ��廬廨 ��� ��廣���� 廩��� �� ���廩� +��廚�� (廨�� ���� 廚�廖廡� 廣� 廩��廨� �������廬). + +>> �廡�廩� C-x C-s ��� �廩��廨 �廬 �廣�廬廡 廩��� 廩� �廩�廣�廨. + �廬�廢��, 廬�廚�廣 ����廣� "Wrote ... TUTORIAL.he" �廬�廬�廬 �廬廢���. + +��廬� �廚廬�� 廡��廛 廡��� 廣"� �廢廚�廬 �� �� �廣廨�� ��廬�. ��廬� �� �廚廬�� 廡��廛 +廩���� 廡���. �� ��廨� ��廢�廨 廡�廢�� ��廩�� �廣�廨廬 Emacs: 廚廬�� �廬 �廡��廛 +廩���� 廬���� 廨�廡 ��� �廬���� ��廡�廩 �廡廖� �廬���. �廩廬廚廣��� �廬 廚廡��廬 �廩��廨�, +Emacs ��廢�廨 �廬 �廡��廛 廣� ��廡廖� 廩�廡廩廬�. ���廬� 廨�廣 �����, 廬���� ��廩�� +廩����� 廣�廨��� 廡��廛 廡���. + + +* ��廢廢�� +-------- + +�� 廬廚廬�� 廡��廛 ��廖廝 廣� C-x C-f, �廡��廛 �廨�廩�� 廣���� �廩�廨 廚廬�� �-Emacs. +廬���� ����廨 ���� 廣"� C-x C-f. �� 廬���� �廚廬�� �廖廚廨 廨� 廩� 廡�廢��. + +>> ��廢�廨 廣廬� 廡��廛 �廩� "foo" 廣"� �廡廩廬 C-x C-f foo <Return>��. + ��廨-�� ����廖� 廡廢廬 �廡廖�, 廣廨�� ��廬� ���廖�廝 廩�廨� �廡��廛 "foo" + 廣"� C-x C-s. 廣廬� ��廨� �廩�廣�廨 �廣�廨廬 C-x C-f TUTORIAL.he <Return>��. + +��Emacs ����廡 �� 廡��廛 �廬�� ��廩�廬 �廩� "��廢廛" ("buffer"). 廚廬��廬 廡��廛 ��廢廨廬 +��廢廛 ��廩 �廬�� Emacs. ��� �廨��廬 �廬 廨廩��廬 ���廢廢�� �廡����� �廬�� Emacs, +�廡�廩� + + ��C-x C-b �廢� 廨廩��廬 �� ���廢廢�� + +>> �廖� �廬 C-x C-b ��廡��� ��. + +廩��� �� 廩��� ��廢廛 �廩 廩� ��� ��廢廛 廣廩�� �� �廢��� �廬 廩� �廡��廛 廩�廬 廬���� +��� ����廡. �� �廡廖� 廩�廬� �廡�廩�� ����� Emacs 廬��� ���� ��廡 廩� ��廢廛 +��廩��. + +>> �廡�廩� C-x 1 ��� ��廚�廨 �廨廩��廬 ���廢廢��. + +�廩廡����� �廖廚廨 ��廢廢��, 廨廡 ��� ��� ���� ����廬 ���廢廛 "������" ��� 廨�廣 +�廬��. ��� ���廢廛 �� �廬� ��廢廣�� 廣廨��� ���廬� 廨�廣. �� �廨廢���� �廣廨�� ��廢廛 +��廨, 廣���� "�廣��廨" ��廢廛. 廣��廨 ��廢廢�� 廩�廬����� �廡�廢��, ��廬� �廣廩�廬 ��廬 +廣"� C-x C-f 廩�廚廡�� �廬 �廡��廛 �廩��廬. ��� 廡���廬 �廨� 廚廩��� ��廬廨: 廩���廩 +�廚廡��� C-x b. 廚廡��� �� 廬���� ��廬�� ��廡�廩 �廬 廩� ���廢廛. + +>> �廡�廩� C-x b foo <Return>�� ��� ����廨 ���廢廛 "foo" �廩廨 ����廡 �廡廖� 廩� + �廡��廛 "foo". ��廨-�� �廡�廩� C-x b TUTORIAL.he <Return>�� ��� �廩�� + �廩�廣�廨 ��. + +�廨�� ��廡廨�� 廩� ���廢廛 ��� �廩� �廡��廛 (��� 廩� �廬�廡�� 廩��). ��� ��� �� +廬��� ��. 廨廩��廬 ���廢廢�� 廩��廢廨廬 廣"� C-x C-b 廬��� 廬廢�� �廬 廩��廬 �� ���廢廢�� +�廡����� �-Emacs. + +�� �廡廖� 廩��廢� ����� 廩� Emacs ���� 廬��� ��廡 廩� ��廢廛 ��廩��. 廡����� +��廢廢�� 廩���� 廡廩�廨�� �廩�� 廡��廛. ������, ���廢廛 �廩� "*Buffer List*" ���� +�廢�� 廩�� 廡��廛. ��� ��廢廛 �����廡 �廬 廨廩��廬 ���廢廢�� 廩��廢廨 廣"� C-x C-b. +��廢廛 �廩� "*Messages*" �廝 ��� ���� 廡廩�廨 �廩�� 廡��廛; ��� ����廡 �廬 ����廣�廬 +廩��廚�廣� �廩�廨� �廬�廬��� ����� 廣���廬�� �廬�� Emacs. + +>> �廡�廩� C-x b *Messages* <Return>�� ��� �廢廚�廬 ���廢廛 廩� ���廣�廬. + ��廨-�� �廡�廩� C-x b TUTORIAL.he <Return>�� 廣"� ����廨 �廩�廣�廨 ��. + +�� 廣廩�廬� 廩������ ��廡廖� 廩� 廡��廛 ���廨-�� 廚廬�廬� 廡��廛 ��廨, ��� ���廨 廩��廨 +�廬 �廩������ 廩廣廩�廬� �廡��廛 �廨�廩��. �廩������ ���� �廩�廨�� �廬�� Emacs, �廬�� +���廢廛 廩� ��廬� 廡��廛. �廢�廨廬� �廣廨��廬� 廩� �廡��廛 ���廖廝 ���� �廩廚�廣�� 廣� +���廢廛 廩� �廡��廛 �廨�廩��. ��廨 �� ��� 廩���廩�, �� �廩�廣�廬� ��� 廩�廩 廢�廨� +�廩��� ���� �廩��廨 �廬 ���廢廛 廩� �廡��廛 �廨�廩��. ��� �� ��� �� ��� ���� +�廩� �� ���廬� 廢廨���� �廣��廨 ���廢廛 ���� �廣�廨廬 C-x C-f ��� �廩��廨 廣� +C-x C-s. ��� 廡���廬 廚廡��� + + ��C-x s 廩��廨 ��廢廢�� ����� + +��C-x s 廣��廨 廣� �� ���廢廢�� �廩廨 ������ 廩������ 廩�廨� �廩�廨�. ���� �� ��廢廛 +��� ��� 廩��� �廬�� ��� �廩��廨 ��廬� �� ��. + +>> ����廖� 廩�廨� 廩� �廡廖� ���廨-�� �廡�廩� C-x s. + ��� 廢廨�� �廩��� ��� �廩��廨 ��廢廛 �廩� TUTORIAL.he. + �廩��� ����� 廣"� �廡廩� 廣� "y". + + +* �廨��廬 ��廖廝 �廚廡���廬 +-------------------- + +�廖廚廨 �廚廡���廬 �-Emacs ���� ��廨�� ��� 廩��廬� ��廚廣�� 廣"� �� 廬�� �-control +��-meta. ��� ��廬��廨 廣� �廣�� ��, Emacs �廩廬�廩 �廚廡���廬 X ��廨����廬 (eXtend) +�廬 ��廖廝 �廚廡���廬 �廨���. 廚廡���廬 �廨��� ��� �� 廩廬��: + + ��C-x �廨��廬 廬�. 廬� ���� 廩�� ��廨�� �廩��� �廬 �廚廡���. + ��M-x �廨��� 廣"� 廩� �廚廡���. ��廨�� �� 廩� �廨�� 廩� 廚廡���. + +�廣�廨廬 廩廬� ��� ��廬� ��廚廣�� 廚廡���廬 廩���廩��廬 廩��� �廩廬�廩�� �廣廬�� 廨��廡�廬 +��廬廨 ��廩廨 廚廡���廬 廩���廬� 廣� 廣�廩��. ��� ��� ��廨 廨��廬�: C-x C-f �廚廬��廬 +廡��廛, �-C-x C-s �廩��廨廬 廡��廛, ������. ����� ��廖廚廬 ��� 廚廡��� �廢�廬 +�-Emacs -- ��C-x C-c. (�廩�廬� �廚廣���� C-x C-c, �� 廬���� �廩������ 廩�廨� +�廩�廨�; C-x C-c �廢�廣 �廩��廨 �� 廡��廛 廩廩���廬� �廚�� 廩��� �廖��� �廬 Emacs.) + +�� �廬� �廩廬�廩�� �廢� �廨廚� �廩廨 廬��� ��廖廚廨 廬�����廬 ��廡���, ����� �廡�廡�� +�廚廡��� �����廬 ��� �廣��廨 �-Emacs �廬����廬 ��廨廬. �廚廩廨 �廣廩�廬 ��廬 �廣�廨廬 +�廣��廨 �� 廚廡���廬 廩� ���� ������廬. ����, ��廩廨 �廬� �廩廬�廩�� �廬廢��� +�廡廖�����廬 廩�廖���廬 ��廢�� 廨廡 廬����廬 ��廬 ��-����廬, 廬廢�廨�� "��廩廣�廬" +("suspend") �廬 Emacs 廣"� �廣��廨 �廬����廬 ��廨廬. + +�廚廡��� C-z ��廢�廬 �-Emacs *���廚� ����* -- �� 廩廬���� �廩�� ���� ����廨 +��廬廨 ����廩�� ���廬� �廡���. ��廩廨 Emacs 廨廛 廣� 廬廢��廬 �廡廖�, C-z "�廩廣�" �廬 +Emacs: ��� ����廨 �廬�� �廩�廨廬 �廚廡���廬 ��廖�廖�廬 廩� �廣廨�廬 ��廚廣�� ("shell"), +��� ���� �廖��� �廬 Emacs. �廨�� ��廣廨��廬, ��� ���廩�� �廣���廬�� �-Emacs, +廬廢�廨�� ��廡�廩 �廬 �廚廡��� "fg" �� ��"%emacs"��. + +�廨�廣 ����� ��廩廬�廩 �-C-x C-c ��� ��廩廨 �廬� 廣����� ��廬�廬廡 (log out). +���-��, 廬廢�廨�� ��廩廬�廩 �� ��� �廢�廬 �-Emacs 廩��廚廣� 廣"� 廬�����廬 ��廨�廬 +���� 廡廨��廬 ���"� -- 廬�����廬 ��� �� 廬��� ���廣�廬 ��廖廬�廨 廣� �廩廣��廬 Emacs. + +廡����廬 廚廡���廬 C-x 廨��廬 ���. ���� 廨廩��廬 ��� 廩��廨 ���廬�: + + ��C-x C-f 廚廬� 廡��廛 + ��C-x C-s 廩��廨 廡��廛 + ��C-x s 廩��廨 ��廢廢�� ����� + ��C-x C-b �廢� 廨廩��廬 ��廢廢�� + ��C-x b ���廝 ��廢廛 + ��C-x C-c 廢� �-Emacs + ��C-x 1 �廩�廨 廨廡 ���� ��� ���廡 �� �廩�廨 + ��C-x u ��� 廚廡��� ��廨��� + +�廨��� 廣"� 廩� �廚廡��� 廩���廩�廬 廣� 廚廡���廬 廣�� ��廬廨 ���廨�廬 �� 廚廡���廬 +廖廚廢�廚��廬 廨廡 ���廚�� 廚廣��� (modes) �������. ����� ��� ��� 廚廡��� +replace-string (���廝 ��廨��廬) �廩廨 ����廚� ��廨��廬 ��廬 ��廩�� ��� ���廢廛. +��廨� 廩廬廡�廩� M-x, ��Emacs �廢�� M-x �廬�廬�廬 �廬廢��� ����� 廩廬廡�廩� �廬 廩� +�廚廡���, ��廡廨� �� "replace-string". �廖廚�廡 廩廬廡�廩� "repl s<TAB>��" �-Emacs +�廩��� �廬 �廩� ����. (<TAB> ��� �廡廩 Tab, ��廨� ��� 廬�廢�� ��廬� �廣� �廡廩 +�-CapsLock �� Shift, ��� �廡廢� �廩���� 廩� ��廡��廬.) 廖���� �廬 廩� �廚廡��� +廣"� �廡廩廬 <Return>. + +�廚廡��� ����廚廬 ��廨��廬 �廡�廡� �廩�� �廨������� -- ���廨��廬 廩廬���廝 ��� 廩廬���廝 +��廬�. 廖���� �廡廩� 廩� �� ��廬 ��� 廣"� <Return>. + +>> ����� �廬 �廖�� 廩廬� 廩�廨�廬 �廬�廬 �廩�廨� ��. + 廣廬� �廡�廩� M-x repl s<Return>changed<Return>altered<Return>��. + + 廩��� �� 廩����� "changed" �廩�廨� �� 廩廬�廬�: �� 廣廬� ���廚廬� �廬 + ����� c-h-a-n-g-e-d ����� "altered" ��� �廡�� �� ��� ��廢�廬 ��廨� + �廖��. + + +* 廩��廨� �������廬 +---------------- + +廩������ 廩廣廨�廬� �廡��廛 ��� �廨� 廩�廨廬� 廣����� ���廬 ������ �� ���廩� 廩��� +�廬廡廣. 廣"� ���� 廣���� �廚�� 廖��� ��, Emacs 廩��廨 �廣廬�� ������廬 �� 廡��廛 +廩��廢� �廣廨���. �廩��廨� ��������廬 ���廬 �廣廩�廬 �廡��廛 �廚廨� 廩廩�� �廬��� +��廖廬��� �廬� #. ������, �� ����� 廣�廨��� 廡��廛 �廩� "hello.c", 廡��廛 �廩��廨� +��������廬 廩���廢廨 廣��廨� ��廡廨� "#hello.c#". 廩��廨� 廨���� 廩� �廡��廛 廣� ���� +���廡廬 �廬 廡��廛 �廩��廨� ��������廬. + +�� ���廩� ��� �廬廡廣, 廬���� ��廢�� �廬 �廩������ 廩�� �廖廚廡廬� �廩��廨. �廩� ��, +�廩 �廚廬�� �廬 �廡��廛 �廨��� (�廬 �廡��廛 �廩�� ��廡�廨�, �� �廬 廡��廛 �廩��廨� +��������廬), ���廨-�� ��廡�廩 M-x recover-file <Return>��. �廩-Emacs ��廡廩 +��廩�廨, �廡�廩� yes<Return>�� ��� 廩-Emacs �廩��廨 �廬 �廡��廛 �廚� 廩�廩�廨 +�������廬. + + +* 廬廢��廬 �� +---------- + +�� Emacs ���� 廩�廬� �廡�廩�� 廚廡��� ���, ��� �廢�� �廬 廩�廡廩廬� �廬�廬�廬 �廬廢���, +����廨 廩�廡廨� "���廨 廬廢��廬 ��". ���廨 �� �廩廬�廩 �廩�廨� �廬�廬��� 廩� �廬廢���. + + +* 廩�廨廬 廖���廖 +------------ + +�廩�廨� 廩�廣� ���廨 廬廢��廬 �� �廡廨�廬 "廩�廨廬 �廖���廖" (mode line). 廩�廨� �� +�廢��� �廩�� ���: + + -U:**- TUTORIAL.he 63% L651 (Fundamental)----------------------- + +廩�廨� �� �廢��� ���廣 �廩�� ���� �廢�� 廩� Emacs ����� ��廡廖� 廩��廢� �廣廨���. + +�廬� ��廨 ���廣�� ��� �廩�廣�廬� 廩� 廩� �廡��廛 -- ��� �廡��廛 廩廚廬�廬�. NN%�� �廢��� +�廬 ��廡���� ������ �廬�� ��廡廖�, ����廨 �� NN ������ ���廡廖� 廡����� ��廡廖� +���廢� �廨�廣 �����. �� ���廢� ����� ���� �廬 廬���廬 ��廡廖�, 廬廨�� 廩� "Top" +��廡�� "0% ". �� ���廢� ����� ���� �廬 廖�廝 ��廡廖�, 廬廨�� 廩� "Bot" ��(bottom). +�� ��廡廖� ��-�� 廡廢廨 廩���� ��廢� �����, 廩�廨廬 �廖���廖 廬廢�� "All". + +���廬 L ���廖廚廨 廩��廨�� �廢����� �廬 ���廡�� ������ ��廨� ��廨廬: �� �廨��� �廬 +�廖廚廨 �廩�廨� 廩�� ��廢� �廖��. + +�������廬 ��� �廡廢� �廩���� �廩�廣�廬� �� 廩���廬� �廬 ��廡廖�. ��� ��廨� 廚廬��廬 +�廡��廛 �� ��廨� 廩��廨廬� ���廡 ��� 廩� 廩�廨廬 �廖���廖 ���� �廢�� ������廬, ��� 廨廡 +�廡廚��. + +���廡 廩�廬�� �廖��廨��� ���廨 ��� ��o ��廚�� �廣廨��� (editing modes) �廚廣���� +�廣廬. �廨�廨廬 ����� ��� Fundamental, ���廚� ��廖�廖, 廩�� �廬� �廩廬�廩�� �廣廬. +���� ����� 廩� "��廚� 廣廨��� 廨�廩�" (major mode). + +�-Emacs ��廚�� 廣廨��� 廨�廩��� 廨��� ��������. ��廡 ��� ��廣�� �廣廨��� 廩� 廩廚廬 +廬���廬 �廖���廬 �/�� 廖�� �廖��� 廩� �廡廖�, ���� Lisp mode, Text mode ���'. +��� 廨�廣 �廬�� 廨廡 ��廚� 廣�廡廨� ��� ���� ����廬 廚廣�� �廩�� 廬��� �廢���� �廩�廨廬 +�廖���廖 ���廬� �廡�� �� �廨�廣 �廬� 廨���� "Fundamental". + +�� ��廚� 廣�廡廨� ��廨� ���� 廚廡���廬 �廚廣�� �廢�廨� �����廬. ��廩�, �廩�� 廚廡���廬 +��廢�廨廬 �廣廨�廬 �廬�� 廬����廬, ����廬 ��� 廩廚廬 廬���廬 ����廨� �廬 �廚�廨�� 廩� +�廣廨�廬 �廢�廨� ��廨廬, �� ��廚� 廣�廡廨� ���� �����廖 �廣廨�廬 �廢�廨� 廩�廬���� �廩廚�. +�� ��廚� 廣�廡廨� ���� ��廣廩� 廩� �廚廡��� 廩�廣�廨廬� �廚廩廨 ��廚廣�� �廬 ��廬� ���廚�. +��廩� �廚廡��� ��廚廣�� �廬 ���廚� Fundamental ���� M-x fundamental-mode. + +�� �����廬�� �廣廨�� �廡廖� �廩廚� ���廩�廬 ��廩��, ��� �廡��廛 ���, ���� ��� +��廩廬�廩 �-Text mode. + +>> �廡�廩� M-x text-mode <Return>��. + +�� ����: �廝 ��廬 �廚廡���廬 Emacs 廩���廬� 廣� �� �廩�� �廬 �廬����廬� ���廚� +���廬�. 廣� ��廬, 廩��� �� 廩-M-f �-M-b �廬���廖�� 廣�廩�� �-'�廨廩' ���廡 ������. +�廚��-��, �-Fundamental mode, ��M-f �-M-b �廬���� 廣� ��廨廩 ��廚廨�� ��� +�����. + +��廚��� 廨�廩��� ��廨�-��� �廩��� 廡��廬 �廬 �廬����廬 �廚廡���廬: 廨�� �廚廡���廬 +廣���� "廣�廩�廬 ��廬� 廣����" ��� ���廚��� �廨�廩���, ��� 廣�廩�廬 ��廬� 廡廢廬 ��廨廬. + +�廢廚�� �廬�廣�� 廩� ���廚� �廨�廩� ������ �廩 ��廡�廩 C-h m. + +>> �廩廬�廩� �-C-u C-v 廚廣� ��廬 �� ��廬廨 ��� ����� 廩�廨� �� �廨�廩�廬 �廬廢���. +>> 廣廬� �廡�廩� C-h m ��� �廨��廬 ��� Text mode 廩��� ��-Fundamental mode. +>> ��廖�廝, �廡�廩� C-x 1 ��� �廖�廡 �廬 �廬�廣�� ��廬廢���. + +��廚��� 廨�廩��� �廡廨��� �� �廩�� 廩廡����� �� ��廚��-�廩�� (minor modes). +��廚�� �廩�� ���� ������ ���廚� ���廚��� �廨�廩���, �� 廨廡 �廩��� ��廬� ��廡廢廬. +�� ��廚�-�廩�� ��廬� ��廚廣�� �� ����� ��� 廬��廬 ��� 廩�廨 ��廚�� ��廩�� ���� +廬��廬 ���廚� �廨�廩� ������. ��� 廬���� ��廚廣�� ��廚�-�廩�� ��� �� ��廬廨, �� �廝 +��廚�-�廩��. + +��� ���廚��-��廩�� �廩���廩��� ���廬廨, ������ �廩� 廣廨��廬 �廡廖 �廩廚廬-���廩, ��� +Auto Fill mode. ��廩廨 ��廚� �� ��廚廣�, Emacs �������廬 廚�廬� 廩�廨� ��廩� +�廖��� ���� �� ��廡廖� 廩�廡廩廬� �廨�� ��� �廩��� 廩�廨� ��廬. + +��廚廣�廬 Auto Fill mode �廩 ��廡�廩 M-x auto-fill-mode <Return>��. ��廩廨 ��廚� +�� ��廚廣�, ��廬� ����� 廣"� M-x auto-fill-mode <Return>��. ��廬 ���廨廬, 廚廡��� +�� �廚廣��� �廬 ���廚� �廩���� 廚廣�� �����廬 ��廬� �廩��� 廚廣��. �廚廣��� �� +廡�廨��� "��廬��" -- �廚廡��� "��廬�廬" �廬 ���廚�. + +>> �廡�廩� 廣廬� M-x auto-fill-mode <Return>��. ��廨-�� �廡�廩� "廩��� " (廣� + �廨��� �廖�廝) 廩�� �廩�� 廣� 廩廬�廚廬� 廩�廨� ��廩�. �廨����� �廩���� �廩�� + 廩-Auto Fill mode 廩��廨 廩�廨�廬 �� �廨廡 �廨��� 廩��� �����. + +�廩����� (margin) 廩-Emacs 廩��廨 ��廨�-��� �廬����� ��廨� 70 廬����, ��� ��廬� +�廩��廬 ���廨� �� �廣�廨廬 �廚廡��� C-x f. 廚廡��� �� �廡��廬 �廬 ����廨� ���廩� 廩� +�廩����� ��廨����� ���廨�. + +>> �廡�廩� C-x f 廣� �廨����� 廩� 20. (C-u 2 0 C-x f). ��廨-�� �廡�廩� �廡廖� + ��廩�� �廩��� �� 廩-Emacs 廚�廬� 廩�廨�廬 ��廩�廬 ��廨� 20 廬���� ��� ���廬廨. + ��廖�廝, ����廨� �廬 ���廨廬 �廩����� �-70 廣"� 廩���廩 ���廨 �-C-x f. + +�� 廣廨�廬� 廩������ ���廢廣 廚廖廡�, Auto Fill mode �� ���� 廩�廨�廬 ���廩 ���廚� +�������. +��� ���� ���廩 �廬 �� �廚廖廡� �廡�廩� M-q ��(META-q) �廩�廖�� ��廢� �廬�� +�廚廖廡�. + +>> ���廣� �廬 �廖�� �廬�� �廚廖廡� �廡���廬 ��廡�廩� M-q. + + +* ��廚�廩 +------- + +��Emacs ���� ��廚廩 ��廨���廬 (廨廢廝 廩� 廬���� �� �����) 廡���� �� ���廨� �廬�� +��廡廖�. ��廚�廩 廩� ��廨��廬 ��� 廖�� 廩� 廚廡��� ���廣廬 �廖��: ��� ��廡� �廬 �廖�� +���� 廩��廢�� ���廨��廬 ����. + +���廚�廩 廩� Emacs ���� "�廢��廨" ("incremental"). 廚�廨�廩 ���廨 ��� 廩���廚�廩 +�廬�廢廣 ��廡��� ��廡廩廬�� �廬 ���廨��廬 ��廬� �廨廢���� ��廢��. + +�廚廡��� ��廬��� ���廚�廩 ��� C-s ���廚�廩 廡���� �-C-r ���廚�廩 ���廨�. ���! �� +廬廚廣��� ��廬� 廣����. + +�廩廬廡�廩� C-s, 廬廨�� 廩����廨 廬廢��廬 ��� ��廚�廣 ��廡廖� "I-search". �� ���廨 +廩-Emacs ��廢� ��廢� "��廚�廩 �廢��廨" ("incremental search") ���� ��廬�� +��廡廩廬�� �廬 ���廨��廬 ��廬� �廨廢���� ��廢��. �廡廩� 廣� <Return> �廖���廬 �廬 +���廚�廩. + +>> �廡�廩� 廣廬� C-s ��� ��廬��� ���廚�廩. ���-���, ��廬-��廬, �廡�廩� �廬 ����� + "廖��", 廣� �廚廖廡� ��廨� �� ��廬, �廩��� �� ��廬����廬 �廖��. + �� 廣廬� �廢�廬� �廬 ����� "廖��" 廚廣� ��廬. +>> �廡�廩� C-s 廩��, ��� ��廢�� �廬 "廖��" ��廡���廬 ��廖廚�� ��廡廖�. +>> �廡�廩� <Delback> 廩��廩 廚廣��� �廩��� �� �廬��廣廬 �廖�� ��� �廡廩�. +>> �廡�廩� <Return> �廖��� ���廚�廩. + +��� 廩�廬� �� ��� 廩廡廨�? ����� "��廚�廩 �廢��廨" Emacs ��廖� ��廢�� �廬 ��廡�� +��� �� ��廚�廣� ���廨��廬 廩�廡廩廬�. ��� ��廢�� �廬 ���廨��廬 ��廡�� ���, 廚廩�� +�廡�廩� C-s 廚廣� ��廖廚廬. �� ���廨��廬 ���� ��廢�廬 ���廩� ��廡廖�, Emacs �廢廚廢廝 +�����廣 廩���廚�廩 ���廖 ��廢� 廩� "�廩���" ("failing"). �廡廩� 廣� C-g �� ��� +�廖���廬 �廬 ���廚�廩. + +(�廣廨�: ��廣廨��廬 ����廬 �廡廩� 廣� C-s �廡廚�廣� �廬 廬廢��廬 ��廖�, �� 廩�� 廬廨�� +��廬廨 廩�� 廚�� 廩� Emacs. �廩�廣�廬 ���廨 廩廬���廬 �廣廨�廬 ��廚廣�� 廩廩�� "flow +control" ��廚廣�廬 廣"� C-s ����� �廣��廨� �廬 C-s �-Emacs. ������ �廡廚�廬 +�廬廢��� ��廣廨��廬 ��� �廩 ��廡�廩 C-q.) + +�� ����� ���廚�廩 廬廡�廩� 廣� <Delback>, 廬廨�� 廩�廬� ���廨�� 廩� ���廨��廬 +����廡廩廬 ���廡 ����廚�廩 ���廨 ��廡�� �廡��� �� ��廢�� ���廨��廬 ��� �廬� ���廨��. +��廩�, ���� 廩�廡廩廬� "廖" 廣"� ��廢�� �廬 ��廡�� ��� �� ��廚�廣� ���廬 "廖". �� +廣�廩�� 廬廡�廩� "�", �廖�� ���� ��廡�� �� ��廢� "廖�". 廣廬� �廡�廩� <Delback>. +�-"�" ���廡 ����廨��廬 ��廖�� ���廨 ��廡�� �� ��� �廢� �廬 "廖" �廨�廩���. + +�� ����� ���廚�廩 廬廚廣��� 廚廡��� ��廩�� 廣"� �廡廩� 廣� �廡廩 廬�� ���廢� 廣� +CONTROL �� META, ���廚�廩 �廖廬���. (��� 廬���� ��廢��� ���� �� -- ��� 廬���� +������� �廣廬 ��廚�廩, �����廬 C-s �-C-r.) + +�廡廩� 廣� C-s �廬���� ��廚�廩 廩��廖� ��廢�� �廬 ���廨��廬 _��廨�_ �廖��. �� +�廨廢���� ��廢�� �廩�� ��廡廖� �廡��� ��廡�� ������, �廡�廩� C-r ��廡�� C-s. �� +�� 廩��廨�� ���� C-s 廬廡廝 �� ���� C-r, ��� 廩����� ���廚�廩 �廬�廚�. + + +* �����廬 �廨���� +--------------- + +��廬 �廬����廬 �����廬 廩� Emacs ��� �� ��廬� ��廢�� ��廬廨 ����� ��� 廣� ��廖� +��-����廬. (�廣廨�: Emacs �廩廬�廩 ����� "frame" -- "廬���廬" -- �廩��� �� +廩廬�����廬 ��廨�廬 ����廬 "����". 廬����廬 �廬��廨�廬 �廚廖廡� ����. 廬���� ��廢�� �廬 +廨廩��廬 ������� 廩� Emacs �廚廨廡 "Glossary" 廩� ��廨�� �廩廬�廩.) + +>> ����� 廖�� �廩�廨� �� ��廡�廩� C-u 0 C-l ��(CONTROL-L ��� CONTROL-1). + +>> 廣廬� �廡�廩� C-x 2 ��廬�廢�� ��� ����� �廬��廡 �廩����. �� ��� �廩�� ������廬 + �廢�� �廬 �廩�廣�廨 ���. �廖�� �廩�廨 ����� �廣����廛 + +>> �廡�廩� C-M-v ��� ����� �廬 ����� �廬�廬��. + (�� ��廡��廬 廩��� ��� �廡廩 META ���廬�, �廡�廩� ��<ESC> C-v �廬���廝.) + +>> �廡�廩� C-x o ��("o" ��� 廨�� �-"other", "��廨") 廣"� ��廣��廨 �廬 �廖�� ����� + �廬�廬��. +>> �廡�廩� C-v �-M-v ����� �廬�廬�� ��� ����� ��廬�. + ��廩��� �廡廨�� ��廨��廬 ��� ����� �廣����. + +>> �廡�廩� C-x o 廩�� ����廨 ����� �廣����. + �廖�� ����� �廣���� ��廩�廨 ��廡�� �� ��� ��� �廚��-��. + +廬���� ���廩�� ��廩廬�廩 �-C-x o ��� ���� ��� 廩�� ������廬. ��� ���� ��廡�� +廖�� �廩��, ��� 廨廡 ���� ��� �廢�� �廬 �廖�� ��� 廨�廣. �� 廚廡���廬 �廣廨��� +�廨����廬 廚�廣��廬 廣� ����� 廩�� ��廢� �廖��. ��� 廡�廨��� ����� �� "����� +����廨". + +�廚廡��� C-M-v ���� ��� ��廩廨 ����� 廣�廨��� �廡廖� ����� ��� ��廩廬�廩�� ����� +��廨 �����廖. 廬���� ��� 廣廬 �廩��廨 廣� �廖�� ����� �� �廬� 廣�廨��� �廡廖� +���廬廡�� ����� �廩�� �廣�廨廬 C-M-v. + +��C-M-v ��� ����� ��廬 廩� 廚廡��廬 CONTROL-META. �� ��廡��廬 廩��� 廡��� �廡廩 +META ���廬�, 廬���� ��廡�廩 �廬 �廚廡��� 廣"� ���廢� ����廡� 廩� �廡廩� CONTROL +�-META �� ��� ��� ��廡�廩 v. �廖�廨 廩�� 廬��廢� 廣� CONTROL �-META ���� �廩�� +�� 廩�� ��廡廩�� ���� 廚�廣��� 廣"� 廩���� �廬� ���廡廩 ��� ��廬�. + +�� ��� ��廡��廬 �廡廩 META ���廬� ��廬� �廩廬�廩�� �-<ESC> �廬���廝, �廖�廨 �� +�廩��: ������ ��廡�廩 <ESC> �廨廡 ���廨 ��� CONTROL-v, ���廬 �廩�� +廩-CONTROL-<ESC> v �� �廣���. <ESC> ��� 廬� ����廬 廣廢��, 廩�� ��� CONTROL +�� META. + +>> �廡�廩� C-x 1 (����� �廣����) ��� �廖�廡 �廬 ����� �廬�廬��. + +(���� �廡廩廬� C-x 1 ����� �廬�廬��, ���廬� �廖�廡�� �廬 ����� �廣����. 廬���� +��廩�� 廣� 廚廡��� �� �-"�廩�廨 廨廡 ���� ��� -- ����� �� ��� ��廢� 廣廬�".) + +��� ���� ��廢�� �廬 ��廬� ���廢廛 �廩�� ������廬. 廬���� ��廩廬�廩 �-C-x C-f +�廚廬��廬 廡��廛 ���� ������廬 -- ��廨 �� ���� �廩廚�廣 廣� ����� �廩��. �廚廩廨 �� +�廚廬�� 廡�廢�� 廩���� ��� ��� �廩�� ������廬 ���廚� ��廬�-廬���. + +��� 廣�� 廩��� ��廩廬�廩 �廩�� �����廬 ��廢�� 廩� 廩�� ��廨�� 廩����: + +>> �廡�廩� C-x 4 C-f ���廨-�� �廡�廩� 廩� 廩� ��� �廡�廢�� 廩���. + 廖���� 廣� <Return>. 廩��� �� 廩�廡��廛 ����廡廩 ��廢� ����� �廬�廬��. �廖�� + ���� �廩� �廝 ���. + +>> �廡�廩� C-x o �廣��廨 ����� �廣���� ���廨-�� �廡�廩� C-x 1 ��� �廖�廡 �廬 + ����� �廬�廬��. + + +* 廬����廬 �廨���廬 +--------------- + +��Emacs �廖��� �廚廬�� �廖廚廨 "廬����廬" ("frames") �廬��� 廩����� �廩廬�廩�� �廢� +廩�廖��� ��廢�� 廨廡 �廡廖�. 廬���廬 ����廬 廡��廢廬 �����廬, 廬廚廨��, 廚廖� �����, ���廨 +廬廢��廬 �� ���'. (廬�����廬 ��廨�廬 �����廬 �廡廨�� ��� "����".) + +>> �廡�廩� M-x make-frame <Return>��. + �廬�廢��, 廬���廬 ��廩� 廬�廚�廣 廣� ��廖�. + +�� �� 廩廣廩�廬� �廬���廬 ��廡�廨�廬 ��廬� �廣廩�廬 �� �廬���廬 ���廩�. �廬���廬 �廨�廩��� +��� �� 廩�� ��廨 �����. + +>> �廡�廩� M-x delete-frame <Return>��. + �廬���廬 廩�� �廡廩廬� �廬 �廚廡��� 廬�廖�廨 �廬�廣�� ���廖�. + +���-��, ��廬� �廖��廨 廬���廬 ��廨� �廨���� ��廬��廬 廣"� ���� ������廬 廩� ��廣廨�廬 +廩��� (��廨�-���, 廣"� �廡�廡� 廣� ��廚廬�廨 ��廖��� �-"X" �廚��� 廣����� 廩� +�廬���廬.) 廩�� ���廣 ���� ���� �廣���� ��廩廨 廖��廨�� 廬���廬 (�� ����). ����廣 +��� 廚廩�� ��廨� ��廬廢���, ��� ��廬� ����廨� ����廨 ��廬廨. + + +* 廨��廬 廣廨��� 廨廡�廨廖����廬 +----------------------- + +�廬�� �廬�廡�廣� ��廢� 廩廡廨�� "廨�廬 廣廨��� 廨廡�廨廖���廬". Emacs �廢��� ��廬 廣"� +廖��廨��� �廨��廣�� �廩�廨廬 �廖���廖 �廖��� �廩� ���廚� �廨�廩�. ��廩�, ��廢� 廩� +[(Fundamental)] ��廡�� (Fundamental). + +��� ����廛 �廨�廬 廣廨��� 廨廡�廨廖���廬 �廩 ��廡�廩 <ESC> <ESC> <ESC>. ���� 廚廡��� +����廬 廩� "������廬". ��廬� ��廩廬�廩 �� �� ��� �廖�廡 �����廬 ���廬廨�� ���廢��� +�廬�� ����-��廢廛. + +>> �廡�廩� M-x ��� �����廖 �����-��廢廛; ��廨-�� �廡�廩� <ESC> <ESC> <ESC> ��� + �����廛 �廩�. + +�廡廩� 廣� C-g �� 廬��廛 �廬�� �廨��廬 廣廨��� 廨廡�廨廖����廬. ��廬, �廩�� 廩-C-g ���� +廚廡���廬 ��廨������� _��廖�廨廬_ �廨�� �廨廡�廨廖���廬, ���� �廢�廬 ����. + + +* �廡��廬 廣�廨� ��廖廚廬 +------------------ + +�廩�廣�廨 �廨�廩�� ��� �廩廬���� �廬廬 ������ ���廣 廩�� �廖廚�廡 ��廬��廬 �廩���廩 廩��� +�-Emacs. ��Emacs ���� ��-�� �廨�� 廩��� 廩�� �廚廩廨�廬 �廬�廨 ���廖��廨 ��� �廬 +���. ����, 廖��廨 廩廬廨廢� ����� ��廬廨 廣� Emacs 廩�� �廩 �� 廣�� �廨�� 廬����廬 +廩���廩��廬. Emacs ���� 廚廡���廬 �廩� 廡廨��廬 廬�廣�� 廣� �廚廡���廬 廩� Emacs. +�廚廣�廬 廚廡���廬 "廣�廨�" ��� 廬��� �廬���� ��廡廩 CONTROL-h 廩廣�-�� �廡廨� "�廡廩 +廣�廨�" ("help"). + +��廚廣�廬 廚廡���廬 廣�廨� �廩 ��廡�廩 �廬 C-h ���廨-�� 廣�� 廬� 廩��廡廩 廣�廨� �廖�� +�廖����. �� �廬� _���廬_ ������, �廡�廩� C-h ?�� �-Emacs �廢�� �廬 廖��� �廣�廨� +廩��� �廣��� �廨廩�廬��. �� �廡廩廬� C-h ��廖�廚� 廩� ��廨 ����廬� 廩��� 廢�廨� �廩�� +廣�廨�, 廚廩�� �廡�廩� C-g ���� �廬 �廚廡���. + +(�� �廡廩廬 C-h ���� �廢��� �廬�廬�廬 �廬廢��� ���廣� ���廨 廣�廨�, �廖� ��廡�廩 F1 �� +M-x help <Return>�� �廬���廝.) + +廖�� �廣�廨� ��廖�廖 ���廬廨 ��� C-h c. �廡�廩� C-h, ��廨�� �廬 ���廬 c ��� �廡�廩� +廖�廨廬 �廡廩�� 廩�廚廣��� 廚廡��� ��廩��. Emacs �廢�� 廬���廨 ��� 廡廢廨 廩� �廚廡��� +����. + +>> �廡�廩� C-h c C-p. + +�廬�廢�� 廩廬�廢� 廢廨��� ����廬 �廩�� ��� ��: + + C-p runs the command previous-line + +����廣� ��� �廨�� �廬 "廩� �廚��廡廢��". ���廬 �廩��廬 �廚��廡廢��廬 ���廨�� ��� +�廢��� �� �� 廣�廩�廬, �廩��廬 廣廩���� �廩�廩 �廬�廣�� �廡�廢廨 -- �廖廚�廡 ��� �����廨 +��� �廬 �廚廡���廬 廩���廬� �廣�廨. + +��廬� �廢��� ��廨� C-h c �� 廚廡���廬 廩��廚廣��廬 廣"� 廖�廨廬 �廡廩�� ���廨� ���� +����, ���� C-x C-s �� (�� ��� �廡廩 META �� EDIT �� ALT) ���<ESC> v. + +�艠��廬 ���廣 �廚�廨� ��廬廨 廣� 廚廡���, �廩廬�廩� �廚廡��� C-h k ��廡�� C-h c. + +>> �廡�廩� C-h k C-p. + +�廬�廢��, ��廢�� �廩� ��廬�廣�� 廩� �廚��廡廢�� ����� Emacs �廚廨�. �廩廬廖���� �廡廨�� +�廬 �廬�廣��, �廡�廩� C-x 1 ��� �廖�廡 �廬 ���� �廣�廨�. �� ������ �廣廩�廬 ��廬 +���. �廚廩廨 ��廢廣 廡廢廬 廣廨��� 廬�� 廩���廩 �廬�廣�� ���廢� �廨廡 ��"� ��廡�廩 C-x 1. + +��� 廣�� ��� 廚廡���廬 廣�廨� 廩���廩��廬: + + ��C-h f 廬� �廖�廨 廣� 廚��廡廢��. �廩 ��廡�廩 �廬 廩� �廚��廡廢��. + +>> �廖� ��廡�廩 C-h f previous-line <Return>��. + �廬�廢��, ��廢� 廬�廣�� ��� 廩� �廚��廡廢�� ����廩廬 �廬 �廚廡��� C-p �廚� 廩��� + ���廣 �-Emacs. + +廚廡��� ���� C-h v �廢��� 廬�廣�� 廩� �廩廬��, ���� ��� 廩�廬 �廣廨��� 廩��� ��廬� +�廩��廬 ��� �廡廖�� �廬 Emacs. �廩 ��廡�廩 �廬 廩� ��廩廬�� ��廩廨 Emacs ��廡廩 ��廬. + + ��C-h a 廚廡���廬 ����廣 ���廩� �廖����. �廡�廩� ���廬 �廚廬� �-Emacs + �廢�� �廬 廨廩��廬 �廚廡���廬 廩廩��廬��� �����廬 �廬 ���廬 ��廚廬�. + �� �廚廡���廬 ���� ��廬��廬 ��廚廣�� 廣"� META-x. 廣��廨 ��廡 + ��廚廡���廬 廬�廢� �� 廖�廨廬 �廡廩�� 廩�廚廣��� �廬 �廚廡���. + +>> �廡�廩� C-h a file <Return>��. + +�廬�廢�� ���, ��廢� ���� 廣� 廨廩��� 廩� �� �廚廡���廬 廩廩��廬��� �����廬 �廬 ����� +"file". ������ 廬廨�� �� �廡廩� 廡�廢�廨 ���� C-x C-f �廢� 廩��廬 �廚廡���廬 ���� +find-file. + +>> �廡�廩� C-M-v ��� ����� �廬 ���� �廣�廨�. 廣廩� ��廬 廚廣��� ����廬. + +>> 廣廬� �廡�廩� C-x 1 ��� �廖��廨 �廬 ���� �廣�廨�. + + ��C-h i �廢� ��廨���� ��廩廬�廩 ������� �����廬 Emacs. (廚廡��� �� + ���廣� �� �廩� "Info".) 廚廡��� ��廬 廚�廬�廬 ��廢廛 ����� �廡廨�� + "*info*" 廩�� 廬���� �廡廨�� ��廨���� ���廬廡��� ��廣廨�廬 廩���. + �廡�廩� m emacs <Return>�� ��� �廡廨�� ���廨�� ��廩廬�廩� Emacs. + �� ����� ���廨�� �廬 Info, �廡�廩� ? �-Emacs �廡� �廬�� + �廩�廣�廨 廣� �廬����廬 廩� Info mode. �廩廬廖���� 廣� �廩�廣�廨 + ���, ��� ����� ����廢�� ��廩廬�廩 ���廨�� Emacs �廬�廨 �廬�廣�� + �廣�廡廨� 廩���. + + +* 廣�� 廬����廬 +------------ + +廬���� ����� 廣�� 廣�-����廬 Emacs 廣"� 廡廨��� ���廨�� ��廩廬�廩 廩��, �� �廖廚廨 +���廚廖 �� ���廨廖� �廡���廬 �廬�� Emacs 廣廢��. (廬���� ����廣 �� ���廨�� �廨� +廬廚廨�� Help �� 廣"� �廡廩� 廣� C-h r.) ���� 廩廬� 廬����廬 廩������ ��廢�� �� +�廣����� �� �廩��� �廩廨 ��廖�廬 �廡廩�廬, �-dired 廩��廚廩廨廬 ��廚�� ��� �廡�廢��. + +�廩��� ��� �廨� �����廣 ��廡廩�廬 ���廬廨�廬. ��廩�, �� �廨廢���� �廣��廨 ���廢廛 +*Messages*, 廬���� ��廡�廩 C-x b *M<Tab>�� �-Emacs �廩��� �廬 廩�廨 ���廬��廬 廩� +廩� ���廢廛 ��� 廩��廬� ��廖�廡 ��� 廩�廡廩廬�. �廩��� 廚�廣�廬 �� 廣� 廩��廬 �廚廡���廬 +�廩��廬 廡�廢��. 廬���廬 ��廩��� �廬��廨廬 ������ ���廨�� ��廩廬�廩 Emacs �廢��廬 +(node) �廩� "Completion". + +��Dired ��廚廩廨 ��廢�� 廨廩��廬 廡�廢�� �廬�廡�� (���廚廢�� �� �廬廬-廬�廡��廬 廩��), ���廣 +�廬�� �廨廩��� ���, �廚廬�� 廡�廢��, �廩��廬 �廬 廩��廬���, ����廡 ��廬� ���廢廣 廣���� +廣�� 廚廣���廬 廨��廬. Dired �廬��廨 ������ ���廨�� ��廩廬�廩 �廢��廬 �廩� "Dired". + +���廖廝, ��廨�� ��廩廬�廩 �廬�廨 廣�� �廨�� ��� 廬����廬 廩� Emacs. + + +* �廖��� +------- + +��� �廢�廬 �-Emacs �廩 ��廡�廩 C-x C-c. + +廩�廣�廨 �� ��廬� ��� ����廬 ���� ��� ��廩廬�廩�� ���廩��, ��� �� �廢�廬� 廩�廩�� +��� ���� �廨�廨, �� 廬廩�� �廬�廩��� �廬 廣廢��� -- 廬廬�����! + + +* �����廬 廩���廩 +-------------- + +廩�廣�廨 �� ���� 廢�廢� 廩� 廩�廨� �廨��� 廩� 廩�廣�廨�� �廩���廩 �-Emacs, ��� ���廨廖� +�廨�廩��� 廩��廬�� 廣"� Stuart Cracraft 廣��廨 ��廨廖廬 �-Emacs ��廡�廨�廬. + +��廨廖� �� 廩� �廩�廣�廨 ���� ��廡 �����廬 GNU Emacs. ��� ����廬 ������廬 ��廢廨�� +���廬�廬 ��廣廬廡� ��廚廢廬 廣�廬廡�� �廬���� �廖������ ���廡��: + + Copyright (C) 2010 Free Software Foundation, Inc. + +��GNU Emacs ���� 廬��� �廚廩�廬; ���廬�� ��廚�廢� �\�� �廩��廬� ��廚�廝 �廬��� +�廨廩��� GNU General Public License, �廚� 廩��� ��廢� ���廨 廣"� Free +Software Foundation, �� ��廨廖� 3 廩� �廨廩���, ��� (���廚廢�� �廩��廨� ���) +��� �廨廖� ����廨廬 ��廬廨. + +��GNU Emacs ��廚廛 �廬�� 廬廡��� 廩��� ���� 廬�廣�廬, ���� ��� �� �廬� ��廨��廬; +�廚��� �� ��廨��廬-��廩廬�廣 廩� 廖��廨�廬 �� �廬��� ����� 廬���廬 �廖���廬. �廚廨���, +��� 廣���� �-GNU General Public License. + +��GNU Emacs ���廨 ����廬 ����� �廣�廬廡 廩� GNU General Public License; �� �� +廡���廬� ��廬�, 廬���� ��廢�� ��廬� �-��<http://www.gnu.org/licenses/>��. + +���� ������� �廡廨�� �廬 �廡��廛 COPYING ��� ��� ���廡 廣�廬廡�� 廩� GNU Emacs +���廨���. 廣�廨� ��� ��廖� �廬 "��廣��廬" 廣� 廬���� 廩���� ��� ���� �廬����, +���廬 廣"� 廩���廩, �廬��� �廩�廬�廝 廩� 廬���� ��廚廩�廬! + + + +--- end of TUTORIAL.he --- + +;;; Local Variables: +;;; coding: utf-8 +;;; bidi-display-reordering: t +;;; sentence-end-double-space: nil +;;; bidi-paragraph-direction: nil +;;; End:
--- a/etc/tutorials/TUTORIAL.translators Fri Jul 30 02:11:29 2010 +0000 +++ b/etc/tutorials/TUTORIAL.translators Sun Aug 01 22:48:29 2010 +0000 @@ -31,6 +31,10 @@ Author: �ric Jacoboni <jaco@teaser.fr> Maintainer: �ric Jacoboni <jaco@teaser.fr> +* TUTORIAL.he +Author: Eli Zaretskii <eliz@gnu.org> +Maintainer: Eli Zaretskii <eliz@gnu.org> + * TUTORIAL.it: Author: Alfredo Finelli <alfredofnl@tiscali.it> Italian GNU Translation Group <tp@lists.linux.it>
--- a/lisp/ChangeLog Fri Jul 30 02:11:29 2010 +0000 +++ b/lisp/ChangeLog Sun Aug 01 22:48:29 2010 +0000 @@ -1,3 +1,71 @@ +2010-08-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * mouse.el (mouse-fixup-help-message): Match "mouse-2" only at the + beginning of the string. Use `string-match-p'. (Bug#6765) + +2010-08-01 Jan Dj辰rv <jan.h.d@swipnet.se> + + * cus-start.el (x-gtk-use-system-tooltips): New variable. + +2010-08-01 Chong Yidong <cyd@stupidchicken.com> + + * emacs-lisp/package.el (package--list-packages): Fix column + alignment. + (package--builtins): Tweak descriptions. + (package-print-package): Upcase descriptions if necessary. Show + all built-in packages in font-lock-builtin-face. + (package-list-packages-internal): Omit "emacs" package. Show + status of built-in packages as "built-in". + +2010-07-31 Chong Yidong <cyd@stupidchicken.com> + + * mouse.el (mouse-save-then-kill): Doc fix. Deactivate mark + before killing to preserve the primary selection (Bug#6701). + + * term/x-win.el (x-select-text): Doc fix. + +2010-07-31 Alan Mackenzie <acm@muc.de> + Enhanced Java Mode to handle Java 5.0 (Tiger) and Java 6 + (Mustang). Contributed by Nathaniel Flath. The following + functions were modified or created: + + * progmodes/cc-vars.el (c-offsets-alist, c-inside-block-syms) + (objc-font-lock-extra-types): + + * progmodes/cc-mode.el (c-basic-common-init): + + * progmodes/cc-langs.el (c-make-mode-syntax-table) + (c++-make-template-syntax-table) + (c-identifier-syntax-modifications, c-symbol-start, c-operators) + (c-<-op-cont-regexp, c->-op-cont-regexp, c-class-decl-kwds) + (c-brace-list-decl-kwds, c-modifier-kwds, c-prefix-spec-kwds-re) + (c-type-list-kwds, c-decl-prefix-re, c-opt-type-suffix-key): + + + * progmodes/cc-fonts.el (c-make-inverse-face) + (c-basic-matchers-after): + + * progmodes/cc-engine.el (c-forward-keyword-clause) + (c-forward-<>-arglist, c-forward-<>-arglist-recur) + (c-forward-name, c-forward-type, c-forward-decl-or-cast-1) + (c-guess-continued-construct, c-guess-basic-syntax): + +2010-07-31 Jan Dj辰rv <jan.h.d@swipnet.se> + + * faces.el (face-all-attributes): Improved documentation (Bug#6767). + +2010-07-31 Eli Zaretskii <eliz@gnu.org> + + * files.el (bidi-paragraph-direction): Define safe local values. + + * language/hebrew.el ("Hebrew"): Add TUTORIAL.he to + language-info-alist. Remove outdated FIXME in a comment. + +2010-07-31 Alan Mackenzie <acm@muc.de> + + * progmodes/cc-cmds.el (c-mask-paragraph): Fix bug #6688: + Auto-fill broken in C/C++ modes. + 2010-07-29 Jan Dj辰rv <jan.h.d@swipnet.se> * menu-bar.el (menu-bar-showhide-tool-bar-menu-customize-enable-left)
--- a/lisp/ChangeLog.7 Fri Jul 30 02:11:29 2010 +0000 +++ b/lisp/ChangeLog.7 Sun Aug 01 22:48:29 2010 +0000 @@ -7738,7 +7738,7 @@ 1997-12-09 Kenichi HANDA <handa@nora.etl.go.jp> * language/korea-util.el (setup-korean-environment): - Bind C-f9 (intead of C-f10) to quail-hangul-switch-symbol-ksc. + Bind C-f9 (instead of C-f10) to quail-hangul-switch-symbol-ksc. * language/korean.el: Documentation for "Korean" language environment adjusted for the above change.
--- a/lisp/ChangeLog.8 Fri Jul 30 02:11:29 2010 +0000 +++ b/lisp/ChangeLog.8 Sun Aug 01 22:48:29 2010 +0000 @@ -8808,14 +8808,14 @@ enable-kinsoku. * simple.el (do-auto-fill): Don't check kinsoku-enable here. - Don't call kinsoku directly, intead call fill-find-break-point. + Don't call kinsoku directly, instead call fill-find-break-point. * textmodes/fill.el: Setup `fill-find-break-point-function' property to character sets which require `kinsoku' processing for filling. (fill-find-break-point): New function. (fill-region-as-paragraph): Don't check kinsoku-enable here. - Don't call kinsoku directly, intead call fill-find-break-point. + Don't call kinsoku directly, instead call fill-find-break-point. 1998-10-18 Richard Stallman <rms@psilocin.ai.mit.edu>
--- a/lisp/cus-start.el Fri Jul 30 02:11:29 2010 +0000 +++ b/lisp/cus-start.el Sun Aug 01 22:48:29 2010 +0000 @@ -358,6 +358,7 @@ (x-gtk-show-hidden-files menu boolean "22.1") (x-gtk-file-dialog-help-text menu boolean "22.1") (x-gtk-whole-detached-tool-bar x boolean "22.1") + (x-gtk-use-system-tooltips tooltip boolean "23.3") ;; xterm.c (x-use-underline-position-properties display boolean "22.1") (x-underline-at-descent-line display boolean "22.1")
--- a/lisp/emacs-lisp/package.el Fri Jul 30 02:11:29 2010 +0000 +++ b/lisp/emacs-lisp/package.el Sun Aug 01 22:48:29 2010 +0000 @@ -292,15 +292,15 @@ (if (>= emacs-major-version 22) ;; FIXME: emacs 22 includes tramp, rcirc, maybe ;; other things... - '((erc . [(5 2) nil "An Emacs Internet Relay Chat client"]) + '((erc . [(5 2) nil "Internet Relay Chat client"]) ;; The external URL is version 1.15, so make sure the ;; built-in one looks newer. (url . [(1 16) nil "URL handling libary"]))) (if (>= emacs-major-version 23) '(;; Strangely, nxml-version is missing in Emacs 23. ;; We pick the merge date as the version. - (nxml . [(20071123) nil "Major mode for editing XML documents."]) - (bubbles . [(0 5) nil "Puzzle game for Emacs."]))))) + (nxml . [(20071123) nil "Major mode for XML documents"]) + (bubbles . [(0 5) nil "A puzzle game"]))))) "Alist of all built-in packages. Maps the package name to a vector [VERSION REQS DOCSTRING].") (put 'package--builtins 'risky-local-variable t) @@ -358,16 +358,6 @@ ;; Both null. (funcall fun 0 0)))) -(defun package--test-version-compare () - "Test suite for `package-version-compare'." - (unless (and (package-version-compare '(0) '(0) '=) - (not (package-version-compare '(1) '(0) '=)) - (package-version-compare '(1 0 1) '(1) '>=) - (package-version-compare '(1 0 1) '(1) '>) - (not (package-version-compare '(0 9 1) '(1 0 2) '>=))) - (error "Failed")) - t) - (defun package-strip-version (dirname) "Strip the version from a combined package name and version. E.g., if given \"quux-23.0\", will return \"quux\"" @@ -1422,7 +1412,7 @@ (defun package-print-package (package version key desc) (let ((face - (cond ((eq package 'emacs) 'font-lock-builtin-face) + (cond ((string= key "built-in") 'font-lock-builtin-face) ((string= key "available") 'default) ((string= key "held") 'font-lock-constant-face) ((string= key "disabled") 'font-lock-warning-face) @@ -1444,7 +1434,9 @@ ;; FIXME: this 'when' is bogus... (when desc (indent-to 43 1) - (insert (propertize desc 'font-lock-face face))) + (let ((opoint (point))) + (insert (propertize desc 'font-lock-face face)) + (upcase-region opoint (min (point) (1+ opoint))))) (insert "\n"))) (defun package-list-maybe-add (package version status description result) @@ -1462,22 +1454,31 @@ (setq buffer-read-only nil) (erase-buffer) (let ((info-list) - name desc hold) + name desc hold + builtin) ;; List installed packages (dolist (elt package-alist) + ;; Ignore the Emacs package. (setq name (car elt) desc (cdr elt) hold (assq name package-load-list)) - (setq info-list - (package-list-maybe-add name (package-desc-vers desc) - ;; FIXME: it turns out to be - ;; tricky to see if this package - ;; is presently activated. - (if (stringp (cadr hold)) - "held" - "installed") - (package-desc-doc desc) - info-list))) + (unless (eq name 'emacs) + (setq info-list + (package-list-maybe-add + name (package-desc-vers desc) + ;; FIXME: it turns out to be tricky to see if this + ;; package is presently activated. + (cond ((stringp (cadr hold)) + "held") + ((and (setq builtin (assq name package--builtins)) + (package-version-compare + (package-desc-vers (cdr builtin)) + (package-desc-vers desc) + '=)) + "built-in") + (t "installed")) + (package-desc-doc desc) + info-list)))) ;; List available packages (dolist (elt package-archive-contents) (setq name (car elt) @@ -1574,8 +1575,8 @@ '((0 . "") (2 . "Package") (20 . "Version") - (30 . "Status") - (41 . "Description")) + (32 . "Status") + (43 . "Description")) "")) ;; It's okay to use pop-to-buffer here. The package menu buffer
--- a/lisp/faces.el Fri Jul 30 02:11:29 2010 +0000 +++ b/lisp/faces.el Sun Aug 01 22:48:29 2010 +0000 @@ -376,7 +376,7 @@ (defun face-all-attributes (face &optional frame) "Return an alist stating the attributes of FACE. Each element of the result has the form (ATTR-NAME . ATTR-VALUE). -Normally the value describes the default attributes, +If FRAME is omitted or nil the value describes the default attributes, but if you specify FRAME, the value describes the attributes of FACE on FRAME." (mapcar (lambda (pair)
--- a/lisp/files.el Fri Jul 30 02:11:29 2010 +0000 +++ b/lisp/files.el Sun Aug 01 22:48:29 2010 +0000 @@ -2784,6 +2784,9 @@ (truncate-lines . booleanp) ;; C source code (bidi-display-reordering . booleanp))) ;; C source code +(put 'bidi-paragraph-direction 'safe-local-variable + (lambda (v) (memq v '(nil right-to-left left-to-right)))) + (put 'c-set-style 'safe-local-eval-function t) (defvar file-local-variables-alist nil
--- a/lisp/language/hebrew.el Fri Jul 30 02:11:29 2010 +0000 +++ b/lisp/language/hebrew.el Sun Aug 01 22:48:29 2010 +0000 @@ -46,14 +46,13 @@ (define-coding-system-alias 'iso-8859-8 'hebrew-iso-8bit) ;; These are for Explicit and Implicit directionality information, as -;; defined in RFC 1556. We don't yet support directional information -;; in bidi languages, so these aliases are a lie, especially as far as -;; iso-8859-8-e is concerned. FIXME. +;; defined in RFC 1556. (define-coding-system-alias 'iso-8859-8-e 'hebrew-iso-8bit) (define-coding-system-alias 'iso-8859-8-i 'hebrew-iso-8bit) (set-language-info-alist - "Hebrew" '((charset iso-8859-8) + "Hebrew" '((tutorial . "TUTORIAL.he") + (charset iso-8859-8) (coding-priority hebrew-iso-8bit) (coding-system hebrew-iso-8bit windows-1255 cp862) (nonascii-translation . iso-8859-8)
--- a/lisp/mouse.el Fri Jul 30 02:11:29 2010 +0000 +++ b/lisp/mouse.el Sun Aug 01 22:48:29 2010 +0000 @@ -879,8 +879,7 @@ (let (mp pos) (if (and mouse-1-click-follows-link (stringp msg) - (save-match-data - (string-match "^mouse-2" msg)) + (string-match-p "\\`mouse-2" msg) (setq mp (mouse-pixel-position)) (consp (setq pos (cdr mp))) (car pos) (>= (car pos) 0) @@ -1336,16 +1335,23 @@ (undo-boundary)) (defun mouse-save-then-kill (click) - "Save text to point in kill ring; the second time, kill the text. -If the text between point and the mouse is the same as what's -at the front of the kill ring, this deletes the text. -Otherwise, it adds the text to the kill ring, like \\[kill-ring-save], -which prepares for a second click to delete the text. + "Set the region according to CLICK; the second time, kill the region. +Assuming this command is bound to a mouse button, CLICK is the +corresponding input event. -If you have selected words or lines, this command extends the -selection through the word or line clicked on. If you do this -again in a different position, it extends the selection again. -If you do this twice in the same position, the selection is killed." +If the region is already active, adjust it. Normally, this +happens by moving either point or mark, whichever is closer, to +the position of CLICK. But if you have selected words or lines, +the region is adjusted by moving point or mark to the word or +line boundary closest to CLICK. + +If the region is inactive, activate it temporarily; set mark at +the original point, and move click to the position of CLICK. + +However, if this command is being called a second time (i.e. the +value of `last-command' is `mouse-save-then-kill'), kill the +region instead. If the text in the region is the same as the +text in the front of the kill ring, just delete it." (interactive "e") (let ((before-scroll (with-current-buffer (window-buffer (posn-window (event-start click))) @@ -1357,44 +1363,50 @@ (this-command this-command)) (if (and (with-current-buffer (window-buffer (posn-window (event-start click))) - (and (mark t) (> (mod mouse-selection-click-count 3) 0) + (and (mark t) + (> (mod mouse-selection-click-count 3) 0) ;; Don't be fooled by a recent click in some other buffer. (eq mouse-selection-click-count-buffer (current-buffer))))) - (if (not (and (eq last-command 'mouse-save-then-kill) - (equal click-posn - (car (cdr-safe (cdr-safe mouse-save-then-kill-posn)))))) - ;; Find both ends of the object selected by this click. - (let* ((range - (mouse-start-end click-posn click-posn - mouse-selection-click-count))) - ;; Move whichever end is closer to the click. - ;; That's what xterm does, and it seems reasonable. - (if (< (abs (- click-posn (mark t))) - (abs (- click-posn (point)))) - (set-mark (car range)) - (goto-char (nth 1 range))) - ;; We have already put the old region in the kill ring. - ;; Replace it with the extended region. - ;; (It would be annoying to make a separate entry.) - (kill-new (buffer-substring (point) (mark t)) t) - (mouse-set-region-1) - ;; Arrange for a repeated mouse-3 to kill this region. - (setq mouse-save-then-kill-posn - (list (car kill-ring) (point) click-posn))) - ;; If we click this button again without moving it, - ;; that time kill. - (mouse-save-then-kill-delete-region (mark) (point)) - (setq mouse-selection-click-count 0) - (setq mouse-save-then-kill-posn nil)) + (if (and (eq last-command 'mouse-save-then-kill) + (equal click-posn (nth 2 mouse-save-then-kill-posn))) + ;; If we click this button again without moving it, kill. + (progn + ;; Call `deactivate-mark' to save the primary selection. + (deactivate-mark) + (mouse-save-then-kill-delete-region (mark) (point)) + (setq mouse-selection-click-count 0) + (setq mouse-save-then-kill-posn nil)) + ;; Find both ends of the object selected by this click. + (let* ((range + (mouse-start-end click-posn click-posn + mouse-selection-click-count))) + ;; Move whichever end is closer to the click. + ;; That's what xterm does, and it seems reasonable. + (if (< (abs (- click-posn (mark t))) + (abs (- click-posn (point)))) + (set-mark (car range)) + (goto-char (nth 1 range))) + ;; We have already put the old region in the kill ring. + ;; Replace it with the extended region. + ;; (It would be annoying to make a separate entry.) + (kill-new (buffer-substring (point) (mark t)) t) + (mouse-set-region-1) + ;; Arrange for a repeated mouse-3 to kill this region. + (setq mouse-save-then-kill-posn + (list (car kill-ring) (point) click-posn)))) + (if (and (eq last-command 'mouse-save-then-kill) mouse-save-then-kill-posn (eq (car mouse-save-then-kill-posn) (car kill-ring)) - (equal (cdr mouse-save-then-kill-posn) (list (point) click-posn))) + (equal (cdr mouse-save-then-kill-posn) + (list (point) click-posn))) ;; If this is the second time we've called ;; mouse-save-then-kill, delete the text from the buffer. (progn - (mouse-save-then-kill-delete-region (point) (mark)) + ;; Call `deactivate-mark' to save the primary selection. + (deactivate-mark) + (mouse-save-then-kill-delete-region (point) (mark t)) ;; After we kill, another click counts as "the first time". (setq mouse-save-then-kill-posn nil)) ;; This is not a repetition.
--- a/lisp/progmodes/cc-cmds.el Fri Jul 30 02:11:29 2010 +0000 +++ b/lisp/progmodes/cc-cmds.el Sun Aug 01 22:48:29 2010 +0000 @@ -3974,16 +3974,17 @@ ;; "Invalid search bound (wrong side of point)" ;; error in the subsequent re-search. Maybe ;; another fix would be needed (2007-12-08). - (and (> (- (cdr c-lit-limits) 2) (point)) + (or (<= (- (cdr c-lit-limits) 2) (point)) + (and (search-forward-regexp (concat "\\=[ \t]*\\(" c-current-comment-prefix "\\)") (- (cdr c-lit-limits) 2) t) (not (search-forward-regexp "\\(\\s \\|\\sw\\)" (- (cdr c-lit-limits) 2) 'limit)) - ;; The comment ender IS on its own line. Exclude - ;; this line from the filling. - (set-marker end (c-point 'bol)))) + ;; The comment ender IS on its own line. Exclude + ;; this line from the filling. + (set-marker end (c-point 'bol))))) ;; The comment ender is hanging. Replace all space between it ;; and the last word either by one or two 'x's (when
--- a/lisp/progmodes/cc-engine.el Fri Jul 30 02:11:29 2010 +0000 +++ b/lisp/progmodes/cc-engine.el Sun Aug 01 22:48:29 2010 +0000 @@ -5401,6 +5401,7 @@ ;; `nconc' doesn't mind that the tail of ;; `c-record-found-types' is t. (nconc c-record-found-types c-record-type-identifiers))) + (if (c-major-mode-is 'java-mode) (c-fontify-recorded-types-and-refs)) t) (goto-char start) @@ -5420,7 +5421,6 @@ ;; List that collects the positions after the argument ;; separating ',' in the arglist. arg-start-pos) - ;; If the '<' has paren open syntax then we've marked it as an angle ;; bracket arglist before, so skip to the end. (if (and (not c-parse-and-markup-<>-arglists) @@ -5431,7 +5431,6 @@ (if (and (c-go-up-list-forward) (eq (char-before) ?>)) t - ;; Got unmatched paren angle brackets. We don't clear the paren ;; syntax properties and retry, on the basis that it's very ;; unlikely that paren angle brackets become operators by code @@ -5441,70 +5440,51 @@ nil)) (forward-char) + (unless (looking-at c-<-op-cont-regexp) - (while (and + (while (and (progn - - (when c-record-type-identifiers - (if all-types - - ;; All encountered identifiers are types, so set the - ;; promote flag and parse the type. - (progn - (c-forward-syntactic-ws) - (when (looking-at c-identifier-start) - (let ((c-promote-possible-types t)) - (c-forward-type)))) - - ;; Check if this arglist argument is a sole type. If - ;; it's known then it's recorded in - ;; `c-record-type-identifiers'. If it only is found - ;; then it's recorded in `c-record-found-types' which we - ;; might roll back if it turns out that this isn't an - ;; angle bracket arglist afterall. - (when (memq (char-before) '(?, ?<)) - (let ((orig-record-found-types c-record-found-types)) - (c-forward-syntactic-ws) - (and (memq (c-forward-type) '(known found)) - (not (looking-at "[,>]")) - ;; A found type was recorded but it's not the - ;; only thing in the arglist argument, so reset - ;; `c-record-found-types'. - (setq c-record-found-types - orig-record-found-types)))))) - - (setq pos (point)) - (or (when (eq (char-after) ?>) - ;; Must check for '>' at the very start separately, - ;; since the regexp below has to avoid ">>" without - ;; using \\=. - (forward-char) - t) - - ;; Note: These regexps exploit the match order in \| so - ;; that "<>" is matched by "<" rather than "[^>:-]>". - (c-syntactic-re-search-forward - (if c-restricted-<>-arglists - ;; Stop on ',', '|', '&', '+' and '-' to catch - ;; common binary operators that could be between - ;; two comparison expressions "a<b" and "c>d". - "[<;{},|&+-]\\|\\([^>:-]>\\)" - ;; Otherwise we still stop on ',' to find the - ;; argument start positions. - "[<;{},]\\|\\([^>:-]>\\)") - nil 'move t t 1) - - ;; If the arglist starter has lost its open paren - ;; syntax but not the closer, we won't find the - ;; closer above since we only search in the - ;; balanced sexp. In that case we stop just short - ;; of it so check if the following char is the closer. - (when (eq (char-after) ?>) - (forward-char) - t))) - - (cond - ((eq (char-before) ?>) + (c-forward-syntactic-ws) + (let ((orig-record-found-types c-record-found-types)) + (when (or (and c-record-type-identifiers all-types) + (c-major-mode-is 'java-mode)) + ;; All encountered identifiers are types, so set the + ;; promote flag and parse the type. + (progn + (c-forward-syntactic-ws) + (if (looking-at "\\?") + (forward-char) + (when (looking-at c-identifier-start) + (let ((c-promote-possible-types t) + (c-record-found-types t)) + (c-forward-type)))) + + (c-forward-syntactic-ws) + + (when (or (looking-at "extends") + (looking-at "super")) + (forward-word) + (c-forward-syntactic-ws) + (let ((c-promote-possible-types t) + (c-record-found-types t)) + (c-forward-type) + (c-forward-syntactic-ws)))))) + + (setq pos (point)) + + (or + ;; Note: These regexps exploit the match order in \| so + ;; that "<>" is matched by "<" rather than "[^>:-]>". + (c-syntactic-re-search-forward + ;; Stop on ',', '|', '&', '+' and '-' to catch + ;; common binary operators that could be between + ;; two comparison expressions "a<b" and "c>d". + "[<;{},|+&-]\\|[>)]" + nil t t) + t)) + + (cond + ((eq (char-before) ?>) ;; Either an operator starting with '>' or the end of ;; the angle bracket arglist. @@ -5526,7 +5506,6 @@ ((eq (char-before) ?<) ;; Either an operator starting with '<' or a nested arglist. - (setq pos (point)) (let (id-start id-end subres keyword-match) (if (if (looking-at c-<-op-cont-regexp) @@ -5546,14 +5525,14 @@ (when (or (setq keyword-match (looking-at c-opt-<>-sexp-key)) (not (looking-at c-keywords-regexp))) - (setq id-start (point)))) - - (setq subres - (let ((c-record-type-identifiers nil) - (c-record-found-types nil)) - (c-forward-<>-arglist-recur - (and keyword-match - (c-keyword-member + (setq id-start (point)))) + + (setq subres + (let ((c-promote-possible-types t) + (c-record-found-types t)) + (c-forward-<>-arglist-recur + (and keyword-match + (c-keyword-member (c-keyword-sym (match-string 1)) 'c-<>-type-kwds))))) ))) @@ -5574,14 +5553,16 @@ (c-forward-syntactic-ws) (looking-at c-opt-identifier-concat-key))) (c-record-ref-id (cons id-start id-end)) - (c-record-type-id (cons id-start id-end)))))) - t) - - ((and (eq (char-before) ?,) - (not c-restricted-<>-arglists)) - ;; Just another argument. Record the position. The - ;; type check stuff that made us stop at it is at - ;; the top of the loop. + (c-record-type-id (cons id-start id-end)))))) + t) + + ((and (not c-restricted-<>-arglists) + (or (and (eq (char-before) ?&) + (not (eq (char-after) ?&))) + (eq (char-before) ?,))) + ;; Just another argument. Record the position. The + ;; type check stuff that made us stop at it is at + ;; the top of the loop. (setq arg-start-pos (cons (point) arg-start-pos))) (t @@ -5590,7 +5571,6 @@ ;; it's useless to try to find a surrounding arglist ;; if we're nested. (throw 'angle-bracket-arglist-escape nil)))))) - (if res (or c-record-found-types t))))) @@ -5793,9 +5773,8 @@ ((and c-recognize-<>-arglists (eq (char-after) ?<)) ;; Maybe an angle bracket arglist. - - (when (let (c-record-type-identifiers - c-record-found-types) + (when (let ((c-record-type-identifiers t) + (c-record-found-types t)) (c-forward-<>-arglist nil)) (c-add-type start (1+ pos)) @@ -5844,6 +5823,9 @@ ;; `c-record-type-identifiers' is non-nil. ;; ;; This function might do hidden buffer changes. + (when (looking-at "<") + (c-forward-<>-arglist t) + (c-forward-syntactic-ws)) (let ((start (point)) pos res name-res id-start id-end id-range) @@ -6043,6 +6025,18 @@ res)) +(defun c-forward-annotation () + ;; Used for Java code only at the moment. Assumes point is on the + ;; @, moves forward an annotation. returns nil if there is no + ;; annotation at point. + (and (looking-at "@") + (progn (forward-char) t) + (c-forward-type) + (progn (c-forward-syntactic-ws) t) + (if (looking-at "(") + (c-go-list-forward) + t))) + ;; Handling of large scale constructs like statements and declarations. @@ -6212,6 +6206,9 @@ (save-rec-type-ids c-record-type-identifiers) (save-rec-ref-ids c-record-ref-identifiers)) + (while (c-forward-annotation) + (c-forward-syntactic-ws)) + ;; Check for a type. Unknown symbols are treated as possible ;; types, but they could also be specifiers disguised through ;; macros like __INLINE__, so we recognize both types and known @@ -6545,13 +6542,14 @@ ;; CASE 3 (when (= (point) start) ;; Got a plain list of identifiers. If a colon follows it's - ;; a valid label. Otherwise the last one probably is the - ;; declared identifier and we should back up to the previous - ;; type, providing it isn't a cast. - (if (eq (char-after) ?:) - ;; If we've found a specifier keyword then it's a - ;; declaration regardless. - (throw 'at-decl-or-cast (eq at-decl-or-cast t)) + ;; a valid label. Otherwise the last one probably is the + ;; declared identifier and we should back up to the previous + ;; type, providing it isn't a cast. + (if (and (eq (char-after) ?:) + (not (c-major-mode-is 'java-mode))) + ;; If we've found a specifier keyword then it's a + ;; declaration regardless. + (throw 'at-decl-or-cast (eq at-decl-or-cast t)) (setq backup-if-not-cast t) (throw 'at-decl-or-cast t))) @@ -8512,7 +8510,7 @@ ;; ;; This function might do hidden buffer changes. - (let (special-brace-list) + (let (special-brace-list placeholder) (goto-char indent-point) (skip-chars-forward " \t") @@ -8619,6 +8617,22 @@ (c-add-stmt-syntax 'func-decl-cont nil t containing-sexp paren-state)) + ;;CASE F: continued statement and the only preceding items are + ;;annotations. + ((and (c-major-mode-is 'java-mode) + (setq placeholder (point)) + (c-beginning-of-statement-1) + (progn + (while (and (c-forward-annotation) + (< (point) placeholder)) + (c-forward-syntactic-ws)) + t) + (prog1 + (>= (point) placeholder) + (goto-char placeholder))) + (c-beginning-of-statement-1 containing-sexp) + (c-add-syntax 'annotation-var-cont (point))) + ;; CASE D: continued statement. (t (c-beginning-of-statement-1 containing-sexp) @@ -8718,7 +8732,6 @@ (when (and containing-sexp (eq (char-after containing-sexp) ?\()) (setq c-stmt-delim-chars c-stmt-delim-chars-with-comma)) - ;; cache char before and after indent point, and move point to ;; the most likely position to perform the majority of tests (goto-char indent-point) @@ -9468,23 +9481,36 @@ (c-add-syntax 'objc-method-args-cont placeholder)) ;; CASE 5L: we are at the first argument of a template - ;; arglist that begins on the previous line. - ((and c-recognize-<>-arglists - (eq (char-before) ?<) - (setq placeholder (1- (point))) - (not (and c-overloadable-operators-regexp - (c-after-special-operator-id lim)))) - (c-beginning-of-statement-1 (c-safe-position (point) paren-state)) - (c-add-syntax 'template-args-cont (c-point 'boi) placeholder)) - - ;; CASE 5Q: we are at a statement within a macro. - (macro-start - (c-beginning-of-statement-1 containing-sexp) - (c-add-stmt-syntax 'statement nil t containing-sexp paren-state)) - - ;; CASE 5M: we are at a topmost continuation line - (t - (c-beginning-of-statement-1 (c-safe-position (point) paren-state)) + ;; arglist that begins on the previous line. + ((and c-recognize-<>-arglists + (eq (char-before) ?<) + (not (and c-overloadable-operators-regexp + (c-after-special-operator-id lim)))) + (c-beginning-of-statement-1 (c-safe-position (point) paren-state)) + (c-add-syntax 'template-args-cont (c-point 'boi))) + + ;; CASE 5Q: we are at a statement within a macro. + (macro-start + (c-beginning-of-statement-1 containing-sexp) + (c-add-stmt-syntax 'statement nil t containing-sexp paren-state)) + + ;;CASE 5N: We are at a tompmost continuation line and the only + ;;preceding items are annotations. + ((and (c-major-mode-is 'java-mode) + (setq placeholder (point)) + (c-beginning-of-statement-1) + (progn + (while (and (c-forward-annotation)) + (c-forward-syntactic-ws)) + t) + (prog1 + (>= (point) placeholder) + (goto-char placeholder))) + (c-add-syntax 'annotation-top-cont (c-point 'boi))) + + ;; CASE 5M: we are at a topmost continuation line + (t + (c-beginning-of-statement-1 (c-safe-position (point) paren-state)) (when (c-major-mode-is 'objc-mode) (setq placeholder (point)) (while (and (c-forward-objc-directive) @@ -9495,43 +9521,20 @@ (c-add-syntax 'topmost-intro-cont (c-point 'boi))) )) - ;; (CASE 6 has been removed.) - - ;; CASE 19: line is an expression, not a statement, and is directly - ;; contained by a template delimiter. Most likely, we are in a - ;; template arglist within a statement. This case is based on CASE - ;; 7. At some point in the future, we may wish to create more - ;; syntactic symbols such as `template-intro', - ;; `template-cont-nonempty', etc., and distinguish between them as we - ;; do for `arglist-intro' etc. (2009-12-07). - ((and c-recognize-<>-arglists - (setq containing-< (c-up-list-backward indent-point containing-sexp)) - (eq (char-after containing-<) ?\<)) - (setq placeholder (c-point 'boi containing-<)) - (goto-char containing-sexp) ; Most nested Lbrace/Lparen (but not - ; '<') before indent-point. - (if (>= (point) placeholder) - (progn - (forward-char) - (skip-chars-forward " \t")) - (goto-char placeholder)) - (c-add-stmt-syntax 'template-args-cont (list containing-<) t - (c-most-enclosing-brace c-state-cache (point)) - paren-state)) - - - ;; CASE 7: line is an expression, not a statement. Most - ;; likely we are either in a function prototype or a function - ;; call argument list, or a template argument list. - ((not (or (and c-special-brace-lists - (save-excursion - (goto-char containing-sexp) - (c-looking-at-special-brace-list))) - (eq (char-after containing-sexp) ?{) - (eq (char-after containing-sexp) ?<))) - (cond - - ;; CASE 7A: we are looking at the arglist closing paren. + + ;; (CASE 6 has been removed.) + + ;; CASE 7: line is an expression, not a statement. Most + ;; likely we are either in a function prototype or a function + ;; call argument list + ((not (or (and c-special-brace-lists + (save-excursion + (goto-char containing-sexp) + (c-looking-at-special-brace-list))) + (eq (char-after containing-sexp) ?{))) + (cond + + ;; CASE 7A: we are looking at the arglist closing paren. ;; C.f. case 7F. ((memq char-after-ip '(?\) ?\])) (goto-char containing-sexp) @@ -9543,12 +9546,34 @@ (skip-chars-forward " \t")) (goto-char placeholder)) (c-add-stmt-syntax 'arglist-close (list containing-sexp) t - (c-most-enclosing-brace paren-state (point)) - paren-state)) - - ;; CASE 7B: Looking at the opening brace of an - ;; in-expression block or brace list. C.f. cases 4, 16A - ;; and 17E. + (c-most-enclosing-brace paren-state (point)) + paren-state)) + + ;; CASE 19: line is an expression, not a statement, and is directly + ;; contained by a template delimiter. Most likely, we are in a + ;; template arglist within a statement. This case is based on CASE + ;; 7. At some point in the future, we may wish to create more + ;; syntactic symbols such as `template-intro', + ;; `template-cont-nonempty', etc., and distinguish between them as we + ;; do for `arglist-intro' etc. (2009-12-07). + ((and c-recognize-<>-arglists + (setq containing-< (c-up-list-backward indent-point containing-sexp)) + (eq (char-after containing-<) ?\<)) + (setq placeholder (c-point 'boi containing-<)) + (goto-char containing-sexp) ; Most nested Lbrace/Lparen (but not + ; '<') before indent-point. + (if (>= (point) placeholder) + (progn + (forward-char) + (skip-chars-forward " \t")) + (goto-char placeholder)) + (c-add-stmt-syntax 'template-args-cont (list containing-<) t + (c-most-enclosing-brace c-state-cache (point)) + paren-state)) + + ;; CASE 7B: Looking at the opening brace of an + ;; in-expression block or brace list. C.f. cases 4, 16A + ;; and 17E. ((and (eq char-after-ip ?{) (progn (setq placeholder (c-inside-bracelist-p (point)
--- a/lisp/progmodes/cc-fonts.el Fri Jul 30 02:11:29 2010 +0000 +++ b/lisp/progmodes/cc-fonts.el Sun Aug 01 22:48:29 2010 +0000 @@ -194,6 +194,10 @@ (unless (face-property-instance oldface 'reverse) (invert-face newface))))) +(defvar c-annotation-face (make-face 'c-annotation-face) + "Face used to highlight annotations in java-mode and other modes that may wish to use it.") +(set-face-foreground 'c-annotation-face "blue") + (eval-and-compile ;; We need the following functions during compilation since they're ;; called when the `c-lang-defconst' initializers are evaluated. @@ -1538,6 +1542,9 @@ '((c-fontify-types-and-refs ((c-promote-possible-types t)) (c-forward-keyword-clause 1) (if (> (point) limit) (goto-char limit)))))))) + + ,@(when (c-major-mode-is 'java-mode) + `((eval . (list "\\<\\(@[a-zA-Z0-9]+\\)\\>" 1 c-annotation-face)))) )) (c-lang-defconst c-matchers-1
--- a/lisp/progmodes/cc-langs.el Fri Jul 30 02:11:29 2010 +0000 +++ b/lisp/progmodes/cc-langs.el Sun Aug 01 22:48:29 2010 +0000 @@ -359,7 +359,7 @@ (let ((table (make-syntax-table))) (c-populate-syntax-table table) ;; Mode specific syntaxes. - ,(cond ((c-major-mode-is 'objc-mode) + ,(cond ((or (c-major-mode-is 'objc-mode) (c-major-mode-is 'java-mode)) ;; Let '@' be part of symbols in ObjC to cope with ;; its compiler directives as single keyword tokens. ;; This is then necessary since it's assumed that @@ -382,7 +382,7 @@ ;; '<' and '>' characters. Therefore this syntax table might go ;; away when CC Mode handles templates correctly everywhere. t nil - c++ `(lambda () + (java c++) `(lambda () (let ((table (funcall ,(c-lang-const c-make-mode-syntax-table)))) (modify-syntax-entry ?< "(>" table) (modify-syntax-entry ?> ")<" table) @@ -425,7 +425,7 @@ ;; it as an indentifier character since it's often used in various ;; machine generated identifiers. t '((?_ . "w") (?$ . "w")) - objc (append '((?@ . "w")) + (objc java) (append '((?@ . "w")) (c-lang-const c-identifier-syntax-modifications)) awk '((?_ . "w"))) (c-lang-defvar c-identifier-syntax-modifications @@ -502,9 +502,10 @@ (c-lang-defconst c-symbol-start "Regexp that matches the start of a symbol, i.e. any identifier or -keyword. It's unspecified how far it matches. Does not contain a \\| +keyword. It's unspecified how far it matches. Does not contain a \\| operator at the top level." t (concat "[" c-alpha "_]") + java (concat "[" c-alpha "_@]") objc (concat "[" c-alpha "@]") pike (concat "[" c-alpha "_`]")) (c-lang-defvar c-symbol-start (c-lang-const c-symbol-start)) @@ -859,7 +860,7 @@ ;; Primary. ,@(c-lang-const c-identifier-ops) - ,@(cond ((c-major-mode-is 'c++-mode) + ,@(cond ((or (c-major-mode-is 'c++-mode) (c-major-mode-is 'java-mode)) `((postfix-if-paren "<" ">"))) ; Templates. ((c-major-mode-is 'pike-mode) `((prefix "global" "predef"))) @@ -1118,6 +1119,7 @@ t "\\`<." (lambda (op) (substring op 1))))) + (c-lang-defvar c-<-op-cont-regexp (c-lang-const c-<-op-cont-regexp)) (c-lang-defconst c->-op-cont-regexp @@ -1127,7 +1129,13 @@ (c-filter-ops (c-lang-const c-all-op-syntax-tokens) t "\\`>." - (lambda (op) (substring op 1))))) + (lambda (op) (substring op 1)))) + java (c-make-keywords-re nil + (c-filter-ops (c-lang-const c-all-op-syntax-tokens) + t + "\\`>[^>]\\|\\`>>[^>]" + (lambda (op) (substring op 1))))) + (c-lang-defvar c->-op-cont-regexp (c-lang-const c->-op-cont-regexp)) (c-lang-defconst c-stmt-delim-chars @@ -1628,7 +1636,7 @@ c++ '("class" "struct" "union") objc '("struct" "union" "@interface" "@implementation" "@protocol") - java '("class" "interface") + java '("class" "@interface" "interface") idl '("component" "eventtype" "exception" "home" "interface" "struct" "union" "valuetype" ;; In CORBA PSDL: @@ -1651,7 +1659,7 @@ `c-<>-type-kwds', or `c-<>-arglist-kwds' then the associated clauses will be handled." t '("enum") - (java awk) nil) + (awk) nil) (c-lang-defconst c-brace-list-key ;; Regexp matching the start of declarations where the following @@ -1772,7 +1780,7 @@ "bindsTo" "delegatesTo" "implements" "proxy" "storedOn") ;; Note: "const" is not used in Java, but it's still a reserved keyword. java '("abstract" "const" "final" "native" "private" "protected" "public" - "static" "strictfp" "synchronized" "transient" "volatile") + "static" "strictfp" "synchronized" "transient" "volatile" "@[A-Za-z0-9]+") pike '("final" "inline" "local" "nomask" "optional" "private" "protected" "public" "static" "variant")) @@ -1858,7 +1866,11 @@ (c-lang-defconst c-prefix-spec-kwds-re ;; Adorned regexp of `c-prefix-spec-kwds'. - t (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds))) + t (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds)) + java (replace-regexp-in-string + "\\\\\\[" "[" + (replace-regexp-in-string "\\\\\\+" "+" (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds))))) + (c-lang-defvar c-prefix-spec-kwds-re (c-lang-const c-prefix-spec-kwds-re)) (c-lang-defconst c-specifier-key @@ -1950,7 +1962,7 @@ t nil c++ '("operator") objc '("@class") - java '("import" "new" "extends" "implements" "throws") + java '("import" "new" "extends" "super" "implements" "throws") idl '("manages" "native" "primarykey" "supports" ;; In CORBA PSDL: "as" "implements" "of" "scope") @@ -2499,7 +2511,7 @@ ;; in all languages except Java for when a cpp macro definition ;; begins with a declaration. t "\\([\{\}\(\);,]+\\)" - java "\\([\{\}\(;,]+\\)" + java "\\([\{\}\(;,<]+\\)" ;; Match "<" in C++ to get the first argument in a template arglist. ;; In that case there's an additional check in `c-find-decl-spots' ;; that it got open paren syntax. @@ -2759,7 +2771,7 @@ is in effect or not." t nil (c c++ objc pike) "\\(\\.\\.\\.\\)" - java (concat "\\(\\[" (c-lang-const c-simple-ws) "*\\]\\)")) + java (concat "\\(\\[" (c-lang-const c-simple-ws) "*\\]\\|\\.\\.\\.\\)")) (c-lang-defvar c-opt-type-suffix-key (c-lang-const c-opt-type-suffix-key)) (c-lang-defvar c-known-type-key
--- a/lisp/progmodes/cc-mode.el Fri Jul 30 02:11:29 2010 +0000 +++ b/lisp/progmodes/cc-mode.el Sun Aug 01 22:48:29 2010 +0000 @@ -522,7 +522,7 @@ (when (or c-recognize-<>-arglists (c-major-mode-is 'awk-mode) - (c-major-mode-is '(c-mode c++-mode objc-mode))) + (c-major-mode-is '(java-mode c-mode c++-mode objc-mode))) ;; We'll use the syntax-table text property to change the syntax ;; of some chars for this language, so do the necessary setup for ;; that.
--- a/lisp/progmodes/cc-vars.el Fri Jul 30 02:11:29 2010 +0000 +++ b/lisp/progmodes/cc-vars.el Sun Aug 01 22:48:29 2010 +0000 @@ -1056,9 +1056,13 @@ ;; Anchor pos: Boi at the topmost intro line. (knr-argdecl . 0) ;; Anchor pos: At the beginning of the first K&R argdecl. - (topmost-intro . 0) + (topmost-intro . 0) ;; Anchor pos: Bol at the last line of previous construct. (topmost-intro-cont . c-lineup-topmost-intro-cont) + ;;Anchor pos: Bol at the topmost annotation line + (annotation-top-cont . 0) + ;;Anchor pos: Bol at the topmost annotation line + (annotation-var-cont . +) ;; Anchor pos: Boi at the topmost intro line. (member-init-intro . +) ;; Anchor pos: Boi at the func decl arglist open. @@ -1285,12 +1289,16 @@ between them; in C++ and Java, throws declarations and other things can appear in this context. knr-argdecl-intro -- First line of a K&R C argument declaration. - knr-argdecl -- Subsequent lines in a K&R C argument declaration. - topmost-intro -- The first line in a topmost construct definition. - topmost-intro-cont -- Topmost definition continuation lines. - member-init-intro -- First line in a member initialization list. - member-init-cont -- Subsequent member initialization list lines. - inher-intro -- First line of a multiple inheritance list. + knr-argdecl -- Subsequent lines in a K&R C argument declaration. + topmost-intro -- The first line in a topmost construct definition. + topmost-intro-cont -- Topmost definition continuation lines. + annotation-top-cont -- Topmost definition continuation line where only + annotations are on previous lines. + annotation-var-cont -- A continuation of a C (or like) statement where + only annotations are on previous lines. + member-init-intro -- First line in a member initialization list. + member-init-cont -- Subsequent member initialization list lines. + inher-intro -- First line of a multiple inheritance list. inher-cont -- Subsequent multiple inheritance lines. block-open -- Statement block open brace. block-close -- Statement block close brace. @@ -1376,7 +1384,7 @@ '(defun-block-intro block-open block-close statement statement-cont statement-block-intro statement-case-intro statement-case-open substatement substatement-open substatement-label case-label label - do-while-closure else-clause catch-clause inlambda)) + do-while-closure else-clause catch-clause inlambda annotation-var-cont)) (defcustom c-style-variables-are-local-p t "*Whether style variables should be buffer local by default. @@ -1577,7 +1585,7 @@ :group 'c) (defcustom java-font-lock-extra-types - (list (concat "[" c-upper "]\\sw*[" c-lower "]\\sw*")) + (list (concat "[" c-upper "]\\sw*[" c-lower "]\\sw")) (c-make-font-lock-extra-types-blurb "Java" "java-mode" (concat "For example, a value of (\"[" c-upper "]\\\\sw*[" c-lower "]\\\\sw*\") means capitalized words are treated as type names (the requirement for a
--- a/lisp/term/x-win.el Fri Jul 30 02:11:29 2010 +0000 +++ b/lisp/term/x-win.el Sun Aug 01 22:48:29 2010 +0000 @@ -1234,18 +1234,12 @@ (defun x-select-text (text &optional push) "Select TEXT, a string, according to the window system. - -On X, put TEXT in the primary X selection. For backward -compatibility with older X applications, set the value of X cut -buffer 0 as well, and if the optional argument PUSH is non-nil, -rotate the cut buffers. If `x-select-enable-clipboard' is -non-nil, copy the text to the X clipboard as well. - -On Windows, make TEXT the current selection. If -`x-select-enable-clipboard' is non-nil, copy the text to the -clipboard as well. The argument PUSH is ignored. - -On Nextstep, put TEXT in the pasteboard; PUSH is ignored." +If `x-select-enable-clipboard' is non-nil, copy TEXT to the +clipboard. If `x-select-enable-primary' is non-nil, put TEXT in +the primary selection. For backward compatibility with older X +applications, this function also sets the value of X cut buffer +0, and, if the optional argument PUSH is non-nil, rotates the cut +buffers." ;; With multi-tty, this function may be called from a tty frame. (when (eq (framep (selected-frame)) 'x) ;; Don't send the cut buffer too much text.
--- a/src/ChangeLog Fri Jul 30 02:11:29 2010 +0000 +++ b/src/ChangeLog Sun Aug 01 22:48:29 2010 +0000 @@ -1,3 +1,41 @@ +2010-08-01 Jan Dj辰rv <jan.h.d@swipnet.se> + + * xterm.h (struct x_output): Add ttip_widget, ttip_window and + ttip_lbl. + + * xterm.c (x_clear_frame): Check FRAME_GTK_WIDGET (f) before + calling gtk_widget_queue_draw. + (x_free_frame_resources): Call xg_free_frame_widgets. + + * xfns.c (x_gtk_use_system_tooltips): New variable. + (Fx_show_tip): If USE_GTK and x_gtk_use_system_tooltips, call + new gtkutil tooltip functions to show the tooltip. + (Fx_hide_tip): Call xg_hide_tooltip. + (syms_of_xfns): Defvar x-gtk-use-system-tooltips. + + * gtkutil.h (xg_free_frame_widgets, xg_prepare_tooltip) + (xg_show_tooltip, xg_hide_tooltip): Declare. + + * gtkutil.c (hierarchy_ch_cb, qttip_cb, xg_prepare_tooltip) + (xg_show_tooltip, xg_hide_tooltip, xg_free_frame_widgets): New + functions. + (xg_create_frame_widgets): Set ttip_* to 0. Set a dummy tooltip + text so qttip_cb is called. Connect query-tooltip to qttip_cb. + Remove code that is commented out. + +2010-08-01 Stefan Monnier <monnier@iro.umontreal.ca> + + * keymap.c (Fdefine_key, Flookup_key): Say what event is invalid. + +2010-07-31 Chong Yidong <cyd@stupidchicken.com> + + * xselect.c (x_own_selection): Use list4. + +2010-07-30 Dan Nicolaescu <dann@ics.uci.edu> + + * buffer.c (Qwindow): Do not define, already defined in data.c. + (syms_of_buffer): Do not intern and staticpro Qwindow. (Bug#6760) + 2010-07-29 Chad Brown <yandros@mit.edu> Replace tests for SYSV_SYSTEM_DIR with HAVE_DIRENT_H, set via autoconf. @@ -21303,7 +21341,7 @@ * charset.c (charset_ordered_list_tick): New variable. (Fdefine_charset_internal): Increment charset_ordered_list_tick. (Funify_charset): New optional arg DEUNIFY. If it is non-nil, - deunify intead of unify a charset. + deunify instead of unify a charset. (string_xstring_p): Add `const' to local variables. (find_charsets_in_text): Add `const' to arguments and local variables. (encode_char): Adjust for the change of Funify_charset. Fix
--- a/src/buffer.c Fri Jul 30 02:11:29 2010 +0000 +++ b/src/buffer.c Sun Aug 01 22:48:29 2010 +0000 @@ -162,7 +162,7 @@ Lisp_Object Qoverlayp; -Lisp_Object Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string; +Lisp_Object Qpriority, Qevaporate, Qbefore_string, Qafter_string; Lisp_Object Qmodification_hooks; Lisp_Object Qinsert_in_front_hooks; @@ -5345,8 +5345,6 @@ staticpro (&Qget_file_buffer); Qpriority = intern_c_string ("priority"); staticpro (&Qpriority); - Qwindow = intern_c_string ("window"); - staticpro (&Qwindow); Qbefore_string = intern_c_string ("before-string"); staticpro (&Qbefore_string); Qafter_string = intern_c_string ("after-string");
--- a/src/gtkutil.c Fri Jul 30 02:11:29 2010 +0000 +++ b/src/gtkutil.c Sun Aug 01 22:48:29 2010 +0000 @@ -508,6 +508,161 @@ /*********************************************************************** + Tooltips + ***********************************************************************/ +/* Gtk+ calls this callback when the parent of our tooltip dummy changes. + We use that to pop down the tooltip. This happens if Gtk+ for some + reason wants to change or hide the tooltip. */ + +static void +hierarchy_ch_cb (GtkWidget *widget, + GtkWidget *previous_toplevel, + gpointer user_data) +{ + FRAME_PTR f = (FRAME_PTR) user_data; + struct x_output *x = f->output_data.x; + GtkWidget *top = gtk_widget_get_toplevel (x->ttip_lbl); + + if (! top || ! GTK_IS_WINDOW (top)) + gtk_widget_hide (previous_toplevel); +} + +/* Callback called when Gtk+ thinks a tooltip should be displayed. + We use it to get the tooltip window and the tooltip widget so + we can manipulate the ourselves. + + Return FALSE ensures that the tooltip is not shown. */ + +static gboolean +qttip_cb (GtkWidget *widget, + gint xpos, + gint ypos, + gboolean keyboard_mode, + GtkTooltip *tooltip, + gpointer user_data) +{ + FRAME_PTR f = (FRAME_PTR) user_data; + struct x_output *x = f->output_data.x; + if (x->ttip_widget == NULL) + { + g_object_set (G_OBJECT (widget), "has-tooltip", FALSE, NULL); + x->ttip_widget = tooltip; + g_object_ref (G_OBJECT (tooltip)); + x->ttip_lbl = gtk_label_new (""); + g_object_ref (G_OBJECT (x->ttip_lbl)); + gtk_tooltip_set_custom (tooltip, x->ttip_lbl); + x->ttip_window = GTK_WINDOW (gtk_widget_get_toplevel (x->ttip_lbl)); + /* Realize so we can safely get screen later on. */ + gtk_widget_realize (GTK_WIDGET (x->ttip_window)); + gtk_widget_realize (x->ttip_lbl); + + g_signal_connect (x->ttip_lbl, "hierarchy-changed", + G_CALLBACK (hierarchy_ch_cb), f); + } + return FALSE; +} + +/* Prepare a tooltip to be shown, i.e. calculate WIDTH and HEIGHT. + Return zero if no system tooltip available, non-zero otherwise. */ + +int +xg_prepare_tooltip (FRAME_PTR f, + Lisp_Object string, + int *width, + int *height) +{ + struct x_output *x = f->output_data.x; + GtkWidget *widget; + GdkWindow *gwin; + GdkScreen *screen; + GtkSettings *settings; + gboolean tt_enabled = TRUE; + GtkRequisition req; + Lisp_Object encoded_string; + + if (!x->ttip_lbl) return 0; + + BLOCK_INPUT; + encoded_string = ENCODE_UTF_8 (string); + widget = GTK_WIDGET (x->ttip_lbl); + gwin = gtk_widget_get_window (GTK_WIDGET (x->ttip_window)); + screen = gdk_drawable_get_screen (gwin); + settings = gtk_settings_get_for_screen (screen); + g_object_get (settings, "gtk-enable-tooltips", &tt_enabled, NULL); + if (tt_enabled) + { + g_object_set (settings, "gtk-enable-tooltips", FALSE, NULL); + /* Record that we disabled it so it can be enabled again. */ + g_object_set_data (G_OBJECT (x->ttip_window), "restore-tt", + (gpointer)f); + } + + /* Prevent Gtk+ from hiding tooltip on mouse move and such. */ + g_object_set_data (G_OBJECT + (gtk_widget_get_display (GTK_WIDGET (x->ttip_window))), + "gdk-display-current-tooltip", NULL); + + /* Put out dummy widget in so we can get callbacks for unrealize and + hierarchy-changed. */ + gtk_tooltip_set_custom (x->ttip_widget, widget); + + gtk_tooltip_set_text (x->ttip_widget, SDATA (encoded_string)); + gtk_widget_size_request (GTK_WIDGET (x->ttip_window), &req); + if (width) *width = req.width; + if (height) *height = req.height; + + UNBLOCK_INPUT; + + return 1; +} + +/* Show the tooltip at ROOT_X and ROOT_Y. + xg_prepare_tooltip must have been called before this function. */ + +void +xg_show_tooltip (FRAME_PTR f, int root_x, int root_y) +{ + struct x_output *x = f->output_data.x; + if (x->ttip_window) + { + BLOCK_INPUT; + gtk_window_move (x->ttip_window, root_x, root_y); + gtk_widget_show_all (GTK_WIDGET (x->ttip_window)); + UNBLOCK_INPUT; + } +} + +/* Hide tooltip if shown. Do nothing if not shown. + Return non-zero if tip was hidden, non-ero if not (i.e. not using + system tooltips). */ + +int +xg_hide_tooltip (FRAME_PTR f) +{ + int ret = 0; + if (f->output_data.x->ttip_window) + { + GtkWindow *win = f->output_data.x->ttip_window; + BLOCK_INPUT; + gtk_widget_hide (GTK_WIDGET (win)); + + if (g_object_get_data (G_OBJECT (win), "restore-tt")) + { + GdkWindow *gwin = gtk_widget_get_window (GTK_WIDGET (win)); + GdkScreen *screen = gdk_drawable_get_screen (gwin); + GtkSettings *settings = gtk_settings_get_for_screen (screen); + g_object_set (settings, "gtk-enable-tooltips", TRUE, NULL); + } + UNBLOCK_INPUT; + + ret = 1; + } + + return ret; +} + + +/*********************************************************************** General functions for creating widgets, resizing, events, e.t.c. ***********************************************************************/ @@ -847,17 +1002,34 @@ style->bg_pixmap_name[GTK_STATE_NORMAL] = g_strdup ("<none>"); gtk_widget_modify_style (wfixed, style); - /* GTK does not set any border, and they look bad with GTK. */ - /* That they look bad is no excuse for imposing this here. --Stef - It should be done by providing the proper default in Fx_create_Frame. - f->border_width = 0; - f->internal_border_width = 0; */ + /* Steal a tool tip window we can move ourselves. */ + f->output_data.x->ttip_widget = 0; + f->output_data.x->ttip_lbl = 0; + f->output_data.x->ttip_window = 0; + gtk_widget_set_tooltip_text (wtop, "Dummy text"); + g_signal_connect (wtop, "query-tooltip", G_CALLBACK (qttip_cb), f); UNBLOCK_INPUT; return 1; } +void +xg_free_frame_widgets (FRAME_PTR f) +{ + if (FRAME_GTK_OUTER_WIDGET (f)) + { + struct x_output *x = f->output_data.x; + gtk_widget_destroy (FRAME_GTK_OUTER_WIDGET (f)); + FRAME_X_WINDOW (f) = 0; /* Set to avoid XDestroyWindow in xterm.c */ + FRAME_GTK_OUTER_WIDGET (f) = 0; + if (x->ttip_lbl) + gtk_widget_destroy (x->ttip_lbl); + if (x->ttip_widget) + g_object_unref (G_OBJECT (x->ttip_widget)); + } +} + /* Set the normal size hints for the window manager, for frame F. FLAGS is the flags word to use--or 0 meaning preserve the flags that the window now has.
--- a/src/gtkutil.h Fri Jul 30 02:11:29 2010 +0000 +++ b/src/gtkutil.h Sun Aug 01 22:48:29 2010 +0000 @@ -194,6 +194,7 @@ extern GdkCursor * xg_create_default_cursor (Display *dpy); extern int xg_create_frame_widgets (FRAME_PTR f); +extern void xg_free_frame_widgets (FRAME_PTR f); extern void x_wm_set_size_hint (FRAME_PTR f, long flags, int user_position); @@ -203,6 +204,14 @@ Pixmap icon_pixmap, Pixmap icon_mask); +extern int xg_prepare_tooltip (FRAME_PTR f, + Lisp_Object string, + int *width, + int *height); +extern void xg_show_tooltip (FRAME_PTR f, int root_x, int root_y); +extern int xg_hide_tooltip (FRAME_PTR f); + + /* Mark all callback data that are Lisp_object:s during GC. */ extern void xg_mark_data (void);
--- a/src/keymap.c Fri Jul 30 02:11:29 2010 +0000 +++ b/src/keymap.c Sun Aug 01 22:48:29 2010 +0000 @@ -1226,7 +1226,7 @@ && (!CONSP (c) /* If C is a range, it must be a leaf. */ || (INTEGERP (XCAR (c)) && idx != length))) - error ("Key sequence contains invalid event"); + message_with_string ("Key sequence contains invalid event %s", c, 1); if (idx == length) RETURN_UNGCPRO (store_in_keymap (keymap, c, def)); @@ -1340,7 +1340,7 @@ /* Allow string since binding for `menu-bar-select-buffer' includes the buffer name in the key sequence. */ if (!INTEGERP (c) && !SYMBOLP (c) && !CONSP (c) && !STRINGP (c)) - error ("Key sequence contains invalid event"); + message_with_string ("Key sequence contains invalid event %s", c, 1); cmd = access_keymap (keymap, c, t_ok, 0, 1); if (idx == length)
--- a/src/xfns.c Fri Jul 30 02:11:29 2010 +0000 +++ b/src/xfns.c Sun Aug 01 22:48:29 2010 +0000 @@ -161,6 +161,10 @@ int x_gtk_whole_detached_tool_bar; +/* If non-zero, use Gtk+ tooltips. */ + +static int x_gtk_use_system_tooltips; + /* The background and shape of the mouse pointer, and shape when not over text or in the modeline. */ @@ -4610,7 +4614,9 @@ when this happens. */ static Lisp_Object -x_create_tip_frame (struct x_display_info *dpyinfo, Lisp_Object parms, Lisp_Object text) +x_create_tip_frame (struct x_display_info *dpyinfo, + Lisp_Object parms, + Lisp_Object text) { struct frame *f; Lisp_Object frame, tem; @@ -5037,6 +5043,27 @@ else CHECK_NUMBER (dy); +#ifdef USE_GTK + if (x_gtk_use_system_tooltips) + { + int ok; + + /* Hide a previous tip, if any. */ + Fx_hide_tip (); + + BLOCK_INPUT; + if ((ok = xg_prepare_tooltip (f, string, &width, &height)) != 0) + { + compute_tip_xy (f, parms, dx, dy, width, height, &root_x, &root_y); + xg_show_tooltip (f, root_x, root_y); + /* This is used in Fx_hide_tip. */ + XSETFRAME (tip_frame, f); + } + UNBLOCK_INPUT; + if (ok) goto start_timer; + } +#endif /* USE_GTK */ + if (NILP (last_show_tip_args)) last_show_tip_args = Fmake_vector (make_number (3), Qnil); @@ -5197,6 +5224,7 @@ int count; Lisp_Object deleted, frame, timer; struct gcpro gcpro1, gcpro2; + struct frame *f; /* Return quickly if nothing to do. */ if (NILP (tip_timer) && NILP (tip_frame)) @@ -5214,6 +5242,14 @@ if (!NILP (timer)) call1 (Qcancel_timer, timer); +#ifdef USE_GTK + /* When using system tooltip, tip_frame is the Emacs frame on which + the tip is shown. */ + f = XFRAME (frame); + if (xg_hide_tooltip (f)) + frame = Qnil; +#endif + if (FRAMEP (frame)) { delete_frame (frame, Qnil); @@ -5224,8 +5260,9 @@ redisplay procedure is not called when a tip frame over menu items is unmapped. Redisplay the menu manually... */ { - struct frame *f = SELECTED_FRAME (); - Widget w = f->output_data.x->menubar_widget; + Widget w; + f = SELECTED_FRAME (); + w = f->output_data.x->menubar_widget; if (!DoesSaveUnders (FRAME_X_DISPLAY_INFO (f)->screen) && w != NULL) @@ -5894,6 +5931,12 @@ the tool bar buttons. */); x_gtk_whole_detached_tool_bar = 0; + DEFVAR_BOOL ("x-gtk-use-system-tooltips", &x_gtk_use_system_tooltips, + doc: /* *If non-nil with a Gtk+ built Emacs, the Gtk+ toolip is used. +Otherwise use Emacs own tooltip implementation. +When using Gtk+ tooltips, the tooltip face is not used. */); + x_gtk_use_system_tooltips = 1; + Fprovide (intern_c_string ("x"), Qnil); #ifdef USE_X_TOOLKIT
--- a/src/xselect.c Fri Jul 30 02:11:29 2010 +0000 +++ b/src/xselect.c Sun Aug 01 22:48:29 2010 +0000 @@ -392,7 +392,7 @@ selecting_window = FRAME_X_WINDOW (sf); display = FRAME_X_DISPLAY (sf); dpyinfo = FRAME_X_DISPLAY_INFO (sf); - + CHECK_SYMBOL (selection_name); selection_atom = symbol_to_x_atom (dpyinfo, display, selection_name); @@ -410,10 +410,8 @@ Lisp_Object prev_value; selection_time = long_to_cons ((unsigned long) time); - selection_data = Fcons (selection_name, - Fcons (selection_value, - Fcons (selection_time, - Fcons (selected_frame, Qnil)))); + selection_data = list4 (selection_name, selection_value, + selection_time, selected_frame); prev_value = assq_no_quit (selection_name, Vselection_alist); Vselection_alist = Fcons (selection_data, Vselection_alist); @@ -1015,7 +1013,7 @@ } } UNBLOCK_INPUT; - + selection_symbol = x_atom_to_symbol (display, selection); local_selection_data = assq_no_quit (selection_symbol, Vselection_alist); @@ -2416,7 +2414,7 @@ Atom props[8]; Display *display; struct frame *sf = SELECTED_FRAME (); - + check_x (); if (! FRAME_X_P (sf))
--- a/src/xterm.c Fri Jul 30 02:11:29 2010 +0000 +++ b/src/xterm.c Sun Aug 01 22:48:29 2010 +0000 @@ -2842,7 +2842,8 @@ #if defined (USE_GTK) && defined (USE_TOOLKIT_SCROLL_BARS) /* Make sure scroll bars are redrawn. As they aren't redrawn by redisplay, do it here. */ - gtk_widget_queue_draw (FRAME_GTK_WIDGET (f)); + if (FRAME_GTK_WIDGET (f)) + gtk_widget_queue_draw (FRAME_GTK_WIDGET (f)); #endif XFlush (FRAME_X_DISPLAY (f)); @@ -9278,14 +9279,7 @@ #else /* !USE_X_TOOLKIT */ #ifdef USE_GTK - /* In the GTK version, tooltips are normal X - frames. We must check and free both types. */ - if (FRAME_GTK_OUTER_WIDGET (f)) - { - gtk_widget_destroy (FRAME_GTK_OUTER_WIDGET (f)); - FRAME_X_WINDOW (f) = 0; /* Set to avoid XDestroyWindow below */ - FRAME_GTK_OUTER_WIDGET (f) = 0; - } + xg_free_frame_widgets (f); #endif /* USE_GTK */ if (FRAME_X_WINDOW (f))
--- a/src/xterm.h Fri Jul 30 02:11:29 2010 +0000 +++ b/src/xterm.h Sun Aug 01 22:48:29 2010 +0000 @@ -502,6 +502,10 @@ /* The last size hints set. */ GdkGeometry size_hints; long hint_flags; + + GtkTooltip *ttip_widget; + GtkWidget *ttip_lbl; + GtkWindow *ttip_window; #endif /* If >=0, a bitmap index. The indicated bitmap is used for the