aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXue Fuqiao2014-02-28 11:04:12 +0800
committerXue Fuqiao2014-02-28 11:04:12 +0800
commit4f07dcdce61f54524a8efe63493e5db6e605dd2d (patch)
tree8a08b2f15e0607e108b70758734bb35171342277
parent0a4d25e5d249d35a08959a2775229fef804e9edc (diff)
parent0fcfa97418aa7e7fa42887507e25b9bdf150cc66 (diff)
downloademacs-4f07dcdce61f54524a8efe63493e5db6e605dd2d.tar.gz
emacs-4f07dcdce61f54524a8efe63493e5db6e605dd2d.zip
Document `prettify-symbols-mode' and `global-prettify-symbols-mode'.
* 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.
-rw-r--r--doc/emacs/ChangeLog4
-rw-r--r--doc/emacs/emacs.texi1
-rw-r--r--doc/emacs/programs.texi32
-rw-r--r--etc/NEWS2
4 files changed, 39 insertions, 0 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 7138f59d242..39c37c48022 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,5 +1,9 @@
12014-02-28 Xue Fuqiao <xfq@gnu.org> 12014-02-28 Xue Fuqiao <xfq@gnu.org>
2 2
3 * emacs.texi (Top):
4 * programs.texi (Programs, Prettifying Symbols):
5 Document `prettify-symbols-mode' and `global-prettify-symbols-mode'.
6
3 * misc.texi (Saving Emacs Sessions): Document some new desktop user options. 7 * misc.texi (Saving Emacs Sessions): Document some new desktop user options.
4 8
52014-02-27 Xue Fuqiao <xfq@gnu.org> 92014-02-27 Xue Fuqiao <xfq@gnu.org>
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index ee612643fea..40a32b5da53 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -670,6 +670,7 @@ Editing Programs
670* Symbol Completion:: Completion on symbol names of your program or language. 670* Symbol Completion:: Completion on symbol names of your program or language.
671* MixedCase Words:: Dealing with identifiersLikeThis. 671* MixedCase Words:: Dealing with identifiersLikeThis.
672* Semantic:: Suite of editing tools based on source code parsing. 672* Semantic:: Suite of editing tools based on source code parsing.
673* Prettifying Symbols:: Display symbols as composed characters.
673* Misc for Programs:: Other Emacs features useful for editing programs. 674* Misc for Programs:: Other Emacs features useful for editing programs.
674* C Modes:: Special commands of C, C++, Objective-C, 675* C Modes:: Special commands of C, C++, Objective-C,
675 Java, IDL, Pike and AWK modes. 676 Java, IDL, Pike and AWK modes.
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 4a6da9e4fd6..1cbf61970c0 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -38,6 +38,7 @@ Highlight program syntax (@pxref{Font Lock}).
38* Symbol Completion:: Completion on symbol names of your program or language. 38* Symbol Completion:: Completion on symbol names of your program or language.
39* MixedCase Words:: Dealing with identifiersLikeThis. 39* MixedCase Words:: Dealing with identifiersLikeThis.
40* Semantic:: Suite of editing tools based on source code parsing. 40* Semantic:: Suite of editing tools based on source code parsing.
41* Prettifying Symbols:: Display symbols as composed characters.
41* Misc for Programs:: Other Emacs features useful for editing programs. 42* Misc for Programs:: Other Emacs features useful for editing programs.
42* C Modes:: Special commands of C, C++, Objective-C, Java, 43* C Modes:: Special commands of C, C++, Objective-C, Java,
43 IDL, Pike and AWK modes. 44 IDL, Pike and AWK modes.
@@ -1432,6 +1433,37 @@ is idle.
1432@xref{Top, Semantic,, semantic, Semantic}, for details. 1433@xref{Top, Semantic,, semantic, Semantic}, for details.
1433@end ifnottex 1434@end ifnottex
1434 1435
1436@node Prettifying Symbols
1437@section Prettifying Symbols
1438@cindex prettifying symbols
1439@cindex symbol, prettifying
1440
1441@code{prettify-symbols-mode} and @code{global-prettify-symbols-mode}
1442are two minor modes (@pxref{Minor Modes}) that can display specified
1443symbols as composed characters. For instance, in Emacs Lisp mode
1444(@pxref{Lisp Eval}), this mode will replace the string ``lambda'' with
1445the Greek lambda character.
1446
1447@findex prettify-symbols-mode
1448@vindex prettify-symbols-alist
1449When Prettify Symbols mode and Font Lock mode (@pxref{Font Lock}) are
1450enabled, symbols are prettified (displayed as composed characters)
1451according to the rules in @code{prettify-symbols-alist}, which are
1452locally defined by major modes (@pxref{Major Modes}) supporting
1453prettifying. To add further customizations for a given major mode,
1454you can modify @code{prettify-symbols-alist}. For example:
1455
1456@example
1457(add-hook 'emacs-lisp-mode-hook
1458 (lambda ()
1459 (push '("<=" . ?≤) prettify-symbols-alist)))
1460@end example
1461
1462@findex global-prettify-symbols-mode
1463You can enable this mode locally in desired buffers, or use
1464@code{global-prettify-symbols-mode} to enable it for all modes that
1465support it.
1466
1435@node Misc for Programs 1467@node Misc for Programs
1436@section Other Features Useful for Editing Programs 1468@section Other Features Useful for Editing Programs
1437 1469
diff --git a/etc/NEWS b/etc/NEWS
index d08efc818d2..3d45dfb8011 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1185,6 +1185,7 @@ as a function to call to provide default values.
1185The default `crm-separator' has been changed to allow surrounding spaces 1185The default `crm-separator' has been changed to allow surrounding spaces
1186around the comma. 1186around the comma.
1187 1187
1188---
1188*** The `common-substring' argument of `display-completion-list', 1189*** The `common-substring' argument of `display-completion-list',
1189which has been documented as obsolete since Emacs 23.1, is now _really_ 1190which has been documented as obsolete since Emacs 23.1, is now _really_
1190obsolete, and no longer advertised. Instead use either 1191obsolete, and no longer advertised. Instead use either
@@ -1200,6 +1201,7 @@ to add the highlight.
1200*** New function `completion-table-merge' to combine several 1201*** New function `completion-table-merge' to combine several
1201completion tables by merging their completions. 1202completion tables by merging their completions.
1202 1203
1204+++
1203** New minor modes `prettify-symbols-mode' and `global-prettify-symbols-mode' 1205** New minor modes `prettify-symbols-mode' and `global-prettify-symbols-mode'
1204display specified symbols as composed characters. E.g., in Emacs Lisp mode, 1206display specified symbols as composed characters. E.g., in Emacs Lisp mode,
1205this replaces the string "lambda" with the Greek lambda character. 1207this replaces the string "lambda" with the Greek lambda character.