aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2005-11-21 05:02:37 +0000
committerChong Yidong2005-11-21 05:02:37 +0000
commitc4e8acbcfa34adc5336379d34ceeb8578b88267c (patch)
treebff08490617256b665e5fc532d7568372bfb0fc6
parent74b99d45fd43a12213709ffdbdbadab67b9fdfba (diff)
downloademacs-c4e8acbcfa34adc5336379d34ceeb8578b88267c.tar.gz
emacs-c4e8acbcfa34adc5336379d34ceeb8578b88267c.zip
Font lock enabled by default.
-rw-r--r--man/ChangeLog4
-rw-r--r--man/display.texi37
2 files changed, 24 insertions, 17 deletions
diff --git a/man/ChangeLog b/man/ChangeLog
index 0590f63c555..b95063cb2d9 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,7 @@
12005-11-21 Chong Yidong <cyd@stupidchicken.com>
2
3 * display.texi (Font Lock): Font lock is enabled by default now.
4
12005-11-20 Juri Linkov <juri@jurta.org> 52005-11-20 Juri Linkov <juri@jurta.org>
2 6
3 * basic.texi (Position Info): Update examples of the output. 7 * basic.texi (Position Info): Update examples of the output.
diff --git a/man/display.texi b/man/display.texi
index 42ea7ace2eb..cc345b93b8f 100644
--- a/man/display.texi
+++ b/man/display.texi
@@ -258,32 +258,35 @@ Some special modes, such as Occur mode and Info mode, have completely
258specialized ways of assigning fonts for Font Lock mode. 258specialized ways of assigning fonts for Font Lock mode.
259 259
260@findex font-lock-mode 260@findex font-lock-mode
261@findex turn-on-font-lock 261 Font Lock mode is turned on by default in all modes which support it.
262 The command @kbd{M-x font-lock-mode} turns Font Lock mode on with 262You can toggle font-lock for each buffer with the command @kbd{M-x
263positive argument, off with negative or zero argument, and toggles the 263font-lock-mode}. Using a positive argument unconditionally turns Font
264mode when it has no argument. The function @code{turn-on-font-lock} 264Lock mode on, and a negative or zero argument turns it off.
265unconditionally enables Font Lock mode. This is useful in mode-hook
266functions. For example, to enable Font Lock mode whenever you edit a
267C file, you can do this:
268
269@example
270(add-hook 'c-mode-hook 'turn-on-font-lock)
271@end example
272 265
273@findex global-font-lock-mode 266@findex global-font-lock-mode
274@vindex global-font-lock-mode 267@vindex global-font-lock-mode
275 To turn on Font Lock mode automatically in all modes which support 268 If you do not wish Font Lock mode to be turned on by default,
276it, customize the variable @code{global-font-lock-mode} using the 269customize the variable @code{global-font-lock-mode} using the Customize
277Customize interface (@pxref{Easy Customization}) or use the function 270interface (@pxref{Easy Customization}), or use the function
278@code{global-font-lock-mode} in your @file{.emacs} file, like this: 271@code{global-font-lock-mode} in your @file{.emacs} file, like this:
279 272
280@example 273@example
281(global-font-lock-mode 1) 274(global-font-lock-mode 0)
282@end example 275@end example
283 276
284@noindent 277@noindent
285You can also specify this using the menu bar Options menu, specifying 278Global Font Lock mode can also be set using the menu bar Options menu,
286first Syntax Highlighting and then Save Options. 279specifying first Syntax Highlighting and then Save Options.
280
281@findex turn-on-font-lock
282 If you have disabled Global Font Lock mode, you can still enable font
283lock for specific major modes by adding the function
284@code{turn-on-font-lock} to the mode hooks (@pxref{Hooks}). For
285example, to enable Font Lock mode for editing C files, you can do this:
286
287@example
288(add-hook 'c-mode-hook 'turn-on-font-lock)
289@end example
287 290
288 Font Lock mode uses several specifically named faces to do its job, 291 Font Lock mode uses several specifically named faces to do its job,
289including @code{font-lock-string-face}, @code{font-lock-comment-face}, 292including @code{font-lock-string-face}, @code{font-lock-comment-face},