]> code.delx.au - gnu-emacs/blobdiff - doc/emacs/programs.texi
Tweak previous NEWS change
[gnu-emacs] / doc / emacs / programs.texi
index 4a6da9e4fd64dbcd8f6138e122d2b600ba9247c2..55031e673dce88e91198457bdc5508a86af3741c 100644 (file)
@@ -38,6 +38,7 @@ Highlight program syntax (@pxref{Font Lock}).
 * Symbol Completion::   Completion on symbol names of your program or language.
 * MixedCase Words::     Dealing with identifiersLikeThis.
 * Semantic::            Suite of editing tools based on source code parsing.
+* Prettifying Symbols:: Display symbols as composed characters.
 * Misc for Programs::   Other Emacs features useful for editing programs.
 * C Modes::             Special commands of C, C++, Objective-C, Java,
                           IDL, Pike and AWK modes.
@@ -797,12 +798,12 @@ make it easy to see how and whether parentheses (or other delimiters)
 match up.
 
   Whenever you type a self-inserting character that is a closing
-delimiter, the cursor moves momentarily to the location of the
-matching opening delimiter, provided that is on the screen.  If it is
-not on the screen, Emacs displays some of the text near it in the echo
-area.  Either way, you can tell which grouping you are closing off.
-If the opening delimiter and closing delimiter are mismatched---such
-as in @samp{[x)}---a warning message is displayed in the echo area.
+delimiter, Emacs briefly indicates the location of the matching
+opening delimiter, provided that is on the screen.  If it is not on
+the screen, Emacs displays some of the text near it in the echo area.
+Either way, you can tell which grouping you are closing off.  If the
+opening delimiter and closing delimiter are mismatched---such as in
+@samp{[x)}---a warning message is displayed in the echo area.
 
 @vindex blink-matching-paren
 @vindex blink-matching-paren-distance
@@ -812,13 +813,14 @@ as in @samp{[x)}---a warning message is displayed in the echo area.
 @itemize @bullet
 @item
 @code{blink-matching-paren} turns the feature on or off: @code{nil}
-disables it, but the default is @code{t} to enable it.
+disables it, but the default is @code{t} to enable it.  Set it to
+@code{jump} to make indication work by momentarily moving the cursor
+to the matching opening delimiter.
 
 @item
-@code{blink-matching-delay} says how many seconds to leave the cursor
-on the matching opening delimiter, before bringing it back to the real
-location of point.  This may be an integer or floating-point number;
-the default is 1.
+@code{blink-matching-delay} says how many seconds to keep indicating
+the matching opening delimiter.  This may be an integer or
+floating-point number; the default is 1.
 
 @item
 @code{blink-matching-paren-distance} specifies how many characters
@@ -1432,6 +1434,37 @@ is idle.
 @xref{Top, Semantic,, semantic, Semantic}, for details.
 @end ifnottex
 
+@node Prettifying Symbols
+@section Prettifying Symbols
+@cindex prettifying symbols
+@cindex symbol, prettifying
+
+@code{prettify-symbols-mode} and @code{global-prettify-symbols-mode}
+are two minor modes (@pxref{Minor Modes}) that can display specified
+symbols as composed characters.  For instance, in Emacs Lisp mode
+(@pxref{Lisp Eval}), this mode will replace the string ``lambda'' with
+the Greek lambda character.
+
+@findex prettify-symbols-mode
+@vindex prettify-symbols-alist
+When Prettify Symbols mode and Font Lock mode (@pxref{Font Lock}) are
+enabled, symbols are prettified (displayed as composed characters)
+according to the rules in @code{prettify-symbols-alist}, which are
+locally defined by major modes (@pxref{Major Modes}) supporting
+prettifying.  To add further customizations for a given major mode,
+you can modify @code{prettify-symbols-alist}.  For example:
+
+@example
+(add-hook 'emacs-lisp-mode-hook
+         (lambda ()
+           (push '("<=" . ?≤) prettify-symbols-alist)))
+@end example
+
+@findex global-prettify-symbols-mode
+You can enable this mode locally in desired buffers, or use
+@code{global-prettify-symbols-mode} to enable it for all modes that
+support it.
+
 @node Misc for Programs
 @section Other Features Useful for Editing Programs