Mercurial > emacs
comparison man/custom.texi @ 56085:e6cc673c5461
(Init Syntax): Explain about vars that do special
things when set with setq or with Custom.
(Init Examples): Add line-number-mode example.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 13 Jun 2004 22:08:07 +0000 |
parents | a32af30ee1a1 |
children | 920d5b4fe0a2 |
comparison
equal
deleted
inserted
replaced
56084:4d540c98ac8c | 56085:e6cc673c5461 |
---|---|
1982 expressions. Each of these consists of a function name followed by | 1982 expressions. Each of these consists of a function name followed by |
1983 arguments, all surrounded by parentheses. For example, @code{(setq | 1983 arguments, all surrounded by parentheses. For example, @code{(setq |
1984 fill-column 60)} calls the function @code{setq} to set the variable | 1984 fill-column 60)} calls the function @code{setq} to set the variable |
1985 @code{fill-column} (@pxref{Filling}) to 60. | 1985 @code{fill-column} (@pxref{Filling}) to 60. |
1986 | 1986 |
1987 The second argument to @code{setq} is an expression for the new value of | 1987 You can set any Lisp variable with @code{setq}, but with certain |
1988 the variable. This can be a constant, a variable, or a function call | 1988 variables @code{setq} won't do what you probably want in the |
1989 expression. In @file{.emacs}, constants are used most of the time. They can be: | 1989 @file{.emacs} file. Some variables automatically become buffer-local |
1990 when set with @code{setq}; what you want in @file{.emacs} is to set | |
1991 the default value, using @code{setq-default}. Some customizable minor | |
1992 mode variables do special things to enable the mode when you set them | |
1993 with Customize, but ordinary @code{setq} won't do that; to enable the | |
1994 mode in your @file{.emacs} file, call the minor mode command. The | |
1995 following section has examples of both of these methods. | |
1996 | |
1997 The second argument to @code{setq} is an expression for the new | |
1998 value of the variable. This can be a constant, a variable, or a | |
1999 function call expression. In @file{.emacs}, constants are used most | |
2000 of the time. They can be: | |
1990 | 2001 |
1991 @table @asis | 2002 @table @asis |
1992 @item Numbers: | 2003 @item Numbers: |
1993 Numbers are written in decimal, with an optional initial minus sign. | 2004 Numbers are written in decimal, with an optional initial minus sign. |
1994 | 2005 |
2106 (set-language-environment "Latin-1") | 2117 (set-language-environment "Latin-1") |
2107 @end example | 2118 @end example |
2108 | 2119 |
2109 @need 1500 | 2120 @need 1500 |
2110 @item | 2121 @item |
2122 Turn off Line Number mode, a global minor mode. | |
2123 | |
2124 @example | |
2125 (line-number-mode 0) | |
2126 @end example | |
2127 | |
2128 @need 1500 | |
2129 @item | |
2111 Turn on Auto Fill mode automatically in Text mode and related modes. | 2130 Turn on Auto Fill mode automatically in Text mode and related modes. |
2112 | 2131 |
2113 @example | 2132 @example |
2114 (add-hook 'text-mode-hook | 2133 (add-hook 'text-mode-hook |
2115 '(lambda () (auto-fill-mode 1))) | 2134 '(lambda () (auto-fill-mode 1))) |