comparison lispintro/emacs-lisp-intro.texi @ 89909:68c22ea6027c

Sync to HEAD
author Kenichi Handa <handa@m17n.org>
date Fri, 16 Apr 2004 12:51:06 +0000
parents 375f2633d815
children cce1c0ee76ee
comparison
equal deleted inserted replaced
89908:ee1402f7b568 89909:68c22ea6027c
19 @c clear print-postscript-figures 19 @c clear print-postscript-figures
20 @c --------- 20 @c ---------
21 21
22 @comment %**end of header 22 @comment %**end of header
23 23
24 @set edition-number 2.10 24 @set edition-number 2.12
25 @set update-date 2003 July 15 25 @set update-date 2003 Nov 19
26 26
27 @ignore 27 @ignore
28 ## Summary of shell commands to create various output formats: 28 ## Summary of shell commands to create various output formats:
29 29
30 ## Info output 30 ## Info output
3517 @code{(interactive)}. The @code{mark-whole-buffer} function is like 3517 @code{(interactive)}. The @code{mark-whole-buffer} function is like
3518 this. 3518 this.
3519 3519
3520 Alternatively, if the special letter-codes are not right for your 3520 Alternatively, if the special letter-codes are not right for your
3521 application, you can pass your own arguments to @code{interactive} as 3521 application, you can pass your own arguments to @code{interactive} as
3522 a list. @xref{interactive, , Using @code{Interactive}, elisp, The 3522 a list. @xref{Using Interactive, , Using @code{Interactive}, elisp, The
3523 GNU Emacs Lisp Reference Manual}, for more information about this advanced 3523 GNU Emacs Lisp Reference Manual}, for more information about this advanced
3524 technique. 3524 technique.
3525 3525
3526 @node Permanent Installation, let, Interactive Options, Writing Defuns 3526 @node Permanent Installation, let, Interactive Options, Writing Defuns
3527 @comment node-name, next, previous, up 3527 @comment node-name, next, previous, up
8064 In the past, Emacs used the @code{defvar} special form both for 8064 In the past, Emacs used the @code{defvar} special form both for
8065 internal variables that you would not expect a user to change and for 8065 internal variables that you would not expect a user to change and for
8066 variables that you do expect a user to change. Although you can still 8066 variables that you do expect a user to change. Although you can still
8067 use @code{defvar} for user customizable variables, please use 8067 use @code{defvar} for user customizable variables, please use
8068 @code{defcustom} instead, since that special form provides a path into 8068 @code{defcustom} instead, since that special form provides a path into
8069 the Customization commands. (@xref{defcustom, , Setting Variables 8069 the Customization commands. (@xref{defcustom, , Specifying Variables
8070 with @code{defcustom}}.) 8070 using @code{defcustom}}.)
8071 8071
8072 When you specified a variable using the @code{defvar} special form, 8072 When you specified a variable using the @code{defvar} special form,
8073 you could distinguish a readily settable variable from others by 8073 you could distinguish a readily settable variable from others by
8074 typing an asterisk, @samp{*}, in the first column of its documentation 8074 typing an asterisk, @samp{*}, in the first column of its documentation
8075 string. For example: 8075 string. For example:
8080 "*Buffer name for `shell-command' @dots{} error output. 8080 "*Buffer name for `shell-command' @dots{} error output.
8081 @dots{} ") 8081 @dots{} ")
8082 @end group 8082 @end group
8083 @end smallexample 8083 @end smallexample
8084 8084
8085 @noindent 8085 @findex set-variable
8086 This means that you could (and still can) use the @code{edit-options} 8086 @noindent
8087 command to change the value of 8087 You could (and still can) use the @code{set-variable} command to
8088 @code{shell-command-default-error-buffer} temporarily. 8088 change the value of @code{shell-command-default-error-buffer}
8089 8089 temporarily. However, options set using @code{set-variable} are set
8090 @findex edit-options 8090 only for the duration of your editing session. The new values are not
8091 However, options set using @code{edit-options} are set only for the 8091 saved between sessions. Each time Emacs starts, it reads the original
8092 duration of your editing session. The new values are not saved
8093 between sessions. Each time Emacs starts, it reads the original
8094 value, unless you change the value within your @file{.emacs} file, 8092 value, unless you change the value within your @file{.emacs} file,
8095 either by setting it manually or by using @code{customize}. 8093 either by setting it manually or by using @code{customize}.
8096 @xref{Emacs Initialization, , Your @file{.emacs} File}. 8094 @xref{Emacs Initialization, , Your @file{.emacs} File}.
8097 8095
8098 For me, the major use of the @code{edit-options} command is to suggest 8096 For me, the major use of the @code{set-variable} command is to suggest
8099 variables that I might want to set in my @file{.emacs} file. I urge 8097 variables that I might want to set in my @file{.emacs} file. There
8100 you to look through the list. (@xref{Edit Options, , Editing Variable 8098 are now more than 700 such variables --- far too many to remember
8101 Values, emacs, The GNU Emacs Manual}.) 8099 readily. Fortunately, you can press @key{TAB} after calling the
8100 @code{M-x set-variable} command to see the list of variables.
8101 (@xref{Examining, , Examining and Setting Variables, emacs,
8102 The GNU Emacs Manual}.)
8102 8103
8103 @node copy-region-as-kill, cons & search-fwd Review, defvar, Cutting & Storing Text 8104 @node copy-region-as-kill, cons & search-fwd Review, defvar, Cutting & Storing Text
8104 @comment node-name, next, previous, up 8105 @comment node-name, next, previous, up
8105 @section @code{copy-region-as-kill} 8106 @section @code{copy-region-as-kill}
8106 @findex copy-region-as-kill 8107 @findex copy-region-as-kill
9140 to say, the symbol @code{flowers} holds the address of the pair of 9141 to say, the symbol @code{flowers} holds the address of the pair of
9141 address-boxes, the first of which holds the address of @code{violet}, 9142 address-boxes, the first of which holds the address of @code{violet},
9142 and the second of which holds the address of @code{buttercup}. 9143 and the second of which holds the address of @code{buttercup}.
9143 9144
9144 A pair of address-boxes is called a @dfn{cons cell} or @dfn{dotted 9145 A pair of address-boxes is called a @dfn{cons cell} or @dfn{dotted
9145 pair}. @xref{List Type, , List Type , elisp, The GNU Emacs Lisp 9146 pair}. @xref{Cons Cell Type, , Cons Cell and List Types, elisp, The GNU Emacs Lisp
9146 Reference Manual}, and @ref{Dotted Pair Notation, , Dotted Pair 9147 Reference Manual}, and @ref{Dotted Pair Notation, , Dotted Pair
9147 Notation, elisp, The GNU Emacs Lisp Reference Manual}, for more 9148 Notation, elisp, The GNU Emacs Lisp Reference Manual}, for more
9148 information about cons cells and dotted pairs. 9149 information about cons cells and dotted pairs.
9149 9150
9150 @need 1200 9151 @need 1200
14371 @smallexample 14372 @smallexample
14372 (custom-set-variables '(eval-expression-print-length nil)) 14373 (custom-set-variables '(eval-expression-print-length nil))
14373 @end smallexample 14374 @end smallexample
14374 14375
14375 @noindent 14376 @noindent
14376 (@xref{defcustom, , Setting Variables with @code{defcustom}}. 14377 (@xref{defcustom, , Specifying Variables using @code{defcustom}}.)
14377 Then evaluate the @code{lengths-list-file} expression.) 14378 Then evaluate the @code{lengths-list-file} expression.)
14378 14379
14379 @need 1200 14380 @need 1200
14380 The lengths' list for @file{debug.el} takes less than a second to 14381 The lengths' list for @file{debug.el} takes less than a second to
14381 produce and looks like this: 14382 produce and looks like this:
16123 16124
16124 @noindent 16125 @noindent
16125 The name of the variable is @code{text-mode-hook}; it has no default 16126 The name of the variable is @code{text-mode-hook}; it has no default
16126 value; and its documentation string tells you what it does. 16127 value; and its documentation string tells you what it does.
16127 16128
16128 The @code{:type} keyword tells Emacs what kind of data 16129 The @code{:type} keyword tells Emacs the kind of data to which
16129 @code{text-mode-hook} should be set to and how to display the value in 16130 @code{text-mode-hook} should be set and how to display the value in a
16130 a Customization buffer. 16131 Customization buffer.
16131 16132
16132 The @code{:options} keyword specifies a suggested list of values for 16133 The @code{:options} keyword specifies a suggested list of values for
16133 the variable. Currently, you can use @code{:options} only for a hook. 16134 the variable. Currently, you can use @code{:options} only for a hook.
16134 The list is only a suggestion; it is not exclusive; a person who sets 16135 The list is only a suggestion; it is not exclusive; a person who sets
16135 the variable may set it to other values; the list shown following the 16136 the variable may set it to other values; the list shown following the
21829 @evenheading @thispage @| @| @thistitle 21830 @evenheading @thispage @| @| @thistitle
21830 @oddheading @| @| @thispage 21831 @oddheading @| @| @thispage
21831 @end iftex 21832 @end iftex
21832 21833
21833 @bye 21834 @bye
21835
21836 @ignore
21837 arch-tag: da1a2154-531f-43a8-8e33-fc7faad10acf
21838 @end ignore