]> git.eshelyaron.com Git - emacs.git/commitdiff
Document `prettify-symbols-mode' and `global-prettify-symbols-mode'.
authorXue Fuqiao <xfq@gnu.org>
Fri, 28 Feb 2014 03:04:12 +0000 (11:04 +0800)
committerXue Fuqiao <xfq@gnu.org>
Fri, 28 Feb 2014 03:04:12 +0000 (11:04 +0800)
* doc/emacs/emacs.texi (Top):
* doc/emacs/programs.texi (Programs, Prettifying Symbols):
Document `prettify-symbols-mode' and `global-prettify-symbols-mode'.

* etc/NEWS: Markup changes.

1  2 
doc/emacs/ChangeLog
doc/emacs/emacs.texi
doc/emacs/programs.texi
etc/NEWS

index 7138f59d24206026c19fe820443fbb64de9abf10,7138f59d24206026c19fe820443fbb64de9abf10..39c37c48022267735ed231d5bc6f3d37242fb751
@@@ -1,5 -1,5 +1,9 @@@
  2014-02-28  Xue Fuqiao  <xfq@gnu.org>
  
++      * emacs.texi (Top):
++      * programs.texi (Programs, Prettifying Symbols):
++      Document `prettify-symbols-mode' and `global-prettify-symbols-mode'.
++
        * misc.texi (Saving Emacs Sessions): Document some new desktop user options.
  
  2014-02-27  Xue Fuqiao  <xfq@gnu.org>
index ee612643feab4b4561fb0e97806d2df6285efd6a,ee612643feab4b4561fb0e97806d2df6285efd6a..40a32b5da53a75b1a2623bad5b880c0b360f9e4d
@@@ -670,6 -670,6 +670,7 @@@ Editing Program
  * 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.
index 4a6da9e4fd64dbcd8f6138e122d2b600ba9247c2,4a6da9e4fd64dbcd8f6138e122d2b600ba9247c2..1cbf61970c01a6312b4ab2742a342e80ff876e24
@@@ -38,6 -38,6 +38,7 @@@ Highlight program syntax (@pxref{Font L
  * 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.
@@@ -1432,6 -1432,6 +1433,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
  
diff --cc etc/NEWS
index d08efc818d2a6f14f520f47ff4422f302711fe20,d08efc818d2a6f14f520f47ff4422f302711fe20..3d45dfb8011d2ae26a083def9bd25e8d38ae36ff
+++ b/etc/NEWS
@@@ -1185,6 -1185,6 +1185,7 @@@ as a function to call to provide defaul
  The default `crm-separator' has been changed to allow surrounding spaces
  around the comma.
  
++---
  *** The `common-substring' argument of `display-completion-list',
  which has been documented as obsolete since Emacs 23.1, is now _really_
  obsolete, and no longer advertised.  Instead use either
@@@ -1200,6 -1200,6 +1201,7 @@@ to add the highlight
  *** New function `completion-table-merge' to combine several
  completion tables by merging their completions.
  
+++++
  ** New minor modes `prettify-symbols-mode' and `global-prettify-symbols-mode'
  display specified symbols as composed characters.  E.g., in Emacs Lisp mode,
  this replaces the string "lambda" with the Greek lambda character.