Function calls in elisp are especially expensive. Iterating over a
long list is going to be 30 times faster implemented in C than in Elisp.
- To get started debugging XEmacs, take a look at the `gdbinit' and
-`dbxrc' files in the `src' directory. *Note Q2.1.15 - How to Debug an
+ To get started debugging XEmacs, take a look at the `.gdbinit' and
+`.dbxrc' files in the `src' directory. *Note Q2.1.15 - How to Debug an
XEmacs problem with a debugger: (xemacs-faq)Q2.1.15 - How to Debug an
XEmacs problem with a debugger.
the object is a real Lisp object `Lisp_Type_Record' or just an integer
or a character. Integers and characters are the only two types that are
stored directly - without another level of indirection, and therefore
-they don´t have to be marked and collected. *Note How Lisp Objects Are
+they don't have to be marked and collected. *Note How Lisp Objects Are
Represented in C::.
The second case is the one we have to handle. It is the one when we
objects are allocated and handled using that scheme of `lcrecords'.
Each object is `malloc'ed separately instead of placing it in one of
the contiguous frob blocks. All types that are currently stored using
-`lcrecords'´s `alloc_lcrecord' and `make_lcrecord_list' are the types:
+`lcrecords''s `alloc_lcrecord' and `make_lcrecord_list' are the types:
vectors, buffers, char-table, char-table-entry, console, weak-list,
database, device, ldap, hash-table, command-builder, extent-auxiliary,
extent-info, face, coding-system, frame, image-instance, glyph,
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Default Value, Prev: Creating Buffer-Local, Up: Buffer-Local Variables
+
+The Default Value of a Buffer-Local Variable
+--------------------------------------------
+
+ The global value of a variable with buffer-local bindings is also
+called the "default" value, because it is the value that is in effect
+except when specifically overridden.
+
+ The functions `default-value' and `setq-default' access and change a
+variable's default value regardless of whether the current buffer has a
+buffer-local binding. For example, you could use `setq-default' to
+change the default setting of `paragraph-start' for most buffers; and
+this would work even when you are in a C or Lisp mode buffer that has a
+buffer-local value for this variable.
+
+ The special forms `defvar' and `defconst' also set the default value
+(if they set the variable at all), rather than any local value.
+
+ - Function: default-value symbol
+ This function returns SYMBOL's default value. This is the value
+ that is seen in buffers that do not have their own values for this
+ variable. If SYMBOL is not buffer-local, this is equivalent to
+ `symbol-value' (*note Accessing Variables::).
+
+ - Function: default-boundp symbol
+ The function `default-boundp' tells you whether SYMBOL's default
+ value is nonvoid. If `(default-boundp 'foo)' returns `nil', then
+ `(default-value 'foo)' would get an error.
+
+ `default-boundp' is to `default-value' as `boundp' is to
+ `symbol-value'.
+
+ - Special Form: setq-default symbol value
+ This sets the default value of SYMBOL to VALUE. It does not
+ evaluate SYMBOL, but does evaluate VALUE. The value of the
+ `setq-default' form is VALUE.
+
+ If a SYMBOL is not buffer-local for the current buffer, and is not
+ marked automatically buffer-local, `setq-default' has the same
+ effect as `setq'. If SYMBOL is buffer-local for the current
+ buffer, then this changes the value that other buffers will see
+ (as long as they don't have a buffer-local value), but not the
+ value that the current buffer sees.
+
+ ;; In buffer `foo':
+ (make-local-variable 'local)
+ => local
+ (setq local 'value-in-foo)
+ => value-in-foo
+ (setq-default local 'new-default)
+ => new-default
+ local
+ => value-in-foo
+ (default-value 'local)
+ => new-default
+
+ ;; In (the new) buffer `bar':
+ local
+ => new-default
+ (default-value 'local)
+ => new-default
+ (setq local 'another-default)
+ => another-default
+ (default-value 'local)
+ => another-default
+
+ ;; Back in buffer `foo':
+ local
+ => value-in-foo
+ (default-value 'local)
+ => another-default
+
+ - Function: set-default symbol value
+ This function is like `setq-default', except that SYMBOL is
+ evaluated.
+
+ (set-default (car '(a b c)) 23)
+ => 23
+ (default-value 'a)
+ => 23
+
+\1f
File: lispref.info, Node: Variable Aliases, Prev: Buffer-Local Variables, Up: Variables
Variable Aliases
(macroexpand '(inc2 r s))
=> (progn (inc r) (inc s)) ; `inc' not expanded here.
-\1f
-File: lispref.info, Node: Compiling Macros, Next: Defining Macros, Prev: Expansion, Up: Macros
-
-Macros and Byte Compilation
-===========================
-
- You might ask why we take the trouble to compute an expansion for a
-macro and then evaluate the expansion. Why not have the macro body
-produce the desired results directly? The reason has to do with
-compilation.
-
- When a macro call appears in a Lisp program being compiled, the Lisp
-compiler calls the macro definition just as the interpreter would, and
-receives an expansion. But instead of evaluating this expansion, it
-compiles the expansion as if it had appeared directly in the program.
-As a result, the compiled code produces the value and side effects
-intended for the macro, but executes at full compiled speed. This would
-not work if the macro body computed the value and side effects
-itself--they would be computed at compile time, which is not useful.
-
- In order for compilation of macro calls to work, the macros must be
-defined in Lisp when the calls to them are compiled. The compiler has a
-special feature to help you do this: if a file being compiled contains a
-`defmacro' form, the macro is defined temporarily for the rest of the
-compilation of that file. To use this feature, you must define the
-macro in the same file where it is used and before its first use.
-
- Byte-compiling a file executes any `require' calls at top-level in
-the file. This is in case the file needs the required packages for
-proper compilation. One way to ensure that necessary macro definitions
-are available during compilation is to require the files that define
-them (*note Named Features::). To avoid loading the macro definition
-files when someone _runs_ the compiled program, write
-`eval-when-compile' around the `require' calls (*note Eval During
-Compile::).
-
-\1f
-File: lispref.info, Node: Defining Macros, Next: Backquote, Prev: Compiling Macros, Up: Macros
-
-Defining Macros
-===============
-
- A Lisp macro is a list whose CAR is `macro'. Its CDR should be a
-function; expansion of the macro works by applying the function (with
-`apply') to the list of unevaluated argument-expressions from the macro
-call.
-
- It is possible to use an anonymous Lisp macro just like an anonymous
-function, but this is never done, because it does not make sense to pass
-an anonymous macro to functionals such as `mapcar'. In practice, all
-Lisp macros have names, and they are usually defined with the special
-form `defmacro'.
-
- - Special Form: defmacro name argument-list body-forms...
- `defmacro' defines the symbol NAME as a macro that looks like this:
-
- (macro lambda ARGUMENT-LIST . BODY-FORMS)
-
- This macro object is stored in the function cell of NAME. The
- value returned by evaluating the `defmacro' form is NAME, but
- usually we ignore this value.
-
- The shape and meaning of ARGUMENT-LIST is the same as in a
- function, and the keywords `&rest' and `&optional' may be used
- (*note Argument List::). Macros may have a documentation string,
- but any `interactive' declaration is ignored since macros cannot be
- called interactively.
-
Foundation instead of in the original English.
\1f
+File: lispref.info, Node: Compiling Macros, Next: Defining Macros, Prev: Expansion, Up: Macros
+
+Macros and Byte Compilation
+===========================
+
+ You might ask why we take the trouble to compute an expansion for a
+macro and then evaluate the expansion. Why not have the macro body
+produce the desired results directly? The reason has to do with
+compilation.
+
+ When a macro call appears in a Lisp program being compiled, the Lisp
+compiler calls the macro definition just as the interpreter would, and
+receives an expansion. But instead of evaluating this expansion, it
+compiles the expansion as if it had appeared directly in the program.
+As a result, the compiled code produces the value and side effects
+intended for the macro, but executes at full compiled speed. This would
+not work if the macro body computed the value and side effects
+itself--they would be computed at compile time, which is not useful.
+
+ In order for compilation of macro calls to work, the macros must be
+defined in Lisp when the calls to them are compiled. The compiler has a
+special feature to help you do this: if a file being compiled contains a
+`defmacro' form, the macro is defined temporarily for the rest of the
+compilation of that file. To use this feature, you must define the
+macro in the same file where it is used and before its first use.
+
+ Byte-compiling a file executes any `require' calls at top-level in
+the file. This is in case the file needs the required packages for
+proper compilation. One way to ensure that necessary macro definitions
+are available during compilation is to require the files that define
+them (*note Named Features::). To avoid loading the macro definition
+files when someone _runs_ the compiled program, write
+`eval-when-compile' around the `require' calls (*note Eval During
+Compile::).
+
+\1f
+File: lispref.info, Node: Defining Macros, Next: Backquote, Prev: Compiling Macros, Up: Macros
+
+Defining Macros
+===============
+
+ A Lisp macro is a list whose CAR is `macro'. Its CDR should be a
+function; expansion of the macro works by applying the function (with
+`apply') to the list of unevaluated argument-expressions from the macro
+call.
+
+ It is possible to use an anonymous Lisp macro just like an anonymous
+function, but this is never done, because it does not make sense to pass
+an anonymous macro to functionals such as `mapcar'. In practice, all
+Lisp macros have names, and they are usually defined with the special
+form `defmacro'.
+
+ - Special Form: defmacro name argument-list body-forms...
+ `defmacro' defines the symbol NAME as a macro that looks like this:
+
+ (macro lambda ARGUMENT-LIST . BODY-FORMS)
+
+ This macro object is stored in the function cell of NAME. The
+ value returned by evaluating the `defmacro' form is NAME, but
+ usually we ignore this value.
+
+ The shape and meaning of ARGUMENT-LIST is the same as in a
+ function, and the keywords `&rest' and `&optional' may be used
+ (*note Argument List::). Macros may have a documentation string,
+ but any `interactive' declaration is ignored since macros cannot be
+ called interactively.
+
+\1f
File: lispref.info, Node: Backquote, Next: Problems with Macros, Prev: Defining Macros, Up: Macros
Backquote
happen in process filter functions and sentinels. Therefore, these
errors also can invoke the debugger. *Note Processes::.
+ - User Option: debug-on-signal
+ This variable is similar to `debug-on-error' but breaks whenever
+ an error is signalled, regardless of whether it would be handled.
+
- User Option: debug-ignored-errors
This variable specifies certain kinds of errors that should not
enter the debugger. Its value is a list of error condition
(add-hook 'after-init-hook
'(lambda () (setq debug-on-error t)))
- - User Option: debug-on-signal
- This variable is similar to `debug-on-error' but breaks whenever
- an error is signalled, regardless of whether it would be handled.
-
\1f
File: lispref.info, Node: Infinite Loops, Next: Function Debugging, Prev: Error Debugging, Up: Debugger
* cdr-safe: List Elements.
* ceiling: Numeric Conversions.
* centering point: Vertical Scrolling.
+* cerror: Signaling Errors.
* change hooks: Change Hooks.
* change-major-mode-hook: Major Mode Conventions.
* changing key bindings: Changing Key Bindings.
* charset-registry: Charset Property Functions.
* charset-reverse-direction-charset: Basic Charset Functions.
* charsetp: Charsets.
+* check-argument-type: Signaling Errors.
* check-toolbar-button-syntax: Toolbar Descriptor Format.
* check-valid-char-table-value: Working With Char Tables.
* check-valid-inst-list: Specifier Validation Functions.
* CL note--default optional arg: Argument List.
* CL note--integers vrs eq: Comparison of Numbers.
* CL note--lack union, set: Sets And Lists.
-* CL note--no continuable errors: Signaling Errors.
* CL note--only throw in Emacs: Catch and Throw.
* CL note--rplaca vrs setcar: Modifying Lists.
* CL note--set local: Setting Variables.
* debug-on-next-call: Internals of Debugger.
* debug-on-quit: Infinite Loops.
* debug-on-signal: Error Debugging.
+* debug-on-signal use: Handling Errors.
* debugger <1>: Internals of Debugger.
* debugger: Debugger.
* debugger command list: Debugger Commands.
* define-abbrev: Defining Abbrevs.
* define-abbrev-table: Abbrev Tables.
* define-derived-mode: Derived Modes.
+* define-error: Error Symbols.
* define-function: Defining Functions.
* define-key: Changing Key Bindings.
* define-logical-name: Changing File Attributes.
* display-buffer: Choosing Window.
* display-buffer-function: Choosing Window.
* display-completion-list: Completion Commands.
+* display-error: Processing of Errors.
* display-message: The Echo Area.
* display-warning: Warnings.
* display-warning-minimum-level: Warnings.
* error name: Error Symbols.
* error symbol: Error Symbols.
* error-conditions: Error Symbols.
+* error-message-string: Processing of Errors.
* errors: Errors.
* esc-map: Prefix Keys.
* ESC-prefix: Prefix Keys.
* PATH environment variable: Subprocess Creation.
* path-separator: System Environment.
* pausing: Waiting.
-* peculiar error: Error Symbols.
* peeking at input: Peeking and Discarding.
* percent symbol in modeline: Modeline Data.
* perform-replace: Search and Replace.
* shrink-window-pixels: Resizing Windows.
* side effect: Intro Eval.
* signal: Signaling Errors.
+* signal-error: Signaling Errors.
* signal-process: Signals to Processes.
* signaling errors: Signaling Errors.
* signals: Signals to Processes.
\1f
File: new-users-guide.info, Node: Top, Next: Intro, Prev: (dir), Up: (dir)
- The Emacs Editor ****************
+The Emacs Editor
+****************
Emacs is the extensible, customizable, self-documenting real-time
display editor. This Info file will help you get started on using
END-INFO-DIR-ENTRY
\1f
-File: xemacs-faq.info, Node: Customization, Next: Subsystems, Prev: Installation, Up: Top
-
-3 Customization and Options
-***************************
-
- This is part 3 of the XEmacs Frequently Asked Questions list. This
-section is devoted to Customization and screen settings.
-
-* Menu:
-
-Customization---Emacs Lisp and `.emacs':
-* Q3.0.1:: What version of Emacs am I running?
-* Q3.0.2:: How do I evaluate Elisp expressions?
-* Q3.0.3:: `(setq tab-width 6)' behaves oddly.
-* Q3.0.4:: How can I add directories to the `load-path'?
-* Q3.0.5:: How to check if a lisp function is defined?
-* Q3.0.6:: Can I force the output of `(face-list)' to a buffer?
-* Q3.0.7:: Font selections don't get saved after `Save Options'.
-* Q3.0.8:: How do I make a single minibuffer frame?
-* Q3.0.9:: What is `Customize'?
-
-X Window System & Resources:
-* Q3.1.1:: Where is a list of X resources?
-* Q3.1.2:: How can I detect a color display?
-* Q3.1.3:: `(set-screen-width)' worked in 19.6, but not in 19.13?
-* Q3.1.4:: Specifying `Emacs*EmacsScreen.geometry' in `.emacs' does not work in 19.15?
-* Q3.1.5:: How can I get the icon to just say `XEmacs'?
-* Q3.1.6:: How can I have the window title area display the full path?
-* Q3.1.7:: `xemacs -name junk' doesn't work?
-* Q3.1.8:: `-iconic' doesn't work.
-
-Textual Fonts & Colors:
-* Q3.2.1:: How can I set color options from `.emacs'?
-* Q3.2.2:: How do I set the text, menu and modeline fonts?
-* Q3.2.3:: How can I set the colors when highlighting a region?
-* Q3.2.4:: How can I limit color map usage?
-* Q3.2.5:: My tty supports color, but XEmacs doesn't use them.
-* Q3.2.6:: Can I have pixmap backgrounds in XEmacs?
-
-The Modeline:
-* Q3.3.1:: How can I make the modeline go away?
-* Q3.3.2:: How do you have XEmacs display the line number in the modeline?
-* Q3.3.3:: How do I get XEmacs to put the time of day on the modeline?
-* Q3.3.4:: How do I turn off current chapter from AUC TeX modeline?
-* Q3.3.5:: How can one change the modeline color based on the mode used?
-
-3.4 Multiple Device Support:
-* Q3.4.1:: How do I open a frame on another screen of my multi-headed display?
-* Q3.4.2:: Can I really connect to a running XEmacs after calling up over a modem? How?
-
-3.5 The Keyboard:
-* Q3.5.1:: How can I bind complex functions (or macros) to keys?
-* Q3.5.2:: How can I stop down-arrow from adding empty lines to the bottom of my buffers?
-* Q3.5.3:: How do I bind C-. and C-; to scroll one line up and down?
-* Q3.5.4:: Globally binding Delete?
-* Q3.5.5:: Scrolling one line at a time.
-* Q3.5.6:: How to map Help key alone on Sun type4 keyboard?
-* Q3.5.7:: How can you type in special characters in XEmacs?
-* Q3.5.8:: Why does `(global-set-key [delete-forward] 'delete-char)' complain?
-* Q3.5.9:: How do I make the Delete key delete forward?
-* Q3.5.10:: Can I turn on "sticky" modifier keys?
-* Q3.5.11:: How do I map the arrow keys?
-
-The Cursor:
-* Q3.6.1:: Is there a way to make the bar cursor thicker?
-* Q3.6.2:: Is there a way to get back the old block cursor where the cursor covers the character in front of the point?
-* Q3.6.3:: Can I make the cursor blink?
-
-The Mouse and Highlighting:
-* Q3.7.1:: How can I turn off Mouse pasting?
-* Q3.7.2:: How do I set control/meta/etc modifiers on mouse buttons?
-* Q3.7.3:: Clicking the left button does not do anything in buffer list.
-* Q3.7.4:: How can I get a list of buffers when I hit mouse button 3?
-* Q3.7.5:: Why does cut-and-paste not work between XEmacs and a cmdtool?
-* Q3.7.6:: How I can set XEmacs up so that it pastes where the text cursor is?
-* Q3.7.7:: How do I select a rectangular region?
-* Q3.7.8:: Why does M-w take so long?
-
-The Menubar and Toolbar:
-* Q3.8.1:: How do I get rid of the menu (or menubar)?
-* Q3.8.2:: Can I customize the basic menubar?
-* Q3.8.3:: How do I control how many buffers are listed in the menu `Buffers' list?
-* Q3.8.4:: Resources like `Emacs*menubar*font' are not working?
-* Q3.8.5:: How can I bind a key to a function to toggle the toolbar?
-
-Scrollbars:
-* Q3.9.1:: How can I disable the scrollbar?
-* Q3.9.2:: How can one use resources to change scrollbar colors?
-* Q3.9.3:: Moving the scrollbar can move the point; can I disable this?
-* Q3.9.4:: How can I get automatic horizontal scrolling?
-
-Text Selections:
-* Q3.10.1:: How can I turn off or change highlighted selections?
-* Q3.10.2:: How do I get that typing on an active region removes it?
-* Q3.10.3:: Can I turn off the highlight during isearch?
-* Q3.10.4:: How do I turn off highlighting after C-x C-p (mark-page)?
-* Q3.10.5:: The region disappears when I hit the end of buffer while scrolling.
-
-\1f
-File: xemacs-faq.info, Node: Q3.0.1, Next: Q3.0.2, Prev: Customization, Up: Customization
-
-3.0: Customization - Emacs Lisp and .emacs
-==========================================
-
-Q3.0.1: What version of Emacs am I running?
--------------------------------------------
-
- How can `.emacs' determine which of the family of Emacsen I am using?
-
- To determine if you are currently running GNU Emacs 18, GNU Emacs 19,
-XEmacs 19, XEmacs 20, or Epoch, and use appropriate code, check out the
-example given in `etc/sample.emacs'. There are other nifty things in
-there as well!
-
- For all new code, all you really need to do is:
-
- (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))
-
-\1f
-File: xemacs-faq.info, Node: Q3.0.2, Next: Q3.0.3, Prev: Q3.0.1, Up: Customization
-
-Q3.0.2: How can I evaluate Emacs-Lisp expressions?
---------------------------------------------------
-
- I know I can evaluate Elisp expressions from `*scratch*' buffer with
-`C-j' after the expression. How do I do it from another buffer?
-
- Press `M-:' (the default binding of `eval-expression'), and enter
-the expression to the minibuffer. In XEmacs prior to 19.15
-`eval-expression' used to be a disabled command by default. If this is
-the case, upgrade your XEmacs.
-
-\1f
-File: xemacs-faq.info, Node: Q3.0.3, Next: Q3.0.4, Prev: Q3.0.2, Up: Customization
-
-Q3.0.3: `(setq tab-width 6)' behaves oddly.
--------------------------------------------
-
- If you put `(setq tab-width 6)' in your `.emacs' file it does not
-work! Is there a reason for this? If you do it at the EVAL prompt it
-works fine!! How strange.
-
- Use `setq-default' instead, since `tab-width' is all-buffer-local.
-
-\1f
-File: xemacs-faq.info, Node: Q3.0.4, Next: Q3.0.5, Prev: Q3.0.3, Up: Customization
-
-Q3.0.4: How can I add directories to the `load-path'?
------------------------------------------------------
-
- Here are two ways to do that, one that puts your directories at the
-front of the load-path, the other at the end:
-
- ;;; Add things at the beginning of the load-path, do not add
- ;;; duplicate directories:
- (pushnew "bar" load-path :test 'equal)
-
- (pushnew "foo" load-path :test 'equal)
-
- ;;; Add things at the end, unconditionally
- (setq load-path (nconc load-path '("foo" "bar")))
-
- keith (k.p.) hanlan <keithh@nortel.ca> writes:
-
- To add directories using Unix shell metacharacters use
- `expand-file-name' like this:
-
- (push (expand-file-name "~keithh/.emacsdir") load-path)
-
-\1f
File: xemacs-faq.info, Node: Q3.0.5, Next: Q3.0.6, Prev: Q3.0.4, Up: Customization
Q3.0.5: How to check if a lisp function is defined?
\1f
File: xemacs-faq.info, Node: Q3.1.3, Next: Q3.1.4, Prev: Q3.1.2, Up: Customization
-Q3.1.3: `(set-screen-width)' worked in 19.6, but not in 19.13?
---------------------------------------------------------------
-
- In Lucid Emacs 19.6 I did `(set-screen-width CHARACTERS)' and
-`(set-screen-height LINES)' in my `.emacs' instead of specifying
-`Emacs*EmacsScreen.geometry' in my `.Xdefaults' but this does not work
-in XEmacs 19.13.
-
- These two functions now take frame arguments:
-
- (set-frame-width (selected-frame) CHARACTERS)
- (set-frame-height (selected-frame) LINES)
+Q3.1.3: [This question intentionally left blank]
+------------------------------------------------
\1f
File: xemacs-faq.info, Node: Q3.1.4, Next: Q3.1.5, Prev: Q3.1.3, Up: Customization
-Q3.1.4: Specifying `Emacs*EmacsScreen.geometry' in `.emacs' does not work in 19.15?
------------------------------------------------------------------------------------
-
- In XEmacs 19.11 I specified `Emacs*EmacsScreen.geometry' in my
-`.emacs' but this does not work in XEmacs 19.15.
-
- We have switched from using the term "screen" to using the term
-"frame".
-
- The correct entry for your `.Xdefaults' is now:
-
- Emacs*EmacsFrame.geometry
+Q3.1.4: [This question intentionally left blank]
+------------------------------------------------
\1f
File: xemacs-faq.info, Node: Q3.1.5, Next: Q3.1.6, Prev: Q3.1.4, Up: Customization
Automatic horizontal scrolling is now standard, starting with 19.14.
+\1f
+File: xemacs-faq.info, Node: Q3.10.1, Next: Q3.10.2, Prev: Q3.9.4, Up: Customization
+
+3.10: Text Selections
+=====================
+
+Q3.10.1: How can I turn off or change highlighted selections?
+-------------------------------------------------------------
+
+ The `zmacs' mode allows for what some might call gratuitous
+highlighting for selected regions (either by setting mark or by using
+the mouse). This is the default behavior. To turn off, add the
+following line to your `.emacs' file:
+
+ (setq zmacs-regions nil)
+
+ Starting with XEmacs-20.2 you can also change this with Customize.
+Select from the `Options' menu `Customize->Emacs->Editing->Basics->Zmacs
+Regions' or type `M-x customize <RET> editing-basics <RET>'.
+
+ To change the face for selection, look at `Options->Customize' on
+the menubar.
+
+\1f
+File: xemacs-faq.info, Node: Q3.10.2, Next: Q3.10.3, Prev: Q3.10.1, Up: Customization
+
+Q3.10.2: How do I get that typing on an active region removes it?
+-----------------------------------------------------------------
+
+ I want to change things so that if I select some text and start
+typing, the typed text replaces the selected text, similar to Motif.
+
+ You want to use something called "pending delete". Pending delete
+is what happens when you select a region (with the mouse or keyboard)
+and you press a key to replace the selected region by the key you typed.
+Usually backspace kills the selected region.
+
+ To get this behavior, add the following lines to your `.emacs':
+
+ (cond
+ ((fboundp 'turn-on-pending-delete)
+ (turn-on-pending-delete))
+ ((fboundp 'pending-delete-on)
+ (pending-delete-on t)))
+
+ Note that this will work with both Backspace and Delete. This code
+is a tad more complicated than it has to be for XEmacs in order to make
+it more portable.
+
+\1f
+File: xemacs-faq.info, Node: Q3.10.3, Next: Q3.10.4, Prev: Q3.10.2, Up: Customization
+
+Q3.10.3: Can I turn off the highlight during isearch?
+-----------------------------------------------------
+
+ I do not like my text highlighted while I am doing isearch as I am
+not able to see what's underneath. How do I turn it off?
+
+ Put the following in your `.emacs':
+
+ (setq isearch-highlight nil)
+
+ Starting with XEmacs-20.2 you can also change this with Customize.
+Type `M-x customize-variable <RET> isearch-highlight <RET>'.
+
+ Note also that isearch-highlight affects query-replace and ispell.
+Instead of disabling isearch-highlight you may find that a better
+solution consists of customizing the `isearch' face.
+
+\1f
+File: xemacs-faq.info, Node: Q3.10.4, Next: Q3.10.5, Prev: Q3.10.3, Up: Customization
+
+Q3.10.4: How do I turn off highlighting after `C-x C-p' (mark-page)?
+--------------------------------------------------------------------
+
+ Put this in your `.emacs':
+
+ (setq zmacs-regions nil)
+
+ *Warning: This command turns off all region highlighting.*
+
+ Also *Note Q3.10.1::.
+
+\1f
+File: xemacs-faq.info, Node: Q3.10.5, Prev: Q3.10.4, Up: Customization
+
+Q3.10.5: The region disappears when I hit the end of buffer while scrolling.
+----------------------------------------------------------------------------
+
+ This has been fixed by default starting with XEmacs-20.3.
+
+ With older versions you can turn this feature (if it indeed is a
+feature) off like this:
+
+ (defadvice scroll-up (around scroll-up freeze)
+ (interactive "_P")
+ (let ((zmacs-region-stays t))
+ (if (interactive-p)
+ (condition-case nil
+ ad-do-it
+ (end-of-buffer (goto-char (point-max))))
+ ad-do-it)))
+
+ (defadvice scroll-down (around scroll-down freeze)
+ (interactive "_P")
+ (let ((zmacs-region-stays t))
+ (if (interactive-p)
+ (condition-case nil
+ ad-do-it
+ (beginning-of-buffer (goto-char (point-min))))
+ ad-do-it)))
+
+ Thanks to T. V. Raman <raman@adobe.com> for assistance in deriving
+this answer.
+
+\1f
+File: xemacs-faq.info, Node: Subsystems, Next: Miscellaneous, Prev: Customization, Up: Top
+
+4 Major Subsystems
+******************
+
+ This is part 4 of the XEmacs Frequently Asked Questions list. This
+section is devoted to major XEmacs subsystems.
+
+* Menu:
+
+Reading Mail with VM:
+* Q4.0.1:: How do I set up VM to retrieve remote mail using POP?
+* Q4.0.2:: How do I get VM to filter mail for me?
+* Q4.0.3:: How can I get VM to automatically check for new mail?
+* Q4.0.4:: [This question intentionally left blank]
+* Q4.0.5:: How do I get my outgoing mail archived?
+* Q4.0.6:: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"?
+* Q4.0.7:: Is there a mailing list or FAQ for VM?
+* Q4.0.8:: Remote mail reading with VM.
+* Q4.0.9:: rmail or VM gets an error incorporating new mail.
+* Q4.0.10:: How do I make VM stay in a single frame?
+* Q4.0.11:: How do I make VM or mh-e display graphical smilies?
+* Q4.0.12:: Customization of VM not covered in the manual or here.
+
+Web browsing with W3:
+* Q4.1.1:: What is W3?
+* Q4.1.2:: How do I run W3 from behind a firewall?
+* Q4.1.3:: Is it true that W3 supports style sheets and tables?
+
+Reading Netnews and Mail with Gnus:
+* Q4.2.1:: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus,argh!
+* Q4.2.2:: [This question intentionally left blank]
+* Q4.2.3:: How do I make Gnus stay within a single frame?
+* Q4.2.4:: How do I customize the From: line?
+
+Other Mail & News:
+* Q4.3.1:: How can I read and/or compose MIME messages?
+* Q4.3.2:: What is TM and where do I get it?
+* Q4.3.3:: Why isn't this `movemail' program working?
+* Q4.3.4:: Movemail is also distributed by Netscape? Can that cause problems?
+* Q4.3.5:: Where do I find pstogif (required by tm)?
+
+Sparcworks, EOS, and WorkShop:
+* Q4.4.1:: What is SPARCworks, EOS, and WorkShop
+* Q4.4.2:: How do I start the Sun Workshop support in XEmacs 21?
+
+Energize:
+* Q4.5.1:: What is/was Energize?
+
+Infodock:
+* Q4.6.1:: What is Infodock?
+
+Other Unbundled Packages:
+* Q4.7.1:: What is AUC TeX? Where do you get it?
+* Q4.7.2:: Are there any Emacs Lisp Spreadsheets?
+* Q4.7.3:: [This question intentionally left blank]
+* Q4.7.4:: Problems installing AUC TeX
+* Q4.7.5:: Is there a reason for an Emacs package not to be included in XEmacs?
+* Q4.7.6:: Is there a MatLab mode?
+
+\1f
+File: xemacs-faq.info, Node: Q4.0.1, Next: Q4.0.2, Prev: Subsystems, Up: Subsystems
+
+4.0: Reading Mail with VM
+=========================
+
+Q4.0.1: How do I set up VM to retrieve mail from a remote site using POP?
+-------------------------------------------------------------------------
+
+ Use `vm-spool-files', like this for example:
+
+ (setq vm-spool-files '("/var/spool/mail/wing"
+ "netcom23.netcom.com:110:pass:wing:MYPASS"))
+
+ Of course substitute your actual password for MYPASS.
+
+\1f
+File: xemacs-faq.info, Node: Q4.0.2, Next: Q4.0.3, Prev: Q4.0.1, Up: Subsystems
+
+Q4.0.2: How do I get VM to filter mail for me?
+----------------------------------------------
+
+ One possibility is to use procmail to split your mail before it gets
+to VM. I prefer this personally, since there are many strange and
+wonderful things one can do with procmail. Procmail may be found at
+`ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/'.
+
+ Also see the Mail Filtering FAQ at:
+`ftp://rtfm.mit.edu/pub/usenet/news.answers/mail/filtering-faq'.
+
+\1f
+File: xemacs-faq.info, Node: Q4.0.3, Next: Q4.0.4, Prev: Q4.0.2, Up: Subsystems
+
+Q4.0.3: How can I get VM to automatically check for new mail?
+-------------------------------------------------------------
+
+ John Turner <turner@lanl.gov> writes:
+
+ Use the following:
+
+ (setq vm-auto-get-new-mail 60)
+
+\1f
+File: xemacs-faq.info, Node: Q4.0.4, Next: Q4.0.5, Prev: Q4.0.3, Up: Subsystems
+
+Q4.0.4: [This question intentionally left blank]
+------------------------------------------------
+
+ Obsolete question, left blank to avoid renumbering.
+
+\1f
+File: xemacs-faq.info, Node: Q4.0.5, Next: Q4.0.6, Prev: Q4.0.4, Up: Subsystems
+
+Q4.0.5: How do I get my outgoing mail archived?
+-----------------------------------------------
+
+ (setq mail-archive-file-name "~/outbox")
+
END-INFO-DIR-ENTRY
\1f
-File: xemacs-faq.info, Node: Q3.10.1, Next: Q3.10.2, Prev: Q3.9.4, Up: Customization
-
-3.10: Text Selections
-=====================
-
-Q3.10.1: How can I turn off or change highlighted selections?
--------------------------------------------------------------
-
- The `zmacs' mode allows for what some might call gratuitous
-highlighting for selected regions (either by setting mark or by using
-the mouse). This is the default behavior. To turn off, add the
-following line to your `.emacs' file:
-
- (setq zmacs-regions nil)
-
- Starting with XEmacs-20.2 you can also change this with Customize.
-Select from the `Options' menu `Customize->Emacs->Editing->Basics->Zmacs
-Regions' or type `M-x customize <RET> editing-basics <RET>'.
-
- To change the face for selection, look at `Options->Customize' on
-the menubar.
-
-\1f
-File: xemacs-faq.info, Node: Q3.10.2, Next: Q3.10.3, Prev: Q3.10.1, Up: Customization
-
-Q3.10.2: How do I get that typing on an active region removes it?
------------------------------------------------------------------
-
- I want to change things so that if I select some text and start
-typing, the typed text replaces the selected text, similar to Motif.
-
- You want to use something called "pending delete". Pending delete
-is what happens when you select a region (with the mouse or keyboard)
-and you press a key to replace the selected region by the key you typed.
-Usually backspace kills the selected region.
-
- To get this behavior, add the following line to your `.emacs':
-
- (turn-on-pending-delete)
-
- Note that this will work with both Backspace and Delete.
-
-\1f
-File: xemacs-faq.info, Node: Q3.10.3, Next: Q3.10.4, Prev: Q3.10.2, Up: Customization
-
-Q3.10.3: Can I turn off the highlight during isearch?
------------------------------------------------------
-
- I do not like my text highlighted while I am doing isearch as I am
-not able to see what's underneath. How do I turn it off?
-
- Put the following in your `.emacs':
-
- (setq isearch-highlight nil)
-
- Starting with XEmacs-20.2 you can also change this with Customize.
-Type `M-x customize-variable <RET> isearch-highlight <RET>'.
-
- Note also that isearch-highlight affects query-replace and ispell.
-Instead of disabling isearch-highlight you may find that a better
-solution consists of customizing the `isearch' face.
-
-\1f
-File: xemacs-faq.info, Node: Q3.10.4, Next: Q3.10.5, Prev: Q3.10.3, Up: Customization
-
-Q3.10.4: How do I turn off highlighting after `C-x C-p' (mark-page)?
---------------------------------------------------------------------
-
- Put this in your `.emacs':
-
- (setq zmacs-regions nil)
-
- *Warning: This command turns off all region highlighting.*
-
- Also *Note Q3.10.1::.
-
-\1f
-File: xemacs-faq.info, Node: Q3.10.5, Prev: Q3.10.4, Up: Customization
-
-Q3.10.5: The region disappears when I hit the end of buffer while scrolling.
-----------------------------------------------------------------------------
-
- This has been fixed by default starting with XEmacs-20.3.
-
- With older versions you can turn this feature (if it indeed is a
-feature) off like this:
-
- (defadvice scroll-up (around scroll-up freeze)
- (interactive "_P")
- (let ((zmacs-region-stays t))
- (if (interactive-p)
- (condition-case nil
- ad-do-it
- (end-of-buffer (goto-char (point-max))))
- ad-do-it)))
-
- (defadvice scroll-down (around scroll-down freeze)
- (interactive "_P")
- (let ((zmacs-region-stays t))
- (if (interactive-p)
- (condition-case nil
- ad-do-it
- (beginning-of-buffer (goto-char (point-min))))
- ad-do-it)))
-
- Thanks to T. V. Raman <raman@adobe.com> for assistance in deriving
-this answer.
-
-\1f
-File: xemacs-faq.info, Node: Subsystems, Next: Miscellaneous, Prev: Customization, Up: Top
-
-4 Major Subsystems
-******************
-
- This is part 4 of the XEmacs Frequently Asked Questions list. This
-section is devoted to major XEmacs subsystems.
-
-* Menu:
-
-Reading Mail with VM:
-* Q4.0.1:: How do I set up VM to retrieve remote mail using POP?
-* Q4.0.2:: How do I get VM to filter mail for me?
-* Q4.0.3:: How can I get VM to automatically check for new mail?
-* Q4.0.4:: [This question intentionally left blank]
-* Q4.0.5:: How do I get my outgoing mail archived?
-* Q4.0.6:: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"?
-* Q4.0.7:: Is there a mailing list or FAQ for VM?
-* Q4.0.8:: Remote mail reading with VM.
-* Q4.0.9:: rmail or VM gets an error incorporating new mail.
-* Q4.0.10:: How do I make VM stay in a single frame?
-* Q4.0.11:: How do I make VM or mh-e display graphical smilies?
-* Q4.0.12:: Customization of VM not covered in the manual or here.
-
-Web browsing with W3:
-* Q4.1.1:: What is W3?
-* Q4.1.2:: How do I run W3 from behind a firewall?
-* Q4.1.3:: Is it true that W3 supports style sheets and tables?
-
-Reading Netnews and Mail with Gnus:
-* Q4.2.1:: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus,argh!
-* Q4.2.2:: [This question intentionally left blank]
-* Q4.2.3:: How do I make Gnus stay within a single frame?
-* Q4.2.4:: How do I customize the From: line?
-
-Other Mail & News:
-* Q4.3.1:: How can I read and/or compose MIME messages?
-* Q4.3.2:: What is TM and where do I get it?
-* Q4.3.3:: Why isn't this `movemail' program working?
-* Q4.3.4:: Movemail is also distributed by Netscape? Can that cause problems?
-* Q4.3.5:: Where do I find pstogif (required by tm)?
-
-Sparcworks, EOS, and WorkShop:
-* Q4.4.1:: What is SPARCworks, EOS, and WorkShop
-* Q4.4.2:: How do I start the Sun Workshop support in XEmacs 21?
-
-Energize:
-* Q4.5.1:: What is/was Energize?
-
-Infodock:
-* Q4.6.1:: What is Infodock?
-
-Other Unbundled Packages:
-* Q4.7.1:: What is AUC TeX? Where do you get it?
-* Q4.7.2:: Are there any Emacs Lisp Spreadsheets?
-* Q4.7.3:: Byte compiling AUC TeX on XEmacs 19.14
-* Q4.7.4:: Problems installing AUC TeX
-* Q4.7.5:: Is there a reason for an Emacs package not to be included in XEmacs?
-* Q4.7.6:: Is there a MatLab mode?
-
-\1f
-File: xemacs-faq.info, Node: Q4.0.1, Next: Q4.0.2, Prev: Subsystems, Up: Subsystems
-
-4.0: Reading Mail with VM
-=========================
-
-Q4.0.1: How do I set up VM to retrieve mail from a remote site using POP?
--------------------------------------------------------------------------
-
- Use `vm-spool-files', like this for example:
-
- (setq vm-spool-files '("/var/spool/mail/wing"
- "netcom23.netcom.com:110:pass:wing:MYPASS"))
-
- Of course substitute your actual password for MYPASS.
-
-\1f
-File: xemacs-faq.info, Node: Q4.0.2, Next: Q4.0.3, Prev: Q4.0.1, Up: Subsystems
-
-Q4.0.2: How do I get VM to filter mail for me?
-----------------------------------------------
-
- One possibility is to use procmail to split your mail before it gets
-to VM. I prefer this personally, since there are many strange and
-wonderful things one can do with procmail. Procmail may be found at
-`ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/'.
-
- Also see the Mail Filtering FAQ at:
-`ftp://rtfm.mit.edu/pub/usenet/news.answers/mail/filtering-faq'.
-
-\1f
-File: xemacs-faq.info, Node: Q4.0.3, Next: Q4.0.4, Prev: Q4.0.2, Up: Subsystems
-
-Q4.0.3: How can I get VM to automatically check for new mail?
--------------------------------------------------------------
-
- John Turner <turner@lanl.gov> writes:
-
- Use the following:
-
- (setq vm-auto-get-new-mail 60)
-
-\1f
-File: xemacs-faq.info, Node: Q4.0.4, Next: Q4.0.5, Prev: Q4.0.3, Up: Subsystems
-
-Q4.0.4: [This question intentionally left blank]
-------------------------------------------------
-
- Obsolete question, left blank to avoid renumbering.
-
-\1f
-File: xemacs-faq.info, Node: Q4.0.5, Next: Q4.0.6, Prev: Q4.0.4, Up: Subsystems
-
-Q4.0.5: How do I get my outgoing mail archived?
------------------------------------------------
-
- (setq mail-archive-file-name "~/outbox")
-
-\1f
File: xemacs-faq.info, Node: Q4.0.6, Next: Q4.0.7, Prev: Q4.0.5, Up: Subsystems
Q4.0.6: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"?
\1f
File: xemacs-faq.info, Node: Q4.7.3, Next: Q4.7.4, Prev: Q4.7.2, Up: Subsystems
-Q4.7.3: Byte compiling AUC TeX on XEmacs 19.14.
------------------------------------------------
-
- Georges Brun-Cottan <bruncott@dormeur.inria.fr> writes:
-
- When byte compiling auctex-9.4g, you must use the command:
-
- xemacs -batch -l lpath.el
+Q4.7.3: [This question intentionally left blank]
+------------------------------------------------
\1f
File: xemacs-faq.info, Node: Q4.7.4, Next: Q4.7.5, Prev: Q4.7.3, Up: Subsystems
* Q5.0.8:: Why does edt emulation not work?
* Q5.0.9:: How can I emulate VI and use it as my default mode?
* Q5.0.10:: [This question intentionally left blank]
-* Q5.0.11:: Filladapt doesn't work in 19.15?
+* Q5.0.11:: How do I turn on filladapt for all buffers?
* Q5.0.12:: How do I disable gnuserv from opening a new frame?
* Q5.0.13:: How do I start gnuserv so that each subsequent XEmacs is a client?
* Q5.0.14:: Strange things are happening in Shell Mode.
* Q5.0.15:: Where do I get the latest CC Mode?
* Q5.0.16:: I find auto-show-mode disconcerting. How do I turn it off?
* Q5.0.17:: How can I get two instances of info?
-* Q5.0.18:: I upgraded to XEmacs 19.14 and gnuserv stopped working
+* Q5.0.18:: [This question intentionally left blank]
* Q5.0.19:: Is there something better than LaTeX mode?
* Q5.0.20:: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient?
\1f
File: xemacs-faq.info, Node: Q5.0.11, Next: Q5.0.12, Prev: Q5.0.10, Up: Miscellaneous
-Q5.0.11: Filladapt doesn't work in 19.15
-----------------------------------------
+Q5.0.11: How do I turn on filladapt for all buffers?
+----------------------------------------------------
- Filladapt 2.x is included in 19.15. In it filladapt is now a minor
-mode and minor modes are traditionally off by default. The following
-added to your `.emacs' will turn it on for all buffers:
+ Filladapt is a minor mode and minor modes are traditionally off by
+default. The following added to your `.emacs' will turn it on for all
+buffers:
(setq-default filladapt-mode t)
You can't. The `info' package does not provide for multiple info
buffers.
+\1f
+File: xemacs-faq.info, Node: Q5.0.18, Next: Q5.0.19, Prev: Q5.0.17, Up: Miscellaneous
+
+Q5.0.18: [This question intentionally left blank]
+-------------------------------------------------
+
+\1f
+File: xemacs-faq.info, Node: Q5.0.19, Next: Q5.0.20, Prev: Q5.0.18, Up: Miscellaneous
+
+Q5.0.19: Is there something better than LaTeX mode?
+---------------------------------------------------
+
+ David Kastrup <dak@fsnif.neuroinformatik.ruhr-uni-bochum.de> writes:
+
+ The standard TeX modes leave much to be desired, and are somewhat
+ leniently maintained. Serious TeX users use AUC TeX (*note
+ Q4.7.1::).
+
+\1f
+File: xemacs-faq.info, Node: Q5.0.20, Next: Q5.1.1, Prev: Q5.0.19, Up: Miscellaneous
+
+Q5.0.20: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient?
+---------------------------------------------------------------------------------------------------------
+
+ Jan Vroonhof <vroonhof@math.ethz.ch> writes:
+ Here is one of the solutions, we have this in a script called
+ `etc/editclient.sh'.
+ #!/bin/sh
+ if gnuclient -batch -eval t >/dev/null 2>&1
+ then
+ exec gnuclient ${1+"$@"}
+ else
+ xemacs -unmapped -f gnuserv-start &
+ until gnuclient -batch -eval t >/dev/null 2>&1
+ do
+ sleep 1
+ done
+ exec gnuclient ${1+"$@"}
+ fi
+
+ Note that there is a known problem when running XEmacs and
+ 'gnuclient -nw' on the same TTY.
+
+\1f
+File: xemacs-faq.info, Node: Q5.1.1, Next: Q5.1.2, Prev: Q5.0.20, Up: Miscellaneous
+
+5.1: Emacs Lisp Programming Techniques
+======================================
+
+Q5.1.1: What is the difference in key sequences between XEmacs and GNU Emacs?
+-----------------------------------------------------------------------------
+
+ Erik Naggum <clerik@naggum.no> writes;
+
+ Emacs has a legacy of keyboards that produced characters with
+ modifier bits, and therefore map a variety of input systems into
+ this scheme even today. XEmacs is instead optimized for X events.
+ This causes an incompatibility in the way key sequences are
+ specified, but both Emacs and XEmacs will accept a key sequence as
+ a vector of lists of modifiers that ends with a key, e.g., to bind
+ `M-C-a', you would say `[(meta control a)]' in both Emacsen.
+ XEmacs has an abbreviated form for a single key, just (meta
+ control a). Emacs has an abbreviated form for the Control and the
+ Meta modifiers to string-characters (the ASCII characters), as in
+ `\M-\C-a'. XEmacs users need to be aware that the abbreviated
+ form works only for one-character key sequences, while Emacs users
+ need to be aware that the string-character is rather limited.
+ Specifically, the string-character can accommodate only 256
+ different values, 128 of which have the Meta modifier and 128 of
+ which have not. In each of these blocks, only 32 characters have
+ the Control modifier. Whereas `[(meta control A)]' differs from
+ `[(meta control a)]' because the case differs, `\M-\C-a' and
+ `\M-\C-A' do not. Programmers are advised to use the full common
+ form, both because it is more readable and less error-prone, and
+ because it is supported by both Emacsen.
+
+ Another (even safer) way to be sure of the key-sequences is to use
+the `read-kbd-macro' function, which takes a string like `C-c <up>',
+and converts it to the internal key representation of the Emacs you
+use. The function is available both on XEmacs and GNU Emacs.
+
+\1f
+File: xemacs-faq.info, Node: Q5.1.2, Next: Q5.1.3, Prev: Q5.1.1, Up: Miscellaneous
+
+Q5.1.2: Can I generate "fake" keyboard events?
+----------------------------------------------
+
+ I wonder if there is an interactive function that can generate
+"fake" keyboard events. This way, I could simply map them inside
+XEmacs.
+
+ This seems to work:
+
+ (defun cg--generate-char-event (ch)
+ "Generate an event, as if ch has been typed"
+ (dispatch-event (character-to-event ch)))
+
+ ;; Backspace and Delete stuff
+ (global-set-key [backspace]
+ (lambda () (interactive) (cg--generate-char-event 127)))
+ (global-set-key [unknown_keysym_0x4]
+ (lambda () (interactive) (cg--generate-char-event 4)))
+
+\1f
+File: xemacs-faq.info, Node: Q5.1.3, Next: Q5.1.4, Prev: Q5.1.2, Up: Miscellaneous
+
+Q5.1.3: Could you explain `read-kbd-macro' in more detail?
+----------------------------------------------------------
+
+ The `read-kbd-macro' function returns the internal Emacs
+representation of a human-readable string (which is its argument).
+Thus:
+
+ (read-kbd-macro "C-c C-a")
+ => [(control ?c) (control ?a)]
+
+ (read-kbd-macro "C-c C-. <up>")
+ => [(control ?c) (control ?.) up]
+
+ In GNU Emacs the same forms will be evaluated to what GNU Emacs
+understands internally--the sequences `"\C-x\C-c"' and `[3 67108910
+up]', respectively.
+
+ The exact "human-readable" syntax is defined in the docstring of
+`edmacro-mode'. I'll repeat it here, for completeness.
+
+ Format of keyboard macros during editing:
+
+ Text is divided into "words" separated by whitespace. Except for
+ the words described below, the characters of each word go directly
+ as characters of the macro. The whitespace that separates words is
+ ignored. Whitespace in the macro must be written explicitly, as in
+ `foo <SPC> bar <RET>'.
+
+ * The special words `RET', `SPC', `TAB', `DEL', `LFD', `ESC',
+ and `NUL' represent special control characters. The words
+ must be written in uppercase.
+
+ * A word in angle brackets, e.g., `<return>', `<down>', or
+ `<f1>', represents a function key. (Note that in the standard
+ configuration, the function key `<return>' and the control key
+ <RET> are synonymous.) You can use angle brackets on the
+ words <RET>, <SPC>, etc., but they are not required there.
+
+ * Keys can be written by their ASCII code, using a backslash
+ followed by up to six octal digits. This is the only way to
+ represent keys with codes above \377.
+
+ * One or more prefixes `M-' (meta), `C-' (control), `S-'
+ (shift), `A-' (alt), `H-' (hyper), and `s-' (super) may
+ precede a character or key notation. For function keys, the
+ prefixes may go inside or outside of the brackets: `C-<down>'
+ == `<C-down>'. The prefixes may be written in any order:
+ `M-C-x' == `C-M-x'.
+
+ Prefixes are not allowed on multi-key words, e.g., `C-abc',
+ except that the Meta prefix is allowed on a sequence of
+ digits and optional minus sign: `M--123' == `M-- M-1 M-2 M-3'.
+
+ * The `^' notation for control characters also works: `^M' ==
+ `C-m'.
+
+ * Double angle brackets enclose command names: `<<next-line>>'
+ is shorthand for `M-x next-line <RET>'.
+
+ * Finally, `REM' or `;;' causes the rest of the line to be
+ ignored as a comment.
+
+ Any word may be prefixed by a multiplier in the form of a decimal
+ number and `*': `3*<right>' == `<right> <right> <right>', and
+ `10*foo' == `foofoofoofoofoofoofoofoofoofoo'.
+
+ Multiple text keys can normally be strung together to form a word,
+ but you may need to add whitespace if the word would look like one
+ of the above notations: `; ; ;' is a keyboard macro with three
+ semicolons, but `;;;' is a comment. Likewise, `\ 1 2 3' is four
+ keys but `\123' is a single key written in octal, and `< right >'
+ is seven keys but `<right>' is a single function key. When in
+ doubt, use whitespace.
+
+\1f
+File: xemacs-faq.info, Node: Q5.1.4, Next: Q5.1.5, Prev: Q5.1.3, Up: Miscellaneous
+
+Q5.1.4: What is the performance hit of `let'?
+---------------------------------------------
+
+ In most cases, not noticeable. Besides, there's no avoiding
+`let'--you have to bind your local variables, after all. Some pose a
+question whether to nest `let's, or use one `let' per function. I
+think because of clarity and maintenance (and possible future
+implementation), `let'-s should be used (nested) in a way to provide
+the clearest code.
+
END-INFO-DIR-ENTRY
\1f
-File: xemacs-faq.info, Node: Q5.0.18, Next: Q5.0.19, Prev: Q5.0.17, Up: Miscellaneous
-
-Q5.0.18: I upgraded to XEmacs 19.14 and gnuserv stopped working.
-----------------------------------------------------------------
-
- Mark Daku <daku@nortel.ca> writes:
-
- It turns out I was using an older version of gnuserv. The
- installation didn't put the binary into the public bin directory.
- It put it in `lib/xemacs-19.14/hppa1.1-hp-hpux9.05/gnuserv'.
- Shouldn't it have been put in `bin/hppa1.1-hp-hpux9.0'?
-
-\1f
-File: xemacs-faq.info, Node: Q5.0.19, Next: Q5.0.20, Prev: Q5.0.18, Up: Miscellaneous
-
-Q5.0.19: Is there something better than LaTeX mode?
----------------------------------------------------
-
- David Kastrup <dak@fsnif.neuroinformatik.ruhr-uni-bochum.de> writes:
-
- The standard TeX modes leave much to be desired, and are somewhat
- leniently maintained. Serious TeX users use AUC TeX (*note
- Q4.7.1::).
-
-\1f
-File: xemacs-faq.info, Node: Q5.0.20, Next: Q5.1.1, Prev: Q5.0.19, Up: Miscellaneous
-
-Q5.0.20: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient?
----------------------------------------------------------------------------------------------------------
-
- Jan Vroonhof <vroonhof@math.ethz.ch> writes:
- Here is one of the solutions, we have this in a script called
- `etc/editclient.sh'.
- #!/bin/sh
- if gnuclient -batch -eval t >/dev/null 2>&1
- then
- exec gnuclient ${1+"$@"}
- else
- xemacs -unmapped -f gnuserv-start &
- until gnuclient -batch -eval t >/dev/null 2>&1
- do
- sleep 1
- done
- exec gnuclient ${1+"$@"}
- fi
-
- Note that there is a known problem when running XEmacs and
- 'gnuclient -nw' on the same TTY.
-
-\1f
-File: xemacs-faq.info, Node: Q5.1.1, Next: Q5.1.2, Prev: Q5.0.20, Up: Miscellaneous
-
-5.1: Emacs Lisp Programming Techniques
-======================================
-
-Q5.1.1: What is the difference in key sequences between XEmacs and GNU Emacs?
------------------------------------------------------------------------------
-
- Erik Naggum <clerik@naggum.no> writes;
-
- Emacs has a legacy of keyboards that produced characters with
- modifier bits, and therefore map a variety of input systems into
- this scheme even today. XEmacs is instead optimized for X events.
- This causes an incompatibility in the way key sequences are
- specified, but both Emacs and XEmacs will accept a key sequence as
- a vector of lists of modifiers that ends with a key, e.g., to bind
- `M-C-a', you would say `[(meta control a)]' in both Emacsen.
- XEmacs has an abbreviated form for a single key, just (meta
- control a). Emacs has an abbreviated form for the Control and the
- Meta modifiers to string-characters (the ASCII characters), as in
- `\M-\C-a'. XEmacs users need to be aware that the abbreviated
- form works only for one-character key sequences, while Emacs users
- need to be aware that the string-character is rather limited.
- Specifically, the string-character can accommodate only 256
- different values, 128 of which have the Meta modifier and 128 of
- which have not. In each of these blocks, only 32 characters have
- the Control modifier. Whereas `[(meta control A)]' differs from
- `[(meta control a)]' because the case differs, `\M-\C-a' and
- `\M-\C-A' do not. Programmers are advised to use the full common
- form, both because it is more readable and less error-prone, and
- because it is supported by both Emacsen.
-
- Another (even safer) way to be sure of the key-sequences is to use
-the `read-kbd-macro' function, which takes a string like `C-c <up>',
-and converts it to the internal key representation of the Emacs you
-use. The function is available both on XEmacs and GNU Emacs.
-
-\1f
-File: xemacs-faq.info, Node: Q5.1.2, Next: Q5.1.3, Prev: Q5.1.1, Up: Miscellaneous
-
-Q5.1.2: Can I generate "fake" keyboard events?
-----------------------------------------------
-
- I wonder if there is an interactive function that can generate
-"fake" keyboard events. This way, I could simply map them inside
-XEmacs.
-
- This seems to work:
-
- (defun cg--generate-char-event (ch)
- "Generate an event, as if ch has been typed"
- (dispatch-event (character-to-event ch)))
-
- ;; Backspace and Delete stuff
- (global-set-key [backspace]
- (lambda () (interactive) (cg--generate-char-event 127)))
- (global-set-key [unknown_keysym_0x4]
- (lambda () (interactive) (cg--generate-char-event 4)))
-
-\1f
-File: xemacs-faq.info, Node: Q5.1.3, Next: Q5.1.4, Prev: Q5.1.2, Up: Miscellaneous
-
-Q5.1.3: Could you explain `read-kbd-macro' in more detail?
-----------------------------------------------------------
-
- The `read-kbd-macro' function returns the internal Emacs
-representation of a human-readable string (which is its argument).
-Thus:
-
- (read-kbd-macro "C-c C-a")
- => [(control ?c) (control ?a)]
-
- (read-kbd-macro "C-c C-. <up>")
- => [(control ?c) (control ?.) up]
-
- In GNU Emacs the same forms will be evaluated to what GNU Emacs
-understands internally--the sequences `"\C-x\C-c"' and `[3 67108910
-up]', respectively.
-
- The exact "human-readable" syntax is defined in the docstring of
-`edmacro-mode'. I'll repeat it here, for completeness.
-
- Format of keyboard macros during editing:
-
- Text is divided into "words" separated by whitespace. Except for
- the words described below, the characters of each word go directly
- as characters of the macro. The whitespace that separates words is
- ignored. Whitespace in the macro must be written explicitly, as in
- `foo <SPC> bar <RET>'.
-
- * The special words `RET', `SPC', `TAB', `DEL', `LFD', `ESC',
- and `NUL' represent special control characters. The words
- must be written in uppercase.
-
- * A word in angle brackets, e.g., `<return>', `<down>', or
- `<f1>', represents a function key. (Note that in the standard
- configuration, the function key `<return>' and the control key
- <RET> are synonymous.) You can use angle brackets on the
- words <RET>, <SPC>, etc., but they are not required there.
-
- * Keys can be written by their ASCII code, using a backslash
- followed by up to six octal digits. This is the only way to
- represent keys with codes above \377.
-
- * One or more prefixes `M-' (meta), `C-' (control), `S-'
- (shift), `A-' (alt), `H-' (hyper), and `s-' (super) may
- precede a character or key notation. For function keys, the
- prefixes may go inside or outside of the brackets: `C-<down>'
- == `<C-down>'. The prefixes may be written in any order:
- `M-C-x' == `C-M-x'.
-
- Prefixes are not allowed on multi-key words, e.g., `C-abc',
- except that the Meta prefix is allowed on a sequence of
- digits and optional minus sign: `M--123' == `M-- M-1 M-2 M-3'.
-
- * The `^' notation for control characters also works: `^M' ==
- `C-m'.
-
- * Double angle brackets enclose command names: `<<next-line>>'
- is shorthand for `M-x next-line <RET>'.
-
- * Finally, `REM' or `;;' causes the rest of the line to be
- ignored as a comment.
-
- Any word may be prefixed by a multiplier in the form of a decimal
- number and `*': `3*<right>' == `<right> <right> <right>', and
- `10*foo' == `foofoofoofoofoofoofoofoofoofoo'.
-
- Multiple text keys can normally be strung together to form a word,
- but you may need to add whitespace if the word would look like one
- of the above notations: `; ; ;' is a keyboard macro with three
- semicolons, but `;;;' is a comment. Likewise, `\ 1 2 3' is four
- keys but `\123' is a single key written in octal, and `< right >'
- is seven keys but `<right>' is a single function key. When in
- doubt, use whitespace.
-
-\1f
-File: xemacs-faq.info, Node: Q5.1.4, Next: Q5.1.5, Prev: Q5.1.3, Up: Miscellaneous
-
-Q5.1.4: What is the performance hit of `let'?
----------------------------------------------
-
- In most cases, not noticeable. Besides, there's no avoiding
-`let'--you have to bind your local variables, after all. Some pose a
-question whether to nest `let's, or use one `let' per function. I
-think because of clarity and maintenance (and possible future
-implementation), `let'-s should be used (nested) in a way to provide
-the clearest code.
-
-\1f
File: xemacs-faq.info, Node: Q5.1.5, Next: Q5.1.6, Prev: Q5.1.4, Up: Miscellaneous
Q5.1.5: What is the recommended use of `setq'?
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Outline Motion, Next: Outline Visibility, Prev: Outline Format, Up: Outline Mode
+
+Outline Motion Commands
+.......................
+
+ Some special commands in Outline mode move backward and forward to
+heading lines.
+
+`C-c C-n'
+ Move point to the next visible heading line
+ (`outline-next-visible-heading').
+
+`C-c C-p'
+ Move point to the previous visible heading line
+ (`outline-previous-visible-heading').
+
+`C-c C-f'
+ Move point to the next visible heading line at the same level as
+ the one point is on (`outline-forward-same-level').
+
+`C-c C-b'
+ Move point to the previous visible heading line at the same level
+ (`outline-backward-same-level').
+
+`C-c C-u'
+ Move point up to a lower-level (more inclusive) visible heading
+ line (`outline-up-heading').
+
+ `C-c C-n' (`next-visible-heading') moves down to the next heading
+line. `C-c C-p' (`previous-visible-heading') moves similarly backward.
+Both accept numeric arguments as repeat counts. The names emphasize
+that invisible headings are skipped, but this is not really a special
+feature. All editing commands that look for lines ignore the invisible
+lines automatically.
+
+ More advanced motion commands understand the levels of headings.
+The commands `C-c C-f' (`outline-forward-same-level') and `C-c C-b'
+(`outline-backward-same-level') move from one heading line to another
+visible heading at the same depth in the outline. `C-c C-u'
+(`outline-up-heading') moves backward to another heading that is less
+deeply nested.
+
+\1f
+File: xemacs.info, Node: Outline Visibility, Prev: Outline Motion, Up: Outline Mode
+
+Outline Visibility Commands
+...........................
+
+ The other special commands of outline mode are used to make lines
+visible or invisible. Their names all start with `hide' or `show'.
+Most of them exist as pairs of opposites. They are not undoable;
+instead, you can undo right past them. Making lines visible or
+invisible is simply not recorded by the undo mechanism.
+
+`M-x hide-body'
+ Make all body lines in the buffer invisible.
+
+`M-x show-all'
+ Make all lines in the buffer visible.
+
+`C-c C-d'
+ Make everything under this heading invisible, not including this
+ heading itself (`hide-subtree').
+
+`C-c C-s'
+ Make everything under this heading visible, including body,
+ subheadings, and their bodies (`show-subtree').
+
+`M-x hide-leaves'
+ Make the body of this heading line, and of all its subheadings,
+ invisible.
+
+`M-x show-branches'
+ Make all subheadings of this heading line, at all levels, visible.
+
+`C-c C-i'
+ Make immediate subheadings (one level down) of this heading line
+ visible (`show-children').
+
+`M-x hide-entry'
+ Make this heading line's body invisible.
+
+`M-x show-entry'
+ Make this heading line's body visible.
+
+ Two commands that are exact opposites are `M-x hide-entry' and `M-x
+show-entry'. They are used with point on a heading line, and apply
+only to the body lines of that heading. The subtopics and their bodies
+are not affected.
+
+ Two more powerful opposites are `C-c C-h' (`hide-subtree') and `C-c
+C-s' (`show-subtree'). Both should be used when point is on a heading
+line, and both apply to all the lines of that heading's "subtree": its
+body, all its subheadings, both direct and indirect, and all of their
+bodies. In other words, the subtree contains everything following this
+heading line, up to and not including the next heading of the same or
+higher rank.
+
+ Intermediate between a visible subtree and an invisible one is having
+all the subheadings visible but none of the body. There are two
+commands for doing this, one that hides the bodies and one that makes
+the subheadings visible. They are `M-x hide-leaves' and `M-x
+show-branches'.
+
+ A little weaker than `show-branches' is `C-c C-i' (`show-children').
+It makes just the direct subheadings visible--those one level down.
+Deeper subheadings remain invisible.
+
+ Two commands have a blanket effect on the whole file. `M-x
+hide-body' makes all body lines invisible, so that you see just the
+outline structure. `M-x show-all' makes all lines visible. You can
+think of these commands as a pair of opposites even though `M-x
+show-all' applies to more than just body lines.
+
+ You can turn off the use of ellipses at the ends of visible lines by
+setting `selective-display-ellipses' to `nil'. The result is no
+visible indication of the presence of invisible lines.
+
+\1f
+File: xemacs.info, Node: Words, Next: Sentences, Prev: Text Mode, Up: Text
+
+Words
+=====
+
+ Emacs has commands for moving over or operating on words. By
+convention, the keys for them are all `Meta-' characters.
+
+`M-f'
+ Move forward over a word (`forward-word').
+
+`M-b'
+ Move backward over a word (`backward-word').
+
+`M-d'
+ Kill up to the end of a word (`kill-word').
+
+`M-<DEL>'
+ Kill back to the beginning of a word (`backward-kill-word').
+
+`M-@'
+ Mark the end of the next word (`mark-word').
+
+`M-t'
+ Transpose two words; drag a word forward or backward across other
+ words (`transpose-words').
+
+ Notice how these keys form a series that parallels the
+character-based `C-f', `C-b', `C-d', `C-t' and <DEL>. `M-@' is related
+to `C-@', which is an alias for `C-<SPC>'.
+
+ The commands `Meta-f' (`forward-word') and `Meta-b'
+(`backward-word') move forward and backward over words. They are
+analogous to `Control-f' and `Control-b', which move over single
+characters. Like their `Control-' analogues, `Meta-f' and `Meta-b'
+move several words if given an argument. `Meta-f' with a negative
+argument moves backward, and `Meta-b' with a negative argument moves
+forward. Forward motion stops after the last letter of the word, while
+backward motion stops before the first letter.
+
+ `Meta-d' (`kill-word') kills the word after point. To be precise,
+it kills everything from point to the place `Meta-f' would move to.
+Thus, if point is in the middle of a word, `Meta-d' kills just the part
+after point. If some punctuation comes between point and the next
+word, it is killed along with the word. (To kill only the next word
+but not the punctuation before it, simply type `Meta-f' to get to the
+end and kill the word backwards with `Meta-<DEL>'.) `Meta-d' takes
+arguments just like `Meta-f'.
+
+ `Meta-<DEL>' (`backward-kill-word') kills the word before point. It
+kills everything from point back to where `Meta-b' would move to. If
+point is after the space in `FOO, BAR', then `FOO, ' is killed. To
+kill just `FOO', type `Meta-b Meta-d' instead of `Meta-<DEL>'.
+
+ `Meta-t' (`transpose-words') exchanges the word before or containing
+point with the following word. The delimiter characters between the
+words do not move. For example, transposing `FOO, BAR' results in
+`BAR, FOO' rather than `BAR FOO,'. *Note Transpose::, for more on
+transposition and on arguments to transposition commands.
+
+ To operate on the next N words with an operation which applies
+between point and mark, you can either set the mark at point and then
+move over the words, or you can use the command `Meta-@' (`mark-word')
+which does not move point but sets the mark where `Meta-f' would move
+to. It can be given arguments just like `Meta-f'.
+
+ The word commands' understanding of syntax is completely controlled
+by the syntax table. For example, any character can be declared to be
+a word delimiter. *Note Syntax::.
+
+\1f
+File: xemacs.info, Node: Sentences, Next: Paragraphs, Prev: Words, Up: Text
+
+Sentences
+=========
+
+ The Emacs commands for manipulating sentences and paragraphs are
+mostly on `Meta-' keys, and therefore are like the word-handling
+commands.
+
+`M-a'
+ Move back to the beginning of the sentence (`backward-sentence').
+
+`M-e'
+ Move forward to the end of the sentence (`forward-sentence').
+
+`M-k'
+ Kill forward to the end of the sentence (`kill-sentence').
+
+`C-x <DEL>'
+ Kill back to the beginning of the sentence
+ (`backward-kill-sentence').
+
+ The commands `Meta-a' and `Meta-e' (`backward-sentence' and
+`forward-sentence') move to the beginning and end of the current
+sentence, respectively. They resemble `Control-a' and `Control-e',
+which move to the beginning and end of a line. Unlike their
+counterparts, `Meta-a' and `Meta-e' move over successive sentences if
+repeated or given numeric arguments. Emacs assumes the typist's
+convention is followed, and thus considers a sentence to end wherever
+there is a `.', `?', or `!' followed by the end of a line or two
+spaces, with any number of `)', `]', `'', or `"' characters allowed in
+between. A sentence also begins or ends wherever a paragraph begins or
+ends.
+
+ Neither `M-a' nor `M-e' moves past the newline or spaces beyond the
+sentence edge at which it is stopping.
+
+ `M-a' and `M-e' have a corresponding kill command, just like `C-a'
+and `C-e' have `C-k'. The command is `M-k' (`kill-sentence') which
+kills from point to the end of the sentence. With minus one as an
+argument it kills back to the beginning of the sentence. Larger
+arguments serve as repeat counts.
+
+ There is a special command, `C-x <DEL>' (`backward-kill-sentence'),
+for killing back to the beginning of a sentence, which is useful when
+you change your mind in the middle of composing text.
+
+ The variable `sentence-end' controls recognition of the end of a
+sentence. It is a regexp that matches the last few characters of a
+sentence, together with the whitespace following the sentence. Its
+normal value is:
+
+ "[.?!][]\"')]*\\($\\|\t\\| \\)[ \t\n]*"
+
+This example is explained in the section on regexps. *Note Regexps::.
+
+\1f
+File: xemacs.info, Node: Paragraphs, Next: Pages, Prev: Sentences, Up: Text
+
+Paragraphs
+==========
+
+ The Emacs commands for manipulating paragraphs are also `Meta-' keys.
+
+`M-['
+ Move back to previous paragraph beginning
+ (`backward-paragraph').
+
+`M-]'
+ Move forward to next paragraph end (`forward-paragraph').
+
+`M-h'
+ Put point and mark around this or next paragraph
+ (`mark-paragraph').
+
+ `Meta-[' moves to the beginning of the current or previous paragraph,
+while `Meta-]' moves to the end of the current or next paragraph.
+Blank lines and text formatter command lines separate paragraphs and are
+not part of any paragraph. An indented line starts a new paragraph.
+
+ In major modes for programs (as opposed to Text mode), paragraphs
+begin and end only at blank lines. As a result, the paragraph commands
+continue to be useful even though there are no paragraphs per se.
+
+ When there is a fill prefix, paragraphs are delimited by all lines
+which don't start with the fill prefix. *Note Filling::.
+
+ To operate on a paragraph, you can use the command `Meta-h'
+(`mark-paragraph') to set the region around it. This command puts
+point at the beginning and mark at the end of the paragraph point was
+in. If point is between paragraphs (in a run of blank lines or at a
+boundary), the paragraph following point is surrounded by point and
+mark. If there are blank lines preceding the first line of the
+paragraph, one of the blank lines is included in the region. Thus, for
+example, `M-h C-w' kills the paragraph around or after point.
+
+ The precise definition of a paragraph boundary is controlled by the
+variables `paragraph-separate' and `paragraph-start'. The value of
+`paragraph-start' is a regexp that matches any line that either starts
+or separates paragraphs. The value of `paragraph-separate' is another
+regexp that matches only lines that separate paragraphs without being
+part of any paragraph. Lines that start a new paragraph and are
+contained in it must match both regexps. For example, normally
+`paragraph-start' is `"^[ \t\n\f]"' and `paragraph-separate' is `"^[
+\t\f]*$"'.
+
+ Normally it is desirable for page boundaries to separate paragraphs.
+The default values of these variables recognize the usual separator for
+pages.
+
+\1f
File: xemacs.info, Node: Pages, Next: Filling, Prev: Paragraphs, Up: Text
Pages
produces clear and readable files. For an example, look at any of the C
source files of XEmacs.
-\1f
-File: xemacs.info, Node: Matching, Next: Comments, Prev: Grinding, Up: Programs
-
-Automatic Display of Matching Parentheses
-=========================================
-
- The Emacs parenthesis-matching feature shows you automatically how
-parentheses match in the text. Whenever a self-inserting character that
-is a closing delimiter is typed, the cursor moves momentarily to the
-location of the matching opening delimiter, provided that is visible on
-the screen. If it is not on the screen, some text starting with that
-opening delimiter is displayed in the echo area. Either way, you see
-the grouping you are closing off.
-
- In Lisp, automatic matching applies only to parentheses. In C, it
-also applies to braces and brackets. Emacs knows which characters to
-regard as matching delimiters based on the syntax table set by the major
-mode. *Note Syntax::.
-
- If the opening delimiter and closing delimiter are mismatched--as in
-`[x)'--the echo area displays a warning message. The correct matches
-are specified in the syntax table.
-
- Two variables control parenthesis matching displays.
-`blink-matching-paren' turns the feature on or off. The default is `t'
-(match display is on); `nil' turns it off.
-`blink-matching-paren-distance' specifies how many characters back
-Emacs searches to find a matching opening delimiter. If the match is
-not found in the specified region, scanning stops, and nothing is
-displayed. This prevents wasting lots of time scanning when there is no
-match. The default is 4000.
-
-\1f
-File: xemacs.info, Node: Comments, Next: Balanced Editing, Prev: Matching, Up: Programs
-
-Manipulating Comments
-=====================
-
- The comment commands insert, kill and align comments.
-
-`M-;'
- Insert or align comment (`indent-for-comment').
-
-`C-x ;'
- Set comment column (`set-comment-column').
-
-`C-u - C-x ;'
- Kill comment on current line (`kill-comment').
-
-`M-<LFD>'
- Like <RET> followed by inserting and aligning a comment
- (`indent-new-comment-line').
-
- The command that creates a comment is `Meta-;'
-(`indent-for-comment'). If there is no comment already on the line, a
-new comment is created and aligned at a specific column called the
-"comment column". Emacs creates the comment by inserting the string at
-the value of `comment-start'; see below. Point is left after that
-string. If the text of the line extends past the comment column,
-indentation is done to a suitable boundary (usually, at least one space
-is inserted). If the major mode has specified a string to terminate
-comments, that string is inserted after point, to keep the syntax valid.
-
- You can also use `Meta-;' to align an existing comment. If a line
-already contains the string that starts comments, `M-;' just moves
-point after it and re-indents it to the conventional place. Exception:
-comments starting in column 0 are not moved.
-
- Some major modes have special rules for indenting certain kinds of
-comments in certain contexts. For example, in Lisp code, comments which
-start with two semicolons are indented as if they were lines of code,
-instead of at the comment column. Comments which start with three
-semicolons are supposed to start at the left margin. Emacs understands
-these conventions by indenting a double-semicolon comment using <TAB>
-and by not changing the indentation of a triple-semicolon comment at
-all.
-
- ;; This function is just an example.
- ;;; Here either two or three semicolons are appropriate.
- (defun foo (x)
- ;;; And now, the first part of the function:
- ;; The following line adds one.
- (1+ x)) ; This line adds one.
-
- In C code, a comment preceded on its line by nothing but whitespace
-is indented like a line of code.
-
- Even when an existing comment is properly aligned, `M-;' is still
-useful for moving directly to the start of the comment.
-
- `C-u - C-x ;' (`kill-comment') kills the comment on the current
-line, if there is one. The indentation before the start of the comment
-is killed as well. If there does not appear to be a comment in the
-line, nothing happens. To reinsert the comment on another line, move
-to the end of that line, type first `C-y', and then `M-;' to realign
-the comment. Note that `C-u - C-x ;' is not a distinct key; it is `C-x
-;' (`set-comment-column') with a negative argument. That command is
-programmed to call `kill-comment' when called with a negative argument.
-However, `kill-comment' is a valid command which you could bind
-directly to a key if you wanted to.
-
-Multiple Lines of Comments
---------------------------
-
- If you are typing a comment and want to continue it on another line,
-use the command `Meta-<LFD>' (`indent-new-comment-line'), which
-terminates the comment you are typing, creates a new blank line
-afterward, and begins a new comment indented under the old one. If
-Auto Fill mode is on and you go past the fill column while typing, the
-comment is continued in just this fashion. If point is not at the end
-of the line when you type `M-<LFD>', the text on the rest of the line
-becomes part of the new comment line.
-
-Options Controlling Comments
-----------------------------
-
- The comment column is stored in the variable `comment-column'. You
-can explicitly set it to a number. Alternatively, the command `C-x ;'
-(`set-comment-column') sets the comment column to the column point is
-at. `C-u C-x ;' sets the comment column to match the last comment
-before point in the buffer, and then calls `Meta-;' to align the
-current line's comment under the previous one. Note that `C-u - C-x ;'
-runs the function `kill-comment' as described above.
-
- `comment-column' is a per-buffer variable; altering the variable
-affects only the current buffer. You can also change the default value.
-*Note Locals::. Many major modes initialize this variable for the
-current buffer.
-
- The comment commands recognize comments based on the regular
-expression that is the value of the variable `comment-start-skip'.
-This regexp should not match the null string. It may match more than
-the comment starting delimiter in the strictest sense of the word; for
-example, in C mode the value of the variable is `"/\\*+ *"', which
-matches extra stars and spaces after the `/*' itself. (Note that `\\'
-is needed in Lisp syntax to include a `\' in the string, which is needed
-to deny the first star its special meaning in regexp syntax. *Note
-Regexps::.)
-
- When a comment command makes a new comment, it inserts the value of
-`comment-start' to begin it. The value of `comment-end' is inserted
-after point and will follow the text you will insert into the comment.
-In C mode, `comment-start' has the value `"/* "' and `comment-end' has
-the value `" */"'.
-
- `comment-multi-line' controls how `M-<LFD>'
-(`indent-new-comment-line') behaves when used inside a comment. If
-`comment-multi-line' is `nil', as it normally is, then `M-<LFD>'
-terminates the comment on the starting line and starts a new comment on
-the new following line. If `comment-multi-line' is not `nil', then
-`M-<LFD>' sets up the new following line as part of the same comment
-that was found on the starting line. This is done by not inserting a
-terminator on the old line and not inserting a starter on the new line.
-In languages where multi-line comments are legal, the value you choose
-for this variable is a matter of taste.
-
- The variable `comment-indent-hook' should contain a function that is
-called to compute the indentation for a newly inserted comment or for
-aligning an existing comment. Major modes set this variable
-differently. The function is called with no arguments, but with point
-at the beginning of the comment, or at the end of a line if a new
-comment is to be inserted. The function should return the column in
-which the comment ought to start. For example, in Lisp mode, the
-indent hook function bases its decision on the number of semicolons
-that begin an existing comment and on the code in the preceding lines.
-
-\1f
-File: xemacs.info, Node: Balanced Editing, Next: Lisp Completion, Prev: Comments, Up: Programs
-
-Editing Without Unbalanced Parentheses
-======================================
-
-`M-('
- Put parentheses around next sexp(s) (`insert-parentheses').
-
-`M-)'
- Move past next close parenthesis and re-indent
- (`move-over-close-and-reindent').
-
- The commands `M-(' (`insert-parentheses') and `M-)'
-(`move-over-close-and-reindent') are designed to facilitate a style of
-editing which keeps parentheses balanced at all times. `M-(' inserts a
-pair of parentheses, either together as in `()', or, if given an
-argument, around the next several sexps, and leaves point after the open
-parenthesis. Instead of typing `( F O O )', you can type `M-( F O O',
-which has the same effect except for leaving the cursor before the
-close parenthesis. You can then type `M-)', which moves past the close
-parenthesis, deletes any indentation preceding it (in this example
-there is none), and indents with <LFD> after it.
-
-\1f
-File: xemacs.info, Node: Lisp Completion, Next: Documentation, Prev: Balanced Editing, Up: Programs
-
-Completion for Lisp Symbols
-===========================
-
- Completion usually happens in the minibuffer. An exception is
-completion for Lisp symbol names, which is available in all buffers.
-
- The command `M-<TAB>' (`lisp-complete-symbol') takes the partial
-Lisp symbol before point to be an abbreviation, and compares it against
-all non-trivial Lisp symbols currently known to Emacs. Any additional
-characters that they all have in common are inserted at point.
-Non-trivial symbols are those that have function definitions, values, or
-properties.
-
- If there is an open-parenthesis immediately before the beginning of
-the partial symbol, only symbols with function definitions are
-considered as completions.
-
- If the partial name in the buffer has more than one possible
-completion and they have no additional characters in common, a list of
-all possible completions is displayed in another window.
-
-\1f
-File: xemacs.info, Node: Documentation, Next: Change Log, Prev: Lisp Completion, Up: Programs
-
-Documentation Commands
-======================
-
- As you edit Lisp code to be run in Emacs, you can use the commands
-`C-h f' (`describe-function') and `C-h v' (`describe-variable') to
-print documentation of functions and variables you want to call. These
-commands use the minibuffer to read the name of a function or variable
-to document, and display the documentation in a window.
-
- For extra convenience, these commands provide default arguments
-based on the code in the neighborhood of point. `C-h f' sets the
-default to the function called in the innermost list containing point.
-`C-h v' uses the symbol name around or adjacent to point as its default.
-
- The `M-x manual-entry' command gives you access to documentation on
-Unix commands, system calls, and libraries. The command reads a topic
-as an argument, and displays the Unix manual page for that topic.
-`manual-entry' always searches all 8 sections of the manual and
-concatenates all the entries it finds. For example, the topic
-`termcap' finds the description of the termcap library from section 3,
-followed by the description of the termcap data base from section 5.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Matching, Next: Comments, Prev: Grinding, Up: Programs
+
+Automatic Display of Matching Parentheses
+=========================================
+
+ The Emacs parenthesis-matching feature shows you automatically how
+parentheses match in the text. Whenever a self-inserting character that
+is a closing delimiter is typed, the cursor moves momentarily to the
+location of the matching opening delimiter, provided that is visible on
+the screen. If it is not on the screen, some text starting with that
+opening delimiter is displayed in the echo area. Either way, you see
+the grouping you are closing off.
+
+ In Lisp, automatic matching applies only to parentheses. In C, it
+also applies to braces and brackets. Emacs knows which characters to
+regard as matching delimiters based on the syntax table set by the major
+mode. *Note Syntax::.
+
+ If the opening delimiter and closing delimiter are mismatched--as in
+`[x)'--the echo area displays a warning message. The correct matches
+are specified in the syntax table.
+
+ Two variables control parenthesis matching displays.
+`blink-matching-paren' turns the feature on or off. The default is `t'
+(match display is on); `nil' turns it off.
+`blink-matching-paren-distance' specifies how many characters back
+Emacs searches to find a matching opening delimiter. If the match is
+not found in the specified region, scanning stops, and nothing is
+displayed. This prevents wasting lots of time scanning when there is no
+match. The default is 4000.
+
+\1f
+File: xemacs.info, Node: Comments, Next: Balanced Editing, Prev: Matching, Up: Programs
+
+Manipulating Comments
+=====================
+
+ The comment commands insert, kill and align comments.
+
+`M-;'
+ Insert or align comment (`indent-for-comment').
+
+`C-x ;'
+ Set comment column (`set-comment-column').
+
+`C-u - C-x ;'
+ Kill comment on current line (`kill-comment').
+
+`M-<LFD>'
+ Like <RET> followed by inserting and aligning a comment
+ (`indent-new-comment-line').
+
+ The command that creates a comment is `Meta-;'
+(`indent-for-comment'). If there is no comment already on the line, a
+new comment is created and aligned at a specific column called the
+"comment column". Emacs creates the comment by inserting the string at
+the value of `comment-start'; see below. Point is left after that
+string. If the text of the line extends past the comment column,
+indentation is done to a suitable boundary (usually, at least one space
+is inserted). If the major mode has specified a string to terminate
+comments, that string is inserted after point, to keep the syntax valid.
+
+ You can also use `Meta-;' to align an existing comment. If a line
+already contains the string that starts comments, `M-;' just moves
+point after it and re-indents it to the conventional place. Exception:
+comments starting in column 0 are not moved.
+
+ Some major modes have special rules for indenting certain kinds of
+comments in certain contexts. For example, in Lisp code, comments which
+start with two semicolons are indented as if they were lines of code,
+instead of at the comment column. Comments which start with three
+semicolons are supposed to start at the left margin. Emacs understands
+these conventions by indenting a double-semicolon comment using <TAB>
+and by not changing the indentation of a triple-semicolon comment at
+all.
+
+ ;; This function is just an example.
+ ;;; Here either two or three semicolons are appropriate.
+ (defun foo (x)
+ ;;; And now, the first part of the function:
+ ;; The following line adds one.
+ (1+ x)) ; This line adds one.
+
+ In C code, a comment preceded on its line by nothing but whitespace
+is indented like a line of code.
+
+ Even when an existing comment is properly aligned, `M-;' is still
+useful for moving directly to the start of the comment.
+
+ `C-u - C-x ;' (`kill-comment') kills the comment on the current
+line, if there is one. The indentation before the start of the comment
+is killed as well. If there does not appear to be a comment in the
+line, nothing happens. To reinsert the comment on another line, move
+to the end of that line, type first `C-y', and then `M-;' to realign
+the comment. Note that `C-u - C-x ;' is not a distinct key; it is `C-x
+;' (`set-comment-column') with a negative argument. That command is
+programmed to call `kill-comment' when called with a negative argument.
+However, `kill-comment' is a valid command which you could bind
+directly to a key if you wanted to.
+
+Multiple Lines of Comments
+--------------------------
+
+ If you are typing a comment and want to continue it on another line,
+use the command `Meta-<LFD>' (`indent-new-comment-line'), which
+terminates the comment you are typing, creates a new blank line
+afterward, and begins a new comment indented under the old one. If
+Auto Fill mode is on and you go past the fill column while typing, the
+comment is continued in just this fashion. If point is not at the end
+of the line when you type `M-<LFD>', the text on the rest of the line
+becomes part of the new comment line.
+
+Options Controlling Comments
+----------------------------
+
+ The comment column is stored in the variable `comment-column'. You
+can explicitly set it to a number. Alternatively, the command `C-x ;'
+(`set-comment-column') sets the comment column to the column point is
+at. `C-u C-x ;' sets the comment column to match the last comment
+before point in the buffer, and then calls `Meta-;' to align the
+current line's comment under the previous one. Note that `C-u - C-x ;'
+runs the function `kill-comment' as described above.
+
+ `comment-column' is a per-buffer variable; altering the variable
+affects only the current buffer. You can also change the default value.
+*Note Locals::. Many major modes initialize this variable for the
+current buffer.
+
+ The comment commands recognize comments based on the regular
+expression that is the value of the variable `comment-start-skip'.
+This regexp should not match the null string. It may match more than
+the comment starting delimiter in the strictest sense of the word; for
+example, in C mode the value of the variable is `"/\\*+ *"', which
+matches extra stars and spaces after the `/*' itself. (Note that `\\'
+is needed in Lisp syntax to include a `\' in the string, which is needed
+to deny the first star its special meaning in regexp syntax. *Note
+Regexps::.)
+
+ When a comment command makes a new comment, it inserts the value of
+`comment-start' to begin it. The value of `comment-end' is inserted
+after point and will follow the text you will insert into the comment.
+In C mode, `comment-start' has the value `"/* "' and `comment-end' has
+the value `" */"'.
+
+ `comment-multi-line' controls how `M-<LFD>'
+(`indent-new-comment-line') behaves when used inside a comment. If
+`comment-multi-line' is `nil', as it normally is, then `M-<LFD>'
+terminates the comment on the starting line and starts a new comment on
+the new following line. If `comment-multi-line' is not `nil', then
+`M-<LFD>' sets up the new following line as part of the same comment
+that was found on the starting line. This is done by not inserting a
+terminator on the old line and not inserting a starter on the new line.
+In languages where multi-line comments are legal, the value you choose
+for this variable is a matter of taste.
+
+ The variable `comment-indent-hook' should contain a function that is
+called to compute the indentation for a newly inserted comment or for
+aligning an existing comment. Major modes set this variable
+differently. The function is called with no arguments, but with point
+at the beginning of the comment, or at the end of a line if a new
+comment is to be inserted. The function should return the column in
+which the comment ought to start. For example, in Lisp mode, the
+indent hook function bases its decision on the number of semicolons
+that begin an existing comment and on the code in the preceding lines.
+
+\1f
+File: xemacs.info, Node: Balanced Editing, Next: Lisp Completion, Prev: Comments, Up: Programs
+
+Editing Without Unbalanced Parentheses
+======================================
+
+`M-('
+ Put parentheses around next sexp(s) (`insert-parentheses').
+
+`M-)'
+ Move past next close parenthesis and re-indent
+ (`move-over-close-and-reindent').
+
+ The commands `M-(' (`insert-parentheses') and `M-)'
+(`move-over-close-and-reindent') are designed to facilitate a style of
+editing which keeps parentheses balanced at all times. `M-(' inserts a
+pair of parentheses, either together as in `()', or, if given an
+argument, around the next several sexps, and leaves point after the open
+parenthesis. Instead of typing `( F O O )', you can type `M-( F O O',
+which has the same effect except for leaving the cursor before the
+close parenthesis. You can then type `M-)', which moves past the close
+parenthesis, deletes any indentation preceding it (in this example
+there is none), and indents with <LFD> after it.
+
+\1f
+File: xemacs.info, Node: Lisp Completion, Next: Documentation, Prev: Balanced Editing, Up: Programs
+
+Completion for Lisp Symbols
+===========================
+
+ Completion usually happens in the minibuffer. An exception is
+completion for Lisp symbol names, which is available in all buffers.
+
+ The command `M-<TAB>' (`lisp-complete-symbol') takes the partial
+Lisp symbol before point to be an abbreviation, and compares it against
+all non-trivial Lisp symbols currently known to Emacs. Any additional
+characters that they all have in common are inserted at point.
+Non-trivial symbols are those that have function definitions, values, or
+properties.
+
+ If there is an open-parenthesis immediately before the beginning of
+the partial symbol, only symbols with function definitions are
+considered as completions.
+
+ If the partial name in the buffer has more than one possible
+completion and they have no additional characters in common, a list of
+all possible completions is displayed in another window.
+
+\1f
+File: xemacs.info, Node: Documentation, Next: Change Log, Prev: Lisp Completion, Up: Programs
+
+Documentation Commands
+======================
+
+ As you edit Lisp code to be run in Emacs, you can use the commands
+`C-h f' (`describe-function') and `C-h v' (`describe-variable') to
+print documentation of functions and variables you want to call. These
+commands use the minibuffer to read the name of a function or variable
+to document, and display the documentation in a window.
+
+ For extra convenience, these commands provide default arguments
+based on the code in the neighborhood of point. `C-h f' sets the
+default to the function called in the innermost list containing point.
+`C-h v' uses the symbol name around or adjacent to point as its default.
+
+ The `M-x manual-entry' command gives you access to documentation on
+Unix commands, system calls, and libraries. The command reads a topic
+as an argument, and displays the Unix manual page for that topic.
+`manual-entry' always searches all 8 sections of the manual and
+concatenates all the entries it finds. For example, the topic
+`termcap' finds the description of the termcap library from section 3,
+followed by the description of the termcap data base from section 5.
+
+\1f
File: xemacs.info, Node: Change Log, Next: Tags, Prev: Documentation, Up: Programs
Change Logs
never conflict because in Lisp and in Emacs it is always clear from the
context which one is referred to.
-\1f
-File: xemacs.info, Node: Fortran Columns, Next: Fortran Abbrev, Prev: Fortran Comments, Up: Fortran
-
-Columns
--------
-
-`C-c C-r'
- Displays a "column ruler" momentarily above the current line
- (`fortran-column-ruler').
-
-`C-c C-w'
- Splits the current window horizontally so that it is 72 columns
- wide. This may help you avoid going over that limit
- (`fortran-window-create').
-
- The command `C-c C-r' (`fortran-column-ruler') shows a column ruler
-above the current line. The comment ruler consists of two lines of
-text that show you the locations of columns with special significance
-in Fortran programs. Square brackets show the limits of the columns for
-line numbers, and curly brackets show the limits of the columns for the
-statement body. Column numbers appear above them.
-
- Note that the column numbers count from zero, as always in XEmacs.
-As a result, the numbers may not be those you are familiar with; but the
-actual positions in the line are standard Fortran.
-
- The text used to display the column ruler is the value of the
-variable `fortran-comment-ruler'. By changing this variable, you can
-change the display.
-
- For even more help, use `C-c C-w' (`fortran-window-create'), a
-command which splits the current window horizontally, resulting in a
-window 72 columns wide. When you edit in this window, you can
-immediately see when a line gets too wide to be correct Fortran.
-
-\1f
-File: xemacs.info, Node: Fortran Abbrev, Prev: Fortran Columns, Up: Fortran
-
-Fortran Keyword Abbrevs
------------------------
-
- Fortran mode provides many built-in abbrevs for common keywords and
-declarations. These are the same sort of abbrevs that you can define
-yourself. To use them, you must turn on Abbrev mode. *note Abbrevs::.
-
- The built-in abbrevs are unusual in one way: they all start with a
-semicolon. You cannot normally use semicolon in an abbrev, but Fortran
-mode makes this possible by changing the syntax of semicolon to "word
-constituent".
-
- For example, one built-in Fortran abbrev is `;c' for `continue'. If
-you insert `;c' and then insert a punctuation character such as a space
-or a newline, the `;c' changes automatically to `continue', provided
-Abbrev mode is enabled.
-
- Type `;?' or `;C-h' to display a list of all built-in Fortran
-abbrevs and what they stand for.
-
-\1f
-File: xemacs.info, Node: Asm Mode, Prev: Fortran, Up: Programs
-
-Asm Mode
-========
-
- Asm mode is a major mode for editing files of assembler code. It
-defines these commands:
-
-`<TAB>'
- `tab-to-tab-stop'.
-
-`<LFD>'
- Insert a newline and then indent using `tab-to-tab-stop'.
-
-`:'
- Insert a colon and then remove the indentation from before the
- label preceding colon. Then do `tab-to-tab-stop'.
-
-`;'
- Insert or align a comment.
-
- The variable `asm-comment-char' specifies which character starts
-comments in assembler syntax.
-
-\1f
-File: xemacs.info, Node: Running, Next: Packages, Prev: Programs, Up: Top
-
-Compiling and Testing Programs
-******************************
-
- The previous chapter discusses the Emacs commands that are useful for
-making changes in programs. This chapter deals with commands that
-assist in the larger process of developing and maintaining programs.
-
-* Menu:
-
-* Compilation:: Compiling programs in languages other than Lisp
- (C, Pascal, etc.)
-* Modes: Lisp Modes. Various modes for editing Lisp programs, with
- different facilities for running the Lisp programs.
-* Libraries: Lisp Libraries. Creating Lisp programs to run in Emacs.
-* Eval: Lisp Eval. Executing a single Lisp expression in Emacs.
-* Debug: Lisp Debug. Debugging Lisp programs running in Emacs.
-* Interaction: Lisp Interaction. Executing Lisp in an Emacs buffer.
-* External Lisp:: Communicating through Emacs with a separate Lisp.
-
-\1f
-File: xemacs.info, Node: Compilation, Next: Lisp Modes, Prev: Running, Up: Running
-
-Running "make", or Compilers Generally
-======================================
-
- Emacs can run compilers for non-interactive languages like C and
-Fortran as inferior processes, feeding the error log into an Emacs
-buffer. It can also parse the error messages and visit the files in
-which errors are found, moving point to the line where the error
-occurred.
-
-`M-x compile'
- Run a compiler asynchronously under Emacs, with error messages to
- `*compilation*' buffer.
-
-`M-x grep'
- Run `grep' asynchronously under Emacs, with matching lines listed
- in the buffer named `*compilation*'.
-
-`M-x kill-compilation'
- Kill the process made by the `M-x compile' command.
-
-`M-x kill-grep'
- Kill the running compilation or `grep' subprocess.
-
-`C-x `'
- Visit the next compiler error message or `grep' match.
-
- To run `make' or another compiler, type `M-x compile'. This command
-reads a shell command line using the minibuffer, then executes the
-specified command line in an inferior shell with output going to the
-buffer named `*compilation*'. By default, the current buffer's default
-directory is used as the working directory for the execution of the
-command; therefore, the makefile comes from this directory.
-
- When the shell command line is read, the minibuffer appears
-containing a default command line (the command you used the last time
-you typed `M-x compile'). If you type just <RET>, the same command
-line is used again. The first `M-x compile' provides `make -k' as the
-default. The default is taken from the variable `compile-command'; if
-the appropriate compilation command for a file is something other than
-`make -k', it can be useful to have the file specify a local value for
-`compile-command' (*note File Variables::).
-
- When you start a compilation, the buffer `*compilation*' is
-displayed in another window but not selected. Its mode line displays
-the word `run' or `exit' in the parentheses to tell you whether
-compilation is finished. You do not have to keep this buffer visible;
-compilation continues in any case.
-
- To kill the compilation process, type `M-x-kill-compilation'. The
-mode line of the `*compilation*' buffer changes to say `signal' instead
-of `run'. Starting a new compilation also kills any running
-compilation, as only one can occur at any time. Starting a new
-compilation prompts for confirmation before actually killing a
-compilation that is running.
-
- To parse the compiler error messages, type `C-x `' (`next-error').
-The character following `C-x' is the grave accent, not the single
-quote. The command displays the buffer `*compilation*' in one window
-and the buffer in which the next error occurred in another window.
-Point in that buffer is moved to the line where the error was found.
-The corresponding error message is scrolled to the top of the window in
-which `*compilation*' is displayed.
-
- The first time you use `C-x `' after the start of a compilation, it
-parses all the error messages, visits all the files that have error
-messages, and creates markers pointing at the lines the error messages
-refer to. It then moves to the first error message location.
-Subsequent uses of `C-x `' advance down the data set up by the first
-use. When the preparsed error messages are exhausted, the next `C-x `'
-checks for any more error messages that have come in; this is useful if
-you start editing compiler errors while compilation is still going on.
-If no additional error messages have come in, `C-x `' reports an error.
-
- `C-u C-x `' discards the preparsed error message data and parses the
-`*compilation*' buffer again, then displays the first error. This way,
-you can process the same set of errors again.
-
- Instead of running a compiler, you can run `grep' and see the lines
-on which matches were found. To do this, type `M-x grep' with an
-argument line that contains the same arguments you would give to
-`grep': a `grep'-style regexp (usually in single quotes to quote the
-shell's special characters) followed by filenames, which may use
-wildcard characters. The output from `grep' goes in the
-`*compilation*' buffer. You can use `C-x `' to find the lines that
-match as if they were compilation errors.
-
- Note: a shell is used to run the compile command, but the shell is
-not run in interactive mode. In particular, this means that the shell
-starts up with no prompt. If you find your usual shell prompt making an
-unsightly appearance in the `*compilation*' buffer, it means you have
-made a mistake in your shell's initialization file (`.cshrc' or `.shrc'
-or ...) by setting the prompt unconditionally. The shell
-initialization file should set the prompt only if there already is a
-prompt. Here's how to do it in `csh':
-
- if ($?prompt) set prompt = ...
-
-\1f
-File: xemacs.info, Node: Lisp Modes, Next: Lisp Libraries, Prev: Compilation, Up: Running
-
-Major Modes for Lisp
-====================
-
- Emacs has four different major modes for Lisp. They are the same in
-terms of editing commands, but differ in the commands for executing Lisp
-expressions.
-
-Emacs-Lisp mode
- The mode for editing source files of programs to run in Emacs Lisp.
- This mode defines `C-M-x' to evaluate the current defun. *Note
- Lisp Libraries::.
-
-Lisp Interaction mode
- The mode for an interactive session with Emacs Lisp. It defines
- <LFD> to evaluate the sexp before point and insert its value in the
- buffer. *Note Lisp Interaction::.
-
-Lisp mode
- The mode for editing source files of programs that run in other
- dialects of Lisp than Emacs Lisp. This mode defines `C-M-x' to
- send the current defun to an inferior Lisp process. *Note
- External Lisp::.
-
-Inferior Lisp mode
- The mode for an interactive session with an inferior Lisp process.
- This mode combines the special features of Lisp mode and Shell mode
- (*note Shell Mode::).
-
-Scheme mode
- Like Lisp mode but for Scheme programs.
-
-Inferior Scheme mode
- The mode for an interactive session with an inferior Scheme
- process.
-
-\1f
-File: xemacs.info, Node: Lisp Libraries, Next: Lisp Eval, Prev: Lisp Modes, Up: Running
-
-Libraries of Lisp Code for Emacs
-================================
-
- Lisp code for Emacs editing commands is stored in files whose names
-conventionally end in `.el'. This ending tells Emacs to edit them in
-Emacs-Lisp mode (*note Lisp Modes::).
-
-* Menu:
-
-* Loading:: Loading libraries of Lisp code into Emacs for use.
-* Compiling Libraries:: Compiling a library makes it load and run faster.
-* Mocklisp:: Converting Mocklisp to Lisp so XEmacs can run it.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Fortran Columns, Next: Fortran Abbrev, Prev: Fortran Comments, Up: Fortran
+
+Columns
+-------
+
+`C-c C-r'
+ Displays a "column ruler" momentarily above the current line
+ (`fortran-column-ruler').
+
+`C-c C-w'
+ Splits the current window horizontally so that it is 72 columns
+ wide. This may help you avoid going over that limit
+ (`fortran-window-create').
+
+ The command `C-c C-r' (`fortran-column-ruler') shows a column ruler
+above the current line. The comment ruler consists of two lines of
+text that show you the locations of columns with special significance
+in Fortran programs. Square brackets show the limits of the columns for
+line numbers, and curly brackets show the limits of the columns for the
+statement body. Column numbers appear above them.
+
+ Note that the column numbers count from zero, as always in XEmacs.
+As a result, the numbers may not be those you are familiar with; but the
+actual positions in the line are standard Fortran.
+
+ The text used to display the column ruler is the value of the
+variable `fortran-comment-ruler'. By changing this variable, you can
+change the display.
+
+ For even more help, use `C-c C-w' (`fortran-window-create'), a
+command which splits the current window horizontally, resulting in a
+window 72 columns wide. When you edit in this window, you can
+immediately see when a line gets too wide to be correct Fortran.
+
+\1f
+File: xemacs.info, Node: Fortran Abbrev, Prev: Fortran Columns, Up: Fortran
+
+Fortran Keyword Abbrevs
+-----------------------
+
+ Fortran mode provides many built-in abbrevs for common keywords and
+declarations. These are the same sort of abbrevs that you can define
+yourself. To use them, you must turn on Abbrev mode. *note Abbrevs::.
+
+ The built-in abbrevs are unusual in one way: they all start with a
+semicolon. You cannot normally use semicolon in an abbrev, but Fortran
+mode makes this possible by changing the syntax of semicolon to "word
+constituent".
+
+ For example, one built-in Fortran abbrev is `;c' for `continue'. If
+you insert `;c' and then insert a punctuation character such as a space
+or a newline, the `;c' changes automatically to `continue', provided
+Abbrev mode is enabled.
+
+ Type `;?' or `;C-h' to display a list of all built-in Fortran
+abbrevs and what they stand for.
+
+\1f
+File: xemacs.info, Node: Asm Mode, Prev: Fortran, Up: Programs
+
+Asm Mode
+========
+
+ Asm mode is a major mode for editing files of assembler code. It
+defines these commands:
+
+`<TAB>'
+ `tab-to-tab-stop'.
+
+`<LFD>'
+ Insert a newline and then indent using `tab-to-tab-stop'.
+
+`:'
+ Insert a colon and then remove the indentation from before the
+ label preceding colon. Then do `tab-to-tab-stop'.
+
+`;'
+ Insert or align a comment.
+
+ The variable `asm-comment-char' specifies which character starts
+comments in assembler syntax.
+
+\1f
+File: xemacs.info, Node: Running, Next: Packages, Prev: Programs, Up: Top
+
+Compiling and Testing Programs
+******************************
+
+ The previous chapter discusses the Emacs commands that are useful for
+making changes in programs. This chapter deals with commands that
+assist in the larger process of developing and maintaining programs.
+
+* Menu:
+
+* Compilation:: Compiling programs in languages other than Lisp
+ (C, Pascal, etc.)
+* Modes: Lisp Modes. Various modes for editing Lisp programs, with
+ different facilities for running the Lisp programs.
+* Libraries: Lisp Libraries. Creating Lisp programs to run in Emacs.
+* Eval: Lisp Eval. Executing a single Lisp expression in Emacs.
+* Debug: Lisp Debug. Debugging Lisp programs running in Emacs.
+* Interaction: Lisp Interaction. Executing Lisp in an Emacs buffer.
+* External Lisp:: Communicating through Emacs with a separate Lisp.
+
+\1f
+File: xemacs.info, Node: Compilation, Next: Lisp Modes, Prev: Running, Up: Running
+
+Running "make", or Compilers Generally
+======================================
+
+ Emacs can run compilers for non-interactive languages like C and
+Fortran as inferior processes, feeding the error log into an Emacs
+buffer. It can also parse the error messages and visit the files in
+which errors are found, moving point to the line where the error
+occurred.
+
+`M-x compile'
+ Run a compiler asynchronously under Emacs, with error messages to
+ `*compilation*' buffer.
+
+`M-x grep'
+ Run `grep' asynchronously under Emacs, with matching lines listed
+ in the buffer named `*compilation*'.
+
+`M-x kill-compilation'
+ Kill the process made by the `M-x compile' command.
+
+`M-x kill-grep'
+ Kill the running compilation or `grep' subprocess.
+
+`C-x `'
+ Visit the next compiler error message or `grep' match.
+
+ To run `make' or another compiler, type `M-x compile'. This command
+reads a shell command line using the minibuffer, then executes the
+specified command line in an inferior shell with output going to the
+buffer named `*compilation*'. By default, the current buffer's default
+directory is used as the working directory for the execution of the
+command; therefore, the makefile comes from this directory.
+
+ When the shell command line is read, the minibuffer appears
+containing a default command line (the command you used the last time
+you typed `M-x compile'). If you type just <RET>, the same command
+line is used again. The first `M-x compile' provides `make -k' as the
+default. The default is taken from the variable `compile-command'; if
+the appropriate compilation command for a file is something other than
+`make -k', it can be useful to have the file specify a local value for
+`compile-command' (*note File Variables::).
+
+ When you start a compilation, the buffer `*compilation*' is
+displayed in another window but not selected. Its mode line displays
+the word `run' or `exit' in the parentheses to tell you whether
+compilation is finished. You do not have to keep this buffer visible;
+compilation continues in any case.
+
+ To kill the compilation process, type `M-x-kill-compilation'. The
+mode line of the `*compilation*' buffer changes to say `signal' instead
+of `run'. Starting a new compilation also kills any running
+compilation, as only one can occur at any time. Starting a new
+compilation prompts for confirmation before actually killing a
+compilation that is running.
+
+ To parse the compiler error messages, type `C-x `' (`next-error').
+The character following `C-x' is the grave accent, not the single
+quote. The command displays the buffer `*compilation*' in one window
+and the buffer in which the next error occurred in another window.
+Point in that buffer is moved to the line where the error was found.
+The corresponding error message is scrolled to the top of the window in
+which `*compilation*' is displayed.
+
+ The first time you use `C-x `' after the start of a compilation, it
+parses all the error messages, visits all the files that have error
+messages, and creates markers pointing at the lines the error messages
+refer to. It then moves to the first error message location.
+Subsequent uses of `C-x `' advance down the data set up by the first
+use. When the preparsed error messages are exhausted, the next `C-x `'
+checks for any more error messages that have come in; this is useful if
+you start editing compiler errors while compilation is still going on.
+If no additional error messages have come in, `C-x `' reports an error.
+
+ `C-u C-x `' discards the preparsed error message data and parses the
+`*compilation*' buffer again, then displays the first error. This way,
+you can process the same set of errors again.
+
+ Instead of running a compiler, you can run `grep' and see the lines
+on which matches were found. To do this, type `M-x grep' with an
+argument line that contains the same arguments you would give to
+`grep': a `grep'-style regexp (usually in single quotes to quote the
+shell's special characters) followed by filenames, which may use
+wildcard characters. The output from `grep' goes in the
+`*compilation*' buffer. You can use `C-x `' to find the lines that
+match as if they were compilation errors.
+
+ Note: a shell is used to run the compile command, but the shell is
+not run in interactive mode. In particular, this means that the shell
+starts up with no prompt. If you find your usual shell prompt making an
+unsightly appearance in the `*compilation*' buffer, it means you have
+made a mistake in your shell's initialization file (`.cshrc' or `.shrc'
+or ...) by setting the prompt unconditionally. The shell
+initialization file should set the prompt only if there already is a
+prompt. Here's how to do it in `csh':
+
+ if ($?prompt) set prompt = ...
+
+\1f
+File: xemacs.info, Node: Lisp Modes, Next: Lisp Libraries, Prev: Compilation, Up: Running
+
+Major Modes for Lisp
+====================
+
+ Emacs has four different major modes for Lisp. They are the same in
+terms of editing commands, but differ in the commands for executing Lisp
+expressions.
+
+Emacs-Lisp mode
+ The mode for editing source files of programs to run in Emacs Lisp.
+ This mode defines `C-M-x' to evaluate the current defun. *Note
+ Lisp Libraries::.
+
+Lisp Interaction mode
+ The mode for an interactive session with Emacs Lisp. It defines
+ <LFD> to evaluate the sexp before point and insert its value in the
+ buffer. *Note Lisp Interaction::.
+
+Lisp mode
+ The mode for editing source files of programs that run in other
+ dialects of Lisp than Emacs Lisp. This mode defines `C-M-x' to
+ send the current defun to an inferior Lisp process. *Note
+ External Lisp::.
+
+Inferior Lisp mode
+ The mode for an interactive session with an inferior Lisp process.
+ This mode combines the special features of Lisp mode and Shell mode
+ (*note Shell Mode::).
+
+Scheme mode
+ Like Lisp mode but for Scheme programs.
+
+Inferior Scheme mode
+ The mode for an interactive session with an inferior Scheme
+ process.
+
+\1f
+File: xemacs.info, Node: Lisp Libraries, Next: Lisp Eval, Prev: Lisp Modes, Up: Running
+
+Libraries of Lisp Code for Emacs
+================================
+
+ Lisp code for Emacs editing commands is stored in files whose names
+conventionally end in `.el'. This ending tells Emacs to edit them in
+Emacs-Lisp mode (*note Lisp Modes::).
+
+* Menu:
+
+* Loading:: Loading libraries of Lisp code into Emacs for use.
+* Compiling Libraries:: Compiling a library makes it load and run faster.
+* Mocklisp:: Converting Mocklisp to Lisp so XEmacs can run it.
+
+\1f
File: xemacs.info, Node: Loading, Next: Compiling Libraries, Prev: Lisp Libraries, Up: Lisp Libraries
Loading Libraries
`M-x kill-all-abbrevs' removes all existing abbrev definitions.
-\1f
-File: xemacs.info, Node: Expanding Abbrevs, Next: Editing Abbrevs, Prev: Defining Abbrevs, Up: Abbrevs
-
-Controlling Abbrev Expansion
-============================
-
- An abbrev expands whenever it is in a buffer just before point and
-you type a self-inserting punctuation character (<SPC>, comma, etc.).
-Most often an abbrev is used by inserting the abbrev followed by
-punctuation.
-
- Abbrev expansion preserves case; thus, `foo' expands into `find
-outer otter', `Foo' into `Find outer otter', and `FOO' into `FIND OUTER
-OTTER' or `Find Outer Otter' according to the variable
-`abbrev-all-caps' (a non-`nil' value chooses the first of the two
-expansions).
-
- Two commands are available to control abbrev expansion:
-
-`M-''
- Separate a prefix from a following abbrev to be expanded
- (`abbrev-prefix-mark').
-
-`C-x a e'
- Expand the abbrev before point (`expand-abbrev'). This is
- effective even when Abbrev mode is not enabled.
-
-`M-x unexpand-abbrev'
- Undo last abbrev expansion.
-
-`M-x expand-region-abbrevs'
- Expand some or all abbrevs found in the region.
-
- You may wish to expand an abbrev with a prefix attached. For
-example, if `cnst' expands into `construction', you may want to use it
-to enter `reconstruction'. It does not work to type `recnst', because
-that is not necessarily a defined abbrev. Instead, you can use the
-command `M-'' (`abbrev-prefix-mark') between the prefix `re' and the
-abbrev `cnst'. First, insert `re'. Then type `M-''; this inserts a
-minus sign in the buffer to indicate that it has done its work. Then
-insert the abbrev `cnst'. The buffer now contains `re-cnst'. Now
-insert a punctuation character to expand the abbrev `cnst' into
-`construction'. The minus sign is deleted at this point by `M-''. The
-resulting text is the desired `reconstruction'.
-
- If you actually want the text of the abbrev in the buffer, rather
-than its expansion, insert the following punctuation with `C-q'. Thus,
-`foo C-q -' leaves `foo-' in the buffer.
-
- If you expand an abbrev by mistake, you can undo the expansion
-(replace the expansion by the original abbrev text) with `M-x
-unexpand-abbrev'. You can also use `C-_' (`undo') to undo the
-expansion; but that will first undo the insertion of the punctuation
-character.
-
- `M-x expand-region-abbrevs' searches through the region for defined
-abbrevs, and offers to replace each one it finds with its expansion.
-This command is useful if you have typed text using abbrevs but forgot
-to turn on Abbrev mode first. It may also be useful together with a
-special set of abbrev definitions for making several global
-replacements at once. The command is effective even if Abbrev mode is
-not enabled.
-
-\1f
-File: xemacs.info, Node: Editing Abbrevs, Next: Saving Abbrevs, Prev: Expanding Abbrevs, Up: Abbrevs
-
-Examining and Editing Abbrevs
-=============================
-
-`M-x list-abbrevs'
- Print a list of all abbrev definitions.
-
-`M-x edit-abbrevs'
- Edit a list of abbrevs; you can add, alter, or remove definitions.
-
- The output from `M-x list-abbrevs' looks like this:
-
- (lisp-mode-abbrev-table)
- "dk" 0 "define-key"
- (global-abbrev-table)
- "dfn" 0 "definition"
-
-(Some blank lines of no semantic significance, and some other abbrev
-tables, have been omitted.)
-
- A line containing a name in parentheses is the header for abbrevs in
-a particular abbrev table; `global-abbrev-table' contains all the global
-abbrevs, and the other abbrev tables that are named after major modes
-contain the mode-specific abbrevs.
-
- Within each abbrev table, each non-blank line defines one abbrev.
-The word at the beginning is the abbrev. The number that appears is
-the number of times the abbrev has been expanded. Emacs keeps track of
-this to help you see which abbrevs you actually use, in case you want
-to eliminate those that you don't use often. The string at the end of
-the line is the expansion.
-
- `M-x edit-abbrevs' allows you to add, change or kill abbrev
-definitions by editing a list of them in an Emacs buffer. The list has
-the format described above. The buffer of abbrevs is called
-`*Abbrevs*', and is in Edit-Abbrevs mode. This mode redefines the key
-`C-c C-c' to install the abbrev definitions as specified in the buffer.
-The `edit-abbrevs-redefine' command does this. Any abbrevs not
-described in the buffer are eliminated when this is done.
-
- `edit-abbrevs' is actually the same as `list-abbrevs', except that
-it selects the buffer `*Abbrevs*' whereas `list-abbrevs' merely
-displays it in another window.
-
-\1f
-File: xemacs.info, Node: Saving Abbrevs, Next: Dynamic Abbrevs, Prev: Editing Abbrevs, Up: Abbrevs
-
-Saving Abbrevs
-==============
-
- These commands allow you to keep abbrev definitions between editing
-sessions.
-
-`M-x write-abbrev-file'
- Write a file describing all defined abbrevs.
-
-`M-x read-abbrev-file'
- Read such an abbrev file and define abbrevs as specified there.
-
-`M-x quietly-read-abbrev-file'
- Similar, but do not display a message about what is going on.
-
-`M-x define-abbrevs'
- Define abbrevs from buffer.
-
-`M-x insert-abbrevs'
- Insert all abbrevs and their expansions into the buffer.
-
- Use `M-x write-abbrev-file' to save abbrev definitions for use in a
-later session. The command reads a file name using the minibuffer and
-writes a description of all current abbrev definitions into the
-specified file. The text stored in the file looks like the output of
-`M-x list-abbrevs'.
-
- `M-x read-abbrev-file' prompts for a file name using the minibuffer
-and reads the specified file, defining abbrevs according to its
-contents. `M-x quietly-read-abbrev-file' is the same but does not
-display a message in the echo area; it is actually useful primarily in
-the `.emacs' file. If you give an empty argument to either of these
-functions, the file name Emacs uses is the value of the variable
-`abbrev-file-name', which is by default `"~/.abbrev_defs"'.
-
- Emacs offers to save abbrevs automatically if you have changed any of
-them, whenever it offers to save all files (for `C-x s' or `C-x C-c').
-Set the variable `save-abbrevs' to `nil' to inhibit this feature.
-
- The commands `M-x insert-abbrevs' and `M-x define-abbrevs' are
-similar to the previous commands but work on text in an Emacs buffer.
-`M-x insert-abbrevs' inserts text into the current buffer before point,
-describing all current abbrev definitions; `M-x define-abbrevs' parses
-the entire current buffer and defines abbrevs accordingly.
-
-\1f
-File: xemacs.info, Node: Dynamic Abbrevs, Prev: Saving Abbrevs, Up: Abbrevs
-
-Dynamic Abbrev Expansion
-========================
-
- The abbrev facility described above operates automatically as you
-insert text, but all abbrevs must be defined explicitly. By contrast,
-"dynamic abbrevs" allow the meanings of abbrevs to be determined
-automatically from the contents of the buffer, but dynamic abbrev
-expansion happens only when you request it explicitly.
-
-`M-/'
- Expand the word in the buffer before point as a "dynamic abbrev",
- by searching in the buffer for words starting with that
- abbreviation (`dabbrev-expand').
-
- For example, if the buffer contains `does this follow ' and you type
-`f o M-/', the effect is to insert `follow' because that is the last
-word in the buffer that starts with `fo'. A numeric argument to `M-/'
-says to take the second, third, etc. distinct expansion found looking
-backward from point. Repeating `M-/' searches for an alternative
-expansion by looking farther back. After the entire buffer before
-point has been considered, the buffer after point is searched.
-
- Dynamic abbrev expansion is completely independent of Abbrev mode;
-the expansion of a word with `M-/' is completely independent of whether
-it has a definition as an ordinary abbrev.
-
-\1f
-File: xemacs.info, Node: Picture, Next: Sending Mail, Prev: Abbrevs, Up: Top
-
-Editing Pictures
-****************
-
- If you want to create a picture made out of text characters (for
-example, a picture of the division of a register into fields, as a
-comment in a program), use the command `edit-picture' to enter Picture
-mode.
-
- In Picture mode, editing is based on the "quarter-plane" model of
-text. In this model, the text characters lie studded on an area that
-stretches infinitely far to the right and downward. The concept of the
-end of a line does not exist in this model; the most you can say is
-where the last non-blank character on the line is found.
-
- Of course, Emacs really always considers text as a sequence of
-characters, and lines really do have ends. But in Picture mode most
-frequently-used keys are rebound to commands that simulate the
-quarter-plane model of text. They do this by inserting spaces or by
-converting tabs to spaces.
-
- Most of the basic editing commands of Emacs are redefined by Picture
-mode to do essentially the same thing but in a quarter-plane way. In
-addition, Picture mode defines various keys starting with the `C-c'
-prefix to run special picture editing commands.
-
- One of these keys, `C-c C-c', is pretty important. Often a picture
-is part of a larger file that is usually edited in some other major
-mode. `M-x edit-picture' records the name of the previous major mode.
-You can then use the `C-c C-c' command (`picture-mode-exit') to restore
-that mode. `C-c C-c' also deletes spaces from the ends of lines,
-unless you give it a numeric argument.
-
- The commands used in Picture mode all work in other modes (provided
-the `picture' library is loaded), but are only bound to keys in
-Picture mode. Note that the descriptions below talk of moving "one
-column" and so on, but all the picture mode commands handle numeric
-arguments as their normal equivalents do.
-
- Turning on Picture mode calls the value of the variable
-`picture-mode-hook' as a function, with no arguments, if that value
-exists and is non-`nil'.
-
-* Menu:
-
-* Basic Picture:: Basic concepts and simple commands of Picture Mode.
-* Insert in Picture:: Controlling direction of cursor motion
- after "self-inserting" characters.
-* Tabs in Picture:: Various features for tab stops and indentation.
-* Rectangles in Picture:: Clearing and superimposing rectangles.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Expanding Abbrevs, Next: Editing Abbrevs, Prev: Defining Abbrevs, Up: Abbrevs
+
+Controlling Abbrev Expansion
+============================
+
+ An abbrev expands whenever it is in a buffer just before point and
+you type a self-inserting punctuation character (<SPC>, comma, etc.).
+Most often an abbrev is used by inserting the abbrev followed by
+punctuation.
+
+ Abbrev expansion preserves case; thus, `foo' expands into `find
+outer otter', `Foo' into `Find outer otter', and `FOO' into `FIND OUTER
+OTTER' or `Find Outer Otter' according to the variable
+`abbrev-all-caps' (a non-`nil' value chooses the first of the two
+expansions).
+
+ Two commands are available to control abbrev expansion:
+
+`M-''
+ Separate a prefix from a following abbrev to be expanded
+ (`abbrev-prefix-mark').
+
+`C-x a e'
+ Expand the abbrev before point (`expand-abbrev'). This is
+ effective even when Abbrev mode is not enabled.
+
+`M-x unexpand-abbrev'
+ Undo last abbrev expansion.
+
+`M-x expand-region-abbrevs'
+ Expand some or all abbrevs found in the region.
+
+ You may wish to expand an abbrev with a prefix attached. For
+example, if `cnst' expands into `construction', you may want to use it
+to enter `reconstruction'. It does not work to type `recnst', because
+that is not necessarily a defined abbrev. Instead, you can use the
+command `M-'' (`abbrev-prefix-mark') between the prefix `re' and the
+abbrev `cnst'. First, insert `re'. Then type `M-''; this inserts a
+minus sign in the buffer to indicate that it has done its work. Then
+insert the abbrev `cnst'. The buffer now contains `re-cnst'. Now
+insert a punctuation character to expand the abbrev `cnst' into
+`construction'. The minus sign is deleted at this point by `M-''. The
+resulting text is the desired `reconstruction'.
+
+ If you actually want the text of the abbrev in the buffer, rather
+than its expansion, insert the following punctuation with `C-q'. Thus,
+`foo C-q -' leaves `foo-' in the buffer.
+
+ If you expand an abbrev by mistake, you can undo the expansion
+(replace the expansion by the original abbrev text) with `M-x
+unexpand-abbrev'. You can also use `C-_' (`undo') to undo the
+expansion; but that will first undo the insertion of the punctuation
+character.
+
+ `M-x expand-region-abbrevs' searches through the region for defined
+abbrevs, and offers to replace each one it finds with its expansion.
+This command is useful if you have typed text using abbrevs but forgot
+to turn on Abbrev mode first. It may also be useful together with a
+special set of abbrev definitions for making several global
+replacements at once. The command is effective even if Abbrev mode is
+not enabled.
+
+\1f
+File: xemacs.info, Node: Editing Abbrevs, Next: Saving Abbrevs, Prev: Expanding Abbrevs, Up: Abbrevs
+
+Examining and Editing Abbrevs
+=============================
+
+`M-x list-abbrevs'
+ Print a list of all abbrev definitions.
+
+`M-x edit-abbrevs'
+ Edit a list of abbrevs; you can add, alter, or remove definitions.
+
+ The output from `M-x list-abbrevs' looks like this:
+
+ (lisp-mode-abbrev-table)
+ "dk" 0 "define-key"
+ (global-abbrev-table)
+ "dfn" 0 "definition"
+
+(Some blank lines of no semantic significance, and some other abbrev
+tables, have been omitted.)
+
+ A line containing a name in parentheses is the header for abbrevs in
+a particular abbrev table; `global-abbrev-table' contains all the global
+abbrevs, and the other abbrev tables that are named after major modes
+contain the mode-specific abbrevs.
+
+ Within each abbrev table, each non-blank line defines one abbrev.
+The word at the beginning is the abbrev. The number that appears is
+the number of times the abbrev has been expanded. Emacs keeps track of
+this to help you see which abbrevs you actually use, in case you want
+to eliminate those that you don't use often. The string at the end of
+the line is the expansion.
+
+ `M-x edit-abbrevs' allows you to add, change or kill abbrev
+definitions by editing a list of them in an Emacs buffer. The list has
+the format described above. The buffer of abbrevs is called
+`*Abbrevs*', and is in Edit-Abbrevs mode. This mode redefines the key
+`C-c C-c' to install the abbrev definitions as specified in the buffer.
+The `edit-abbrevs-redefine' command does this. Any abbrevs not
+described in the buffer are eliminated when this is done.
+
+ `edit-abbrevs' is actually the same as `list-abbrevs', except that
+it selects the buffer `*Abbrevs*' whereas `list-abbrevs' merely
+displays it in another window.
+
+\1f
+File: xemacs.info, Node: Saving Abbrevs, Next: Dynamic Abbrevs, Prev: Editing Abbrevs, Up: Abbrevs
+
+Saving Abbrevs
+==============
+
+ These commands allow you to keep abbrev definitions between editing
+sessions.
+
+`M-x write-abbrev-file'
+ Write a file describing all defined abbrevs.
+
+`M-x read-abbrev-file'
+ Read such an abbrev file and define abbrevs as specified there.
+
+`M-x quietly-read-abbrev-file'
+ Similar, but do not display a message about what is going on.
+
+`M-x define-abbrevs'
+ Define abbrevs from buffer.
+
+`M-x insert-abbrevs'
+ Insert all abbrevs and their expansions into the buffer.
+
+ Use `M-x write-abbrev-file' to save abbrev definitions for use in a
+later session. The command reads a file name using the minibuffer and
+writes a description of all current abbrev definitions into the
+specified file. The text stored in the file looks like the output of
+`M-x list-abbrevs'.
+
+ `M-x read-abbrev-file' prompts for a file name using the minibuffer
+and reads the specified file, defining abbrevs according to its
+contents. `M-x quietly-read-abbrev-file' is the same but does not
+display a message in the echo area; it is actually useful primarily in
+the `.emacs' file. If you give an empty argument to either of these
+functions, the file name Emacs uses is the value of the variable
+`abbrev-file-name', which is by default `"~/.abbrev_defs"'.
+
+ Emacs offers to save abbrevs automatically if you have changed any of
+them, whenever it offers to save all files (for `C-x s' or `C-x C-c').
+Set the variable `save-abbrevs' to `nil' to inhibit this feature.
+
+ The commands `M-x insert-abbrevs' and `M-x define-abbrevs' are
+similar to the previous commands but work on text in an Emacs buffer.
+`M-x insert-abbrevs' inserts text into the current buffer before point,
+describing all current abbrev definitions; `M-x define-abbrevs' parses
+the entire current buffer and defines abbrevs accordingly.
+
+\1f
+File: xemacs.info, Node: Dynamic Abbrevs, Prev: Saving Abbrevs, Up: Abbrevs
+
+Dynamic Abbrev Expansion
+========================
+
+ The abbrev facility described above operates automatically as you
+insert text, but all abbrevs must be defined explicitly. By contrast,
+"dynamic abbrevs" allow the meanings of abbrevs to be determined
+automatically from the contents of the buffer, but dynamic abbrev
+expansion happens only when you request it explicitly.
+
+`M-/'
+ Expand the word in the buffer before point as a "dynamic abbrev",
+ by searching in the buffer for words starting with that
+ abbreviation (`dabbrev-expand').
+
+ For example, if the buffer contains `does this follow ' and you type
+`f o M-/', the effect is to insert `follow' because that is the last
+word in the buffer that starts with `fo'. A numeric argument to `M-/'
+says to take the second, third, etc. distinct expansion found looking
+backward from point. Repeating `M-/' searches for an alternative
+expansion by looking farther back. After the entire buffer before
+point has been considered, the buffer after point is searched.
+
+ Dynamic abbrev expansion is completely independent of Abbrev mode;
+the expansion of a word with `M-/' is completely independent of whether
+it has a definition as an ordinary abbrev.
+
+\1f
+File: xemacs.info, Node: Picture, Next: Sending Mail, Prev: Abbrevs, Up: Top
+
+Editing Pictures
+****************
+
+ If you want to create a picture made out of text characters (for
+example, a picture of the division of a register into fields, as a
+comment in a program), use the command `edit-picture' to enter Picture
+mode.
+
+ In Picture mode, editing is based on the "quarter-plane" model of
+text. In this model, the text characters lie studded on an area that
+stretches infinitely far to the right and downward. The concept of the
+end of a line does not exist in this model; the most you can say is
+where the last non-blank character on the line is found.
+
+ Of course, Emacs really always considers text as a sequence of
+characters, and lines really do have ends. But in Picture mode most
+frequently-used keys are rebound to commands that simulate the
+quarter-plane model of text. They do this by inserting spaces or by
+converting tabs to spaces.
+
+ Most of the basic editing commands of Emacs are redefined by Picture
+mode to do essentially the same thing but in a quarter-plane way. In
+addition, Picture mode defines various keys starting with the `C-c'
+prefix to run special picture editing commands.
+
+ One of these keys, `C-c C-c', is pretty important. Often a picture
+is part of a larger file that is usually edited in some other major
+mode. `M-x edit-picture' records the name of the previous major mode.
+You can then use the `C-c C-c' command (`picture-mode-exit') to restore
+that mode. `C-c C-c' also deletes spaces from the ends of lines,
+unless you give it a numeric argument.
+
+ The commands used in Picture mode all work in other modes (provided
+the `picture' library is loaded), but are only bound to keys in
+Picture mode. Note that the descriptions below talk of moving "one
+column" and so on, but all the picture mode commands handle numeric
+arguments as their normal equivalents do.
+
+ Turning on Picture mode calls the value of the variable
+`picture-mode-hook' as a function, with no arguments, if that value
+exists and is non-`nil'.
+
+* Menu:
+
+* Basic Picture:: Basic concepts and simple commands of Picture Mode.
+* Insert in Picture:: Controlling direction of cursor motion
+ after "self-inserting" characters.
+* Tabs in Picture:: Various features for tab stops and indentation.
+* Rectangles in Picture:: Clearing and superimposing rectangles.
+
+\1f
File: xemacs.info, Node: Basic Picture, Next: Insert in Picture, Prev: Picture, Up: Picture
Basic Editing in Picture Mode
are set up for the United States, Emacs always uses the present
definition, even though it is wrong for some prior years.
-\1f
-File: xemacs.info, Node: Sunrise/Sunset, Next: Lunar Phases, Prev: Holidays, Up: Calendar/Diary
-
-Times of Sunrise and Sunset
----------------------------
-
- Special calendar commands can tell you, to within a minute or two,
-the times of sunrise and sunset for any date.
-
-`S'
- Display times of sunrise and sunset for the selected date
- (`calendar-sunrise-sunset').
-
-`Button2 Sunrise/Sunset'
- Display times of sunrise and sunset for the date you click on.
-
-`M-x sunrise-sunset'
- Display times of sunrise and sunset for today's date.
-
-`C-u M-x sunrise-sunset'
- Display times of sunrise and sunset for a specified date.
-
- Within the calendar, to display the _local times_ of sunrise and
-sunset in the echo area, move point to the date you want, and type `S'.
-Alternatively, click `Button2' on the date, then choose
-`Sunrise/Sunset' from the menu that appears. The command `M-x
-sunrise-sunset' is available outside the calendar to display this
-information for today's date or a specified date. To specify a date
-other than today, use `C-u M-x sunrise-sunset', which prompts for the
-year, month, and day.
-
- You can display the times of sunrise and sunset for any location and
-any date with `C-u C-u M-x sunrise-sunset'. This asks you for a
-longitude, latitude, number of minutes difference from Coordinated
-Universal Time, and date, and then tells you the times of sunrise and
-sunset for that location on that date.
-
- Because the times of sunrise and sunset depend on the location on
-earth, you need to tell Emacs your latitude, longitude, and location
-name before using these commands. Here is an example of what to set:
-
- (setq calendar-latitude 40.1)
- (setq calendar-longitude -88.2)
- (setq calendar-location-name "Urbana, IL")
-
-Use one decimal place in the values of `calendar-latitude' and
-`calendar-longitude'.
-
- Your time zone also affects the local time of sunrise and sunset.
-Emacs usually gets time zone information from the operating system, but
-if these values are not what you want (or if the operating system does
-not supply them), you must set them yourself. Here is an example:
-
- (setq calendar-time-zone -360)
- (setq calendar-standard-time-zone-name "CST")
- (setq calendar-daylight-time-zone-name "CDT")
-
-The value of `calendar-time-zone' is the number of minutes difference
-between your local standard time and Coordinated Universal Time
-(Greenwich time). The values of `calendar-standard-time-zone-name' and
-`calendar-daylight-time-zone-name' are the abbreviations used in your
-time zone. Emacs displays the times of sunrise and sunset _corrected
-for daylight savings time_. *Note Daylight Savings::, for how daylight
-savings time is determined.
-
- As a user, you might find it convenient to set the calendar location
-variables for your usual physical location in your `.emacs' file. And
-when you install Emacs on a machine, you can create a `default.el' file
-which sets them properly for the typical location of most users of that
-machine. *Note Init File::.
-
-\1f
-File: xemacs.info, Node: Lunar Phases, Next: Other Calendars, Prev: Sunrise/Sunset, Up: Calendar/Diary
-
-Phases of the Moon
-------------------
-
- These calendar commands display the dates and times of the phases of
-the moon (new moon, first quarter, full moon, last quarter). This
-feature is useful for debugging problems that "depend on the phase of
-the moon."
-
-`M'
- Display the dates and times for all the quarters of the moon for
- the three-month period shown (`calendar-phases-of-moon').
-
-`M-x phases-of-moon'
- Display dates and times of the quarters of the moon for three
- months around today's date.
-
- Within the calendar, use the `M' command to display a separate
-buffer of the phases of the moon for the current three-month range. The
-dates and times listed are accurate to within a few minutes.
-
- Outside the calendar, use the command `M-x phases-of-moon' to
-display the list of the phases of the moon for the current month and the
-preceding and succeeding months. For information about a different
-month, use `C-u M-x phases-of-moon', which prompts for the month and
-year.
-
- The dates and times given for the phases of the moon are given in
-local time (corrected for daylight savings, when appropriate); but if
-the variable `calendar-time-zone' is void, Coordinated Universal Time
-(the Greenwich time zone) is used. *Note Daylight Savings::.
-
-\1f
-File: xemacs.info, Node: Other Calendars, Next: Calendar Systems, Prev: Lunar Phases, Up: Calendar/Diary
-
-Conversion To and From Other Calendars
---------------------------------------
-
- The Emacs calendar displayed is _always_ the Gregorian calendar,
-sometimes called the "new style" calendar, which is used in most of the
-world today. However, this calendar did not exist before the sixteenth
-century and was not widely used before the eighteenth century; it did
-not fully displace the Julian calendar and gain universal acceptance
-until the early twentieth century. The Emacs calendar can display any
-month since January, year 1 of the current era, but the calendar
-displayed is the Gregorian, even for a date at which the Gregorian
-calendar did not exist.
-
- While Emacs cannot display other calendars, it can convert dates to
-and from several other calendars.
-
-* Menu:
-
-* Calendar Systems:: The calendars Emacs understands
- (aside from Gregorian).
-* To Other Calendar:: Converting the selected date to various calendars.
-* From Other Calendar:: Moving to a date specified in another calendar.
-* Mayan Calendar:: Moving to a date specified in a Mayan calendar.
-
- If you are interested in these calendars, you can convert dates one
-at a time. Put point on the desired date of the Gregorian calendar and
-press the appropriate keys. The `p' is a mnemonic for "print" since
-Emacs "prints' the equivalent date in the echo area.
-
-\1f
-File: xemacs.info, Node: Calendar Systems, Next: To Other Calendar, Prev: Other Calendars, Up: Other Calendars
-
-Supported Calendar Systems
-==========================
-
- The ISO commercial calendar is used largely in Europe.
-
- The Julian calendar, named after Julius Caesar, was the one used in
-Europe throughout medieval times, and in many countries up until the
-nineteenth century.
-
- Astronomers use a simple counting of days elapsed since noon, Monday,
-January 1, 4713 B.C. on the Julian calendar. The number of days elapsed
-is called the _Julian day number_ or the _Astronomical day number_.
-
- The Hebrew calendar is used by tradition in the Jewish religion. The
-Emacs calendar program uses the Hebrew calendar to determine the dates
-of Jewish holidays. Hebrew calendar dates begin and end at sunset.
-
- The Islamic calendar is used in many predominantly Islamic countries.
-Emacs uses it to determine the dates of Islamic holidays. There is no
-universal agreement in the Islamic world about the calendar; Emacs uses
-a widely accepted version, but the precise dates of Islamic holidays
-often depend on proclamation by religious authorities, not on
-calculations. As a consequence, the actual dates of observance can vary
-slightly from the dates computed by Emacs. Islamic calendar dates begin
-and end at sunset.
-
- The French Revolutionary calendar was created by the Jacobins after
-the 1789 revolution, to represent a more secular and nature-based view
-of the annual cycle, and to install a 10-day week in a rationalization
-measure similar to the metric system. The French government officially
-abandoned this calendar at the end of 1805.
-
- The Maya of Central America used three separate, overlapping calendar
-systems, the _long count_, the _tzolkin_, and the _haab_. Emacs knows
-about all three of these calendars. Experts dispute the exact
-correlation between the Mayan calendar and our calendar; Emacs uses the
-Goodman-Martinez-Thompson correlation in its calculations.
-
- The Copts use a calendar based on the ancient Egyptian solar
-calendar. Their calendar consists of twelve 30-day months followed by
-an extra five-day period. Once every fourth year they add a leap day
-to this extra period to make it six days. The Ethiopic calendar is
-identical in structure, but has different year numbers and month names.
-
- The Persians use a solar calendar based on a design of Omar Khayyam.
-Their calendar consists of twelve months of which the first six have 31
-days, the next five have 30 days, and the last has 29 in ordinary years
-and 30 in leap years. Leap years occur in a complicated pattern every
-four or five years.
-
- The Chinese calendar is a complicated system of lunar months arranged
-into solar years. The years go in cycles of sixty, each year containing
-either twelve months in an ordinary year or thirteen months in a leap
-year; each month has either 29 or 30 days. Years, ordinary months, and
-days are named by combining one of ten "celestial stems" with one of
-twelve "terrestrial branches" for a total of sixty names that are
-repeated in a cycle of sixty.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Sunrise/Sunset, Next: Lunar Phases, Prev: Holidays, Up: Calendar/Diary
+
+Times of Sunrise and Sunset
+---------------------------
+
+ Special calendar commands can tell you, to within a minute or two,
+the times of sunrise and sunset for any date.
+
+`S'
+ Display times of sunrise and sunset for the selected date
+ (`calendar-sunrise-sunset').
+
+`Button2 Sunrise/Sunset'
+ Display times of sunrise and sunset for the date you click on.
+
+`M-x sunrise-sunset'
+ Display times of sunrise and sunset for today's date.
+
+`C-u M-x sunrise-sunset'
+ Display times of sunrise and sunset for a specified date.
+
+ Within the calendar, to display the _local times_ of sunrise and
+sunset in the echo area, move point to the date you want, and type `S'.
+Alternatively, click `Button2' on the date, then choose
+`Sunrise/Sunset' from the menu that appears. The command `M-x
+sunrise-sunset' is available outside the calendar to display this
+information for today's date or a specified date. To specify a date
+other than today, use `C-u M-x sunrise-sunset', which prompts for the
+year, month, and day.
+
+ You can display the times of sunrise and sunset for any location and
+any date with `C-u C-u M-x sunrise-sunset'. This asks you for a
+longitude, latitude, number of minutes difference from Coordinated
+Universal Time, and date, and then tells you the times of sunrise and
+sunset for that location on that date.
+
+ Because the times of sunrise and sunset depend on the location on
+earth, you need to tell Emacs your latitude, longitude, and location
+name before using these commands. Here is an example of what to set:
+
+ (setq calendar-latitude 40.1)
+ (setq calendar-longitude -88.2)
+ (setq calendar-location-name "Urbana, IL")
+
+Use one decimal place in the values of `calendar-latitude' and
+`calendar-longitude'.
+
+ Your time zone also affects the local time of sunrise and sunset.
+Emacs usually gets time zone information from the operating system, but
+if these values are not what you want (or if the operating system does
+not supply them), you must set them yourself. Here is an example:
+
+ (setq calendar-time-zone -360)
+ (setq calendar-standard-time-zone-name "CST")
+ (setq calendar-daylight-time-zone-name "CDT")
+
+The value of `calendar-time-zone' is the number of minutes difference
+between your local standard time and Coordinated Universal Time
+(Greenwich time). The values of `calendar-standard-time-zone-name' and
+`calendar-daylight-time-zone-name' are the abbreviations used in your
+time zone. Emacs displays the times of sunrise and sunset _corrected
+for daylight savings time_. *Note Daylight Savings::, for how daylight
+savings time is determined.
+
+ As a user, you might find it convenient to set the calendar location
+variables for your usual physical location in your `.emacs' file. And
+when you install Emacs on a machine, you can create a `default.el' file
+which sets them properly for the typical location of most users of that
+machine. *Note Init File::.
+
+\1f
+File: xemacs.info, Node: Lunar Phases, Next: Other Calendars, Prev: Sunrise/Sunset, Up: Calendar/Diary
+
+Phases of the Moon
+------------------
+
+ These calendar commands display the dates and times of the phases of
+the moon (new moon, first quarter, full moon, last quarter). This
+feature is useful for debugging problems that "depend on the phase of
+the moon."
+
+`M'
+ Display the dates and times for all the quarters of the moon for
+ the three-month period shown (`calendar-phases-of-moon').
+
+`M-x phases-of-moon'
+ Display dates and times of the quarters of the moon for three
+ months around today's date.
+
+ Within the calendar, use the `M' command to display a separate
+buffer of the phases of the moon for the current three-month range. The
+dates and times listed are accurate to within a few minutes.
+
+ Outside the calendar, use the command `M-x phases-of-moon' to
+display the list of the phases of the moon for the current month and the
+preceding and succeeding months. For information about a different
+month, use `C-u M-x phases-of-moon', which prompts for the month and
+year.
+
+ The dates and times given for the phases of the moon are given in
+local time (corrected for daylight savings, when appropriate); but if
+the variable `calendar-time-zone' is void, Coordinated Universal Time
+(the Greenwich time zone) is used. *Note Daylight Savings::.
+
+\1f
+File: xemacs.info, Node: Other Calendars, Next: Calendar Systems, Prev: Lunar Phases, Up: Calendar/Diary
+
+Conversion To and From Other Calendars
+--------------------------------------
+
+ The Emacs calendar displayed is _always_ the Gregorian calendar,
+sometimes called the "new style" calendar, which is used in most of the
+world today. However, this calendar did not exist before the sixteenth
+century and was not widely used before the eighteenth century; it did
+not fully displace the Julian calendar and gain universal acceptance
+until the early twentieth century. The Emacs calendar can display any
+month since January, year 1 of the current era, but the calendar
+displayed is the Gregorian, even for a date at which the Gregorian
+calendar did not exist.
+
+ While Emacs cannot display other calendars, it can convert dates to
+and from several other calendars.
+
+* Menu:
+
+* Calendar Systems:: The calendars Emacs understands
+ (aside from Gregorian).
+* To Other Calendar:: Converting the selected date to various calendars.
+* From Other Calendar:: Moving to a date specified in another calendar.
+* Mayan Calendar:: Moving to a date specified in a Mayan calendar.
+
+ If you are interested in these calendars, you can convert dates one
+at a time. Put point on the desired date of the Gregorian calendar and
+press the appropriate keys. The `p' is a mnemonic for "print" since
+Emacs "prints' the equivalent date in the echo area.
+
+\1f
+File: xemacs.info, Node: Calendar Systems, Next: To Other Calendar, Prev: Other Calendars, Up: Other Calendars
+
+Supported Calendar Systems
+==========================
+
+ The ISO commercial calendar is used largely in Europe.
+
+ The Julian calendar, named after Julius Caesar, was the one used in
+Europe throughout medieval times, and in many countries up until the
+nineteenth century.
+
+ Astronomers use a simple counting of days elapsed since noon, Monday,
+January 1, 4713 B.C. on the Julian calendar. The number of days elapsed
+is called the _Julian day number_ or the _Astronomical day number_.
+
+ The Hebrew calendar is used by tradition in the Jewish religion. The
+Emacs calendar program uses the Hebrew calendar to determine the dates
+of Jewish holidays. Hebrew calendar dates begin and end at sunset.
+
+ The Islamic calendar is used in many predominantly Islamic countries.
+Emacs uses it to determine the dates of Islamic holidays. There is no
+universal agreement in the Islamic world about the calendar; Emacs uses
+a widely accepted version, but the precise dates of Islamic holidays
+often depend on proclamation by religious authorities, not on
+calculations. As a consequence, the actual dates of observance can vary
+slightly from the dates computed by Emacs. Islamic calendar dates begin
+and end at sunset.
+
+ The French Revolutionary calendar was created by the Jacobins after
+the 1789 revolution, to represent a more secular and nature-based view
+of the annual cycle, and to install a 10-day week in a rationalization
+measure similar to the metric system. The French government officially
+abandoned this calendar at the end of 1805.
+
+ The Maya of Central America used three separate, overlapping calendar
+systems, the _long count_, the _tzolkin_, and the _haab_. Emacs knows
+about all three of these calendars. Experts dispute the exact
+correlation between the Mayan calendar and our calendar; Emacs uses the
+Goodman-Martinez-Thompson correlation in its calculations.
+
+ The Copts use a calendar based on the ancient Egyptian solar
+calendar. Their calendar consists of twelve 30-day months followed by
+an extra five-day period. Once every fourth year they add a leap day
+to this extra period to make it six days. The Ethiopic calendar is
+identical in structure, but has different year numbers and month names.
+
+ The Persians use a solar calendar based on a design of Omar Khayyam.
+Their calendar consists of twelve months of which the first six have 31
+days, the next five have 30 days, and the last has 29 in ordinary years
+and 30 in leap years. Leap years occur in a complicated pattern every
+four or five years.
+
+ The Chinese calendar is a complicated system of lunar months arranged
+into solar years. The years go in cycles of sixty, each year containing
+either twelve months in an ordinary year or thirteen months in a leap
+year; each month has either 29 or 30 days. Years, ordinary months, and
+days are named by combining one of ten "celestial stems" with one of
+twelve "terrestrial branches" for a total of sixty names that are
+repeated in a cycle of sixty.
+
+\1f
File: xemacs.info, Node: To Other Calendar, Next: From Other Calendar, Prev: Calendar Systems, Up: Other Calendars
Converting To Other Calendars
savings time should occur. For Cambridge, Massachusetts both variables'
values are 120.
-\1f
-File: xemacs.info, Node: Diary Customizing, Next: Hebrew/Islamic Entries, Prev: Daylight Savings, Up: Calendar Customization
-
-Customizing the Diary
-.....................
-
- Ordinarily, the mode line of the diary buffer window indicates any
-holidays that fall on the date of the diary entries. The process of
-checking for holidays can take several seconds, so including holiday
-information delays the display of the diary buffer noticeably. If you'd
-prefer to have a faster display of the diary buffer but without the
-holiday information, set the variable `holidays-in-diary-buffer' to
-`nil'.
-
- The variable `number-of-diary-entries' controls the number of days
-of diary entries to be displayed at one time. It affects the initial
-display when `view-diary-entries-initially' is `t', as well as the
-command `M-x diary'. For example, the default value is 1, which says
-to display only the current day's diary entries. If the value is 2,
-both the current day's and the next day's entries are displayed. The
-value can also be a vector of seven elements: for example, if the value
-is `[0 2 2 2 2 4 1]' then no diary entries appear on Sunday, the
-current date's and the next day's diary entries appear Monday through
-Thursday, Friday through Monday's entries appear on Friday, while on
-Saturday only that day's entries appear.
-
- The variable `print-diary-entries-hook' is a normal hook run after
-preparation of a temporary buffer containing just the diary entries
-currently visible in the diary buffer. (The other, irrelevant diary
-entries are really absent from the temporary buffer; in the diary
-buffer, they are merely hidden.) The default value of this hook does
-the printing with the command `lpr-buffer'. If you want to use a
-different command to do the printing, just change the value of this
-hook. Other uses might include, for example, rearranging the lines into
-order by day and time.
-
- You can customize the form of dates in your diary file, if neither
-the standard American nor European styles suits your needs, by setting
-the variable `diary-date-forms'. This variable is a list of patterns
-for recognizing a date. Each date pattern is a list whose elements may
-be regular expressions (*note Regexps::) or the symbols `month', `day',
-`year', `monthname', and `dayname'. All these elements serve as
-patterns that match certain kinds of text in the diary file. In order
-for the date pattern, as a whole, to match, all of its elements must
-match consecutively.
-
- A regular expression in a date pattern matches in its usual fashion,
-using the standard syntax table altered so that `*' is a word
-constituent.
-
- The symbols `month', `day', `year', `monthname', and `dayname' match
-the month number, day number, year number, month name, and day name of
-the date being considered. The symbols that match numbers allow
-leading zeros; those that match names allow three-letter abbreviations
-and capitalization. All the symbols can match `*'; since `*' in a
-diary entry means "any day", "any month", and so on, it should match
-regardless of the date being considered.
-
- The default value of `diary-date-forms' in the American style is
-this:
-
- ((month "/" day "[^/0-9]")
- (month "/" day "/" year "[^0-9]")
- (monthname " *" day "[^,0-9]")
- (monthname " *" day ", *" year "[^0-9]")
- (dayname "\\W"))
-
-Emacs matches of the diary entries with the date forms is done with the
-standard syntax table from Fundamental mode (*note Syntax Tables:
-(lispref)Syntax Tables.), but with the `*' changed so that it is a word
-constituent.
-
- The date patterns in the list must be _mutually exclusive_ and must
-not match any portion of the diary entry itself, just the date and one
-character of whitespace. If, to be mutually exclusive, the pattern
-must match a portion of the diary entry text--beyond the whitespace
-that ends the date--then the first element of the date pattern _must_
-be `backup'. This causes the date recognizer to back up to the
-beginning of the current word of the diary entry, after finishing the
-match. Even if you use `backup', the date pattern must absolutely not
-match more than a portion of the first word of the diary entry. The
-default value of `diary-date-forms' in the European style is this list:
-
- ((day "/" month "[^/0-9]")
- (day "/" month "/" year "[^0-9]")
- (backup day " *" monthname "\\W+\\<[^*0-9]")
- (day " *" monthname " *" year "[^0-9]")
- (dayname "\\W"))
-
-Notice the use of `backup' in the third pattern, because it needs to
-match part of a word beyond the date itself to distinguish it from the
-fourth pattern.
-
-\1f
-File: xemacs.info, Node: Hebrew/Islamic Entries, Next: Fancy Diary Display, Prev: Diary Customizing, Up: Calendar Customization
-
-Hebrew- and Islamic-Date Diary Entries
-......................................
-
- Your diary file can have entries based on Hebrew or Islamic dates, as
-well as entries based on the world-standard Gregorian calendar.
-However, because recognition of such entries is time-consuming and most
-people don't use them, you must explicitly enable their use. If you
-want the diary to recognize Hebrew-date diary entries, for example, you
-must do this:
-
- (add-hook 'nongregorian-diary-listing-hook 'list-hebrew-diary-entries)
- (add-hook 'nongregorian-diary-marking-hook 'mark-hebrew-diary-entries)
-
-If you want Islamic-date entries, do this:
-
- (add-hook 'nongregorian-diary-listing-hook 'list-islamic-diary-entries)
- (add-hook 'nongregorian-diary-marking-hook 'mark-islamic-diary-entries)
-
- Hebrew- and Islamic-date diary entries have the same formats as
-Gregorian-date diary entries, except that `H' precedes a Hebrew date
-and `I' precedes an Islamic date. Moreover, because the Hebrew and
-Islamic month names are not uniquely specified by the first three
-letters, you may not abbreviate them. For example, a diary entry for
-the Hebrew date Heshvan 25 could look like this:
-
- HHeshvan 25 Happy Hebrew birthday!
-
-and would appear in the diary for any date that corresponds to Heshvan
-25 on the Hebrew calendar. And here is Islamic-date diary entry that
-matches Dhu al-Qada 25:
-
- IDhu al-Qada 25 Happy Islamic birthday!
-
-and would appear in the diary for any date that corresponds to Dhu
-al-Qada 25 on the Islamic calendar.
-
- As with Gregorian-date diary entries, Hebrew- and Islamic-date
-entries are nonmarking if they are preceded with an ampersand (`&').
-
- Here is a table of commands used in the calendar to create diary
-entries that match the selected date and other dates that are similar
-in the Hebrew or Islamic calendar:
-
-`i h d'
- Add a diary entry for the Hebrew date corresponding to the
- selected date (`insert-hebrew-diary-entry').
-
-`i h m'
- Add a diary entry for the day of the Hebrew month corresponding to
- the selected date (`insert-monthly-hebrew-diary-entry'). This
- diary entry matches any date that has the same Hebrew
- day-within-month as the selected date.
-
-`i h y'
- Add a diary entry for the day of the Hebrew year corresponding to
- the selected date (`insert-yearly-hebrew-diary-entry'). This diary
- entry matches any date which has the same Hebrew month and
- day-within-month as the selected date.
-
-`i i d'
- Add a diary entry for the Islamic date corresponding to the
- selected date (`insert-islamic-diary-entry').
-
-`i i m'
- Add a diary entry for the day of the Islamic month corresponding
- to the selected date (`insert-monthly-islamic-diary-entry').
-
-`i i y'
- Add a diary entry for the day of the Islamic year corresponding to
- the selected date (`insert-yearly-islamic-diary-entry').
-
- These commands work much like the corresponding commands for ordinary
-diary entries: they apply to the date that point is on in the calendar
-window, and what they do is insert just the date portion of a diary
-entry at the end of your diary file. You must then insert the rest of
-the diary entry.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Diary Customizing, Next: Hebrew/Islamic Entries, Prev: Daylight Savings, Up: Calendar Customization
+
+Customizing the Diary
+.....................
+
+ Ordinarily, the mode line of the diary buffer window indicates any
+holidays that fall on the date of the diary entries. The process of
+checking for holidays can take several seconds, so including holiday
+information delays the display of the diary buffer noticeably. If you'd
+prefer to have a faster display of the diary buffer but without the
+holiday information, set the variable `holidays-in-diary-buffer' to
+`nil'.
+
+ The variable `number-of-diary-entries' controls the number of days
+of diary entries to be displayed at one time. It affects the initial
+display when `view-diary-entries-initially' is `t', as well as the
+command `M-x diary'. For example, the default value is 1, which says
+to display only the current day's diary entries. If the value is 2,
+both the current day's and the next day's entries are displayed. The
+value can also be a vector of seven elements: for example, if the value
+is `[0 2 2 2 2 4 1]' then no diary entries appear on Sunday, the
+current date's and the next day's diary entries appear Monday through
+Thursday, Friday through Monday's entries appear on Friday, while on
+Saturday only that day's entries appear.
+
+ The variable `print-diary-entries-hook' is a normal hook run after
+preparation of a temporary buffer containing just the diary entries
+currently visible in the diary buffer. (The other, irrelevant diary
+entries are really absent from the temporary buffer; in the diary
+buffer, they are merely hidden.) The default value of this hook does
+the printing with the command `lpr-buffer'. If you want to use a
+different command to do the printing, just change the value of this
+hook. Other uses might include, for example, rearranging the lines into
+order by day and time.
+
+ You can customize the form of dates in your diary file, if neither
+the standard American nor European styles suits your needs, by setting
+the variable `diary-date-forms'. This variable is a list of patterns
+for recognizing a date. Each date pattern is a list whose elements may
+be regular expressions (*note Regexps::) or the symbols `month', `day',
+`year', `monthname', and `dayname'. All these elements serve as
+patterns that match certain kinds of text in the diary file. In order
+for the date pattern, as a whole, to match, all of its elements must
+match consecutively.
+
+ A regular expression in a date pattern matches in its usual fashion,
+using the standard syntax table altered so that `*' is a word
+constituent.
+
+ The symbols `month', `day', `year', `monthname', and `dayname' match
+the month number, day number, year number, month name, and day name of
+the date being considered. The symbols that match numbers allow
+leading zeros; those that match names allow three-letter abbreviations
+and capitalization. All the symbols can match `*'; since `*' in a
+diary entry means "any day", "any month", and so on, it should match
+regardless of the date being considered.
+
+ The default value of `diary-date-forms' in the American style is
+this:
+
+ ((month "/" day "[^/0-9]")
+ (month "/" day "/" year "[^0-9]")
+ (monthname " *" day "[^,0-9]")
+ (monthname " *" day ", *" year "[^0-9]")
+ (dayname "\\W"))
+
+Emacs matches of the diary entries with the date forms is done with the
+standard syntax table from Fundamental mode (*note Syntax Tables:
+(lispref)Syntax Tables.), but with the `*' changed so that it is a word
+constituent.
+
+ The date patterns in the list must be _mutually exclusive_ and must
+not match any portion of the diary entry itself, just the date and one
+character of whitespace. If, to be mutually exclusive, the pattern
+must match a portion of the diary entry text--beyond the whitespace
+that ends the date--then the first element of the date pattern _must_
+be `backup'. This causes the date recognizer to back up to the
+beginning of the current word of the diary entry, after finishing the
+match. Even if you use `backup', the date pattern must absolutely not
+match more than a portion of the first word of the diary entry. The
+default value of `diary-date-forms' in the European style is this list:
+
+ ((day "/" month "[^/0-9]")
+ (day "/" month "/" year "[^0-9]")
+ (backup day " *" monthname "\\W+\\<[^*0-9]")
+ (day " *" monthname " *" year "[^0-9]")
+ (dayname "\\W"))
+
+Notice the use of `backup' in the third pattern, because it needs to
+match part of a word beyond the date itself to distinguish it from the
+fourth pattern.
+
+\1f
+File: xemacs.info, Node: Hebrew/Islamic Entries, Next: Fancy Diary Display, Prev: Diary Customizing, Up: Calendar Customization
+
+Hebrew- and Islamic-Date Diary Entries
+......................................
+
+ Your diary file can have entries based on Hebrew or Islamic dates, as
+well as entries based on the world-standard Gregorian calendar.
+However, because recognition of such entries is time-consuming and most
+people don't use them, you must explicitly enable their use. If you
+want the diary to recognize Hebrew-date diary entries, for example, you
+must do this:
+
+ (add-hook 'nongregorian-diary-listing-hook 'list-hebrew-diary-entries)
+ (add-hook 'nongregorian-diary-marking-hook 'mark-hebrew-diary-entries)
+
+If you want Islamic-date entries, do this:
+
+ (add-hook 'nongregorian-diary-listing-hook 'list-islamic-diary-entries)
+ (add-hook 'nongregorian-diary-marking-hook 'mark-islamic-diary-entries)
+
+ Hebrew- and Islamic-date diary entries have the same formats as
+Gregorian-date diary entries, except that `H' precedes a Hebrew date
+and `I' precedes an Islamic date. Moreover, because the Hebrew and
+Islamic month names are not uniquely specified by the first three
+letters, you may not abbreviate them. For example, a diary entry for
+the Hebrew date Heshvan 25 could look like this:
+
+ HHeshvan 25 Happy Hebrew birthday!
+
+and would appear in the diary for any date that corresponds to Heshvan
+25 on the Hebrew calendar. And here is Islamic-date diary entry that
+matches Dhu al-Qada 25:
+
+ IDhu al-Qada 25 Happy Islamic birthday!
+
+and would appear in the diary for any date that corresponds to Dhu
+al-Qada 25 on the Islamic calendar.
+
+ As with Gregorian-date diary entries, Hebrew- and Islamic-date
+entries are nonmarking if they are preceded with an ampersand (`&').
+
+ Here is a table of commands used in the calendar to create diary
+entries that match the selected date and other dates that are similar
+in the Hebrew or Islamic calendar:
+
+`i h d'
+ Add a diary entry for the Hebrew date corresponding to the
+ selected date (`insert-hebrew-diary-entry').
+
+`i h m'
+ Add a diary entry for the day of the Hebrew month corresponding to
+ the selected date (`insert-monthly-hebrew-diary-entry'). This
+ diary entry matches any date that has the same Hebrew
+ day-within-month as the selected date.
+
+`i h y'
+ Add a diary entry for the day of the Hebrew year corresponding to
+ the selected date (`insert-yearly-hebrew-diary-entry'). This diary
+ entry matches any date which has the same Hebrew month and
+ day-within-month as the selected date.
+
+`i i d'
+ Add a diary entry for the Islamic date corresponding to the
+ selected date (`insert-islamic-diary-entry').
+
+`i i m'
+ Add a diary entry for the day of the Islamic month corresponding
+ to the selected date (`insert-monthly-islamic-diary-entry').
+
+`i i y'
+ Add a diary entry for the day of the Islamic year corresponding to
+ the selected date (`insert-yearly-islamic-diary-entry').
+
+ These commands work much like the corresponding commands for ordinary
+diary entries: they apply to the date that point is on in the calendar
+window, and what they do is insert just the date portion of a diary
+entry at the end of your diary file. You must then insert the rest of
+the diary entry.
+
+\1f
File: xemacs.info, Node: Fancy Diary Display, Next: Included Diary Files, Prev: Hebrew/Islamic Entries, Up: Calendar Customization
Fancy Diary Display
* X Resources:: X resources controlling various aspects of the
behavior of XEmacs.
-\1f
-File: xemacs.info, Node: Minor Modes, Next: Variables, Up: Customization
-
-Minor Modes
-===========
-
- Minor modes are options which you can use or not. For example, Auto
-Fill mode is a minor mode in which <SPC> breaks lines between words as
-you type. All the minor modes are independent of each other and of the
-selected major mode. Most minor modes inform you in the mode line when
-they are on; for example, `Fill' in the mode line means that Auto Fill
-mode is on.
-
- Append `-mode' to the name of a minor mode to get the name of a
-command function that turns the mode on or off. Thus, the command to
-enable or disable Auto Fill mode is called `M-x auto-fill-mode'. These
-commands are usually invoked with `M-x', but you can bind keys to them
-if you wish. With no argument, the function turns the mode on if it was
-off and off if it was on. This is known as "toggling". A positive
-argument always turns the mode on, and an explicit zero argument or a
-negative argument always turns it off.
-
- Auto Fill mode allows you to enter filled text without breaking lines
-explicitly. Emacs inserts newlines as necessary to prevent lines from
-becoming too long. *Note Filling::.
-
- Overwrite mode causes ordinary printing characters to replace
-existing text instead of moving it to the right. For example, if point
-is in front of the `B' in `FOOBAR', and you type a `G' in Overwrite
-mode, it changes to `FOOGAR', instead of `FOOGBAR'.
-
- Abbrev mode allows you to define abbreviations that automatically
-expand as you type them. For example, `amd' might expand to `abbrev
-mode'. *Note Abbrevs::, for full information.
-
-\1f
-File: xemacs.info, Node: Variables, Next: Keyboard Macros, Prev: Minor Modes, Up: Customization
-
-Variables
-=========
-
- A "variable" is a Lisp symbol which has a value. Variable names can
-contain any characters, but by convention they are words separated by
-hyphens. A variable can also have a documentation string, which
-describes what kind of value it should have and how the value will be
-used.
-
- Lisp allows any variable to have any kind of value, but most
-variables that Emacs uses require a value of a certain type. Often the
-value has to be a string or a number. Sometimes we say that a certain
-feature is turned on if a variable is "non-`nil'," meaning that if the
-variable's value is `nil', the feature is off, but the feature is on
-for any other value. The conventional value to turn on the
-feature--since you have to pick one particular value when you set the
-variable--is `t'.
-
- Emacs uses many Lisp variables for internal recordkeeping, as any
-Lisp program must, but the most interesting variables for you are the
-ones that exist for the sake of customization. Emacs does not
-(usually) change the values of these variables; instead, you set the
-values, and thereby alter and control the behavior of certain Emacs
-commands. These variables are called "options". Most options are
-documented in this manual and appear in the Variable Index (*note
-Variable Index::).
-
- One example of a variable which is an option is `fill-column', which
-specifies the position of the right margin (as a number of characters
-from the left margin) to be used by the fill commands (*note Filling::).
-
-* Menu:
-
-* Examining:: Examining or setting one variable's value.
-* Easy Customization:: Convenient and easy customization of variables.
-* Edit Options:: Examining or editing list of all variables' values.
-* Locals:: Per-buffer values of variables.
-* File Variables:: How files can specify variable values.
-
-\1f
-File: xemacs.info, Node: Examining, Next: Easy Customization, Up: Variables
-
-Examining and Setting Variables
--------------------------------
-
-`C-h v'
-`M-x describe-variable'
- Print the value and documentation of a variable.
-
-`M-x set-variable'
- Change the value of a variable.
-
- To examine the value of a single variable, use `C-h v'
-(`describe-variable'), which reads a variable name using the
-minibuffer, with completion. It prints both the value and the
-documentation of the variable.
-
- C-h v fill-column <RET>
-
-prints something like:
-
- fill-column's value is 75
-
- Documentation:
- *Column beyond which automatic line-wrapping should happen.
- Automatically becomes local when set in any fashion.
-
-The star at the beginning of the documentation indicates that this
-variable is an option. `C-h v' is not restricted to options; it allows
-any variable name.
-
- If you know which option you want to set, you can use `M-x
-set-variable' to set it. This prompts for the variable name in the
-minibuffer (with completion), and then prompts for a Lisp expression
-for the new value using the minibuffer a second time. For example,
-
- M-x set-variable <RET> fill-column <RET> 75 <RET>
-
-sets `fill-column' to 75, as if you had executed the Lisp expression
-`(setq fill-column 75)'.
-
- Setting variables in this way, like all means of customizing Emacs
-except where explicitly stated, affects only the current Emacs session.
-
-\1f
-File: xemacs.info, Node: Easy Customization, Next: Edit Options, Prev: Examining, Up: Variables
-
-Easy Customization Interface
-----------------------------
-
- A convenient way to find the user option variables that you want to
-change, and then change them, is with `M-x customize'. This command
-creates a "customization buffer" with which you can browse through the
-Emacs user options in a logically organized structure, then edit and
-set their values. You can also use the customization buffer to save
-settings permanently. (Not all Emacs user options are included in this
-structure as of yet, but we are adding the rest.)
-
-* Menu:
-
-* Groups: Customization Groups.
- How options are classified in a structure.
-* Changing an Option:: How to edit a value and set an option.
-* Face Customization:: How to edit the attributes of a face.
-* Specific Customization:: Making a customization buffer for specific
- options, faces, or groups.
-
-\1f
-File: xemacs.info, Node: Customization Groups, Next: Changing an Option, Up: Easy Customization
-
-Customization Groups
-....................
-
- For customization purposes, user options are organized into "groups"
-to help you find them. Groups are collected into bigger groups, all
-the way up to a master group called `Emacs'.
-
- `M-x customize' creates a customization buffer that shows the
-top-level `Emacs' group and the second-level groups immediately under
-it. It looks like this, in part:
-
- /- Emacs group: ---------------------------------------------------\
- [State]: visible group members are all at standard settings.
- Customization of the One True Editor.
- See also [Manual].
-
- [Open] Editing group
- Basic text editing facilities.
-
- [Open] External group
- Interfacing to external utilities.
-
- MORE SECOND-LEVEL GROUPS
-
- \- Emacs group end ------------------------------------------------/
-
-This says that the buffer displays the contents of the `Emacs' group.
-The other groups are listed because they are its contents. But they
-are listed differently, without indentation and dashes, because _their_
-contents are not included. Each group has a single-line documentation
-string; the `Emacs' group also has a `[State]' line.
-
- Most of the text in the customization buffer is read-only, but it
-typically includes some "editable fields" that you can edit. There are
-also "active fields"; this means a field that does something when you
-"invoke" it. To invoke an active field, either click on it with
-`Mouse-1', or move point to it and type <RET>.
-
- For example, the phrase `[Open]' that appears in a second-level
-group is an active field. Invoking the `[Open]' field for a group
-opens up a new customization buffer, which shows that group and its
-contents. This field is a kind of hypertext link to another group.
-
- The `Emacs' group does not include any user options itself, but
-other groups do. By examining various groups, you will eventually find
-the options and faces that belong to the feature you are interested in
-customizing. Then you can use the customization buffer to set them.
-
- You can view the structure of customization groups on a larger scale
-with `M-x customize-browse'. This command creates a special kind of
-customization buffer which shows only the names of the groups (and
-options and faces), and their structure.
-
- In this buffer, you can show the contents of a group by invoking
-`[+]'. When the group contents are visible, this button changes to
-`[-]'; invoking that hides the group contents.
-
- Each group, option or face name in this buffer has an active field
-which says `[Group]', `[Option]' or `[Face]'. Invoking that active
-field creates an ordinary customization buffer showing just that group
-and its contents, just that option, or just that face. This is the way
-to set values in it.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Minor Modes, Next: Variables, Up: Customization
+
+Minor Modes
+===========
+
+ Minor modes are options which you can use or not. For example, Auto
+Fill mode is a minor mode in which <SPC> breaks lines between words as
+you type. All the minor modes are independent of each other and of the
+selected major mode. Most minor modes inform you in the mode line when
+they are on; for example, `Fill' in the mode line means that Auto Fill
+mode is on.
+
+ Append `-mode' to the name of a minor mode to get the name of a
+command function that turns the mode on or off. Thus, the command to
+enable or disable Auto Fill mode is called `M-x auto-fill-mode'. These
+commands are usually invoked with `M-x', but you can bind keys to them
+if you wish. With no argument, the function turns the mode on if it was
+off and off if it was on. This is known as "toggling". A positive
+argument always turns the mode on, and an explicit zero argument or a
+negative argument always turns it off.
+
+ Auto Fill mode allows you to enter filled text without breaking lines
+explicitly. Emacs inserts newlines as necessary to prevent lines from
+becoming too long. *Note Filling::.
+
+ Overwrite mode causes ordinary printing characters to replace
+existing text instead of moving it to the right. For example, if point
+is in front of the `B' in `FOOBAR', and you type a `G' in Overwrite
+mode, it changes to `FOOGAR', instead of `FOOGBAR'.
+
+ Abbrev mode allows you to define abbreviations that automatically
+expand as you type them. For example, `amd' might expand to `abbrev
+mode'. *Note Abbrevs::, for full information.
+
+\1f
+File: xemacs.info, Node: Variables, Next: Keyboard Macros, Prev: Minor Modes, Up: Customization
+
+Variables
+=========
+
+ A "variable" is a Lisp symbol which has a value. Variable names can
+contain any characters, but by convention they are words separated by
+hyphens. A variable can also have a documentation string, which
+describes what kind of value it should have and how the value will be
+used.
+
+ Lisp allows any variable to have any kind of value, but most
+variables that Emacs uses require a value of a certain type. Often the
+value has to be a string or a number. Sometimes we say that a certain
+feature is turned on if a variable is "non-`nil'," meaning that if the
+variable's value is `nil', the feature is off, but the feature is on
+for any other value. The conventional value to turn on the
+feature--since you have to pick one particular value when you set the
+variable--is `t'.
+
+ Emacs uses many Lisp variables for internal recordkeeping, as any
+Lisp program must, but the most interesting variables for you are the
+ones that exist for the sake of customization. Emacs does not
+(usually) change the values of these variables; instead, you set the
+values, and thereby alter and control the behavior of certain Emacs
+commands. These variables are called "options". Most options are
+documented in this manual and appear in the Variable Index (*note
+Variable Index::).
+
+ One example of a variable which is an option is `fill-column', which
+specifies the position of the right margin (as a number of characters
+from the left margin) to be used by the fill commands (*note Filling::).
+
+* Menu:
+
+* Examining:: Examining or setting one variable's value.
+* Easy Customization:: Convenient and easy customization of variables.
+* Edit Options:: Examining or editing list of all variables' values.
+* Locals:: Per-buffer values of variables.
+* File Variables:: How files can specify variable values.
+
+\1f
+File: xemacs.info, Node: Examining, Next: Easy Customization, Up: Variables
+
+Examining and Setting Variables
+-------------------------------
+
+`C-h v'
+`M-x describe-variable'
+ Print the value and documentation of a variable.
+
+`M-x set-variable'
+ Change the value of a variable.
+
+ To examine the value of a single variable, use `C-h v'
+(`describe-variable'), which reads a variable name using the
+minibuffer, with completion. It prints both the value and the
+documentation of the variable.
+
+ C-h v fill-column <RET>
+
+prints something like:
+
+ fill-column's value is 75
+
+ Documentation:
+ *Column beyond which automatic line-wrapping should happen.
+ Automatically becomes local when set in any fashion.
+
+The star at the beginning of the documentation indicates that this
+variable is an option. `C-h v' is not restricted to options; it allows
+any variable name.
+
+ If you know which option you want to set, you can use `M-x
+set-variable' to set it. This prompts for the variable name in the
+minibuffer (with completion), and then prompts for a Lisp expression
+for the new value using the minibuffer a second time. For example,
+
+ M-x set-variable <RET> fill-column <RET> 75 <RET>
+
+sets `fill-column' to 75, as if you had executed the Lisp expression
+`(setq fill-column 75)'.
+
+ Setting variables in this way, like all means of customizing Emacs
+except where explicitly stated, affects only the current Emacs session.
+
+\1f
+File: xemacs.info, Node: Easy Customization, Next: Edit Options, Prev: Examining, Up: Variables
+
+Easy Customization Interface
+----------------------------
+
+ A convenient way to find the user option variables that you want to
+change, and then change them, is with `M-x customize'. This command
+creates a "customization buffer" with which you can browse through the
+Emacs user options in a logically organized structure, then edit and
+set their values. You can also use the customization buffer to save
+settings permanently. (Not all Emacs user options are included in this
+structure as of yet, but we are adding the rest.)
+
+* Menu:
+
+* Groups: Customization Groups.
+ How options are classified in a structure.
+* Changing an Option:: How to edit a value and set an option.
+* Face Customization:: How to edit the attributes of a face.
+* Specific Customization:: Making a customization buffer for specific
+ options, faces, or groups.
+
+\1f
+File: xemacs.info, Node: Customization Groups, Next: Changing an Option, Up: Easy Customization
+
+Customization Groups
+....................
+
+ For customization purposes, user options are organized into "groups"
+to help you find them. Groups are collected into bigger groups, all
+the way up to a master group called `Emacs'.
+
+ `M-x customize' creates a customization buffer that shows the
+top-level `Emacs' group and the second-level groups immediately under
+it. It looks like this, in part:
+
+ /- Emacs group: ---------------------------------------------------\
+ [State]: visible group members are all at standard settings.
+ Customization of the One True Editor.
+ See also [Manual].
+
+ [Open] Editing group
+ Basic text editing facilities.
+
+ [Open] External group
+ Interfacing to external utilities.
+
+ MORE SECOND-LEVEL GROUPS
+
+ \- Emacs group end ------------------------------------------------/
+
+This says that the buffer displays the contents of the `Emacs' group.
+The other groups are listed because they are its contents. But they
+are listed differently, without indentation and dashes, because _their_
+contents are not included. Each group has a single-line documentation
+string; the `Emacs' group also has a `[State]' line.
+
+ Most of the text in the customization buffer is read-only, but it
+typically includes some "editable fields" that you can edit. There are
+also "active fields"; this means a field that does something when you
+"invoke" it. To invoke an active field, either click on it with
+`Mouse-1', or move point to it and type <RET>.
+
+ For example, the phrase `[Open]' that appears in a second-level
+group is an active field. Invoking the `[Open]' field for a group
+opens up a new customization buffer, which shows that group and its
+contents. This field is a kind of hypertext link to another group.
+
+ The `Emacs' group does not include any user options itself, but
+other groups do. By examining various groups, you will eventually find
+the options and faces that belong to the feature you are interested in
+customizing. Then you can use the customization buffer to set them.
+
+ You can view the structure of customization groups on a larger scale
+with `M-x customize-browse'. This command creates a special kind of
+customization buffer which shows only the names of the groups (and
+options and faces), and their structure.
+
+ In this buffer, you can show the contents of a group by invoking
+`[+]'. When the group contents are visible, this button changes to
+`[-]'; invoking that hides the group contents.
+
+ Each group, option or face name in this buffer has an active field
+which says `[Group]', `[Option]' or `[Face]'. Invoking that active
+field creates an ordinary customization buffer showing just that group
+and its contents, just that option, or just that face. This is the way
+to set values in it.
+
+\1f
File: xemacs.info, Node: Changing an Option, Next: Face Customization, Prev: Customization Groups, Up: Easy Customization
Changing an Option
* Menu:
-* Interactive Rebinding:: Changing Key Bindings Interactively
-* Programmatic Rebinding:: Changing Key Bindings Programmatically
-* Key Bindings Using Strings::Using Strings for Changing Key Bindings
+* Interactive Rebinding:: Changing Key Bindings Interactively
+* Programmatic Rebinding:: Changing Key Bindings Programmatically
+* Key Bindings Using Strings:: Using Strings for Changing Key Bindings
\1f
File: xemacs.info, Node: Interactive Rebinding, Next: Programmatic Rebinding, Up: Rebinding
control [ escape
control @ control space
-\1f
-File: xemacs.info, Node: Disabling, Prev: Rebinding, Up: Key Bindings
-
-Disabling Commands
-------------------
-
- Disabling a command marks it as requiring confirmation before it can
-be executed. The purpose of disabling a command is to prevent
-beginning users from executing it by accident and being confused.
-
- The direct mechanism for disabling a command is to have a non-`nil'
-`disabled' property on the Lisp symbol for the command. These
-properties are normally set by the user's `.emacs' file with Lisp
-expressions such as:
-
- (put 'delete-region 'disabled t)
-
- If the value of the `disabled' property is a string, that string is
-included in the message printed when the command is used:
-
- (put 'delete-region 'disabled
- "Text deleted this way cannot be yanked back!\n")
-
- You can disable a command either by editing the `.emacs' file
-directly or with the command `M-x disable-command', which edits the
-`.emacs' file for you. *Note Init File::.
-
- When you attempt to invoke a disabled command interactively in Emacs,
-a window is displayed containing the command's name, its documentation,
-and some instructions on what to do next; then Emacs asks for input
-saying whether to execute the command as requested, enable it and
-execute, or cancel it. If you decide to enable the command, you are
-asked whether to do this permanently or just for the current session.
-Enabling permanently works by automatically editing your `.emacs' file.
-You can use `M-x enable-command' at any time to enable any command
-permanently.
-
- Whether a command is disabled is independent of what key is used to
-invoke it; it also applies if the command is invoked using `M-x'.
-Disabling a command has no effect on calling it as a function from Lisp
-programs.
-
-\1f
-File: xemacs.info, Node: Syntax, Next: Init File, Prev: Key Bindings, Up: Customization
-
-The Syntax Table
-================
-
- All the Emacs commands which parse words or balance parentheses are
-controlled by the "syntax table". The syntax table specifies which
-characters are opening delimiters, which are parts of words, which are
-string quotes, and so on. Actually, each major mode has its own syntax
-table (though sometimes related major modes use the same one) which it
-installs in each buffer that uses that major mode. The syntax table
-installed in the current buffer is the one that all commands use, so we
-call it "the" syntax table. A syntax table is a Lisp object, a vector
-of length 256 whose elements are numbers.
-
-* Menu:
-
-* Entry: Syntax Entry. What the syntax table records for each character.
-* Change: Syntax Change. How to change the information.
-
-\1f
-File: xemacs.info, Node: Syntax Entry, Next: Syntax Change, Up: Syntax
-
-Information About Each Character
---------------------------------
-
- The syntax table entry for a character is a number that encodes six
-pieces of information:
-
- * The syntactic class of the character, represented as a small
- integer
-
- * The matching delimiter, for delimiter characters only (the
- matching delimiter of `(' is `)', and vice versa)
-
- * A flag saying whether the character is the first character of a
- two-character comment starting sequence
-
- * A flag saying whether the character is the second character of a
- two-character comment starting sequence
-
- * A flag saying whether the character is the first character of a
- two-character comment ending sequence
-
- * A flag saying whether the character is the second character of a
- two-character comment ending sequence
-
- The syntactic classes are stored internally as small integers, but
-are usually described to or by the user with characters. For example,
-`(' is used to specify the syntactic class of opening delimiters. Here
-is a table of syntactic classes, with the characters that specify them.
-
-` '
- The class of whitespace characters.
-
-`w'
- The class of word-constituent characters.
-
-`_'
- The class of characters that are part of symbol names but not
- words. This class is represented by `_' because the character `_'
- has this class in both C and Lisp.
-
-`.'
- The class of punctuation characters that do not fit into any other
- special class.
-
-`('
- The class of opening delimiters.
-
-`)'
- The class of closing delimiters.
-
-`''
- The class of expression-adhering characters. These characters are
- part of a symbol if found within or adjacent to one, and are part
- of a following expression if immediately preceding one, but are
- like whitespace if surrounded by whitespace.
-
-`"'
- The class of string-quote characters. They match each other in
- pairs, and the characters within the pair all lose their syntactic
- significance except for the `\' and `/' classes of escape
- characters, which can be used to include a string-quote inside the
- string.
-
-`$'
- The class of self-matching delimiters. This is intended for TeX's
- `$', which is used both to enter and leave math mode. Thus, a
- pair of matching `$' characters surround each piece of math mode
- TeX input. A pair of adjacent `$' characters act like a single
- one for purposes of matching.
-
-`/'
- The class of escape characters that always just deny the following
- character its special syntactic significance. The character after
- one of these escapes is always treated as alphabetic.
-
-`\'
- The class of C-style escape characters. In practice, these are
- treated just like `/'-class characters, because the extra
- possibilities for C escapes (such as being followed by digits)
- have no effect on where the containing expression ends.
-
-`<'
- The class of comment-starting characters. Only single-character
- comment starters (such as `;' in Lisp mode) are represented this
- way.
-
-`>'
- The class of comment-ending characters. Newline has this syntax in
- Lisp mode.
-
- The characters flagged as part of two-character comment delimiters
-can have other syntactic functions most of the time. For example, `/'
-and `*' in C code, when found separately, have nothing to do with
-comments. The comment-delimiter significance overrides when the pair of
-characters occur together in the proper order. Only the list and sexp
-commands use the syntax table to find comments; the commands
-specifically for comments have other variables that tell them where to
-find comments. Moreover, the list and sexp commands notice comments
-only if `parse-sexp-ignore-comments' is non-`nil'. This variable is set
-to `nil' in modes where comment-terminator sequences are liable to
-appear where there is no comment, for example, in Lisp mode where the
-comment terminator is a newline but not every newline ends a comment.
-
-\1f
-File: xemacs.info, Node: Syntax Change, Prev: Syntax Entry, Up: Syntax
-
-Altering Syntax Information
----------------------------
-
- It is possible to alter a character's syntax table entry by storing
-a new number in the appropriate element of the syntax table, but it
-would be hard to determine what number to use. Emacs therefore
-provides a command that allows you to specify the syntactic properties
-of a character in a convenient way.
-
- `M-x modify-syntax-entry' is the command to change a character's
-syntax. It can be used interactively and is also used by major modes
-to initialize their own syntax tables. Its first argument is the
-character to change. The second argument is a string that specifies the
-new syntax. When called from Lisp code, there is a third, optional
-argument, which specifies the syntax table in which to make the change.
-If not supplied, or if this command is called interactively, the third
-argument defaults to the current buffer's syntax table.
-
- 1. The first character in the string specifies the syntactic class.
- It is one of the characters in the previous table (*note Syntax
- Entry::).
-
- 2. The second character is the matching delimiter. For a character
- that is not an opening or closing delimiter, this should be a
- space, and may be omitted if no following characters are needed.
-
- 3. The remaining characters are flags. The flag characters allowed
- are:
-
- `1'
- Flag this character as the first of a two-character comment
- starting sequence.
-
- `2'
- Flag this character as the second of a two-character comment
- starting sequence.
-
- `3'
- Flag this character as the first of a two-character comment
- ending sequence.
-
- `4'
- Flag this character as the second of a two-character comment
- ending sequence.
-
- Use `C-h s' (`describe-syntax') to display a description of the
-contents of the current syntax table. The description of each
-character includes both the string you have to pass to
-`modify-syntax-entry' to set up that character's current syntax, and
-some English to explain that string if necessary.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Disabling, Prev: Rebinding, Up: Key Bindings
+
+Disabling Commands
+------------------
+
+ Disabling a command marks it as requiring confirmation before it can
+be executed. The purpose of disabling a command is to prevent
+beginning users from executing it by accident and being confused.
+
+ The direct mechanism for disabling a command is to have a non-`nil'
+`disabled' property on the Lisp symbol for the command. These
+properties are normally set by the user's `.emacs' file with Lisp
+expressions such as:
+
+ (put 'delete-region 'disabled t)
+
+ If the value of the `disabled' property is a string, that string is
+included in the message printed when the command is used:
+
+ (put 'delete-region 'disabled
+ "Text deleted this way cannot be yanked back!\n")
+
+ You can disable a command either by editing the `.emacs' file
+directly or with the command `M-x disable-command', which edits the
+`.emacs' file for you. *Note Init File::.
+
+ When you attempt to invoke a disabled command interactively in Emacs,
+a window is displayed containing the command's name, its documentation,
+and some instructions on what to do next; then Emacs asks for input
+saying whether to execute the command as requested, enable it and
+execute, or cancel it. If you decide to enable the command, you are
+asked whether to do this permanently or just for the current session.
+Enabling permanently works by automatically editing your `.emacs' file.
+You can use `M-x enable-command' at any time to enable any command
+permanently.
+
+ Whether a command is disabled is independent of what key is used to
+invoke it; it also applies if the command is invoked using `M-x'.
+Disabling a command has no effect on calling it as a function from Lisp
+programs.
+
+\1f
+File: xemacs.info, Node: Syntax, Next: Init File, Prev: Key Bindings, Up: Customization
+
+The Syntax Table
+================
+
+ All the Emacs commands which parse words or balance parentheses are
+controlled by the "syntax table". The syntax table specifies which
+characters are opening delimiters, which are parts of words, which are
+string quotes, and so on. Actually, each major mode has its own syntax
+table (though sometimes related major modes use the same one) which it
+installs in each buffer that uses that major mode. The syntax table
+installed in the current buffer is the one that all commands use, so we
+call it "the" syntax table. A syntax table is a Lisp object, a vector
+of length 256 whose elements are numbers.
+
+* Menu:
+
+* Entry: Syntax Entry. What the syntax table records for each character.
+* Change: Syntax Change. How to change the information.
+
+\1f
+File: xemacs.info, Node: Syntax Entry, Next: Syntax Change, Up: Syntax
+
+Information About Each Character
+--------------------------------
+
+ The syntax table entry for a character is a number that encodes six
+pieces of information:
+
+ * The syntactic class of the character, represented as a small
+ integer
+
+ * The matching delimiter, for delimiter characters only (the
+ matching delimiter of `(' is `)', and vice versa)
+
+ * A flag saying whether the character is the first character of a
+ two-character comment starting sequence
+
+ * A flag saying whether the character is the second character of a
+ two-character comment starting sequence
+
+ * A flag saying whether the character is the first character of a
+ two-character comment ending sequence
+
+ * A flag saying whether the character is the second character of a
+ two-character comment ending sequence
+
+ The syntactic classes are stored internally as small integers, but
+are usually described to or by the user with characters. For example,
+`(' is used to specify the syntactic class of opening delimiters. Here
+is a table of syntactic classes, with the characters that specify them.
+
+` '
+ The class of whitespace characters.
+
+`w'
+ The class of word-constituent characters.
+
+`_'
+ The class of characters that are part of symbol names but not
+ words. This class is represented by `_' because the character `_'
+ has this class in both C and Lisp.
+
+`.'
+ The class of punctuation characters that do not fit into any other
+ special class.
+
+`('
+ The class of opening delimiters.
+
+`)'
+ The class of closing delimiters.
+
+`''
+ The class of expression-adhering characters. These characters are
+ part of a symbol if found within or adjacent to one, and are part
+ of a following expression if immediately preceding one, but are
+ like whitespace if surrounded by whitespace.
+
+`"'
+ The class of string-quote characters. They match each other in
+ pairs, and the characters within the pair all lose their syntactic
+ significance except for the `\' and `/' classes of escape
+ characters, which can be used to include a string-quote inside the
+ string.
+
+`$'
+ The class of self-matching delimiters. This is intended for TeX's
+ `$', which is used both to enter and leave math mode. Thus, a
+ pair of matching `$' characters surround each piece of math mode
+ TeX input. A pair of adjacent `$' characters act like a single
+ one for purposes of matching.
+
+`/'
+ The class of escape characters that always just deny the following
+ character its special syntactic significance. The character after
+ one of these escapes is always treated as alphabetic.
+
+`\'
+ The class of C-style escape characters. In practice, these are
+ treated just like `/'-class characters, because the extra
+ possibilities for C escapes (such as being followed by digits)
+ have no effect on where the containing expression ends.
+
+`<'
+ The class of comment-starting characters. Only single-character
+ comment starters (such as `;' in Lisp mode) are represented this
+ way.
+
+`>'
+ The class of comment-ending characters. Newline has this syntax in
+ Lisp mode.
+
+ The characters flagged as part of two-character comment delimiters
+can have other syntactic functions most of the time. For example, `/'
+and `*' in C code, when found separately, have nothing to do with
+comments. The comment-delimiter significance overrides when the pair of
+characters occur together in the proper order. Only the list and sexp
+commands use the syntax table to find comments; the commands
+specifically for comments have other variables that tell them where to
+find comments. Moreover, the list and sexp commands notice comments
+only if `parse-sexp-ignore-comments' is non-`nil'. This variable is set
+to `nil' in modes where comment-terminator sequences are liable to
+appear where there is no comment, for example, in Lisp mode where the
+comment terminator is a newline but not every newline ends a comment.
+
+\1f
+File: xemacs.info, Node: Syntax Change, Prev: Syntax Entry, Up: Syntax
+
+Altering Syntax Information
+---------------------------
+
+ It is possible to alter a character's syntax table entry by storing
+a new number in the appropriate element of the syntax table, but it
+would be hard to determine what number to use. Emacs therefore
+provides a command that allows you to specify the syntactic properties
+of a character in a convenient way.
+
+ `M-x modify-syntax-entry' is the command to change a character's
+syntax. It can be used interactively and is also used by major modes
+to initialize their own syntax tables. Its first argument is the
+character to change. The second argument is a string that specifies the
+new syntax. When called from Lisp code, there is a third, optional
+argument, which specifies the syntax table in which to make the change.
+If not supplied, or if this command is called interactively, the third
+argument defaults to the current buffer's syntax table.
+
+ 1. The first character in the string specifies the syntactic class.
+ It is one of the characters in the previous table (*note Syntax
+ Entry::).
+
+ 2. The second character is the matching delimiter. For a character
+ that is not an opening or closing delimiter, this should be a
+ space, and may be omitted if no following characters are needed.
+
+ 3. The remaining characters are flags. The flag characters allowed
+ are:
+
+ `1'
+ Flag this character as the first of a two-character comment
+ starting sequence.
+
+ `2'
+ Flag this character as the second of a two-character comment
+ starting sequence.
+
+ `3'
+ Flag this character as the first of a two-character comment
+ ending sequence.
+
+ `4'
+ Flag this character as the second of a two-character comment
+ ending sequence.
+
+ Use `C-h s' (`describe-syntax') to display a description of the
+contents of the current syntax table. The description of each
+character includes both the string you have to pass to
+`modify-syntax-entry' to set up that character's current syntax, and
+some English to explain that string if necessary.
+
+\1f
File: xemacs.info, Node: Init File, Next: Audible Bell, Prev: Syntax, Up: Customization
The Init File, .emacs
appears, the text is still present, but marked off-limits. To make it
visible again, type `C-x n w'. *Note Narrowing::.
-\1f
-File: xemacs.info, Node: Unasked-for Search, Next: Emergency Escape, Prev: Text Garbled, Up: Lossage
-
-Spontaneous Entry to Incremental Search
----------------------------------------
-
- If Emacs spontaneously displays `I-search:' at the bottom of the
-screen, it means that the terminal is sending `C-s' and `C-q' according
-to the poorly designed xon/xoff "flow control" protocol. You should
-try to prevent this by putting the terminal in a mode where it will not
-use flow control, or by giving it enough padding that it will never
-send a `C-s'. If that cannot be done, you must tell Emacs to expect
-flow control to be used, until you can get a properly designed terminal.
-
- Information on how to do these things can be found in the file
-`INSTALL' in the Emacs distribution.
-
-\1f
-File: xemacs.info, Node: Emergency Escape, Next: Total Frustration, Prev: Unasked-for Search, Up: Lossage
-
-Emergency Escape
-----------------
-
- Because at times there have been bugs causing Emacs to loop without
-checking `quit-flag', a special feature causes Emacs to be suspended
-immediately if you type a second `C-g' while the flag is already set,
-so you can always get out of XEmacs. Normally Emacs recognizes and
-clears `quit-flag' (and quits!) quickly enough to prevent this from
-happening.
-
- When you resume Emacs after a suspension caused by multiple `C-g', it
-asks two questions before going back to what it had been doing:
-
- Auto-save? (y or n)
- Abort (and dump core)? (y or n)
-
-Answer each one with `y' or `n' followed by <RET>.
-
- Saying `y' to `Auto-save?' causes immediate auto-saving of all
-modified buffers in which auto-saving is enabled.
-
- Saying `y' to `Abort (and dump core)?' causes an illegal instruction
-to be executed, dumping core. This is to enable a wizard to figure out
-why Emacs was failing to quit in the first place. Execution does not
-continue after a core dump. If you answer `n', execution does
-continue. With luck, Emacs will ultimately check `quit-flag' and quit
-normally. If not, and you type another `C-g', it is suspended again.
-
- If Emacs is not really hung, but is just being slow, you may invoke
-the double `C-g' feature without really meaning to. In that case,
-simply resume and answer `n' to both questions, and you will arrive at
-your former state. Presumably the quit you requested will happen soon.
-
- The double-`C-g' feature may be turned off when Emacs is running
-under a window system, since the window system always enables you to
-kill Emacs or to create another window and run another program.
-
-\1f
-File: xemacs.info, Node: Total Frustration, Prev: Emergency Escape, Up: Lossage
-
-Help for Total Frustration
---------------------------
-
- If using Emacs (or something else) becomes terribly frustrating and
-none of the techniques described above solve the problem, Emacs can
-still help you.
-
- First, if the Emacs you are using is not responding to commands, type
-`C-g C-g' to get out of it and then start a new one.
-
- Second, type `M-x doctor <RET>'.
-
- The doctor will make you feel better. Each time you say something to
-the doctor, you must end it by typing <RET> <RET>. This lets the
-doctor know you are finished.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Unasked-for Search, Next: Emergency Escape, Prev: Text Garbled, Up: Lossage
+
+Spontaneous Entry to Incremental Search
+---------------------------------------
+
+ If Emacs spontaneously displays `I-search:' at the bottom of the
+screen, it means that the terminal is sending `C-s' and `C-q' according
+to the poorly designed xon/xoff "flow control" protocol. You should
+try to prevent this by putting the terminal in a mode where it will not
+use flow control, or by giving it enough padding that it will never
+send a `C-s'. If that cannot be done, you must tell Emacs to expect
+flow control to be used, until you can get a properly designed terminal.
+
+ Information on how to do these things can be found in the file
+`INSTALL' in the Emacs distribution.
+
+\1f
+File: xemacs.info, Node: Emergency Escape, Next: Total Frustration, Prev: Unasked-for Search, Up: Lossage
+
+Emergency Escape
+----------------
+
+ Because at times there have been bugs causing Emacs to loop without
+checking `quit-flag', a special feature causes Emacs to be suspended
+immediately if you type a second `C-g' while the flag is already set,
+so you can always get out of XEmacs. Normally Emacs recognizes and
+clears `quit-flag' (and quits!) quickly enough to prevent this from
+happening.
+
+ When you resume Emacs after a suspension caused by multiple `C-g', it
+asks two questions before going back to what it had been doing:
+
+ Auto-save? (y or n)
+ Abort (and dump core)? (y or n)
+
+Answer each one with `y' or `n' followed by <RET>.
+
+ Saying `y' to `Auto-save?' causes immediate auto-saving of all
+modified buffers in which auto-saving is enabled.
+
+ Saying `y' to `Abort (and dump core)?' causes an illegal instruction
+to be executed, dumping core. This is to enable a wizard to figure out
+why Emacs was failing to quit in the first place. Execution does not
+continue after a core dump. If you answer `n', execution does
+continue. With luck, Emacs will ultimately check `quit-flag' and quit
+normally. If not, and you type another `C-g', it is suspended again.
+
+ If Emacs is not really hung, but is just being slow, you may invoke
+the double `C-g' feature without really meaning to. In that case,
+simply resume and answer `n' to both questions, and you will arrive at
+your former state. Presumably the quit you requested will happen soon.
+
+ The double-`C-g' feature may be turned off when Emacs is running
+under a window system, since the window system always enables you to
+kill Emacs or to create another window and run another program.
+
+\1f
+File: xemacs.info, Node: Total Frustration, Prev: Emergency Escape, Up: Lossage
+
+Help for Total Frustration
+--------------------------
+
+ If using Emacs (or something else) becomes terribly frustrating and
+none of the techniques described above solve the problem, Emacs can
+still help you.
+
+ First, if the Emacs you are using is not responding to commands, type
+`C-g C-g' to get out of it and then start a new one.
+
+ Second, type `M-x doctor <RET>'.
+
+ The doctor will make you feel better. Each time you say something to
+the doctor, you must end it by typing <RET> <RET>. This lets the
+doctor know you are finished.
+
+\1f
File: xemacs.info, Node: Bugs, Prev: Lossage, Up: Top
Reporting Bugs
* C-x DEL <2>: Kill Errors.
* C-x DEL: Killing.
* C-x e: Basic Kbd Macro.
-* C-x ESC: Repetition.
+* C-x ESC ESC: Repetition.
* C-x f: Fill Commands.
* C-x h: Marking Objects.
* C-x k: Kill Buffer.
* C-x n w: Narrowing.
* C-x o: Other Window.
* C-x q: Kbd Macro Query.
+* C-x r +: RegNumbers.
+* C-x r b: Bookmarks.
* C-x r g: RegText.
+* C-x r i: RegText.
* C-x r j: RegPos.
+* C-x r l: Bookmarks.
+* C-x r m: Bookmarks.
+* C-x r n: RegNumbers.
+* C-x r r: RegRect.
* C-x r s: RegText.
* C-x r SPC: RegPos.
+* C-x r w: RegConfig.
* C-x RET: Mule Intro.
* C-x RET c: Specify Coding.
* C-x RET C-\: Select Input Method.
* M-n <1>: Nroff Mode.
* M-n: Repetition.
* M-n (isearch-mode): Incremental Search.
+* M-n (minibuffer history): Minibuffer History.
* M-n (Shell mode): Shell Mode.
* M-p <1>: Nroff Mode.
* M-p: Repetition.
* M-p (isearch-mode): Incremental Search.
+* M-p (minibuffer history): Minibuffer History.
* M-p (Shell mode): Shell Mode.
* M-q: Fill Commands.
* M-r: Basic.
+* M-r (minibuffer history): Minibuffer History.
* M-s: Fill Commands.
+* M-s (minibuffer history): Minibuffer History.
* M-SPC: Killing.
* M-t <1>: Words.
* M-t: Transpose.
* S (Calendar mode): Sunrise/Sunset.
* S-TAB (customization buffer): Changing an Option.
* shift key: Intro to Keystrokes.
-* SPC: Completion.
+* SPC: Completion Commands.
* SPC (Calendar mode): General Calendar.
* SPC (query-replace): Query Replace.
* super key <1>: Super and Hyper Keys.
* TAB <2>: Text Mode.
* TAB <3>: Indentation.
* TAB <4>: Major Modes.
-* TAB <5>: Completion.
+* TAB <5>: Completion Example.
* TAB: String Key Sequences.
* TAB (customization buffer): Changing an Option.
* TAB (Shell mode): Shell Mode.
* beginning-of-defun: Defuns.
* beginning-of-fortran-subprogram: Fortran Motion.
* beginning-of-line: Basic.
+* bookmark-delete: Bookmarks.
+* bookmark-insert: Bookmarks.
+* bookmark-insert-location: Bookmarks.
+* bookmark-jump: Bookmarks.
+* bookmark-load: Bookmarks.
+* bookmark-save: Bookmarks.
+* bookmark-set: Bookmarks.
+* bookmark-write: Bookmarks.
* buffer-menu: Several Buffers.
* byte-compile-and-load-file: Compiling Libraries.
* byte-compile-buffer: Compiling Libraries.
* capitalize-word <1>: Case.
* capitalize-word: Fixing Case.
* center-line: Fill Commands.
+* choose-completion: Completion Commands.
* clear-rectangle: Rectangles.
* comint-delchar-or-maybe-eof: Shell Mode.
* comint-dynamic-complete: Shell Mode.
* conx-save: CONX.
* copy-file: Misc File Ops.
* copy-last-shell-input: Shell Mode.
+* copy-rectangle-to-register: RegRect.
* copy-region-as-kill: Kill Ring.
-* copy-region-to-rectangle: RegRect.
* copy-to-buffer: Accumulating Text.
* copy-to-register: RegText.
* count-lines-page: Pages.
* forward-sexp: Lists.
* forward-text-line: Nroff Mode.
* forward-word: Words.
+* frame-configuration-to-register: RegConfig.
* global-set-key <1>: Programmatic Rebinding.
* global-set-key: Interactive Rebinding.
* goto-char: Basic.
* hide-subtree: Outline Visibility.
* holidays: Holidays.
* include-other-diary-files: Included Diary Files.
+* increment-register: RegNumbers.
* indent-c-exp: Multi-line Indent.
* indent-for-comment: Comments.
* indent-new-comment-line: Comments.
* isearch-ring-retreat: Incremental Search.
* isearch-yank-line: Incremental Search.
* isearch-yank-word: Incremental Search.
-* jump-to-register: Split Window.
+* jump-to-register <1>: Split Window.
+* jump-to-register: RegPos.
* just-one-space: Killing.
* kbd-macro-query: Kbd Macro Query.
* kill-all-abbrevs: Defining Abbrevs.
* lisp-mode: External Lisp.
* lisp-send-defun: External Lisp.
* list-abbrevs: Editing Abbrevs.
+* list-bookmarks: Bookmarks.
* list-buffers: List Buffers.
* list-calendar-holidays: Holidays.
* list-coding-systems: Coding Systems.
* mark-whole-buffer: Marking Objects.
* mark-word <1>: Words.
* mark-word: Marking Objects.
-* minibuffer-complete: Completion.
-* minibuffer-complete-word: Completion.
+* minibuffer-complete: Completion Example.
+* minibuffer-complete-word: Completion Commands.
* modify-syntax-entry: Syntax Change.
+* mouse-choose-completion: Completion Commands.
* mouse-del-char: Additional Mouse Operations.
* mouse-delete-window: Additional Mouse Operations.
* mouse-keep-one-window: Additional Mouse Operations.
* newline-and-indent: Basic Indent.
* next-complex-command: Repetition.
* next-error: Compilation.
+* next-history-element: Minibuffer History.
* next-line: Basic.
+* next-list-mode-item: Completion Commands.
+* next-matching-history-element: Minibuffer History.
* not-modified: Saving.
* nroff-mode: Nroff Mode.
+* number-to-register: RegNumbers.
* occur: Other Repeating Search.
* open-dribble-file: Bugs.
* open-line: Blank Lines.
* prefer-coding-system: Recognize Coding.
* prepend-to-buffer: Accumulating Text.
* previous-complex-command: Repetition.
+* previous-history-element: Minibuffer History.
* previous-line: Basic.
+* previous-list-mode-item: Completion Commands.
+* previous-matching-history-element: Minibuffer History.
* print-buffer: Hardcopy.
* print-diary-entries <1>: Diary Customizing.
* print-diary-entries: Diary Commands.
* recenter: Basic.
* recover-file: Recover.
* redraw-calendar: General Calendar.
-* register-to-point: RegPos.
* relabel-menu-item: Menu Customization.
* remove-directory: File Names.
* rename-buffer: Misc Buffer.
* widget-backward: Changing an Option.
* widget-complete: Changing an Option.
* widget-forward: Changing an Option.
-* window-configuration-to-register: Split Window.
+* window-configuration-to-register <1>: Split Window.
+* window-configuration-to-register: RegConfig.
* word-search-backward: Word Search.
* word-search-forward: Word Search.
* write-abbrev-file: Saving Abbrevs.
* bell-volume: Audible Bell.
* blink-matching-paren: Matching.
* blink-matching-paren-distance: Matching.
+* bookmark-save-flag: Bookmarks.
+* bookmark-search-size: Bookmarks.
* buffer-file-coding-system: Recognize Coding.
* buffer-file-name: Visiting.
* buffer-file-truename: Visiting.
* comment-start-skip: Comments.
* compare-ignore-case: Comparing Files.
* compile-command: Compilation.
-* completion-auto-help: Completion.
-* completion-ignored-extensions: Completion.
+* completion-auto-help: Completion Options.
+* completion-ignored-extensions: Completion Options.
* create-frame-hook: XEmacs under X.
* ctl-arrow: Display Vars.
* ctl-x-map: Keymaps.
* mark-ring: Mark Ring.
* mark-ring-max: Mark Ring.
* meta-flag: Meta Key.
-* minibuffer-confirm-incomplete: Completion.
+* minibuffer-confirm-incomplete <1>: Completion Options.
+* minibuffer-confirm-incomplete: Minibuffer Edit.
* minibuffer-local-completion-map: Keymaps.
* minibuffer-local-map: Keymaps.
* minibuffer-local-must-match-map: Keymaps.
* Menu:
* .mailrc file: Mail Headers.
+* // in file name: Minibuffer File.
* Abbrev mode: Minor Modes.
* abbrevs: Abbrevs.
* aborting: Quitting.
* blank lines: Blank Lines.
* body lines (Outline mode): Outline Format.
* bold font: Face Customization.
+* bookmarks: Bookmarks.
* boredom: Amusements.
* buffer: Frame.
* buffer menu: Several Buffers.
* disabling menu items: Menu Customization.
* Distribution: License.
* doctor: Total Frustration.
+* double slash in file name: Minibuffer File.
* drastic changes: Reverting.
* dribble file: Bugs.
* early package hierarchies: Startup Paths.
* Help menu: Pull-down Menus.
* hierarchies: Startup Paths.
* history of commands: Repetition.
+* history of minibuffer input: Minibuffer History.
* holiday forms: Holiday Customizing.
* holidays: Holidays.
* horizontal scrolling: Horizontal Scrolling.
* minibuffer <1>: Keymaps.
* minibuffer <2>: M-x.
* minibuffer: Minibuffer.
+* minibuffer history: Minibuffer History.
* minor modes: Minor Modes.
* mistakes, correcting <1>: Fixit.
* mistakes, correcting: Undo.
* single-file packages: Package Terminology.
* site-specific directories: Startup Paths.
* Size menu item: Options Menu.
+* slashes repeated in file name: Minibuffer File.
* snapshots and version control: Snapshots.
* sorting: Sorting.
* sorting diary entries: Fancy Diary Display.
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Killing, Next: Yanking, Prev: Additional Mouse Operations, Up: Top
+
+Deletion and Killing
+====================
+
+ Most commands that erase text from the buffer save it. You can get
+the text back if you change your mind, or you can move or copy it to
+other parts of the buffer. Commands which erase text and save it in the
+kill ring are known as "kill" commands. Some other commands erase text
+but do not save it; they are known as "delete" commands. (This
+distinction is made only for erasing text in the buffer.)
+
+ The commands' names and individual descriptions use the words `kill'
+and `delete' to indicate what they do. If you perform a kill or delete
+command by mistake, use the `C-x u' (`undo') command to undo it (*note
+Undo::). The delete commands include `C-d' (`delete-char') and <DEL>
+(`delete-backward-char'), which delete only one character at a time,
+and those commands that delete only spaces or newlines. Commands that
+can destroy significant amounts of nontrivial data usually kill.
+
+Deletion
+--------
+
+`C-d'
+ Delete next character (`delete-char').
+
+`<DEL>'
+ Delete previous character (`delete-backward-char').
+
+`M-\'
+ Delete spaces and tabs around point (`delete-horizontal-space').
+
+`M-<SPC>'
+ Delete spaces and tabs around point, leaving one space
+ (`just-one-space').
+
+`C-x C-o'
+ Delete blank lines around the current line (`delete-blank-lines').
+
+`M-^'
+ Join two lines by deleting the intervening newline, and any
+ indentation following it (`delete-indentation').
+
+ The most basic delete commands are `C-d' (`delete-char') and <DEL>
+(`delete-backward-char'). `C-d' deletes the character after point, the
+one the cursor is "on top of". Point doesn't move. <DEL> deletes the
+character before the cursor, and moves point back. You can delete
+newlines like any other characters in the buffer; deleting a newline
+joins two lines. Actually, `C-d' and <DEL> aren't always delete
+commands; if you give them an argument, they kill instead, since they
+can erase more than one character this way.
+
+ The other delete commands delete only formatting characters: spaces,
+tabs and newlines. `M-\' (`delete-horizontal-space') deletes all
+spaces and tab characters before and after point. `M-<SPC>'
+(`just-one-space') does the same but leaves a single space after point,
+regardless of the number of spaces that existed previously (even zero).
+
+ `C-x C-o' (`delete-blank-lines') deletes all blank lines after the
+current line. If the current line is blank, it deletes all blank lines
+preceding the current line as well as leaving one blank line, the
+current line. `M-^' (`delete-indentation') joins the current line and
+the previous line, or, if given an argument, joins the current line and
+the next line by deleting a newline and all surrounding spaces, possibly
+leaving a single space. *Note M-^: Indentation.
+
+Killing by Lines
+----------------
+
+`C-k'
+ Kill rest of line or one or more lines (`kill-line').
+
+ The simplest kill command is `C-k'. If given at the beginning of a
+line, it kills all the text on the line, leaving the line blank. If
+given on a blank line, the blank line disappears. As a consequence, a
+line disappears completely if you go to the front of a non-blank line
+and type `C-k' twice.
+
+ More generally, `C-k' kills from point up to the end of the line,
+unless it is at the end of a line. In that case, it kills the newline
+following the line, thus merging the next line into the current one.
+Emacs ignores invisible spaces and tabs at the end of the line when
+deciding which case applies: if point appears to be at the end of the
+line, you can be sure the newline will be killed.
+
+ If you give `C-k' a positive argument, it kills that many lines and
+the newlines that follow them (however, text on the current line before
+point is not killed). With a negative argument, `C-k' kills back to a
+number of line beginnings. An argument of -2 means kill back to the
+second line beginning. If point is at the beginning of a line, that
+line beginning doesn't count, so `C-u - 2 C-k' with point at the front
+of a line kills the two previous lines.
+
+ `C-k' with an argument of zero kills all the text before point on the
+current line.
+
+Other Kill Commands
+-------------------
+
+`C-w'
+ Kill region (from point to the mark) (`kill-region'). *Note
+ Words::.
+
+`M-d'
+ Kill word (`kill-word').
+
+`M-<DEL>'
+ Kill word backwards (`backward-kill-word').
+
+`C-x <DEL>'
+ Kill back to beginning of sentence (`backward-kill-sentence').
+ *Note Sentences::.
+
+`M-k'
+ Kill to end of sentence (`kill-sentence').
+
+`C-M-k'
+ Kill sexp (`kill-sexp'). *Note Lists::.
+
+`M-z CHAR'
+ Kill up to next occurrence of CHAR (`zap-to-char').
+
+ `C-w' (`kill-region') is a very general kill command; it kills
+everything between point and the mark. You can use this command to kill
+any contiguous sequence of characters by first setting the mark at one
+end of a sequence of characters, then going to the other end and typing
+`C-w'.
+
+ A convenient way of killing is combined with searching: `M-z'
+(`zap-to-char') reads a character and kills from point up to (but not
+including) the next occurrence of that character in the buffer. If
+there is no next occurrence, killing goes to the end of the buffer. A
+numeric argument acts as a repeat count. A negative argument means to
+search backward and kill text before point.
+
+ Other syntactic units can be killed: words, with `M-<DEL>' and `M-d'
+(*note Words::); sexps, with `C-M-k' (*note Lists::); and sentences,
+with `C-x <DEL>' and `M-k' (*note Sentences::).
+
+\1f
+File: xemacs.info, Node: Yanking, Next: Using X Selections, Prev: Killing, Up: Top
+
+Yanking
+=======
+
+ "Yanking" means getting back text which was killed. Some systems
+call this "pasting". The usual way to move or copy text is to kill it
+and then yank it one or more times.
+
+`C-y'
+ Yank last killed text (`yank').
+
+`M-y'
+ Replace re-inserted killed text with the previously killed text
+ (`yank-pop').
+
+`M-w'
+ Save region as last killed text without actually killing it
+ (`copy-region-as-kill').
+
+`C-M-w'
+ Append next kill to last batch of killed text (`append-next-kill').
+
+* Menu:
+
+* Kill Ring:: Where killed text is stored. Basic yanking.
+* Appending Kills:: Several kills in a row all yank together.
+* Earlier Kills:: Yanking something killed some time ago.
+
+\1f
+File: xemacs.info, Node: Kill Ring, Next: Appending Kills, Prev: Yanking, Up: Yanking
+
+The Kill Ring
+-------------
+
+ All killed text is recorded in the "kill ring", a list of blocks of
+text that have been killed. There is only one kill ring, used in all
+buffers, so you can kill text in one buffer and yank it in another
+buffer. This is the usual way to move text from one file to another.
+(*Note Accumulating Text::, for some other ways.)
+
+ If you have two separate Emacs processes, you cannot use the kill
+ring to move text. If you are using XEmacs under X, however, you can
+use the X selection mechanism to move text from one to another.
+
+ If you are using XEmacs under X and have one Emacs process with
+multiple frames, they do share the same kill ring. You can kill or
+copy text in one Emacs frame, then yank it in the other frame belonging
+to the same process.
+
+ The command `C-y' (`yank') reinserts the text of the most recent
+kill. It leaves the cursor at the end of the text and sets the mark at
+the beginning of the text. *Note Mark::.
+
+ `C-u C-y' yanks the text, leaves the cursor in front of the text,
+and sets the mark after it, if the argument is with just a `C-u'. Any
+other argument, including `C-u' and digits, has different results,
+described below, under "Yanking Earlier Kills".
+
+ To copy a block of text, you can also use `M-w'
+(`copy-region-as-kill'), which copies the region into the kill ring
+without removing it from the buffer. `M-w' is similar to `C-w' followed
+by `C-y' but does not mark the buffer as "modified" and does not
+actually cut anything.
+
+\1f
File: xemacs.info, Node: Appending Kills, Next: Earlier Kills, Prev: Kill Ring, Up: Yanking
Appending Kills
Registers
*********
- Emacs "registers" are places in which you can save text or positions
-for later use. Text saved in a register can be copied into the buffer
-once or many times; a position saved in a register is used by moving
-point to that position. Rectangles can also be copied into and out of
-registers (*note Rectangles::).
+ XEmacs "registers" are places in which you can save text or
+positions for later use. Once you save text or a rectangle in a
+register, you can copy it into the buffer once or many times; a position
+saved in a register is used by moving point to that position.
+Rectangles can also be copied into and out of registers (*note
+Rectangles::).
- Each register has a name, which is a single character. A register
-can store either a piece of text, a position, or a rectangle, but only
-one thing at any given time. Whatever you store in a register remains
-there until you store something else in that register.
-
-* Menu:
-
-* RegPos:: Saving positions in registers.
-* RegText:: Saving text in registers.
-* RegRect:: Saving rectangles in registers.
+ Each register has a name which is a single character. A register can
+store a piece of text, a rectangle, a position, a window configuration,
+or a file name, but only one thing at any given time. Whatever you
+store in a register remains there until you store something else in that
+register. To see what a register R contains, use `M-x view-register'.
`M-x view-register <RET> R'
Display a description of what register R contains.
`M-x view-register' reads a register name as an argument and then
displays the contents of the specified register.
+* Menu:
+
+* Position: RegPos. Saving positions in registers.
+* Text: RegText. Saving text in registers.
+* Rectangle: RegRect. Saving rectangles in registers.
+* Configurations: RegConfig. Saving window configurations in registers.
+* Files: RegFiles. File names in registers.
+* Numbers: RegNumbers. Numbers in registers.
+* Bookmarks:: Bookmarks are like registers, but persistent.
+
\1f
File: xemacs.info, Node: RegPos, Next: RegText, Prev: Registers, Up: Registers
Saving Positions in Registers
=============================
- Saving a position records a spot in a buffer so you can move back
-there later. Moving to a saved position re-selects the buffer and
-moves point to the spot.
+ Saving a position records a place in a buffer so that you can move
+back there later. Moving to a saved position switches to that buffer
+and moves point to that place in it.
-`C-x r SPC R'
- Save the location of point in register R (`point-to-register').
+`C-x r <SPC> R'
+ Save position of point in register R (`point-to-register').
`C-x r j R'
- Jump to the location saved in register R (`register-to-point').
+ Jump to the position saved in register R (`jump-to-register').
- To save the current location of point in a register, choose a name R
-and type `C-x r SPC R'. The register R retains the location thus saved
-until you store something else in that register.
+ To save the current position of point in a register, choose a name R
+and type `C-x r <SPC> R'. The register R retains the position thus
+saved until you store something else in that register.
- The command `C-x r j R' moves point to the location recorded in
+ The command `C-x r j R' moves point to the position recorded in
register R. The register is not affected; it continues to record the
same location. You can jump to the same position using the same
register as often as you want.
+ If you use `C-x r j' to go to a saved position, but the buffer it
+was saved from has been killed, `C-x r j' tries to create the buffer
+again by visiting the same file. Of course, this works only for buffers
+that were visiting files.
+
\1f
File: xemacs.info, Node: RegText, Next: RegRect, Prev: RegPos, Up: Registers
moves the piece of text further down on the ring. It becomes hard to
keep track of the argument needed to retrieve the same text with `C-y'.
An alternative is to store the text in a register with `C-x r s'
-(`copy-to-register') and then retrieve it with `C-x r g'
+(`copy-to-register') and then retrieve it with `C-x r i'
(`insert-register').
`C-x r s R'
Copy region into register R (`copy-to-register').
`C-x r g R'
+`C-x r i R'
Insert text contents of register R (`insert-register').
`C-x r s R' stores a copy of the text of the region into the
-register named R. Given a numeric argument, `C-x r s' deletes the text
-from the buffer as well.
+register named R. Given a numeric argument, `C-x r s R' deletes the
+text from the buffer as well.
- `C-x r g R' inserts the text from register R in the buffer. By
+ `C-x r i R' inserts the text from register R in the buffer. By
default it leaves point before the text and places the mark after it.
-With a numeric argument, it puts point after the text and the mark
-before it.
+With a numeric argument (`C-u'), it puts point after the text and the
+mark before it.
\1f
-File: xemacs.info, Node: RegRect, Prev: RegText, Up: Registers
+File: xemacs.info, Node: RegRect, Next: RegConfig, Prev: RegText, Up: Registers
Saving Rectangles in Registers
==============================
buffer.
`C-x r r R'
- Copy the region-rectangle into register
- R(`copy-rectangle-to-register'). With a numeric argument, delete
- it as well.
+ Copy the region-rectangle into register R
+ (`copy-rectangle-to-register'). With a numeric argument, delete it
+ as well.
`C-x r g R'
+`C-x r i R'
Insert the rectangle stored in register R (if it contains a
rectangle) (`insert-register').
- The `C-x r g' command inserts linear text if the register contains
-that, or inserts a rectangle if the register contains one.
+ The `C-x r i R' command inserts linear text if the register
+contains that, or inserts a rectangle if the register contains one.
+
+ See also the command `sort-columns', which you can think of as
+sorting a rectangle. *Note Sorting::.
+
+\1f
+File: xemacs.info, Node: RegConfig, Next: RegNumbers, Prev: RegRect, Up: Registers
+
+Saving Window Configurations in Registers
+=========================================
+
+ You can save the window configuration of the selected frame in a
+register, or even the configuration of all windows in all frames, and
+restore the configuration later.
+
+`C-x r w R'
+ Save the state of the selected frame's windows in register R
+ (`window-configuration-to-register').
+
+`M-x frame-configuration-to-register <RET> R'
+ Save the state of all frames, including all their windows, in
+ register R (`frame-configuration-to-register').
+
+ Use `C-x r j R' to restore a window or frame configuration. This is
+the same command used to restore a cursor position. When you restore a
+frame configuration, any existing frames not included in the
+configuration become invisible. If you wish to delete these frames
+instead, use `C-u C-x r j R'.
+
+\1f
+File: xemacs.info, Node: RegNumbers, Next: RegFiles, Prev: RegConfig, Up: Registers
+
+Keeping Numbers in Registers
+============================
+
+ There are commands to store a number in a register, to insert the
+number in the buffer in decimal, and to increment it. These commands
+can be useful in keyboard macros (*note Keyboard Macros::).
+
+`C-u NUMBER C-x r n REG'
+ Store NUMBER into register REG (`number-to-register').
+
+`C-u NUMBER C-x r + REG'
+ Increment the number in register REG by NUMBER
+ (`increment-register').
+
+`C-x r g REG'
+ Insert the number from register REG into the buffer.
+
+ `C-x r g' is the same command used to insert any other sort of
+register contents into the buffer.
+
+\1f
+File: xemacs.info, Node: RegFiles, Next: Bookmarks, Prev: RegNumbers, Up: Registers
+
+Keeping File Names in Registers
+===============================
+
+ If you visit certain file names frequently, you can visit them more
+conveniently if you put their names in registers. Here's the Lisp code
+used to put a file name in a register:
+
+ (set-register ?R '(file . NAME))
+
+For example,
+
+ (set-register ?z '(file . "/usr/src/xemacs/src/ChangeLog"))
+
+puts the file name shown in register `z'.
+
+ To visit the file whose name is in register R, type `C-x r j R'.
+(This is the same command used to jump to a position or restore a frame
+configuration.)
+
+\1f
+File: xemacs.info, Node: Bookmarks, Prev: RegFiles, Up: Registers
+
+Bookmarks
+=========
+
+ "Bookmarks" are somewhat like registers in that they record
+positions you can jump to. Unlike registers, they have long names, and
+they persist automatically from one Emacs session to the next. The
+prototypical use of bookmarks is to record "where you were reading" in
+various files.
+
+ Note: bookmark.el is distributed in edit-utils package. You need to
+install that to use bookmark facility (*note Packages::).
+
+`C-x r m <RET>'
+ Set the bookmark for the visited file, at point.
+
+`C-x r m BOOKMARK <RET>'
+ Set the bookmark named BOOKMARK at point (`bookmark-set').
+
+`C-x r b BOOKMARK <RET>'
+ Jump to the bookmark named BOOKMARK (`bookmark-jump').
+
+`C-x r l'
+ List all bookmarks (`list-bookmarks').
+
+`M-x bookmark-save'
+ Save all the current bookmark values in the default bookmark file.
+
+ The prototypical use for bookmarks is to record one current position
+in each of several files. So the command `C-x r m', which sets a
+bookmark, uses the visited file name as the default for the bookmark
+name. If you name each bookmark after the file it points to, then you
+can conveniently revisit any of those files with `C-x r b', and move to
+the position of the bookmark at the same time.
+
+ To display a list of all your bookmarks in a separate buffer, type
+`C-x r l' (`list-bookmarks'). If you switch to that buffer, you can
+use it to edit your bookmark definitions or annotate the bookmarks.
+Type `C-h m' in that buffer for more information about its special
+editing commands.
+
+ When you kill XEmacs, XEmacs offers to save your bookmark values in
+your default bookmark file, `~/.emacs.bmk', if you have changed any
+bookmark values. You can also save the bookmarks at any time with the
+`M-x bookmark-save' command. The bookmark commands load your default
+bookmark file automatically. This saving and loading is how bookmarks
+persist from one XEmacs session to the next.
+
+ If you set the variable `bookmark-save-flag' to 1, then each command
+that sets a bookmark will also save your bookmarks; this way, you don't
+lose any bookmark values even if XEmacs crashes. (The value, if a
+number, says how many bookmark modifications should go by between
+saving.)
+
+ Bookmark position values are saved with surrounding context, so that
+`bookmark-jump' can find the proper position even if the file is
+modified slightly. The variable `bookmark-search-size' says how many
+characters of context to record, on each side of the bookmark's
+position.
+
+ Here are some additional commands for working with bookmarks:
+
+`M-x bookmark-load <RET> FILENAME <RET>'
+ Load a file named FILENAME that contains a list of bookmark
+ values. You can use this command, as well as `bookmark-write', to
+ work with other files of bookmark values in addition to your
+ default bookmark file.
+
+`M-x bookmark-write <RET> FILENAME <RET>'
+ Save all the current bookmark values in the file FILENAME.
+
+`M-x bookmark-delete <RET> BOOKMARK <RET>'
+ Delete the bookmark named BOOKMARK.
+
+`M-x bookmark-insert-location <RET> BOOKMARK <RET>'
+ Insert in the buffer the name of the file that bookmark BOOKMARK
+ points to.
+
+`M-x bookmark-insert <RET> BOOKMARK <RET>'
+ Insert in the buffer the _contents_ of the file that bookmark
+ BOOKMARK points to.
\1f
File: xemacs.info, Node: Display, Next: Search, Prev: Registers, Up: Top
To make everything visible again, type `C-x $' with no argument.
-\1f
-File: xemacs.info, Node: Display Vars, Prev: Selective Display, Up: Display
-
-Variables Controlling Display
-=============================
-
- This section contains information for customization only. Beginning
-users should skip it.
-
- When you reenter XEmacs after suspending, XEmacs normally clears the
-screen and redraws the entire display. On some terminals with more than
-one page of memory, it is possible to arrange the termcap entry so that
-the `ti' and `te' strings (output to the terminal when XEmacs is
-entered and exited, respectively) switch between pages of memory so as
-to use one page for XEmacs and another page for other output. In that
-case, you might want to set the variable `no-redraw-on-reenter' to
-non-`nil' so that XEmacs will assume, when resumed, that the screen
-page it is using still contains what XEmacs last wrote there.
-
- The variable `echo-keystrokes' controls the echoing of
-multi-character keys; its value is the number of seconds of pause
-required to cause echoing to start, or zero, meaning don't echo at all.
-*Note Echo Area::.
-
- If the variable `ctl-arrow' is `nil', control characters in the
-buffer are displayed with octal escape sequences, all except newline and
-tab. If its value is `t', then control characters will be printed with
-an up-arrow, for example `^A'.
-
- If its value is not `t' and not `nil', then characters whose code is
-greater than 160 (that is, the space character (32) with its high bit
-set) will be assumed to be printable, and will be displayed without
-alteration. This is the default when running under X Windows, since
-XEmacs assumes an ISO/8859-1 character set (also known as "Latin1").
-The `ctl-arrow' variable may also be set to an integer, in which case
-all characters whose codes are greater than or equal to that value will
-be assumed to be printable.
-
- Altering the value of `ctl-arrow' makes it local to the current
-buffer; until that time, the default value is in effect. *Note
-Locals::.
-
- Normally, a tab character in the buffer is displayed as whitespace
-which extends to the next display tab stop position, and display tab
-stops come at intervals equal to eight spaces. The number of spaces
-per tab is controlled by the variable `tab-width', which is made local
-by changing it, just like `ctl-arrow'. Note that how the tab character
-in the buffer is displayed has nothing to do with the definition of
-<TAB> as a command.
-
- If you set the variable `selective-display-ellipses' to `nil', the
-three dots at the end of a line that precedes invisible lines do not
-appear. There is no visible indication of the invisible lines. This
-variable becomes local automatically when set.
-
-\1f
-File: xemacs.info, Node: Search, Next: Fixit, Prev: Display, Up: Top
-
-Searching and Replacement
-*************************
-
- Like other editors, Emacs has commands for searching for occurrences
-of a string. The principal search command is unusual in that it is
-"incremental": it begins to search before you have finished typing the
-search string. There are also non-incremental search commands more like
-those of other editors.
-
- Besides the usual `replace-string' command that finds all
-occurrences of one string and replaces them with another, Emacs has a
-fancy replacement command called `query-replace' which asks
-interactively which occurrences to replace.
-
-* Menu:
-
-* Incremental Search:: Search happens as you type the string.
-* Non-Incremental Search:: Specify entire string and then search.
-* Word Search:: Search for sequence of words.
-* Regexp Search:: Search for match for a regexp.
-* Regexps:: Syntax of regular expressions.
-* Search Case:: To ignore case while searching, or not.
-* Replace:: Search, and replace some or all matches.
-* Other Repeating Search:: Operating on all matches for some regexp.
-
-\1f
-File: xemacs.info, Node: Incremental Search, Next: Non-Incremental Search, Prev: Search, Up: Search
-
-Incremental Search
-==================
-
- An incremental search begins searching as soon as you type the first
-character of the search string. As you type in the search string, Emacs
-shows you where the string (as you have typed it so far) is found.
-When you have typed enough characters to identify the place you want,
-you can stop. Depending on what you do next, you may or may not need to
-terminate the search explicitly with a <RET>.
-
-`C-s'
- Incremental search forward (`isearch-forward').
-
-`C-r'
- Incremental search backward (`isearch-backward').
-
- `C-s' starts an incremental search. `C-s' reads characters from the
-keyboard and positions the cursor at the first occurrence of the
-characters that you have typed. If you type `C-s' and then `F', the
-cursor moves right after the first `F'. Type an `O', and see the
-cursor move to after the first `FO'. After another `O', the cursor is
-after the first `FOO' after the place where you started the search.
-Meanwhile, the search string `FOO' has been echoed in the echo area.
-
- The echo area display ends with three dots when actual searching is
-going on. When search is waiting for more input, the three dots are
-removed. (On slow terminals, the three dots are not displayed.)
-
- If you make a mistake in typing the search string, you can erase
-characters with <DEL>. Each <DEL> cancels the last character of the
-search string. This does not happen until Emacs is ready to read
-another input character; first it must either find, or fail to find,
-the character you want to erase. If you do not want to wait for this
-to happen, use `C-g' as described below.
-
- When you are satisfied with the place you have reached, you can type
-<RET> (or <C-m>), which stops searching, leaving the cursor where the
-search brought it. Any command not specially meaningful in searches
-also stops the search and is then executed. Thus, typing `C-a' exits
-the search and then moves to the beginning of the line. <RET> is
-necessary only if the next command you want to type is a printing
-character, <DEL>, <ESC>, or another control character that is special
-within searches (`C-q', `C-w', `C-r', `C-s', or `C-y').
-
- Sometimes you search for `FOO' and find it, but were actually
-looking for a different occurance of it. To move to the next occurrence
-of the search string, type another `C-s'. Do this as often as
-necessary. If you overshoot, you can cancel some `C-s' characters with
-<DEL>.
-
- After you exit a search, you can search for the same string again by
-typing just `C-s C-s': the first `C-s' is the key that invokes
-incremental search, and the second `C-s' means "search again".
-
- If the specified string is not found at all, the echo area displays
-the text `Failing I-Search'. The cursor is after the place where Emacs
-found as much of your string as it could. Thus, if you search for
-`FOOT', and there is no `FOOT', the cursor may be after the `FOO' in
-`FOOL'. At this point there are several things you can do. If you
-mistyped the search string, correct it. If you like the place you have
-found, you can type <RET> or some other Emacs command to "accept what
-the search offered". Or you can type `C-g', which removes from the
-search string the characters that could not be found (the `T' in
-`FOOT'), leaving those that were found (the `FOO' in `FOOT'). A second
-`C-g' at that point cancels the search entirely, returning point to
-where it was when the search started.
-
- If a search is failing and you ask to repeat it by typing another
-`C-s', it starts again from the beginning of the buffer. Repeating a
-failing backward search with `C-r' starts again from the end. This is
-called "wrapping around". `Wrapped' appears in the search prompt once
-this has happened.
-
- The `C-g' "quit" character does special things during searches; just
-what it does depends on the status of the search. If the search has
-found what you specified and is waiting for input, `C-g' cancels the
-entire search. The cursor moves back to where you started the search.
-If `C-g' is typed when there are characters in the search string that
-have not been found--because Emacs is still searching for them, or
-because it has failed to find them--then the search string characters
-which have not been found are discarded from the search string. The
-search is now successful and waiting for more input, so a second `C-g'
-cancels the entire search.
-
- To search for a control character such as `C-s' or <DEL> or <ESC>,
-you must quote it by typing `C-q' first. This function of `C-q' is
-analogous to its meaning as an Emacs command: it causes the following
-character to be treated the way a graphic character would normally be
-treated in the same context.
-
- To search backwards, you can use `C-r' instead of `C-s' to start the
-search; `C-r' is the key that runs the command (`isearch-backward') to
-search backward. You can also use `C-r' to change from searching
-forward to searching backwards. Do this if a search fails because the
-place you started was too far down in the file. Repeated `C-r' keeps
-looking for more occurrences backwards. `C-s' starts going forward
-again. You can cancel `C-r' in a search with <DEL>.
-
- The characters `C-y' and `C-w' can be used in incremental search to
-grab text from the buffer into the search string. This makes it
-convenient to search for another occurrence of text at point. `C-w'
-copies the word after point as part of the search string, advancing
-point over that word. Another `C-s' to repeat the search will then
-search for a string including that word. `C-y' is similar to `C-w' but
-copies the rest of the current line into the search string.
-
- The characters `M-p' and `M-n' can be used in an incremental search
-to recall things which you have searched for in the past. A list of
-the last 16 things you have searched for is retained, and `M-p' and
-`M-n' let you cycle through that ring.
-
- The character `M-<TAB>' does completion on the elements in the
-search history ring. For example, if you know that you have recently
-searched for the string `POTATOE', you could type `C-s P O M-<TAB>'.
-If you had searched for other strings beginning with `PO' then you
-would be shown a list of them, and would need to type more to select
-one.
-
- You can change any of the special characters in incremental search
-via the normal keybinding mechanism: simply add a binding to the
-`isearch-mode-map'. For example, to make the character `C-b' mean
-"search backwards" while in isearch-mode, do this:
-
- (define-key isearch-mode-map "\C-b" 'isearch-repeat-backward)
-
- These are the default bindings of isearch-mode:
-
-`DEL'
- Delete a character from the incremental search string
- (`isearch-delete-char').
-
-`RET'
- Exit incremental search (`isearch-exit').
-
-`C-q'
- Quote special characters for incremental search
- (`isearch-quote-char').
-
-`C-s'
- Repeat incremental search forward (`isearch-repeat-forward').
-
-`C-r'
- Repeat incremental search backward (`isearch-repeat-backward').
-
-`C-y'
- Pull rest of line from buffer into search string
- (`isearch-yank-line').
-
-`C-w'
- Pull next word from buffer into search string
- (`isearch-yank-word').
-
-`C-g'
- Cancels input back to what has been found successfully, or aborts
- the isearch (`isearch-abort').
-
-`M-p'
- Recall the previous element in the isearch history ring
- (`isearch-ring-retreat').
-
-`M-n'
- Recall the next element in the isearch history ring
- (`isearch-ring-advance').
-
-`M-<TAB>'
- Do completion on the elements in the isearch history ring
- (`isearch-complete').
-
- Any other character which is normally inserted into a buffer when
-typed is automatically added to the search string in isearch-mode.
-
-Slow Terminal Incremental Search
---------------------------------
-
- Incremental search on a slow terminal uses a modified style of
-display that is designed to take less time. Instead of redisplaying
-the buffer at each place the search gets to, it creates a new
-single-line window and uses that to display the line the search has
-found. The single-line window appears as soon as point gets outside of
-the text that is already on the screen.
-
- When the search is terminated, the single-line window is removed.
-Only at this time the window in which the search was done is
-redisplayed to show its new value of point.
-
- The three dots at the end of the search string, normally used to
-indicate that searching is going on, are not displayed in slow style
-display.
-
- The slow terminal style of display is used when the terminal baud
-rate is less than or equal to the value of the variable
-`search-slow-speed', initially 1200.
-
- The number of lines to use in slow terminal search display is
-controlled by the variable `search-slow-window-lines'. Its normal
-value is 1.
-
-\1f
-File: xemacs.info, Node: Non-Incremental Search, Next: Word Search, Prev: Incremental Search, Up: Search
-
-Non-Incremental Search
-======================
-
- Emacs also has conventional non-incremental search commands, which
-require you type the entire search string before searching begins.
-
-`C-s <RET> STRING <RET>'
- Search for STRING.
-
-`C-r <RET> STRING <RET>'
- Search backward for STRING.
-
- To do a non-incremental search, first type `C-s <RET>' (or `C-s
-C-m'). This enters the minibuffer to read the search string.
-Terminate the string with <RET> to start the search. If the string is
-not found, the search command gets an error.
-
- By default, `C-s' invokes incremental search, but if you give it an
-empty argument, which would otherwise be useless, it invokes
-non-incremental search. Therefore, `C-s <RET>' invokes non-incremental
-search. `C-r <RET>' also works this way.
-
- Forward and backward non-incremental searches are implemented by the
-commands `search-forward' and `search-backward'. You can bind these
-commands to keys. The reason that incremental search is programmed to
-invoke them as well is that `C-s <RET>' is the traditional sequence of
-characters used in Emacs to invoke non-incremental search.
-
- Non-incremental searches performed using `C-s <RET>' do not call
-`search-forward' right away. They first check if the next character is
-`C-w', which requests a word search. *Note Word Search::.
-
-\1f
-File: xemacs.info, Node: Word Search, Next: Regexp Search, Prev: Non-Incremental Search, Up: Search
-
-Word Search
-===========
-
- Word search looks for a sequence of words without regard to how the
-words are separated. More precisely, you type a string of many words,
-using single spaces to separate them, and the string is found even if
-there are multiple spaces, newlines or other punctuation between the
-words.
-
- Word search is useful in editing documents formatted by text
-formatters. If you edit while looking at the printed, formatted
-version, you can't tell where the line breaks are in the source file.
-Word search, allows you to search without having to know the line
-breaks.
-
-`C-s <RET> C-w WORDS <RET>'
- Search for WORDS, ignoring differences in punctuation.
-
-`C-r <RET> C-w WORDS <RET>'
- Search backward for WORDS, ignoring differences in punctuation.
-
- Word search is a special case of non-incremental search. It is
-invoked with `C-s <RET> C-w' followed by the search string, which must
-always be terminated with another <RET>. Being non-incremental, this
-search does not start until the argument is terminated. It works by
-constructing a regular expression and searching for that. *Note Regexp
-Search::.
-
- You can do a backward word search with `C-r <RET> C-w'.
-
- Forward and backward word searches are implemented by the commands
-`word-search-forward' and `word-search-backward'. You can bind these
-commands to keys. The reason that incremental search is programmed to
-invoke them as well is that `C-s <RET> C-w' is the traditional Emacs
-sequence of keys for word search.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Display Vars, Prev: Selective Display, Up: Display
+
+Variables Controlling Display
+=============================
+
+ This section contains information for customization only. Beginning
+users should skip it.
+
+ When you reenter XEmacs after suspending, XEmacs normally clears the
+screen and redraws the entire display. On some terminals with more than
+one page of memory, it is possible to arrange the termcap entry so that
+the `ti' and `te' strings (output to the terminal when XEmacs is
+entered and exited, respectively) switch between pages of memory so as
+to use one page for XEmacs and another page for other output. In that
+case, you might want to set the variable `no-redraw-on-reenter' to
+non-`nil' so that XEmacs will assume, when resumed, that the screen
+page it is using still contains what XEmacs last wrote there.
+
+ The variable `echo-keystrokes' controls the echoing of
+multi-character keys; its value is the number of seconds of pause
+required to cause echoing to start, or zero, meaning don't echo at all.
+*Note Echo Area::.
+
+ If the variable `ctl-arrow' is `nil', control characters in the
+buffer are displayed with octal escape sequences, all except newline and
+tab. If its value is `t', then control characters will be printed with
+an up-arrow, for example `^A'.
+
+ If its value is not `t' and not `nil', then characters whose code is
+greater than 160 (that is, the space character (32) with its high bit
+set) will be assumed to be printable, and will be displayed without
+alteration. This is the default when running under X Windows, since
+XEmacs assumes an ISO/8859-1 character set (also known as "Latin1").
+The `ctl-arrow' variable may also be set to an integer, in which case
+all characters whose codes are greater than or equal to that value will
+be assumed to be printable.
+
+ Altering the value of `ctl-arrow' makes it local to the current
+buffer; until that time, the default value is in effect. *Note
+Locals::.
+
+ Normally, a tab character in the buffer is displayed as whitespace
+which extends to the next display tab stop position, and display tab
+stops come at intervals equal to eight spaces. The number of spaces
+per tab is controlled by the variable `tab-width', which is made local
+by changing it, just like `ctl-arrow'. Note that how the tab character
+in the buffer is displayed has nothing to do with the definition of
+<TAB> as a command.
+
+ If you set the variable `selective-display-ellipses' to `nil', the
+three dots at the end of a line that precedes invisible lines do not
+appear. There is no visible indication of the invisible lines. This
+variable becomes local automatically when set.
+
+\1f
+File: xemacs.info, Node: Search, Next: Fixit, Prev: Display, Up: Top
+
+Searching and Replacement
+*************************
+
+ Like other editors, Emacs has commands for searching for occurrences
+of a string. The principal search command is unusual in that it is
+"incremental": it begins to search before you have finished typing the
+search string. There are also non-incremental search commands more like
+those of other editors.
+
+ Besides the usual `replace-string' command that finds all
+occurrences of one string and replaces them with another, Emacs has a
+fancy replacement command called `query-replace' which asks
+interactively which occurrences to replace.
+
+* Menu:
+
+* Incremental Search:: Search happens as you type the string.
+* Non-Incremental Search:: Specify entire string and then search.
+* Word Search:: Search for sequence of words.
+* Regexp Search:: Search for match for a regexp.
+* Regexps:: Syntax of regular expressions.
+* Search Case:: To ignore case while searching, or not.
+* Replace:: Search, and replace some or all matches.
+* Other Repeating Search:: Operating on all matches for some regexp.
+
+\1f
+File: xemacs.info, Node: Incremental Search, Next: Non-Incremental Search, Prev: Search, Up: Search
+
+Incremental Search
+==================
+
+ An incremental search begins searching as soon as you type the first
+character of the search string. As you type in the search string, Emacs
+shows you where the string (as you have typed it so far) is found.
+When you have typed enough characters to identify the place you want,
+you can stop. Depending on what you do next, you may or may not need to
+terminate the search explicitly with a <RET>.
+
+`C-s'
+ Incremental search forward (`isearch-forward').
+
+`C-r'
+ Incremental search backward (`isearch-backward').
+
+ `C-s' starts an incremental search. `C-s' reads characters from the
+keyboard and positions the cursor at the first occurrence of the
+characters that you have typed. If you type `C-s' and then `F', the
+cursor moves right after the first `F'. Type an `O', and see the
+cursor move to after the first `FO'. After another `O', the cursor is
+after the first `FOO' after the place where you started the search.
+Meanwhile, the search string `FOO' has been echoed in the echo area.
+
+ The echo area display ends with three dots when actual searching is
+going on. When search is waiting for more input, the three dots are
+removed. (On slow terminals, the three dots are not displayed.)
+
+ If you make a mistake in typing the search string, you can erase
+characters with <DEL>. Each <DEL> cancels the last character of the
+search string. This does not happen until Emacs is ready to read
+another input character; first it must either find, or fail to find,
+the character you want to erase. If you do not want to wait for this
+to happen, use `C-g' as described below.
+
+ When you are satisfied with the place you have reached, you can type
+<RET> (or <C-m>), which stops searching, leaving the cursor where the
+search brought it. Any command not specially meaningful in searches
+also stops the search and is then executed. Thus, typing `C-a' exits
+the search and then moves to the beginning of the line. <RET> is
+necessary only if the next command you want to type is a printing
+character, <DEL>, <ESC>, or another control character that is special
+within searches (`C-q', `C-w', `C-r', `C-s', or `C-y').
+
+ Sometimes you search for `FOO' and find it, but were actually
+looking for a different occurance of it. To move to the next occurrence
+of the search string, type another `C-s'. Do this as often as
+necessary. If you overshoot, you can cancel some `C-s' characters with
+<DEL>.
+
+ After you exit a search, you can search for the same string again by
+typing just `C-s C-s': the first `C-s' is the key that invokes
+incremental search, and the second `C-s' means "search again".
+
+ If the specified string is not found at all, the echo area displays
+the text `Failing I-Search'. The cursor is after the place where Emacs
+found as much of your string as it could. Thus, if you search for
+`FOOT', and there is no `FOOT', the cursor may be after the `FOO' in
+`FOOL'. At this point there are several things you can do. If you
+mistyped the search string, correct it. If you like the place you have
+found, you can type <RET> or some other Emacs command to "accept what
+the search offered". Or you can type `C-g', which removes from the
+search string the characters that could not be found (the `T' in
+`FOOT'), leaving those that were found (the `FOO' in `FOOT'). A second
+`C-g' at that point cancels the search entirely, returning point to
+where it was when the search started.
+
+ If a search is failing and you ask to repeat it by typing another
+`C-s', it starts again from the beginning of the buffer. Repeating a
+failing backward search with `C-r' starts again from the end. This is
+called "wrapping around". `Wrapped' appears in the search prompt once
+this has happened.
+
+ The `C-g' "quit" character does special things during searches; just
+what it does depends on the status of the search. If the search has
+found what you specified and is waiting for input, `C-g' cancels the
+entire search. The cursor moves back to where you started the search.
+If `C-g' is typed when there are characters in the search string that
+have not been found--because Emacs is still searching for them, or
+because it has failed to find them--then the search string characters
+which have not been found are discarded from the search string. The
+search is now successful and waiting for more input, so a second `C-g'
+cancels the entire search.
+
+ To search for a control character such as `C-s' or <DEL> or <ESC>,
+you must quote it by typing `C-q' first. This function of `C-q' is
+analogous to its meaning as an Emacs command: it causes the following
+character to be treated the way a graphic character would normally be
+treated in the same context.
+
+ To search backwards, you can use `C-r' instead of `C-s' to start the
+search; `C-r' is the key that runs the command (`isearch-backward') to
+search backward. You can also use `C-r' to change from searching
+forward to searching backwards. Do this if a search fails because the
+place you started was too far down in the file. Repeated `C-r' keeps
+looking for more occurrences backwards. `C-s' starts going forward
+again. You can cancel `C-r' in a search with <DEL>.
+
+ The characters `C-y' and `C-w' can be used in incremental search to
+grab text from the buffer into the search string. This makes it
+convenient to search for another occurrence of text at point. `C-w'
+copies the word after point as part of the search string, advancing
+point over that word. Another `C-s' to repeat the search will then
+search for a string including that word. `C-y' is similar to `C-w' but
+copies the rest of the current line into the search string.
+
+ The characters `M-p' and `M-n' can be used in an incremental search
+to recall things which you have searched for in the past. A list of
+the last 16 things you have searched for is retained, and `M-p' and
+`M-n' let you cycle through that ring.
+
+ The character `M-<TAB>' does completion on the elements in the
+search history ring. For example, if you know that you have recently
+searched for the string `POTATOE', you could type `C-s P O M-<TAB>'.
+If you had searched for other strings beginning with `PO' then you
+would be shown a list of them, and would need to type more to select
+one.
+
+ You can change any of the special characters in incremental search
+via the normal keybinding mechanism: simply add a binding to the
+`isearch-mode-map'. For example, to make the character `C-b' mean
+"search backwards" while in isearch-mode, do this:
+
+ (define-key isearch-mode-map "\C-b" 'isearch-repeat-backward)
+
+ These are the default bindings of isearch-mode:
+
+`DEL'
+ Delete a character from the incremental search string
+ (`isearch-delete-char').
+
+`RET'
+ Exit incremental search (`isearch-exit').
+
+`C-q'
+ Quote special characters for incremental search
+ (`isearch-quote-char').
+
+`C-s'
+ Repeat incremental search forward (`isearch-repeat-forward').
+
+`C-r'
+ Repeat incremental search backward (`isearch-repeat-backward').
+
+`C-y'
+ Pull rest of line from buffer into search string
+ (`isearch-yank-line').
+
+`C-w'
+ Pull next word from buffer into search string
+ (`isearch-yank-word').
+
+`C-g'
+ Cancels input back to what has been found successfully, or aborts
+ the isearch (`isearch-abort').
+
+`M-p'
+ Recall the previous element in the isearch history ring
+ (`isearch-ring-retreat').
+
+`M-n'
+ Recall the next element in the isearch history ring
+ (`isearch-ring-advance').
+
+`M-<TAB>'
+ Do completion on the elements in the isearch history ring
+ (`isearch-complete').
+
+ Any other character which is normally inserted into a buffer when
+typed is automatically added to the search string in isearch-mode.
+
+Slow Terminal Incremental Search
+--------------------------------
+
+ Incremental search on a slow terminal uses a modified style of
+display that is designed to take less time. Instead of redisplaying
+the buffer at each place the search gets to, it creates a new
+single-line window and uses that to display the line the search has
+found. The single-line window appears as soon as point gets outside of
+the text that is already on the screen.
+
+ When the search is terminated, the single-line window is removed.
+Only at this time the window in which the search was done is
+redisplayed to show its new value of point.
+
+ The three dots at the end of the search string, normally used to
+indicate that searching is going on, are not displayed in slow style
+display.
+
+ The slow terminal style of display is used when the terminal baud
+rate is less than or equal to the value of the variable
+`search-slow-speed', initially 1200.
+
+ The number of lines to use in slow terminal search display is
+controlled by the variable `search-slow-window-lines'. Its normal
+value is 1.
+
+\1f
+File: xemacs.info, Node: Non-Incremental Search, Next: Word Search, Prev: Incremental Search, Up: Search
+
+Non-Incremental Search
+======================
+
+ Emacs also has conventional non-incremental search commands, which
+require you type the entire search string before searching begins.
+
+`C-s <RET> STRING <RET>'
+ Search for STRING.
+
+`C-r <RET> STRING <RET>'
+ Search backward for STRING.
+
+ To do a non-incremental search, first type `C-s <RET>' (or `C-s
+C-m'). This enters the minibuffer to read the search string.
+Terminate the string with <RET> to start the search. If the string is
+not found, the search command gets an error.
+
+ By default, `C-s' invokes incremental search, but if you give it an
+empty argument, which would otherwise be useless, it invokes
+non-incremental search. Therefore, `C-s <RET>' invokes non-incremental
+search. `C-r <RET>' also works this way.
+
+ Forward and backward non-incremental searches are implemented by the
+commands `search-forward' and `search-backward'. You can bind these
+commands to keys. The reason that incremental search is programmed to
+invoke them as well is that `C-s <RET>' is the traditional sequence of
+characters used in Emacs to invoke non-incremental search.
+
+ Non-incremental searches performed using `C-s <RET>' do not call
+`search-forward' right away. They first check if the next character is
+`C-w', which requests a word search. *Note Word Search::.
+
+\1f
+File: xemacs.info, Node: Word Search, Next: Regexp Search, Prev: Non-Incremental Search, Up: Search
+
+Word Search
+===========
+
+ Word search looks for a sequence of words without regard to how the
+words are separated. More precisely, you type a string of many words,
+using single spaces to separate them, and the string is found even if
+there are multiple spaces, newlines or other punctuation between the
+words.
+
+ Word search is useful in editing documents formatted by text
+formatters. If you edit while looking at the printed, formatted
+version, you can't tell where the line breaks are in the source file.
+Word search, allows you to search without having to know the line
+breaks.
+
+`C-s <RET> C-w WORDS <RET>'
+ Search for WORDS, ignoring differences in punctuation.
+
+`C-r <RET> C-w WORDS <RET>'
+ Search backward for WORDS, ignoring differences in punctuation.
+
+ Word search is a special case of non-incremental search. It is
+invoked with `C-s <RET> C-w' followed by the search string, which must
+always be terminated with another <RET>. Being non-incremental, this
+search does not start until the argument is terminated. It works by
+constructing a regular expression and searching for that. *Note Regexp
+Search::.
+
+ You can do a backward word search with `C-r <RET> C-w'.
+
+ Forward and backward word searches are implemented by the commands
+`word-search-forward' and `word-search-backward'. You can bind these
+commands to keys. The reason that incremental search is programmed to
+invoke them as well is that `C-s <RET> C-w' is the traditional Emacs
+sequence of keys for word search.
+
+\1f
File: xemacs.info, Node: Regexp Search, Next: Regexps, Prev: Word Search, Up: Search
Regular Expression Search
substitution is called `substitute-in-file-name'. The substitution is
performed only on filenames read as such using the minibuffer.
-\1f
-File: xemacs.info, Node: Visiting, Next: Saving, Prev: File Names, Up: Files
-
-Visiting Files
-==============
-
-`C-x C-f'
- Visit a file (`find-file').
-
-`C-x C-v'
- Visit a different file instead of the one visited last
- (`find-alternate-file').
-
-`C-x 4 C-f'
- Visit a file, in another window (`find-file-other-window'). Don't
- change this window.
-
-`C-x 5 C-f'
- Visit a file, in another frame (`find-file-other-frame'). Don't
- change this window or frame.
-
- "Visiting" a file means copying its contents into an Emacs buffer so
-you can edit it. Emacs creates a new buffer for each file you visit.
-We say that the buffer is visiting the file that it was created to
-hold. Emacs constructs the buffer name from the file name by throwing
-away the directory and keeping just the file name. For example, a file
-named `/usr/rms/emacs.tex' is displayed in a buffer named `emacs.tex'.
-If a buffer with that name exists, a unique name is constructed by
-appending `<2>', `<3>',and so on, using the lowest number that makes a
-name that is not already in use.
-
- Each window's mode line shows the name of the buffer that is being
-displayed in that window, so you can always tell what buffer you are
-editing.
-
- The changes you make with Emacs are made in the Emacs buffer. They
-do not take effect in the file that you visit, or any other permanent
-place, until you "save" the buffer. Saving the buffer means that Emacs
-writes the current contents of the buffer into its visited file. *Note
-Saving::.
-
- If a buffer contains changes that have not been saved, the buffer is
-said to be "modified". This is important because it implies that some
-changes will be lost if the buffer is not saved. The mode line displays
-two stars near the left margin if the buffer is modified.
-
- To visit a file, use the command `C-x C-f' (`find-file'). Follow
-the command with the name of the file you wish to visit, terminated by a
-<RET>. If you are using XEmacs under X, you can also use the Open...
-command from the File menu bar item.
-
- The file name is read using the minibuffer (*note Minibuffer::), with
-defaulting and completion in the standard manner (*note File Names::).
-While in the minibuffer, you can abort `C-x C-f' by typing `C-g'.
-
- `C-x C-f' has completed successfully when text appears on the screen
-and a new buffer name appears in the mode line. If the specified file
-does not exist and could not be created or cannot be read, an error
-results. The error message is printed in the echo area, and includes
-the name of the file that Emacs was trying to visit.
-
- If you visit a file that is already in Emacs, `C-x C-f' does not make
-another copy. It selects the existing buffer containing that file.
-However, before doing so, it checks that the file itself has not changed
-since you visited or saved it last. If the file has changed, Emacs
-prints a warning message. *Note Simultaneous Editing: Interlocking.
-
- You can switch to a specific file called out in the current buffer by
-calling the function `find-this-file'. By providing a prefix argument,
-this function calls `filename-at-point' and switches to a buffer
-visiting the file FILENAME. It creates one if none already exists. You
-can use this function to edit the file mentioned in the buffer you are
-working in or to test if the file exists. You can do that by using the
-minibuffer completion after snatching the all or part of the filename.
-
- If the variable `find-file-use-truenames''s value is non-`nil', a
-buffer's visited filename will always be traced back to the real file.
-The filename will never be a symbolic link, and there will never be a
-symbolic link anywhere in its directory path. In other words, the
-`buffer-file-name' and `buffer-file-truename' will be equal.
-
- If the variable `find-file-compare-truenames' value is non-`nil',
-the `find-file' command will check the `buffer-file-truename' of all
-visited files when deciding whether a given file is already in a
-buffer, instead of just `buffer-file-name'. If you attempt to visit
-another file which is a hard-link or symbolic-link to a file that is
-already in a buffer, the existing buffer will be found instead of a
-newly created one.
-
- If you want to create a file, just visit it. Emacs prints `(New
-File)' in the echo area, but in other respects behaves as if you had
-visited an existing empty file. If you make any changes and save them,
-the file is created.
-
- If you visit a nonexistent file unintentionally (because you typed
-the wrong file name), use the `C-x C-v' (`find-alternate-file') command
-to visit the file you wanted. `C-x C-v' is similar to `C-x C-f', but
-it kills the current buffer (after first offering to save it if it is
-modified). `C-x C-v' is allowed even if the current buffer is not
-visiting a file.
-
- If the file you specify is actually a directory, Dired is called on
-that directory (*note Dired::). To inhibit this, set the variable
-`find-file-run-dired' to `nil'; then it is an error to try to visit a
-directory.
-
- `C-x 4 f' (`find-file-other-window') is like `C-x C-f' except that
-the buffer containing the specified file is selected in another window.
-The window that was selected before `C-x 4 f' continues to show the
-same buffer it was already showing. If you use this command when only
-one window is being displayed, that window is split in two, with one
-window showing the same buffer as before, and the other one showing the
-newly requested file. *Note Windows::.
-
- `C-x 5 C-f' (`find-file-other-frame') is like `C-x C-f' except that
-it creates a new frame in which the file is displayed.
-
- Use the function `find-this-file-other-window' to edit a file
-mentioned in the buffer you are editing or to test if that file exists.
-To do this, use the minibuffer completion after snatching the part or
-all of the filename. By providing a prefix argument, the function calls
-`filename-at-point' and switches you to a buffer visiting the file
-FILENAME in another window. The function creates a buffer if none
-already exists. This function is similar to `find-file-other-window'.
-
- There are two hook variables that allow extensions to modify the
-operation of visiting files. Visiting a file that does not exist runs
-the functions in the list `find-file-not-found-hooks'; the value of this
-variable is expected to be a list of functions which are called one by
-one until one of them returns non-`nil'. Any visiting of a file,
-whether extant or not, expects `find-file-hooks' to contain list of
-functions and calls them all, one by one. In both cases the functions
-receive no arguments. Visiting a nonexistent file runs the
-`find-file-not-found-hooks' first.
-
-\1f
-File: xemacs.info, Node: Saving, Next: Reverting, Prev: Visiting, Up: Files
-
-Saving Files
-============
-
- "Saving" a buffer in Emacs means writing its contents back into the
-file that was visited in the buffer.
-
-`C-x C-s'
- Save the current buffer in its visited file (`save-buffer').
-
-`C-x s'
- Save any or all buffers in their visited files
- (`save-some-buffers').
-
-`M-~'
- Forget that the current buffer has been changed (`not-modified').
-
-`C-x C-w'
- Save the current buffer in a specified file, and record that file
- as the one visited in the buffer (`write-file').
-
-`M-x set-visited-file-name'
- Change file the name under which the current buffer will be saved.
-
- To save a file and make your changes permanent, type `C-x C-s'
-(`save-buffer'). After saving is finished, `C-x C-s' prints a message
-such as:
-
- Wrote /u/rms/gnu/gnu.tasks
-
-If the selected buffer is not modified (no changes have been made in it
-since the buffer was created or last saved), Emacs does not save it
-because it would have no effect. Instead, `C-x C-s' prints a message
-in the echo area saying:
-
- (No changes need to be saved)
-
- The command `C-x s' (`save-some-buffers') can save any or all
-modified buffers. First it asks, for each modified buffer, whether to
-save it. The questions should be answered with `y' or `n'. `C-x C-c',
-the key that kills Emacs, invokes `save-some-buffers' and therefore
-asks the same questions.
-
- If you have changed a buffer and do not want the changes to be saved,
-you should take some action to prevent it. Otherwise, you are liable to
-save it by mistake each time you use `save-some-buffers' or a related
-command. One thing you can do is type `M-~' (`not-modified'), which
-removes the indication that the buffer is modified. If you do this,
-none of the save commands will believe that the buffer needs to be
-saved. (`~' is often used as a mathematical symbol for `not'; thus
-`Meta-~' is `not', metafied.) You could also use
-`set-visited-file-name' (see below) to mark the buffer as visiting a
-different file name, not in use for anything important.
-
- You can also undo all the changes made since the file was visited or
-saved, by reading the text from the file again. This is called
-"reverting". *Note Reverting::. Alternatively, you can undo all the
-changes by repeating the undo command `C-x u'; but this only works if
-you have not made more changes than the undo mechanism can remember.
-
- `M-x set-visited-file-name' alters the name of the file that the
-current buffer is visiting. It prompts you for the new file name in the
-minibuffer. You can also use `set-visited-file-name' on a buffer that
-is not visiting a file. The buffer's name is changed to correspond to
-the file it is now visiting unless the new name is already used by a
-different buffer; in that case, the buffer name is not changed.
-`set-visited-file-name' does not save the buffer in the newly visited
-file; it just alters the records inside Emacs so that it will save the
-buffer in that file. It also marks the buffer as "modified" so that
-`C-x C-s' will save.
-
- If you wish to mark a buffer as visiting a different file and save it
-right away, use `C-x C-w' (`write-file'). It is precisely equivalent
-to `set-visited-file-name' followed by `C-x C-s'. `C-x C-s' used on a
-buffer that is not visiting a file has the same effect as `C-x C-w';
-that is, it reads a file name, marks the buffer as visiting that file,
-and saves it there. The default file name in a buffer that is not
-visiting a file is made by combining the buffer name with the buffer's
-default directory.
-
- If Emacs is about to save a file and sees that the date of the latest
-version on disk does not match what Emacs last read or wrote, Emacs
-notifies you of this fact, because it probably indicates a problem
-caused by simultaneous editing and requires your immediate attention.
-*Note Simultaneous Editing: Interlocking.
-
- If the variable `require-final-newline' is non-`nil', Emacs puts a
-newline at the end of any file that doesn't already end in one, every
-time a file is saved or written.
-
- Use the hook variable `write-file-hooks' to implement other ways to
-write files, and specify things to be done before files are written.
-The value of this variable should be a list of Lisp functions. When a
-file is to be written, the functions in the list are called, one by
-one, with no arguments. If one of them returns a non-`nil' value, Emacs
-takes this to mean that the file has been written in some suitable
-fashion; the rest of the functions are not called, and normal writing is
-not done. Use the hook variable `after-save-hook' to list all the
-functions to be called after writing out a buffer to a file.
-
-* Menu:
-
-* Backup:: How Emacs saves the old version of your file.
-* Interlocking:: How Emacs protects against simultaneous editing
- of one file by two users.
-
-\1f
-File: xemacs.info, Node: Backup, Next: Interlocking, Prev: Saving, Up: Saving
-
-Backup Files
-------------
-
- Because Unix does not provide version numbers in file names,
-rewriting a file in Unix automatically destroys all record of what the
-file used to contain. Thus, saving a file from Emacs throws away the
-old contents of the file--or it would, except that Emacs carefully
-copies the old contents to another file, called the "backup" file,
-before actually saving. (Make sure that the variable
-`make-backup-files' is non-`nil'. Backup files are not written if this
-variable is `nil').
-
- At your option, Emacs can keep either a single backup file or a
-series of numbered backup files for each file you edit.
-
- Emacs makes a backup for a file only the first time a file is saved
-from one buffer. No matter how many times you save a file, its backup
-file continues to contain the contents from before the file was visited.
-Normally this means that the backup file contains the contents from
-before the current editing session; however, if you kill the buffer and
-then visit the file again, a new backup file is made by the next save.
-
-* Menu:
-
-* Names: Backup Names. How backup files are named;
- Choosing single or numbered backup files.
-* Deletion: Backup Deletion. Emacs deletes excess numbered backups.
-* Copying: Backup Copying. Backups can be made by copying or renaming.
-
-\1f
-File: xemacs.info, Node: Backup Names, Next: Backup Deletion, Prev: Backup, Up: Backup
-
-Single or Numbered Backups
-..........................
-
- If you choose to have a single backup file (the default), the backup
-file's name is constructed by appending `~' to the file name being
-edited; thus, the backup file for `eval.c' is `eval.c~'.
-
- If you choose to have a series of numbered backup files, backup file
-names are made by appending `.~', the number, and another `~' to the
-original file name. Thus, the backup files of `eval.c' would be called
-`eval.c.~1~', `eval.c.~2~', and so on, through names like
-`eval.c.~259~' and beyond.
-
- If protection stops you from writing backup files under the usual
-names, the backup file is written as `%backup%~' in your home directory.
-Only one such file can exist, so only the most recently made backup is
-available.
-
- The choice of single backup or numbered backups is controlled by the
-variable `version-control'. Its possible values are:
-
-`t'
- Make numbered backups.
-
-`nil'
- Make numbered backups for files that have numbered backups already.
- Otherwise, make single backups.
-
-`never'
- Never make numbered backups; always make single backups.
-
-`version-control' may be set locally in an individual buffer to control
-the making of backups for that buffer's file. For example, Rmail mode
-locally sets `version-control' to `never' to make sure that there is
-only one backup for an Rmail file. *Note Locals::.
-
-\1f
-File: xemacs.info, Node: Backup Deletion, Next: Backup Copying, Prev: Backup Names, Up: Backup
-
-Automatic Deletion of Backups
-.............................
-
- To prevent unlimited consumption of disk space, Emacs can delete
-numbered backup versions automatically. Generally Emacs keeps the
-first few backups and the latest few backups, deleting any in between.
-This happens every time a new backup is made. The two variables that
-control the deletion are `kept-old-versions' and `kept-new-versions'.
-Their values are, respectively the number of oldest (lowest-numbered)
-backups to keep and the number of newest (highest-numbered) ones to
-keep, each time a new backup is made. The values are used just after a
-new backup version is made; that newly made backup is included in the
-count in `kept-new-versions'. By default, both variables are 2.
-
- If `trim-versions-without-asking' is non-`nil', excess middle
-versions are deleted without notification. If it is `nil', the
-default, you are asked whether the excess middle versions should really
-be deleted.
-
- You can also use Dired's `.' (Period) command to delete old versions.
-*Note Dired::.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Visiting, Next: Saving, Prev: File Names, Up: Files
+
+Visiting Files
+==============
+
+`C-x C-f'
+ Visit a file (`find-file').
+
+`C-x C-v'
+ Visit a different file instead of the one visited last
+ (`find-alternate-file').
+
+`C-x 4 C-f'
+ Visit a file, in another window (`find-file-other-window'). Don't
+ change this window.
+
+`C-x 5 C-f'
+ Visit a file, in another frame (`find-file-other-frame'). Don't
+ change this window or frame.
+
+ "Visiting" a file means copying its contents into an Emacs buffer so
+you can edit it. Emacs creates a new buffer for each file you visit.
+We say that the buffer is visiting the file that it was created to
+hold. Emacs constructs the buffer name from the file name by throwing
+away the directory and keeping just the file name. For example, a file
+named `/usr/rms/emacs.tex' is displayed in a buffer named `emacs.tex'.
+If a buffer with that name exists, a unique name is constructed by
+appending `<2>', `<3>',and so on, using the lowest number that makes a
+name that is not already in use.
+
+ Each window's mode line shows the name of the buffer that is being
+displayed in that window, so you can always tell what buffer you are
+editing.
+
+ The changes you make with Emacs are made in the Emacs buffer. They
+do not take effect in the file that you visit, or any other permanent
+place, until you "save" the buffer. Saving the buffer means that Emacs
+writes the current contents of the buffer into its visited file. *Note
+Saving::.
+
+ If a buffer contains changes that have not been saved, the buffer is
+said to be "modified". This is important because it implies that some
+changes will be lost if the buffer is not saved. The mode line displays
+two stars near the left margin if the buffer is modified.
+
+ To visit a file, use the command `C-x C-f' (`find-file'). Follow
+the command with the name of the file you wish to visit, terminated by a
+<RET>. If you are using XEmacs under X, you can also use the Open...
+command from the File menu bar item.
+
+ The file name is read using the minibuffer (*note Minibuffer::), with
+defaulting and completion in the standard manner (*note File Names::).
+While in the minibuffer, you can abort `C-x C-f' by typing `C-g'.
+
+ `C-x C-f' has completed successfully when text appears on the screen
+and a new buffer name appears in the mode line. If the specified file
+does not exist and could not be created or cannot be read, an error
+results. The error message is printed in the echo area, and includes
+the name of the file that Emacs was trying to visit.
+
+ If you visit a file that is already in Emacs, `C-x C-f' does not make
+another copy. It selects the existing buffer containing that file.
+However, before doing so, it checks that the file itself has not changed
+since you visited or saved it last. If the file has changed, Emacs
+prints a warning message. *Note Simultaneous Editing: Interlocking.
+
+ You can switch to a specific file called out in the current buffer by
+calling the function `find-this-file'. By providing a prefix argument,
+this function calls `filename-at-point' and switches to a buffer
+visiting the file FILENAME. It creates one if none already exists. You
+can use this function to edit the file mentioned in the buffer you are
+working in or to test if the file exists. You can do that by using the
+minibuffer completion after snatching the all or part of the filename.
+
+ If the variable `find-file-use-truenames''s value is non-`nil', a
+buffer's visited filename will always be traced back to the real file.
+The filename will never be a symbolic link, and there will never be a
+symbolic link anywhere in its directory path. In other words, the
+`buffer-file-name' and `buffer-file-truename' will be equal.
+
+ If the variable `find-file-compare-truenames' value is non-`nil',
+the `find-file' command will check the `buffer-file-truename' of all
+visited files when deciding whether a given file is already in a
+buffer, instead of just `buffer-file-name'. If you attempt to visit
+another file which is a hard-link or symbolic-link to a file that is
+already in a buffer, the existing buffer will be found instead of a
+newly created one.
+
+ If you want to create a file, just visit it. Emacs prints `(New
+File)' in the echo area, but in other respects behaves as if you had
+visited an existing empty file. If you make any changes and save them,
+the file is created.
+
+ If you visit a nonexistent file unintentionally (because you typed
+the wrong file name), use the `C-x C-v' (`find-alternate-file') command
+to visit the file you wanted. `C-x C-v' is similar to `C-x C-f', but
+it kills the current buffer (after first offering to save it if it is
+modified). `C-x C-v' is allowed even if the current buffer is not
+visiting a file.
+
+ If the file you specify is actually a directory, Dired is called on
+that directory (*note Dired::). To inhibit this, set the variable
+`find-file-run-dired' to `nil'; then it is an error to try to visit a
+directory.
+
+ `C-x 4 f' (`find-file-other-window') is like `C-x C-f' except that
+the buffer containing the specified file is selected in another window.
+The window that was selected before `C-x 4 f' continues to show the
+same buffer it was already showing. If you use this command when only
+one window is being displayed, that window is split in two, with one
+window showing the same buffer as before, and the other one showing the
+newly requested file. *Note Windows::.
+
+ `C-x 5 C-f' (`find-file-other-frame') is like `C-x C-f' except that
+it creates a new frame in which the file is displayed.
+
+ Use the function `find-this-file-other-window' to edit a file
+mentioned in the buffer you are editing or to test if that file exists.
+To do this, use the minibuffer completion after snatching the part or
+all of the filename. By providing a prefix argument, the function calls
+`filename-at-point' and switches you to a buffer visiting the file
+FILENAME in another window. The function creates a buffer if none
+already exists. This function is similar to `find-file-other-window'.
+
+ There are two hook variables that allow extensions to modify the
+operation of visiting files. Visiting a file that does not exist runs
+the functions in the list `find-file-not-found-hooks'; the value of this
+variable is expected to be a list of functions which are called one by
+one until one of them returns non-`nil'. Any visiting of a file,
+whether extant or not, expects `find-file-hooks' to contain list of
+functions and calls them all, one by one. In both cases the functions
+receive no arguments. Visiting a nonexistent file runs the
+`find-file-not-found-hooks' first.
+
+\1f
+File: xemacs.info, Node: Saving, Next: Reverting, Prev: Visiting, Up: Files
+
+Saving Files
+============
+
+ "Saving" a buffer in Emacs means writing its contents back into the
+file that was visited in the buffer.
+
+`C-x C-s'
+ Save the current buffer in its visited file (`save-buffer').
+
+`C-x s'
+ Save any or all buffers in their visited files
+ (`save-some-buffers').
+
+`M-~'
+ Forget that the current buffer has been changed (`not-modified').
+
+`C-x C-w'
+ Save the current buffer in a specified file, and record that file
+ as the one visited in the buffer (`write-file').
+
+`M-x set-visited-file-name'
+ Change file the name under which the current buffer will be saved.
+
+ To save a file and make your changes permanent, type `C-x C-s'
+(`save-buffer'). After saving is finished, `C-x C-s' prints a message
+such as:
+
+ Wrote /u/rms/gnu/gnu.tasks
+
+If the selected buffer is not modified (no changes have been made in it
+since the buffer was created or last saved), Emacs does not save it
+because it would have no effect. Instead, `C-x C-s' prints a message
+in the echo area saying:
+
+ (No changes need to be saved)
+
+ The command `C-x s' (`save-some-buffers') can save any or all
+modified buffers. First it asks, for each modified buffer, whether to
+save it. The questions should be answered with `y' or `n'. `C-x C-c',
+the key that kills Emacs, invokes `save-some-buffers' and therefore
+asks the same questions.
+
+ If you have changed a buffer and do not want the changes to be saved,
+you should take some action to prevent it. Otherwise, you are liable to
+save it by mistake each time you use `save-some-buffers' or a related
+command. One thing you can do is type `M-~' (`not-modified'), which
+removes the indication that the buffer is modified. If you do this,
+none of the save commands will believe that the buffer needs to be
+saved. (`~' is often used as a mathematical symbol for `not'; thus
+`Meta-~' is `not', metafied.) You could also use
+`set-visited-file-name' (see below) to mark the buffer as visiting a
+different file name, not in use for anything important.
+
+ You can also undo all the changes made since the file was visited or
+saved, by reading the text from the file again. This is called
+"reverting". *Note Reverting::. Alternatively, you can undo all the
+changes by repeating the undo command `C-x u'; but this only works if
+you have not made more changes than the undo mechanism can remember.
+
+ `M-x set-visited-file-name' alters the name of the file that the
+current buffer is visiting. It prompts you for the new file name in the
+minibuffer. You can also use `set-visited-file-name' on a buffer that
+is not visiting a file. The buffer's name is changed to correspond to
+the file it is now visiting unless the new name is already used by a
+different buffer; in that case, the buffer name is not changed.
+`set-visited-file-name' does not save the buffer in the newly visited
+file; it just alters the records inside Emacs so that it will save the
+buffer in that file. It also marks the buffer as "modified" so that
+`C-x C-s' will save.
+
+ If you wish to mark a buffer as visiting a different file and save it
+right away, use `C-x C-w' (`write-file'). It is precisely equivalent
+to `set-visited-file-name' followed by `C-x C-s'. `C-x C-s' used on a
+buffer that is not visiting a file has the same effect as `C-x C-w';
+that is, it reads a file name, marks the buffer as visiting that file,
+and saves it there. The default file name in a buffer that is not
+visiting a file is made by combining the buffer name with the buffer's
+default directory.
+
+ If Emacs is about to save a file and sees that the date of the latest
+version on disk does not match what Emacs last read or wrote, Emacs
+notifies you of this fact, because it probably indicates a problem
+caused by simultaneous editing and requires your immediate attention.
+*Note Simultaneous Editing: Interlocking.
+
+ If the variable `require-final-newline' is non-`nil', Emacs puts a
+newline at the end of any file that doesn't already end in one, every
+time a file is saved or written.
+
+ Use the hook variable `write-file-hooks' to implement other ways to
+write files, and specify things to be done before files are written.
+The value of this variable should be a list of Lisp functions. When a
+file is to be written, the functions in the list are called, one by
+one, with no arguments. If one of them returns a non-`nil' value, Emacs
+takes this to mean that the file has been written in some suitable
+fashion; the rest of the functions are not called, and normal writing is
+not done. Use the hook variable `after-save-hook' to list all the
+functions to be called after writing out a buffer to a file.
+
+* Menu:
+
+* Backup:: How Emacs saves the old version of your file.
+* Interlocking:: How Emacs protects against simultaneous editing
+ of one file by two users.
+
+\1f
+File: xemacs.info, Node: Backup, Next: Interlocking, Prev: Saving, Up: Saving
+
+Backup Files
+------------
+
+ Because Unix does not provide version numbers in file names,
+rewriting a file in Unix automatically destroys all record of what the
+file used to contain. Thus, saving a file from Emacs throws away the
+old contents of the file--or it would, except that Emacs carefully
+copies the old contents to another file, called the "backup" file,
+before actually saving. (Make sure that the variable
+`make-backup-files' is non-`nil'. Backup files are not written if this
+variable is `nil').
+
+ At your option, Emacs can keep either a single backup file or a
+series of numbered backup files for each file you edit.
+
+ Emacs makes a backup for a file only the first time a file is saved
+from one buffer. No matter how many times you save a file, its backup
+file continues to contain the contents from before the file was visited.
+Normally this means that the backup file contains the contents from
+before the current editing session; however, if you kill the buffer and
+then visit the file again, a new backup file is made by the next save.
+
+* Menu:
+
+* Names: Backup Names. How backup files are named;
+ Choosing single or numbered backup files.
+* Deletion: Backup Deletion. Emacs deletes excess numbered backups.
+* Copying: Backup Copying. Backups can be made by copying or renaming.
+
+\1f
+File: xemacs.info, Node: Backup Names, Next: Backup Deletion, Prev: Backup, Up: Backup
+
+Single or Numbered Backups
+..........................
+
+ If you choose to have a single backup file (the default), the backup
+file's name is constructed by appending `~' to the file name being
+edited; thus, the backup file for `eval.c' is `eval.c~'.
+
+ If you choose to have a series of numbered backup files, backup file
+names are made by appending `.~', the number, and another `~' to the
+original file name. Thus, the backup files of `eval.c' would be called
+`eval.c.~1~', `eval.c.~2~', and so on, through names like
+`eval.c.~259~' and beyond.
+
+ If protection stops you from writing backup files under the usual
+names, the backup file is written as `%backup%~' in your home directory.
+Only one such file can exist, so only the most recently made backup is
+available.
+
+ The choice of single backup or numbered backups is controlled by the
+variable `version-control'. Its possible values are:
+
+`t'
+ Make numbered backups.
+
+`nil'
+ Make numbered backups for files that have numbered backups already.
+ Otherwise, make single backups.
+
+`never'
+ Never make numbered backups; always make single backups.
+
+`version-control' may be set locally in an individual buffer to control
+the making of backups for that buffer's file. For example, Rmail mode
+locally sets `version-control' to `never' to make sure that there is
+only one backup for an Rmail file. *Note Locals::.
+
+\1f
+File: xemacs.info, Node: Backup Deletion, Next: Backup Copying, Prev: Backup Names, Up: Backup
+
+Automatic Deletion of Backups
+.............................
+
+ To prevent unlimited consumption of disk space, Emacs can delete
+numbered backup versions automatically. Generally Emacs keeps the
+first few backups and the latest few backups, deleting any in between.
+This happens every time a new backup is made. The two variables that
+control the deletion are `kept-old-versions' and `kept-new-versions'.
+Their values are, respectively the number of oldest (lowest-numbered)
+backups to keep and the number of newest (highest-numbered) ones to
+keep, each time a new backup is made. The values are used just after a
+new backup version is made; that newly made backup is included in the
+count in `kept-new-versions'. By default, both variables are 2.
+
+ If `trim-versions-without-asking' is non-`nil', excess middle
+versions are deleted without notification. If it is `nil', the
+default, you are asked whether the excess middle versions should really
+be deleted.
+
+ You can also use Dired's `.' (Period) command to delete old versions.
+*Note Dired::.
+
+\1f
File: xemacs.info, Node: Backup Copying, Prev: Backup Deletion, Up: Backup
Copying vs. Renaming
* Making Snapshots:: The snapshot facilities.
* Snapshot Caveats:: Things to be careful of when using snapshots.
-\1f
-File: xemacs.info, Node: Making Snapshots, Next: Snapshot Caveats, Prev: Snapshots, Up: Snapshots
-
-Making and Using Snapshots
-..........................
-
- There are two basic commands for snapshots; one makes a snapshot
-with a given name, the other retrieves a named snapshot.
-
-`C-x v s NAME <RET>'
- Define the last saved versions of every registered file in or
- under the current directory as a snapshot named NAME
- (`vc-create-snapshot').
-
-`C-x v r NAME <RET>'
- Check out all registered files at or below the current directory
- level using whatever versions correspond to the snapshot NAME
- (`vc-retrieve-snapshot').
-
- This command reports an error if any files are locked at or below
- the current directory, without changing anything; this is to avoid
- overwriting work in progress.
-
- A snapshot uses a very small amount of resources--just enough to
-record the list of file names and which version belongs to the
-snapshot. Thus, you need not hesitate to create snapshots whenever
-they are useful.
-
- You can give a snapshot name as an argument to `C-x v =' or `C-x v
-~' (*note Old Versions::). Thus, you can use it to compare a snapshot
-against the current files, or two snapshots against each other, or a
-snapshot against a named version.
-
-\1f
-File: xemacs.info, Node: Snapshot Caveats, Prev: Making Snapshots, Up: Snapshots
-
-Snapshot Caveats
-................
-
- VC's snapshot facilities are modeled on RCS's named-configuration
-support. They use RCS's native facilities for this, so under VC
-snapshots made using RCS are visible even when you bypass VC.
-
- For SCCS, VC implements snapshots itself. The files it uses contain
-name/file/version-number triples. These snapshots are visible only
-through VC.
-
- A snapshot is a set of checked-in versions. So make sure that all
-the files are checked in and not locked when you make a snapshot.
-
- File renaming and deletion can create some difficulties with
-snapshots. This is not a VC-specific problem, but a general design
-issue in version control systems that no one has solved very well yet.
-
- If you rename a registered file, you need to rename its master along
-with it (the command `vc-rename-file' does this automatically). If you
-are using SCCS, you must also update the records of the snapshot, to
-mention the file by its new name (`vc-rename-file' does this, too). An
-old snapshot that refers to a master file that no longer exists under
-the recorded name is invalid; VC can no longer retrieve it. It would
-be beyond the scope of this manual to explain enough about RCS and SCCS
-to explain how to update the snapshots by hand.
-
- Using `vc-rename-file' makes the snapshot remain valid for
-retrieval, but it does not solve all problems. For example, some of the
-files in the program probably refer to others by name. At the very
-least, the makefile probably mentions the file that you renamed. If you
-retrieve an old snapshot, the renamed file is retrieved under its new
-name, which is not the name that the makefile expects. So the program
-won't really work as retrieved.
-
-\1f
-File: xemacs.info, Node: Version Headers, Prev: Snapshots, Up: Version Control
-
-Inserting Version Control Headers
----------------------------------
-
- Sometimes it is convenient to put version identification strings
-directly into working files. Certain special strings called "version
-headers" are replaced in each successive version by the number of that
-version.
-
- You can use the `C-x v h' command (`vc-insert-headers') to insert a
-suitable header string.
-
-`C-x v h'
- Insert headers in a file for use with your version-control system.
-
- The default header string is `\$Id\$' for RCS and `\%W\%' for SCCS.
-(The actual strings inserted do not have the backslashes in them. They
-were placed in the Info source file so that the strings don't get
-interpreted as version-control headers when the Info source files are
-maintained under version control.) You can specify other headers to
-insert by setting the variable `vc-header-alist'. Its value is a list
-of elements of the form `(PROGRAM . STRING)' where PROGRAM is `RCS' or
-`SCCS' and STRING is the string to use.
-
- Instead of a single string, you can specify a list of strings; then
-each string in the list is inserted as a separate header on a line of
-its own.
-
- It is often necessary to use "superfluous" backslashes when writing
-the strings that you put in this variable. This is to prevent the
-string in the constant from being interpreted as a header itself if the
-Emacs Lisp file containing it is maintained with version control.
-
- Each header is inserted surrounded by tabs, inside comment
-delimiters, on a new line at the start of the buffer. Normally the
-ordinary comment start and comment end strings of the current mode are
-used, but for certain modes, there are special comment delimiters for
-this purpose; the variable `vc-comment-alist' specifies them. Each
-element of this list has the form `(MODE STARTER ENDER)'.
-
- The variable `vc-static-header-alist' specifies further strings to
-add based on the name of the buffer. Its value should be a list of
-elements of the form `(REGEXP . FORMAT)'. Whenever REGEXP matches the
-buffer name, FORMAT is inserted as part of the header. A header line
-is inserted for each element that matches the buffer name, and for each
-string specified by `vc-header-alist'. The header line is made by
-processing the string from `vc-header-alist' with the format taken from
-the element. The default value for `vc-static-header-alist' is:
-
- (("\\.c$" .
- "\n#ifndef lint\nstatic char vcid[] = \"\%s\";\n\
- #endif /* lint */\n"))
-
-which specifies insertion of a string of this form:
-
-
- #ifndef lint
- static char vcid[] = "STRING";
- #endif /* lint */
-
-\1f
-File: xemacs.info, Node: ListDir, Next: Comparing Files, Prev: Version Control, Up: Files
-
-Listing a File Directory
-========================
-
- Files are organized by Unix into "directories". A "directory
-listing" is a list of all the files in a directory. Emacs provides
-directory listings in brief format (file names only) and verbose format
-(sizes, dates, and authors included).
-
-`C-x C-d DIR-OR-PATTERN'
- Print a brief directory listing (`list-directory').
-
-`C-u C-x C-d DIR-OR-PATTERN'
- Print a verbose directory listing.
-
- To print a directory listing, use `C-x C-d' (`list-directory').
-This command prompts in the minibuffer for a file name which is either
-a directory to be listed or pattern containing wildcards for the files
-to be listed. For example,
-
- C-x C-d /u2/emacs/etc <RET>
-
-lists all the files in directory `/u2/emacs/etc'. An example of
-specifying a file name pattern is:
-
- C-x C-d /u2/emacs/src/*.c <RET>
-
- Normally, `C-x C-d' prints a brief directory listing containing just
-file names. A numeric argument (regardless of value) tells it to print
-a verbose listing (like `ls -l').
-
- Emacs obtains the text of a directory listing by running `ls' in an
-inferior process. Two Emacs variables control the switches passed to
-`ls': `list-directory-brief-switches' is a string giving the switches
-to use in brief listings (`"-CF"' by default).
-`list-directory-verbose-switches' is a string giving the switches to
-use in a verbose listing (`"-l"' by default).
-
- The variable `directory-abbrev-alist' is an alist of abbreviations
-for file directories. The list consists of elements of the form `(FROM
-. TO)', each meaning to replace `FROM' with `TO' when it appears in a
-directory name. This replacement is done when setting up the default
-directory of a newly visited file. Every `FROM' string should start
-with ``^''.
-
- Use this feature when you have directories which you normally refer
-to via absolute symbolic links. Make `TO' the name of the link, and
-`FROM' the name it is linked to.
-
-\1f
-File: xemacs.info, Node: Comparing Files, Next: Dired, Prev: ListDir, Up: Files
-
-Comparing Files
-===============
-
- The command `M-x diff' compares two files, displaying the
-differences in an Emacs buffer named `*Diff*'. It works by running the
-`diff' program, using options taken from the variable `diff-switches',
-whose value should be a string.
-
- The buffer `*Diff*' has Compilation mode as its major mode, so you
-can use `C-x `' to visit successive changed locations in the two source
-files. You can also move to a particular hunk of changes and type `C-c
-C-c' to find the corresponding source location. You can also use the
-other special commands of Compilation mode: <SPC> and <DEL> for
-scrolling, and `M-p' and `M-n' for cursor motion. *Note Compilation::.
-
- The command `M-x diff-backup' compares a specified file with its most
-recent backup. If you specify the name of a backup file, `diff-backup'
-compares it with the source file that it is a backup of.
-
- The command `M-x compare-windows' compares the text in the current
-window with that in the next window. Comparison starts at point in each
-window. Point moves forward in each window, a character at a time in
-each window, until the next characters in the two windows are
-different. Then the command is finished. For more information about
-windows in Emacs, *Note Windows::.
-
- With a numeric argument, `compare-windows' ignores changes in
-whitespace. If the variable `compare-ignore-case' is non-`nil', it
-ignores differences in case as well.
-
-\1f
-File: xemacs.info, Node: Dired, Next: Misc File Ops, Prev: Comparing Files, Up: Files
-
-Dired, the Directory Editor
-===========================
-
- Dired makes it easy to delete or visit many of the files in a single
-directory at once. It creates an Emacs buffer containing a listing of
-the directory. You can use the normal Emacs commands to move around in
-this buffer and special Dired commands to operate on the files.
-
-* Menu:
-
-* Enter: Dired Enter. How to invoke Dired.
-* Edit: Dired Edit. Editing the Dired buffer.
-* Deletion: Dired Deletion. Deleting files with Dired.
-* Immed: Dired Immed. Other file operations through Dired.
-
-\1f
-File: xemacs.info, Node: Dired Enter, Next: Dired Edit, Prev: Dired, Up: Dired
-
-Entering Dired
---------------
-
- To invoke dired, type `C-x d' or `M-x dired'. The command reads a
-directory name or wildcard file name pattern as a minibuffer argument
-just like the `list-directory' command, `C-x C-d'. Where `dired'
-differs from `list-directory' is in naming the buffer after the
-directory name or the wildcard pattern used for the listing, and putting
-the buffer into Dired mode so that the special commands of Dired are
-available in it. The variable `dired-listing-switches' is a string
-used as an argument to `ls' in making the directory; this string must
-contain `-l'.
-
- To display the Dired buffer in another window rather than in the
-selected window, use `C-x 4 d' (`dired-other-window)' instead of `C-x
-d'.
-
-\1f
-File: xemacs.info, Node: Dired Edit, Next: Dired Deletion, Prev: Dired Enter, Up: Dired
-
-Editing in Dired
-----------------
-
- Once the Dired buffer exists, you can switch freely between it and
-other Emacs buffers. Whenever the Dired buffer is selected, certain
-special commands are provided that operate on files that are listed.
-The Dired buffer is "read-only", and inserting text in it is not
-useful, so ordinary printing characters such as `d' and `x' are used
-for Dired commands. Most Dired commands operate on the file described
-by the line that point is on. Some commands perform operations
-immediately; others "flag" a file to be operated on later.
-
- Most Dired commands that operate on the current line's file also
-treat a numeric argument as a repeat count, meaning to act on the files
-of the next few lines. A negative argument means to operate on the
-files of the preceding lines, and leave point on the first of those
-lines.
-
- All the usual Emacs cursor motion commands are available in Dired
-buffers. Some special purpose commands are also provided. The keys
-`C-n' and `C-p' are redefined so that they try to position the cursor
-at the beginning of the filename on the line, rather than at the
-beginning of the line.
-
- For extra convenience, <SPC> and `n' in Dired are equivalent to
-`C-n'. `p' is equivalent to `C-p'. Moving by lines is done so often
-in Dired that it deserves to be easy to type. <DEL> (move up and
-unflag) is often useful simply for moving up.
-
- The `g' command in Dired runs `revert-buffer' to reinitialize the
-buffer from the actual disk directory and show any changes made in the
-directory by programs other than Dired. All deletion flags in the Dired
-buffer are lost when this is done.
-
-\1f
-File: xemacs.info, Node: Dired Deletion, Next: Dired Immed, Prev: Dired Edit, Up: Dired
-
-Deleting Files With Dired
--------------------------
-
- The primary use of Dired is to flag files for deletion and then
-delete them.
-
-`d'
- Flag this file for deletion.
-
-`u'
- Remove deletion-flag on this line.
-
-`<DEL>'
- Remove deletion-flag on previous line, moving point to that line.
-
-`x'
- Delete the files that are flagged for deletion.
-
-`#'
- Flag all auto-save files (files whose names start and end with `#')
- for deletion (*note Auto Save::).
-
-`~'
- Flag all backup files (files whose names end with `~') for deletion
- (*note Backup::).
-
-`. (Period)'
- Flag excess numeric backup files for deletion. The oldest and
- newest few backup files of any one file are exempt; the middle
- ones are flagged.
-
- You can flag a file for deletion by moving to the line describing the
-file and typing `d' or `C-d'. The deletion flag is visible as a `D' at
-the beginning of the line. Point is moved to the beginning of the next
-line, so that repeated `d' commands flag successive files.
-
- The files are flagged for deletion rather than deleted immediately to
-avoid the danger of deleting a file accidentally. Until you direct
-Dired to delete the flagged files, you can remove deletion flags using
-the commands `u' and <DEL>. `u' works just like `d', but removes flags
-rather than making flags. <DEL> moves upward, removing flags; it is
-like `u' with numeric argument automatically negated.
-
- To delete the flagged files, type `x'. This command first displays a
-list of all the file names flagged for deletion, and requests
-confirmation with `yes'. Once you confirm, all the flagged files are
-deleted, and their lines are deleted from the text of the Dired buffer.
-The shortened Dired buffer remains selected. If you answer `no' or
-quit with `C-g', you return immediately to Dired, with the deletion
-flags still present and no files actually deleted.
-
- The `#', `~', and `.' commands flag many files for deletion, based
-on their names. These commands are useful precisely because they do
-not actually delete any files; you can remove the deletion flags from
-any flagged files that you really wish to keep.
-
- `#' flags for deletion all files that appear to have been made by
-auto-saving (that is, files whose names begin and end with `#'). `~'
-flags for deletion all files that appear to have been made as backups
-for files that were edited (that is, files whose names end with `~').
-
- `.' (Period) flags just some of the backup files for deletion: only
-numeric backups that are not among the oldest few nor the newest few
-backups of any one file. Normally `dired-kept-versions' (not
-`kept-new-versions'; that applies only when saving) specifies the
-number of newest versions of each file to keep, and `kept-old-versions'
-specifies the number of oldest versions to keep. Period with a
-positive numeric argument, as in `C-u 3 .', specifies the number of
-newest versions to keep, overriding `dired-kept-versions'. A negative
-numeric argument overrides `kept-old-versions', using minus the value
-of the argument to specify the number of oldest versions of each file
-to keep.
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Making Snapshots, Next: Snapshot Caveats, Prev: Snapshots, Up: Snapshots
+
+Making and Using Snapshots
+..........................
+
+ There are two basic commands for snapshots; one makes a snapshot
+with a given name, the other retrieves a named snapshot.
+
+`C-x v s NAME <RET>'
+ Define the last saved versions of every registered file in or
+ under the current directory as a snapshot named NAME
+ (`vc-create-snapshot').
+
+`C-x v r NAME <RET>'
+ Check out all registered files at or below the current directory
+ level using whatever versions correspond to the snapshot NAME
+ (`vc-retrieve-snapshot').
+
+ This command reports an error if any files are locked at or below
+ the current directory, without changing anything; this is to avoid
+ overwriting work in progress.
+
+ A snapshot uses a very small amount of resources--just enough to
+record the list of file names and which version belongs to the
+snapshot. Thus, you need not hesitate to create snapshots whenever
+they are useful.
+
+ You can give a snapshot name as an argument to `C-x v =' or `C-x v
+~' (*note Old Versions::). Thus, you can use it to compare a snapshot
+against the current files, or two snapshots against each other, or a
+snapshot against a named version.
+
+\1f
+File: xemacs.info, Node: Snapshot Caveats, Prev: Making Snapshots, Up: Snapshots
+
+Snapshot Caveats
+................
+
+ VC's snapshot facilities are modeled on RCS's named-configuration
+support. They use RCS's native facilities for this, so under VC
+snapshots made using RCS are visible even when you bypass VC.
+
+ For SCCS, VC implements snapshots itself. The files it uses contain
+name/file/version-number triples. These snapshots are visible only
+through VC.
+
+ A snapshot is a set of checked-in versions. So make sure that all
+the files are checked in and not locked when you make a snapshot.
+
+ File renaming and deletion can create some difficulties with
+snapshots. This is not a VC-specific problem, but a general design
+issue in version control systems that no one has solved very well yet.
+
+ If you rename a registered file, you need to rename its master along
+with it (the command `vc-rename-file' does this automatically). If you
+are using SCCS, you must also update the records of the snapshot, to
+mention the file by its new name (`vc-rename-file' does this, too). An
+old snapshot that refers to a master file that no longer exists under
+the recorded name is invalid; VC can no longer retrieve it. It would
+be beyond the scope of this manual to explain enough about RCS and SCCS
+to explain how to update the snapshots by hand.
+
+ Using `vc-rename-file' makes the snapshot remain valid for
+retrieval, but it does not solve all problems. For example, some of the
+files in the program probably refer to others by name. At the very
+least, the makefile probably mentions the file that you renamed. If you
+retrieve an old snapshot, the renamed file is retrieved under its new
+name, which is not the name that the makefile expects. So the program
+won't really work as retrieved.
+
+\1f
+File: xemacs.info, Node: Version Headers, Prev: Snapshots, Up: Version Control
+
+Inserting Version Control Headers
+---------------------------------
+
+ Sometimes it is convenient to put version identification strings
+directly into working files. Certain special strings called "version
+headers" are replaced in each successive version by the number of that
+version.
+
+ You can use the `C-x v h' command (`vc-insert-headers') to insert a
+suitable header string.
+
+`C-x v h'
+ Insert headers in a file for use with your version-control system.
+
+ The default header string is `\$Id\$' for RCS and `\%W\%' for SCCS.
+(The actual strings inserted do not have the backslashes in them. They
+were placed in the Info source file so that the strings don't get
+interpreted as version-control headers when the Info source files are
+maintained under version control.) You can specify other headers to
+insert by setting the variable `vc-header-alist'. Its value is a list
+of elements of the form `(PROGRAM . STRING)' where PROGRAM is `RCS' or
+`SCCS' and STRING is the string to use.
+
+ Instead of a single string, you can specify a list of strings; then
+each string in the list is inserted as a separate header on a line of
+its own.
+
+ It is often necessary to use "superfluous" backslashes when writing
+the strings that you put in this variable. This is to prevent the
+string in the constant from being interpreted as a header itself if the
+Emacs Lisp file containing it is maintained with version control.
+
+ Each header is inserted surrounded by tabs, inside comment
+delimiters, on a new line at the start of the buffer. Normally the
+ordinary comment start and comment end strings of the current mode are
+used, but for certain modes, there are special comment delimiters for
+this purpose; the variable `vc-comment-alist' specifies them. Each
+element of this list has the form `(MODE STARTER ENDER)'.
+
+ The variable `vc-static-header-alist' specifies further strings to
+add based on the name of the buffer. Its value should be a list of
+elements of the form `(REGEXP . FORMAT)'. Whenever REGEXP matches the
+buffer name, FORMAT is inserted as part of the header. A header line
+is inserted for each element that matches the buffer name, and for each
+string specified by `vc-header-alist'. The header line is made by
+processing the string from `vc-header-alist' with the format taken from
+the element. The default value for `vc-static-header-alist' is:
+
+ (("\\.c$" .
+ "\n#ifndef lint\nstatic char vcid[] = \"\%s\";\n\
+ #endif /* lint */\n"))
+
+which specifies insertion of a string of this form:
+
+
+ #ifndef lint
+ static char vcid[] = "STRING";
+ #endif /* lint */
+
+\1f
+File: xemacs.info, Node: ListDir, Next: Comparing Files, Prev: Version Control, Up: Files
+
+Listing a File Directory
+========================
+
+ Files are organized by Unix into "directories". A "directory
+listing" is a list of all the files in a directory. Emacs provides
+directory listings in brief format (file names only) and verbose format
+(sizes, dates, and authors included).
+
+`C-x C-d DIR-OR-PATTERN'
+ Print a brief directory listing (`list-directory').
+
+`C-u C-x C-d DIR-OR-PATTERN'
+ Print a verbose directory listing.
+
+ To print a directory listing, use `C-x C-d' (`list-directory').
+This command prompts in the minibuffer for a file name which is either
+a directory to be listed or pattern containing wildcards for the files
+to be listed. For example,
+
+ C-x C-d /u2/emacs/etc <RET>
+
+lists all the files in directory `/u2/emacs/etc'. An example of
+specifying a file name pattern is:
+
+ C-x C-d /u2/emacs/src/*.c <RET>
+
+ Normally, `C-x C-d' prints a brief directory listing containing just
+file names. A numeric argument (regardless of value) tells it to print
+a verbose listing (like `ls -l').
+
+ Emacs obtains the text of a directory listing by running `ls' in an
+inferior process. Two Emacs variables control the switches passed to
+`ls': `list-directory-brief-switches' is a string giving the switches
+to use in brief listings (`"-CF"' by default).
+`list-directory-verbose-switches' is a string giving the switches to
+use in a verbose listing (`"-l"' by default).
+
+ The variable `directory-abbrev-alist' is an alist of abbreviations
+for file directories. The list consists of elements of the form `(FROM
+. TO)', each meaning to replace `FROM' with `TO' when it appears in a
+directory name. This replacement is done when setting up the default
+directory of a newly visited file. Every `FROM' string should start
+with ``^''.
+
+ Use this feature when you have directories which you normally refer
+to via absolute symbolic links. Make `TO' the name of the link, and
+`FROM' the name it is linked to.
+
+\1f
+File: xemacs.info, Node: Comparing Files, Next: Dired, Prev: ListDir, Up: Files
+
+Comparing Files
+===============
+
+ The command `M-x diff' compares two files, displaying the
+differences in an Emacs buffer named `*Diff*'. It works by running the
+`diff' program, using options taken from the variable `diff-switches',
+whose value should be a string.
+
+ The buffer `*Diff*' has Compilation mode as its major mode, so you
+can use `C-x `' to visit successive changed locations in the two source
+files. You can also move to a particular hunk of changes and type `C-c
+C-c' to find the corresponding source location. You can also use the
+other special commands of Compilation mode: <SPC> and <DEL> for
+scrolling, and `M-p' and `M-n' for cursor motion. *Note Compilation::.
+
+ The command `M-x diff-backup' compares a specified file with its most
+recent backup. If you specify the name of a backup file, `diff-backup'
+compares it with the source file that it is a backup of.
+
+ The command `M-x compare-windows' compares the text in the current
+window with that in the next window. Comparison starts at point in each
+window. Point moves forward in each window, a character at a time in
+each window, until the next characters in the two windows are
+different. Then the command is finished. For more information about
+windows in Emacs, *Note Windows::.
+
+ With a numeric argument, `compare-windows' ignores changes in
+whitespace. If the variable `compare-ignore-case' is non-`nil', it
+ignores differences in case as well.
+
+\1f
+File: xemacs.info, Node: Dired, Next: Misc File Ops, Prev: Comparing Files, Up: Files
+
+Dired, the Directory Editor
+===========================
+
+ Dired makes it easy to delete or visit many of the files in a single
+directory at once. It creates an Emacs buffer containing a listing of
+the directory. You can use the normal Emacs commands to move around in
+this buffer and special Dired commands to operate on the files.
+
+* Menu:
+
+* Enter: Dired Enter. How to invoke Dired.
+* Edit: Dired Edit. Editing the Dired buffer.
+* Deletion: Dired Deletion. Deleting files with Dired.
+* Immed: Dired Immed. Other file operations through Dired.
+
+\1f
+File: xemacs.info, Node: Dired Enter, Next: Dired Edit, Prev: Dired, Up: Dired
+
+Entering Dired
+--------------
+
+ To invoke dired, type `C-x d' or `M-x dired'. The command reads a
+directory name or wildcard file name pattern as a minibuffer argument
+just like the `list-directory' command, `C-x C-d'. Where `dired'
+differs from `list-directory' is in naming the buffer after the
+directory name or the wildcard pattern used for the listing, and putting
+the buffer into Dired mode so that the special commands of Dired are
+available in it. The variable `dired-listing-switches' is a string
+used as an argument to `ls' in making the directory; this string must
+contain `-l'.
+
+ To display the Dired buffer in another window rather than in the
+selected window, use `C-x 4 d' (`dired-other-window)' instead of `C-x
+d'.
+
+\1f
+File: xemacs.info, Node: Dired Edit, Next: Dired Deletion, Prev: Dired Enter, Up: Dired
+
+Editing in Dired
+----------------
+
+ Once the Dired buffer exists, you can switch freely between it and
+other Emacs buffers. Whenever the Dired buffer is selected, certain
+special commands are provided that operate on files that are listed.
+The Dired buffer is "read-only", and inserting text in it is not
+useful, so ordinary printing characters such as `d' and `x' are used
+for Dired commands. Most Dired commands operate on the file described
+by the line that point is on. Some commands perform operations
+immediately; others "flag" a file to be operated on later.
+
+ Most Dired commands that operate on the current line's file also
+treat a numeric argument as a repeat count, meaning to act on the files
+of the next few lines. A negative argument means to operate on the
+files of the preceding lines, and leave point on the first of those
+lines.
+
+ All the usual Emacs cursor motion commands are available in Dired
+buffers. Some special purpose commands are also provided. The keys
+`C-n' and `C-p' are redefined so that they try to position the cursor
+at the beginning of the filename on the line, rather than at the
+beginning of the line.
+
+ For extra convenience, <SPC> and `n' in Dired are equivalent to
+`C-n'. `p' is equivalent to `C-p'. Moving by lines is done so often
+in Dired that it deserves to be easy to type. <DEL> (move up and
+unflag) is often useful simply for moving up.
+
+ The `g' command in Dired runs `revert-buffer' to reinitialize the
+buffer from the actual disk directory and show any changes made in the
+directory by programs other than Dired. All deletion flags in the Dired
+buffer are lost when this is done.
+
+\1f
+File: xemacs.info, Node: Dired Deletion, Next: Dired Immed, Prev: Dired Edit, Up: Dired
+
+Deleting Files With Dired
+-------------------------
+
+ The primary use of Dired is to flag files for deletion and then
+delete them.
+
+`d'
+ Flag this file for deletion.
+
+`u'
+ Remove deletion-flag on this line.
+
+`<DEL>'
+ Remove deletion-flag on previous line, moving point to that line.
+
+`x'
+ Delete the files that are flagged for deletion.
+
+`#'
+ Flag all auto-save files (files whose names start and end with `#')
+ for deletion (*note Auto Save::).
+
+`~'
+ Flag all backup files (files whose names end with `~') for deletion
+ (*note Backup::).
+
+`. (Period)'
+ Flag excess numeric backup files for deletion. The oldest and
+ newest few backup files of any one file are exempt; the middle
+ ones are flagged.
+
+ You can flag a file for deletion by moving to the line describing the
+file and typing `d' or `C-d'. The deletion flag is visible as a `D' at
+the beginning of the line. Point is moved to the beginning of the next
+line, so that repeated `d' commands flag successive files.
+
+ The files are flagged for deletion rather than deleted immediately to
+avoid the danger of deleting a file accidentally. Until you direct
+Dired to delete the flagged files, you can remove deletion flags using
+the commands `u' and <DEL>. `u' works just like `d', but removes flags
+rather than making flags. <DEL> moves upward, removing flags; it is
+like `u' with numeric argument automatically negated.
+
+ To delete the flagged files, type `x'. This command first displays a
+list of all the file names flagged for deletion, and requests
+confirmation with `yes'. Once you confirm, all the flagged files are
+deleted, and their lines are deleted from the text of the Dired buffer.
+The shortened Dired buffer remains selected. If you answer `no' or
+quit with `C-g', you return immediately to Dired, with the deletion
+flags still present and no files actually deleted.
+
+ The `#', `~', and `.' commands flag many files for deletion, based
+on their names. These commands are useful precisely because they do
+not actually delete any files; you can remove the deletion flags from
+any flagged files that you really wish to keep.
+
+ `#' flags for deletion all files that appear to have been made by
+auto-saving (that is, files whose names begin and end with `#'). `~'
+flags for deletion all files that appear to have been made as backups
+for files that were edited (that is, files whose names end with `~').
+
+ `.' (Period) flags just some of the backup files for deletion: only
+numeric backups that are not among the oldest few nor the newest few
+backups of any one file. Normally `dired-kept-versions' (not
+`kept-new-versions'; that applies only when saving) specifies the
+number of newest versions of each file to keep, and `kept-old-versions'
+specifies the number of oldest versions to keep. Period with a
+positive numeric argument, as in `C-u 3 .', specifies the number of
+newest versions to keep, overriding `dired-kept-versions'. A negative
+numeric argument overrides `kept-old-versions', using minus the value
+of the argument to specify the number of oldest versions of each file
+to keep.
+
+\1f
File: xemacs.info, Node: Dired Immed, Prev: Dired Deletion, Up: Dired
Immediate File Operations in Dired
sample text to illustrate scripts used in this language environment.
By default, this command describes the chosen language environment.
-\1f
-File: xemacs.info, Node: Input Methods, Next: Select Input Method, Prev: Language Environments, Up: Mule
-
-Input Methods
-=============
-
- An "input method" is a kind of character conversion designed
-specifically for interactive input. In XEmacs, typically each language
-has its own input method; sometimes several languages which use the same
-characters can share one input method. A few languages support several
-input methods.
-
- The simplest kind of input method works by mapping ASCII letters into
-another alphabet. This is how the Greek and Russian input methods work.
-
- A more powerful technique is composition: converting sequences of
-characters into one letter. Many European input methods use composition
-to produce a single non-ASCII letter from a sequence that consists of a
-letter followed by accent characters. For example, some methods convert
-the sequence `'a' into a single accented letter.
-
- The input methods for syllabic scripts typically use mapping followed
-by composition. The input methods for Thai and Korean work this way.
-First, letters are mapped into symbols for particular sounds or tone
-marks; then, sequences of these which make up a whole syllable are
-mapped into one syllable sign.
-
- Chinese and Japanese require more complex methods. In Chinese input
-methods, first you enter the phonetic spelling of a Chinese word (in
-input method `chinese-py', among others), or a sequence of portions of
-the character (input methods `chinese-4corner' and `chinese-sw', and
-others). Since one phonetic spelling typically corresponds to many
-different Chinese characters, you must select one of the alternatives
-using special XEmacs commands. Keys such as `C-f', `C-b', `C-n',
-`C-p', and digits have special definitions in this situation, used for
-selecting among the alternatives. <TAB> displays a buffer showing all
-the possibilities.
-
- In Japanese input methods, first you input a whole word using
-phonetic spelling; then, after the word is in the buffer, XEmacs
-converts it into one or more characters using a large dictionary. One
-phonetic spelling corresponds to many differently written Japanese
-words, so you must select one of them; use `C-n' and `C-p' to cycle
-through the alternatives.
-
- Sometimes it is useful to cut off input method processing so that the
-characters you have just entered will not combine with subsequent
-characters. For example, in input method `latin-1-postfix', the
-sequence `e '' combines to form an `e' with an accent. What if you
-want to enter them as separate characters?
-
- One way is to type the accent twice; that is a special feature for
-entering the separate letter and accent. For example, `e ' '' gives
-you the two characters `e''. Another way is to type another letter
-after the `e'--something that won't combine with that--and immediately
-delete it. For example, you could type `e e <DEL> '' to get separate
-`e' and `''.
-
- Another method, more general but not quite as easy to type, is to use
-`C-\ C-\' between two characters to stop them from combining. This is
-the command `C-\' (`toggle-input-method') used twice. *Note Select
-Input Method::.
-
- `C-\ C-\' is especially useful inside an incremental search, because
-stops waiting for more characters to combine, and starts searching for
-what you have already entered.
-
- The variables `input-method-highlight-flag' and
-`input-method-verbose-flag' control how input methods explain what is
-happening. If `input-method-highlight-flag' is non-`nil', the partial
-sequence is highlighted in the buffer. If `input-method-verbose-flag'
-is non-`nil', the list of possible characters to type next is displayed
-in the echo area (but not when you are in the minibuffer).
-
-\1f
-File: xemacs.info, Node: Select Input Method, Next: Coding Systems, Prev: Input Methods, Up: Mule
-
-Selecting an Input Method
-=========================
-
-`C-\'
- Enable or disable use of the selected input method.
-
-`C-x <RET> C-\ METHOD <RET>'
- Select a new input method for the current buffer.
-
-`C-h I METHOD <RET>'
-`C-h C-\ METHOD <RET>'
- Describe the input method METHOD (`describe-input-method'). By
- default, it describes the current input method (if any).
-
-`M-x list-input-methods'
- Display a list of all the supported input methods.
-
- To choose an input method for the current buffer, use `C-x <RET>
-C-\' (`select-input-method'). This command reads the input method name
-with the minibuffer; the name normally starts with the language
-environment that it is meant to be used with. The variable
-`current-input-method' records which input method is selected.
-
- Input methods use various sequences of ASCII characters to stand for
-non-ASCII characters. Sometimes it is useful to turn off the input
-method temporarily. To do this, type `C-\' (`toggle-input-method').
-To reenable the input method, type `C-\' again.
-
- If you type `C-\' and you have not yet selected an input method, it
-prompts for you to specify one. This has the same effect as using `C-x
-<RET> C-\' to specify an input method.
-
- Selecting a language environment specifies a default input method for
-use in various buffers. When you have a default input method, you can
-select it in the current buffer by typing `C-\'. The variable
-`default-input-method' specifies the default input method (`nil' means
-there is none).
-
- Some input methods for alphabetic scripts work by (in effect)
-remapping the keyboard to emulate various keyboard layouts commonly used
-for those scripts. How to do this remapping properly depends on your
-actual keyboard layout. To specify which layout your keyboard has, use
-the command `M-x quail-set-keyboard-layout'.
-
- To display a list of all the supported input methods, type `M-x
-list-input-methods'. The list gives information about each input
-method, including the string that stands for it in the mode line.
-
-\1f
-File: xemacs.info, Node: Coding Systems, Next: Recognize Coding, Prev: Select Input Method, Up: Mule
-
-Coding Systems
-==============
-
- Users of various languages have established many more-or-less
-standard coding systems for representing them. XEmacs does not use
-these coding systems internally; instead, it converts from various
-coding systems to its own system when reading data, and converts the
-internal coding system to other coding systems when writing data.
-Conversion is possible in reading or writing files, in sending or
-receiving from the terminal, and in exchanging data with subprocesses.
-
- XEmacs assigns a name to each coding system. Most coding systems are
-used for one language, and the name of the coding system starts with the
-language name. Some coding systems are used for several languages;
-their names usually start with `iso'. There are also special coding
-systems `binary' and `no-conversion' which do not convert printing
-characters at all.
-
- In addition to converting various representations of non-ASCII
-characters, a coding system can perform end-of-line conversion. XEmacs
-handles three different conventions for how to separate lines in a file:
-newline, carriage-return linefeed, and just carriage-return.
-
-`C-h C CODING <RET>'
- Describe coding system CODING.
-
-`C-h C <RET>'
- Describe the coding systems currently in use.
-
-`M-x list-coding-systems'
- Display a list of all the supported coding systems.
-
- The command `C-h C' (`describe-coding-system') displays information
-about particular coding systems. You can specify a coding system name
-as argument; alternatively, with an empty argument, it describes the
-coding systems currently selected for various purposes, both in the
-current buffer and as the defaults, and the priority list for
-recognizing coding systems (*note Recognize Coding::).
-
- To display a list of all the supported coding systems, type `M-x
-list-coding-systems'. The list gives information about each coding
-system, including the letter that stands for it in the mode line (*note
-Mode Line::).
-
- Each of the coding systems that appear in this list--except for
-`binary', which means no conversion of any kind--specifies how and
-whether to convert printing characters, but leaves the choice of
-end-of-line conversion to be decided based on the contents of each file.
-For example, if the file appears to use carriage-return linefeed between
-lines, that end-of-line conversion will be used.
-
- Each of the listed coding systems has three variants which specify
-exactly what to do for end-of-line conversion:
-
-`...-unix'
- Don't do any end-of-line conversion; assume the file uses newline
- to separate lines. (This is the convention normally used on Unix
- and GNU systems.)
-
-`...-dos'
- Assume the file uses carriage-return linefeed to separate lines,
- and do the appropriate conversion. (This is the convention
- normally used on Microsoft systems.)
-
-`...-mac'
- Assume the file uses carriage-return to separate lines, and do the
- appropriate conversion. (This is the convention normally used on
- the Macintosh system.)
-
- These variant coding systems are omitted from the
-`list-coding-systems' display for brevity, since they are entirely
-predictable. For example, the coding system `iso-8859-1' has variants
-`iso-8859-1-unix', `iso-8859-1-dos' and `iso-8859-1-mac'.
-
- In contrast, the coding system `binary' specifies no character code
-conversion at all--none for non-Latin-1 byte values and none for end of
-line. This is useful for reading or writing binary files, tar files,
-and other files that must be examined verbatim.
-
- The easiest way to edit a file with no conversion of any kind is with
-the `M-x find-file-literally' command. This uses `binary', and also
-suppresses other XEmacs features that might convert the file contents
-before you see them. *Note Visiting::.
-
- The coding system `no-conversion' means that the file contains
-non-Latin-1 characters stored with the internal XEmacs encoding. It
-handles end-of-line conversion based on the data encountered, and has
-the usual three variants to specify the kind of end-of-line conversion.
-
-\1f
-File: xemacs.info, Node: Recognize Coding, Next: Specify Coding, Prev: Coding Systems, Up: Mule
-
-Recognizing Coding Systems
-==========================
-
- Most of the time, XEmacs can recognize which coding system to use for
-any given file-once you have specified your preferences.
-
- Some coding systems can be recognized or distinguished by which byte
-sequences appear in the data. However, there are coding systems that
-cannot be distinguished, not even potentially. For example, there is no
-way to distinguish between Latin-1 and Latin-2; they use the same byte
-values with different meanings.
-
- XEmacs handles this situation by means of a priority list of coding
-systems. Whenever XEmacs reads a file, if you do not specify the coding
-system to use, XEmacs checks the data against each coding system,
-starting with the first in priority and working down the list, until it
-finds a coding system that fits the data. Then it converts the file
-contents assuming that they are represented in this coding system.
-
- The priority list of coding systems depends on the selected language
-environment (*note Language Environments::). For example, if you use
-French, you probably want XEmacs to prefer Latin-1 to Latin-2; if you
-use Czech, you probably want Latin-2 to be preferred. This is one of
-the reasons to specify a language environment.
-
- However, you can alter the priority list in detail with the command
-`M-x prefer-coding-system'. This command reads the name of a coding
-system from the minibuffer, and adds it to the front of the priority
-list, so that it is preferred to all others. If you use this command
-several times, each use adds one element to the front of the priority
-list.
-
- Sometimes a file name indicates which coding system to use for the
-file. The variable `file-coding-system-alist' specifies this
-correspondence. There is a special function
-`modify-coding-system-alist' for adding elements to this list. For
-example, to read and write all `.txt' using the coding system
-`china-iso-8bit', you can execute this Lisp expression:
-
- (modify-coding-system-alist 'file "\\.txt\\'" 'china-iso-8bit)
-
-The first argument should be `file', the second argument should be a
-regular expression that determines which files this applies to, and the
-third argument says which coding system to use for these files.
-
- You can specify the coding system for a particular file using the
-`-*-...-*-' construct at the beginning of a file, or a local variables
-list at the end (*note File Variables::). You do this by defining a
-value for the "variable" named `coding'. XEmacs does not really have a
-variable `coding'; instead of setting a variable, it uses the specified
-coding system for the file. For example, `-*-mode: C; coding:
-iso-8859-1;-*-' specifies use of the iso-8859-1 coding system, as well
-as C mode.
-
- Once XEmacs has chosen a coding system for a buffer, it stores that
-coding system in `buffer-file-coding-system' and uses that coding
-system, by default, for operations that write from this buffer into a
-file. This includes the commands `save-buffer' and `write-region'. If
-you want to write files from this buffer using a different coding
-system, you can specify a different coding system for the buffer using
-`set-buffer-file-coding-system' (*note Specify Coding::).
-
translation approved by the author instead of in the original English.
\1f
+File: xemacs.info, Node: Input Methods, Next: Select Input Method, Prev: Language Environments, Up: Mule
+
+Input Methods
+=============
+
+ An "input method" is a kind of character conversion designed
+specifically for interactive input. In XEmacs, typically each language
+has its own input method; sometimes several languages which use the same
+characters can share one input method. A few languages support several
+input methods.
+
+ The simplest kind of input method works by mapping ASCII letters into
+another alphabet. This is how the Greek and Russian input methods work.
+
+ A more powerful technique is composition: converting sequences of
+characters into one letter. Many European input methods use composition
+to produce a single non-ASCII letter from a sequence that consists of a
+letter followed by accent characters. For example, some methods convert
+the sequence `'a' into a single accented letter.
+
+ The input methods for syllabic scripts typically use mapping followed
+by composition. The input methods for Thai and Korean work this way.
+First, letters are mapped into symbols for particular sounds or tone
+marks; then, sequences of these which make up a whole syllable are
+mapped into one syllable sign.
+
+ Chinese and Japanese require more complex methods. In Chinese input
+methods, first you enter the phonetic spelling of a Chinese word (in
+input method `chinese-py', among others), or a sequence of portions of
+the character (input methods `chinese-4corner' and `chinese-sw', and
+others). Since one phonetic spelling typically corresponds to many
+different Chinese characters, you must select one of the alternatives
+using special XEmacs commands. Keys such as `C-f', `C-b', `C-n',
+`C-p', and digits have special definitions in this situation, used for
+selecting among the alternatives. <TAB> displays a buffer showing all
+the possibilities.
+
+ In Japanese input methods, first you input a whole word using
+phonetic spelling; then, after the word is in the buffer, XEmacs
+converts it into one or more characters using a large dictionary. One
+phonetic spelling corresponds to many differently written Japanese
+words, so you must select one of them; use `C-n' and `C-p' to cycle
+through the alternatives.
+
+ Sometimes it is useful to cut off input method processing so that the
+characters you have just entered will not combine with subsequent
+characters. For example, in input method `latin-1-postfix', the
+sequence `e '' combines to form an `e' with an accent. What if you
+want to enter them as separate characters?
+
+ One way is to type the accent twice; that is a special feature for
+entering the separate letter and accent. For example, `e ' '' gives
+you the two characters `e''. Another way is to type another letter
+after the `e'--something that won't combine with that--and immediately
+delete it. For example, you could type `e e <DEL> '' to get separate
+`e' and `''.
+
+ Another method, more general but not quite as easy to type, is to use
+`C-\ C-\' between two characters to stop them from combining. This is
+the command `C-\' (`toggle-input-method') used twice. *Note Select
+Input Method::.
+
+ `C-\ C-\' is especially useful inside an incremental search, because
+stops waiting for more characters to combine, and starts searching for
+what you have already entered.
+
+ The variables `input-method-highlight-flag' and
+`input-method-verbose-flag' control how input methods explain what is
+happening. If `input-method-highlight-flag' is non-`nil', the partial
+sequence is highlighted in the buffer. If `input-method-verbose-flag'
+is non-`nil', the list of possible characters to type next is displayed
+in the echo area (but not when you are in the minibuffer).
+
+\1f
+File: xemacs.info, Node: Select Input Method, Next: Coding Systems, Prev: Input Methods, Up: Mule
+
+Selecting an Input Method
+=========================
+
+`C-\'
+ Enable or disable use of the selected input method.
+
+`C-x <RET> C-\ METHOD <RET>'
+ Select a new input method for the current buffer.
+
+`C-h I METHOD <RET>'
+`C-h C-\ METHOD <RET>'
+ Describe the input method METHOD (`describe-input-method'). By
+ default, it describes the current input method (if any).
+
+`M-x list-input-methods'
+ Display a list of all the supported input methods.
+
+ To choose an input method for the current buffer, use `C-x <RET>
+C-\' (`select-input-method'). This command reads the input method name
+with the minibuffer; the name normally starts with the language
+environment that it is meant to be used with. The variable
+`current-input-method' records which input method is selected.
+
+ Input methods use various sequences of ASCII characters to stand for
+non-ASCII characters. Sometimes it is useful to turn off the input
+method temporarily. To do this, type `C-\' (`toggle-input-method').
+To reenable the input method, type `C-\' again.
+
+ If you type `C-\' and you have not yet selected an input method, it
+prompts for you to specify one. This has the same effect as using `C-x
+<RET> C-\' to specify an input method.
+
+ Selecting a language environment specifies a default input method for
+use in various buffers. When you have a default input method, you can
+select it in the current buffer by typing `C-\'. The variable
+`default-input-method' specifies the default input method (`nil' means
+there is none).
+
+ Some input methods for alphabetic scripts work by (in effect)
+remapping the keyboard to emulate various keyboard layouts commonly used
+for those scripts. How to do this remapping properly depends on your
+actual keyboard layout. To specify which layout your keyboard has, use
+the command `M-x quail-set-keyboard-layout'.
+
+ To display a list of all the supported input methods, type `M-x
+list-input-methods'. The list gives information about each input
+method, including the string that stands for it in the mode line.
+
+\1f
+File: xemacs.info, Node: Coding Systems, Next: Recognize Coding, Prev: Select Input Method, Up: Mule
+
+Coding Systems
+==============
+
+ Users of various languages have established many more-or-less
+standard coding systems for representing them. XEmacs does not use
+these coding systems internally; instead, it converts from various
+coding systems to its own system when reading data, and converts the
+internal coding system to other coding systems when writing data.
+Conversion is possible in reading or writing files, in sending or
+receiving from the terminal, and in exchanging data with subprocesses.
+
+ XEmacs assigns a name to each coding system. Most coding systems are
+used for one language, and the name of the coding system starts with the
+language name. Some coding systems are used for several languages;
+their names usually start with `iso'. There are also special coding
+systems `binary' and `no-conversion' which do not convert printing
+characters at all.
+
+ In addition to converting various representations of non-ASCII
+characters, a coding system can perform end-of-line conversion. XEmacs
+handles three different conventions for how to separate lines in a file:
+newline, carriage-return linefeed, and just carriage-return.
+
+`C-h C CODING <RET>'
+ Describe coding system CODING.
+
+`C-h C <RET>'
+ Describe the coding systems currently in use.
+
+`M-x list-coding-systems'
+ Display a list of all the supported coding systems.
+
+ The command `C-h C' (`describe-coding-system') displays information
+about particular coding systems. You can specify a coding system name
+as argument; alternatively, with an empty argument, it describes the
+coding systems currently selected for various purposes, both in the
+current buffer and as the defaults, and the priority list for
+recognizing coding systems (*note Recognize Coding::).
+
+ To display a list of all the supported coding systems, type `M-x
+list-coding-systems'. The list gives information about each coding
+system, including the letter that stands for it in the mode line (*note
+Mode Line::).
+
+ Each of the coding systems that appear in this list--except for
+`binary', which means no conversion of any kind--specifies how and
+whether to convert printing characters, but leaves the choice of
+end-of-line conversion to be decided based on the contents of each file.
+For example, if the file appears to use carriage-return linefeed between
+lines, that end-of-line conversion will be used.
+
+ Each of the listed coding systems has three variants which specify
+exactly what to do for end-of-line conversion:
+
+`...-unix'
+ Don't do any end-of-line conversion; assume the file uses newline
+ to separate lines. (This is the convention normally used on Unix
+ and GNU systems.)
+
+`...-dos'
+ Assume the file uses carriage-return linefeed to separate lines,
+ and do the appropriate conversion. (This is the convention
+ normally used on Microsoft systems.)
+
+`...-mac'
+ Assume the file uses carriage-return to separate lines, and do the
+ appropriate conversion. (This is the convention normally used on
+ the Macintosh system.)
+
+ These variant coding systems are omitted from the
+`list-coding-systems' display for brevity, since they are entirely
+predictable. For example, the coding system `iso-8859-1' has variants
+`iso-8859-1-unix', `iso-8859-1-dos' and `iso-8859-1-mac'.
+
+ In contrast, the coding system `binary' specifies no character code
+conversion at all--none for non-Latin-1 byte values and none for end of
+line. This is useful for reading or writing binary files, tar files,
+and other files that must be examined verbatim.
+
+ The easiest way to edit a file with no conversion of any kind is with
+the `M-x find-file-literally' command. This uses `binary', and also
+suppresses other XEmacs features that might convert the file contents
+before you see them. *Note Visiting::.
+
+ The coding system `no-conversion' means that the file contains
+non-Latin-1 characters stored with the internal XEmacs encoding. It
+handles end-of-line conversion based on the data encountered, and has
+the usual three variants to specify the kind of end-of-line conversion.
+
+\1f
+File: xemacs.info, Node: Recognize Coding, Next: Specify Coding, Prev: Coding Systems, Up: Mule
+
+Recognizing Coding Systems
+==========================
+
+ Most of the time, XEmacs can recognize which coding system to use for
+any given file-once you have specified your preferences.
+
+ Some coding systems can be recognized or distinguished by which byte
+sequences appear in the data. However, there are coding systems that
+cannot be distinguished, not even potentially. For example, there is no
+way to distinguish between Latin-1 and Latin-2; they use the same byte
+values with different meanings.
+
+ XEmacs handles this situation by means of a priority list of coding
+systems. Whenever XEmacs reads a file, if you do not specify the coding
+system to use, XEmacs checks the data against each coding system,
+starting with the first in priority and working down the list, until it
+finds a coding system that fits the data. Then it converts the file
+contents assuming that they are represented in this coding system.
+
+ The priority list of coding systems depends on the selected language
+environment (*note Language Environments::). For example, if you use
+French, you probably want XEmacs to prefer Latin-1 to Latin-2; if you
+use Czech, you probably want Latin-2 to be preferred. This is one of
+the reasons to specify a language environment.
+
+ However, you can alter the priority list in detail with the command
+`M-x prefer-coding-system'. This command reads the name of a coding
+system from the minibuffer, and adds it to the front of the priority
+list, so that it is preferred to all others. If you use this command
+several times, each use adds one element to the front of the priority
+list.
+
+ Sometimes a file name indicates which coding system to use for the
+file. The variable `file-coding-system-alist' specifies this
+correspondence. There is a special function
+`modify-coding-system-alist' for adding elements to this list. For
+example, to read and write all `.txt' using the coding system
+`china-iso-8bit', you can execute this Lisp expression:
+
+ (modify-coding-system-alist 'file "\\.txt\\'" 'china-iso-8bit)
+
+The first argument should be `file', the second argument should be a
+regular expression that determines which files this applies to, and the
+third argument says which coding system to use for these files.
+
+ You can specify the coding system for a particular file using the
+`-*-...-*-' construct at the beginning of a file, or a local variables
+list at the end (*note File Variables::). You do this by defining a
+value for the "variable" named `coding'. XEmacs does not really have a
+variable `coding'; instead of setting a variable, it uses the specified
+coding system for the file. For example, `-*-mode: C; coding:
+iso-8859-1;-*-' specifies use of the iso-8859-1 coding system, as well
+as C mode.
+
+ Once XEmacs has chosen a coding system for a buffer, it stores that
+coding system in `buffer-file-coding-system' and uses that coding
+system, by default, for operations that write from this buffer into a
+file. This includes the commands `save-buffer' and `write-region'. If
+you want to write files from this buffer using a different coding
+system, you can specify a different coding system for the buffer using
+`set-buffer-file-coding-system' (*note Specify Coding::).
+
+\1f
File: xemacs.info, Node: Specify Coding, Prev: Recognize Coding, Up: Mule
Specifying a Coding System
lines in the file. Saving does not change the visibility status of a
line inside Emacs.
-\1f
-File: xemacs.info, Node: Outline Motion, Next: Outline Visibility, Prev: Outline Format, Up: Outline Mode
-
-Outline Motion Commands
-.......................
-
- Some special commands in Outline mode move backward and forward to
-heading lines.
-
-`C-c C-n'
- Move point to the next visible heading line
- (`outline-next-visible-heading').
-
-`C-c C-p'
- Move point to the previous visible heading line
- (`outline-previous-visible-heading').
-
-`C-c C-f'
- Move point to the next visible heading line at the same level as
- the one point is on (`outline-forward-same-level').
-
-`C-c C-b'
- Move point to the previous visible heading line at the same level
- (`outline-backward-same-level').
-
-`C-c C-u'
- Move point up to a lower-level (more inclusive) visible heading
- line (`outline-up-heading').
-
- `C-c C-n' (`next-visible-heading') moves down to the next heading
-line. `C-c C-p' (`previous-visible-heading') moves similarly backward.
-Both accept numeric arguments as repeat counts. The names emphasize
-that invisible headings are skipped, but this is not really a special
-feature. All editing commands that look for lines ignore the invisible
-lines automatically.
-
- More advanced motion commands understand the levels of headings.
-The commands `C-c C-f' (`outline-forward-same-level') and `C-c C-b'
-(`outline-backward-same-level') move from one heading line to another
-visible heading at the same depth in the outline. `C-c C-u'
-(`outline-up-heading') moves backward to another heading that is less
-deeply nested.
-
-\1f
-File: xemacs.info, Node: Outline Visibility, Prev: Outline Motion, Up: Outline Mode
-
-Outline Visibility Commands
-...........................
-
- The other special commands of outline mode are used to make lines
-visible or invisible. Their names all start with `hide' or `show'.
-Most of them exist as pairs of opposites. They are not undoable;
-instead, you can undo right past them. Making lines visible or
-invisible is simply not recorded by the undo mechanism.
-
-`M-x hide-body'
- Make all body lines in the buffer invisible.
-
-`M-x show-all'
- Make all lines in the buffer visible.
-
-`C-c C-d'
- Make everything under this heading invisible, not including this
- heading itself (`hide-subtree').
-
-`C-c C-s'
- Make everything under this heading visible, including body,
- subheadings, and their bodies (`show-subtree').
-
-`M-x hide-leaves'
- Make the body of this heading line, and of all its subheadings,
- invisible.
-
-`M-x show-branches'
- Make all subheadings of this heading line, at all levels, visible.
-
-`C-c C-i'
- Make immediate subheadings (one level down) of this heading line
- visible (`show-children').
-
-`M-x hide-entry'
- Make this heading line's body invisible.
-
-`M-x show-entry'
- Make this heading line's body visible.
-
- Two commands that are exact opposites are `M-x hide-entry' and `M-x
-show-entry'. They are used with point on a heading line, and apply
-only to the body lines of that heading. The subtopics and their bodies
-are not affected.
-
- Two more powerful opposites are `C-c C-h' (`hide-subtree') and `C-c
-C-s' (`show-subtree'). Both should be used when point is on a heading
-line, and both apply to all the lines of that heading's "subtree": its
-body, all its subheadings, both direct and indirect, and all of their
-bodies. In other words, the subtree contains everything following this
-heading line, up to and not including the next heading of the same or
-higher rank.
-
- Intermediate between a visible subtree and an invisible one is having
-all the subheadings visible but none of the body. There are two
-commands for doing this, one that hides the bodies and one that makes
-the subheadings visible. They are `M-x hide-leaves' and `M-x
-show-branches'.
-
- A little weaker than `show-branches' is `C-c C-i' (`show-children').
-It makes just the direct subheadings visible--those one level down.
-Deeper subheadings remain invisible.
-
- Two commands have a blanket effect on the whole file. `M-x
-hide-body' makes all body lines invisible, so that you see just the
-outline structure. `M-x show-all' makes all lines visible. You can
-think of these commands as a pair of opposites even though `M-x
-show-all' applies to more than just body lines.
-
- You can turn off the use of ellipses at the ends of visible lines by
-setting `selective-display-ellipses' to `nil'. The result is no
-visible indication of the presence of invisible lines.
-
-\1f
-File: xemacs.info, Node: Words, Next: Sentences, Prev: Text Mode, Up: Text
-
-Words
-=====
-
- Emacs has commands for moving over or operating on words. By
-convention, the keys for them are all `Meta-' characters.
-
-`M-f'
- Move forward over a word (`forward-word').
-
-`M-b'
- Move backward over a word (`backward-word').
-
-`M-d'
- Kill up to the end of a word (`kill-word').
-
-`M-<DEL>'
- Kill back to the beginning of a word (`backward-kill-word').
-
-`M-@'
- Mark the end of the next word (`mark-word').
-
-`M-t'
- Transpose two words; drag a word forward or backward across other
- words (`transpose-words').
-
- Notice how these keys form a series that parallels the
-character-based `C-f', `C-b', `C-d', `C-t' and <DEL>. `M-@' is related
-to `C-@', which is an alias for `C-<SPC>'.
-
- The commands `Meta-f' (`forward-word') and `Meta-b'
-(`backward-word') move forward and backward over words. They are
-analogous to `Control-f' and `Control-b', which move over single
-characters. Like their `Control-' analogues, `Meta-f' and `Meta-b'
-move several words if given an argument. `Meta-f' with a negative
-argument moves backward, and `Meta-b' with a negative argument moves
-forward. Forward motion stops after the last letter of the word, while
-backward motion stops before the first letter.
-
- `Meta-d' (`kill-word') kills the word after point. To be precise,
-it kills everything from point to the place `Meta-f' would move to.
-Thus, if point is in the middle of a word, `Meta-d' kills just the part
-after point. If some punctuation comes between point and the next
-word, it is killed along with the word. (To kill only the next word
-but not the punctuation before it, simply type `Meta-f' to get to the
-end and kill the word backwards with `Meta-<DEL>'.) `Meta-d' takes
-arguments just like `Meta-f'.
-
- `Meta-<DEL>' (`backward-kill-word') kills the word before point. It
-kills everything from point back to where `Meta-b' would move to. If
-point is after the space in `FOO, BAR', then `FOO, ' is killed. To
-kill just `FOO', type `Meta-b Meta-d' instead of `Meta-<DEL>'.
-
- `Meta-t' (`transpose-words') exchanges the word before or containing
-point with the following word. The delimiter characters between the
-words do not move. For example, transposing `FOO, BAR' results in
-`BAR, FOO' rather than `BAR FOO,'. *Note Transpose::, for more on
-transposition and on arguments to transposition commands.
-
- To operate on the next N words with an operation which applies
-between point and mark, you can either set the mark at point and then
-move over the words, or you can use the command `Meta-@' (`mark-word')
-which does not move point but sets the mark where `Meta-f' would move
-to. It can be given arguments just like `Meta-f'.
-
- The word commands' understanding of syntax is completely controlled
-by the syntax table. For example, any character can be declared to be
-a word delimiter. *Note Syntax::.
-
-\1f
-File: xemacs.info, Node: Sentences, Next: Paragraphs, Prev: Words, Up: Text
-
-Sentences
-=========
-
- The Emacs commands for manipulating sentences and paragraphs are
-mostly on `Meta-' keys, and therefore are like the word-handling
-commands.
-
-`M-a'
- Move back to the beginning of the sentence (`backward-sentence').
-
-`M-e'
- Move forward to the end of the sentence (`forward-sentence').
-
-`M-k'
- Kill forward to the end of the sentence (`kill-sentence').
-
-`C-x <DEL>'
- Kill back to the beginning of the sentence
- (`backward-kill-sentence').
-
- The commands `Meta-a' and `Meta-e' (`backward-sentence' and
-`forward-sentence') move to the beginning and end of the current
-sentence, respectively. They resemble `Control-a' and `Control-e',
-which move to the beginning and end of a line. Unlike their
-counterparts, `Meta-a' and `Meta-e' move over successive sentences if
-repeated or given numeric arguments. Emacs assumes the typist's
-convention is followed, and thus considers a sentence to end wherever
-there is a `.', `?', or `!' followed by the end of a line or two
-spaces, with any number of `)', `]', `'', or `"' characters allowed in
-between. A sentence also begins or ends wherever a paragraph begins or
-ends.
-
- Neither `M-a' nor `M-e' moves past the newline or spaces beyond the
-sentence edge at which it is stopping.
-
- `M-a' and `M-e' have a corresponding kill command, just like `C-a'
-and `C-e' have `C-k'. The command is `M-k' (`kill-sentence') which
-kills from point to the end of the sentence. With minus one as an
-argument it kills back to the beginning of the sentence. Larger
-arguments serve as repeat counts.
-
- There is a special command, `C-x <DEL>' (`backward-kill-sentence'),
-for killing back to the beginning of a sentence, which is useful when
-you change your mind in the middle of composing text.
-
- The variable `sentence-end' controls recognition of the end of a
-sentence. It is a regexp that matches the last few characters of a
-sentence, together with the whitespace following the sentence. Its
-normal value is:
-
- "[.?!][]\"')]*\\($\\|\t\\| \\)[ \t\n]*"
-
-This example is explained in the section on regexps. *Note Regexps::.
-
-\1f
-File: xemacs.info, Node: Paragraphs, Next: Pages, Prev: Sentences, Up: Text
-
-Paragraphs
-==========
-
- The Emacs commands for manipulating paragraphs are also `Meta-' keys.
-
-`M-['
- Move back to previous paragraph beginning
- (`backward-paragraph').
-
-`M-]'
- Move forward to next paragraph end (`forward-paragraph').
-
-`M-h'
- Put point and mark around this or next paragraph
- (`mark-paragraph').
-
- `Meta-[' moves to the beginning of the current or previous paragraph,
-while `Meta-]' moves to the end of the current or next paragraph.
-Blank lines and text formatter command lines separate paragraphs and are
-not part of any paragraph. An indented line starts a new paragraph.
-
- In major modes for programs (as opposed to Text mode), paragraphs
-begin and end only at blank lines. As a result, the paragraph commands
-continue to be useful even though there are no paragraphs per se.
-
- When there is a fill prefix, paragraphs are delimited by all lines
-which don't start with the fill prefix. *Note Filling::.
-
- To operate on a paragraph, you can use the command `Meta-h'
-(`mark-paragraph') to set the region around it. This command puts
-point at the beginning and mark at the end of the paragraph point was
-in. If point is between paragraphs (in a run of blank lines or at a
-boundary), the paragraph following point is surrounded by point and
-mark. If there are blank lines preceding the first line of the
-paragraph, one of the blank lines is included in the region. Thus, for
-example, `M-h C-w' kills the paragraph around or after point.
-
- The precise definition of a paragraph boundary is controlled by the
-variables `paragraph-separate' and `paragraph-start'. The value of
-`paragraph-start' is a regexp that matches any line that either starts
-or separates paragraphs. The value of `paragraph-separate' is another
-regexp that matches only lines that separate paragraphs without being
-part of any paragraph. Lines that start a new paragraph and are
-contained in it must match both regexps. For example, normally
-`paragraph-start' is `"^[ \t\n\f]"' and `paragraph-separate' is `"^[
-\t\f]*$"'.
-
- Normally it is desirable for page boundaries to separate paragraphs.
-The default values of these variables recognize the usual separator for
-pages.
-