diff options
| author | Richard M. Stallman | 1994-05-21 02:28:15 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-05-21 02:28:15 +0000 |
| commit | 574efc83870d19cb039342fae76543a2652d8aa8 (patch) | |
| tree | 342c086c09cfee1aa29778c76f55daf3870f064b | |
| parent | 5632e6b46b3aef91634f9bb7c96c09654d6a63e9 (diff) | |
| download | emacs-574efc83870d19cb039342fae76543a2652d8aa8.tar.gz emacs-574efc83870d19cb039342fae76543a2652d8aa8.zip | |
*** empty log message ***
| -rw-r--r-- | lispref/anti.texi | 43 | ||||
| -rw-r--r-- | lispref/internals.texi | 60 | ||||
| -rw-r--r-- | lispref/tips.texi | 32 |
3 files changed, 86 insertions, 49 deletions
diff --git a/lispref/anti.texi b/lispref/anti.texi index c42982ce8fb..5f6b9286bfc 100644 --- a/lispref/anti.texi +++ b/lispref/anti.texi | |||
| @@ -91,18 +91,23 @@ You'll have to write programs specially to use it, though. | |||
| 91 | As a result, certain macros, functions, and predicates no longer handle | 91 | As a result, certain macros, functions, and predicates no longer handle |
| 92 | specifications for floating point numbers. | 92 | specifications for floating point numbers. |
| 93 | 93 | ||
| 94 | @itemize @bullet | ||
| 95 | @item | ||
| 94 | The function @code{string-to-number}, the predicate @code{floatp}, and | 96 | The function @code{string-to-number}, the predicate @code{floatp}, and |
| 95 | the variable @code{float-output-format} have all been eliminated. | 97 | the variable @code{float-output-format} have all been eliminated. |
| 96 | 98 | ||
| 99 | @item | ||
| 97 | The functions @code{float}, @code{truncate}, @code{floor}, @code{ceil}, | 100 | The functions @code{float}, @code{truncate}, @code{floor}, @code{ceil}, |
| 98 | @code{round}, and @code{logb} do not exist; neither do the functions | 101 | @code{round}, and @code{logb} do not exist; neither do the functions |
| 99 | @code{abs}, @code{cos}, @code{sin}, @code{tan}, @code{acos}, | 102 | @code{abs}, @code{cos}, @code{sin}, @code{tan}, @code{acos}, |
| 100 | @code{asin}, @code{atan}, @code{exp}, @code{expt}, @code{log10}, | 103 | @code{asin}, @code{atan}, @code{exp}, @code{expt}, @code{log10}, |
| 101 | @code{log}, or @code{sqrt}. | 104 | @code{log}, or @code{sqrt}. |
| 102 | 105 | ||
| 106 | @item | ||
| 103 | The @code{format} function no longer handles the specifications | 107 | The @code{format} function no longer handles the specifications |
| 104 | @samp{%e}, @samp{%f} and @samp{%g} for printing floating point numbers; | 108 | @samp{%e}, @samp{%f} and @samp{%g} for printing floating point numbers; |
| 105 | likewise for @code{message}. | 109 | likewise for @code{message}. |
| 110 | @end bullet | ||
| 106 | 111 | ||
| 107 | @section Changes in Basic Editing Functions | 112 | @section Changes in Basic Editing Functions |
| 108 | 113 | ||
| @@ -169,6 +174,8 @@ We eliminated text properties. | |||
| 169 | Many file-related functions have been eliminated or simplified. Here is | 174 | Many file-related functions have been eliminated or simplified. Here is |
| 170 | a basic listing of these functions. | 175 | a basic listing of these functions. |
| 171 | 176 | ||
| 177 | @itemize @bullet | ||
| 178 | @item | ||
| 172 | The functions @code{file-accessible-directory-p}, @code{file-truename}, | 179 | The functions @code{file-accessible-directory-p}, @code{file-truename}, |
| 173 | @code{make-directory}, @code{delete-directory}, | 180 | @code{make-directory}, @code{delete-directory}, |
| 174 | @code{set-visited-file-modtime}, @code{directory-abbrev-alist}, | 181 | @code{set-visited-file-modtime}, @code{directory-abbrev-alist}, |
| @@ -177,17 +184,22 @@ The functions @code{file-accessible-directory-p}, @code{file-truename}, | |||
| 177 | @code{set-default-file-modes}, @code{default-file-modes}, and | 184 | @code{set-default-file-modes}, @code{default-file-modes}, and |
| 178 | @code{unix-sync} have been eliminated. | 185 | @code{unix-sync} have been eliminated. |
| 179 | 186 | ||
| 187 | @item | ||
| 180 | We got rid of the ``initial file name'' argument to | 188 | We got rid of the ``initial file name'' argument to |
| 181 | @code{read-file-name}. | 189 | @code{read-file-name}. |
| 182 | 190 | ||
| 191 | @item | ||
| 183 | Additionally, we removed the 12th element from the list returned by | 192 | Additionally, we removed the 12th element from the list returned by |
| 184 | @code{file-attributes}. | 193 | @code{file-attributes}. |
| 185 | 194 | ||
| 195 | @item | ||
| 186 | @code{directory-files} always sorts the list of files. It's not user | 196 | @code{directory-files} always sorts the list of files. It's not user |
| 187 | friendly to process the files in any haphazard order. | 197 | friendly to process the files in any haphazard order. |
| 188 | 198 | ||
| 199 | @item | ||
| 189 | We eliminated the variables @code{write-contents-hooks} and | 200 | We eliminated the variables @code{write-contents-hooks} and |
| 190 | @code{local-write-file-hooks}. | 201 | @code{local-write-file-hooks}. |
| 202 | @end bullet | ||
| 191 | 203 | ||
| 192 | @section Making Certain File Names ``Magic'' | 204 | @section Making Certain File Names ``Magic'' |
| 193 | 205 | ||
| @@ -207,7 +219,7 @@ of creeping featurism. | |||
| 207 | @itemize @bullet | 219 | @itemize @bullet |
| 208 | @item | 220 | @item |
| 209 | The functions @code{mouse-position} and @code{set-mouse-position}, and | 221 | The functions @code{mouse-position} and @code{set-mouse-position}, and |
| 210 | the special form @code{track-mouse} have been eliminated. | 222 | the special form @code{track-mouse}, have been eliminated. |
| 211 | 223 | ||
| 212 | @item | 224 | @item |
| 213 | Likewise, the functions @code{x-set-selection}, @code{x-set-cut-buffer}, | 225 | Likewise, the functions @code{x-set-selection}, @code{x-set-cut-buffer}, |
| @@ -334,7 +346,7 @@ accept strings. | |||
| 334 | We removed the @code{read-event}, @code{event-start}, | 346 | We removed the @code{read-event}, @code{event-start}, |
| 335 | @code{posn-window}, @code{posn-point}, @code{posn-col-row}, | 347 | @code{posn-window}, @code{posn-point}, @code{posn-col-row}, |
| 336 | @code{posn-timestamp}, @code{scroll-bar-scale}, and @code{event-end} | 348 | @code{posn-timestamp}, @code{scroll-bar-scale}, and @code{event-end} |
| 337 | functions, since they were only useful for non-character events. | 349 | functions, since they were useful only for non-character events. |
| 338 | 350 | ||
| 339 | @item | 351 | @item |
| 340 | We removed the @code{unread-command-events} and @code{last-event-frame} | 352 | We removed the @code{unread-command-events} and @code{last-event-frame} |
| @@ -357,29 +369,39 @@ same encoding used in strings: 128 plus the corresponding non-Meta | |||
| 357 | 369 | ||
| 358 | @section Menus | 370 | @section Menus |
| 359 | 371 | ||
| 372 | @itemize @bullet | ||
| 373 | @item | ||
| 360 | You can no longer define menus as keymaps; good system design requires | 374 | You can no longer define menus as keymaps; good system design requires |
| 361 | crafting a special-purpose interface for each facility, so it can | 375 | crafting a special-purpose interface for each facility, so it can |
| 362 | precisely fit the requirements of that facility. We decided that | 376 | precisely fit the requirements of that facility. We decided that |
| 363 | unifying keymaps and menus was simply too much of a strain. | 377 | unifying keymaps and menus was simply too much of a strain. |
| 364 | 378 | ||
| 365 | In Emacs 18, you can only activate menus with the mouse. Using them | 379 | @item |
| 380 | In Emacs 18, you can activate menus only with the mouse. Using them | ||
| 366 | with a keyboard was too confusing for too many users. | 381 | with a keyboard was too confusing for too many users. |
| 367 | 382 | ||
| 383 | @item | ||
| 368 | Emacs 18 has no menu bars. All functions and variables related to the | 384 | Emacs 18 has no menu bars. All functions and variables related to the |
| 369 | menu bar have been eliminated. | 385 | menu bar have been eliminated. |
| 386 | @end bullet | ||
| 370 | 387 | ||
| 371 | @section Changes in Minibuffer Features | 388 | @section Changes in Minibuffer Features |
| 372 | 389 | ||
| 390 | @itemize @bullet | ||
| 391 | @item | ||
| 373 | The minibuffer history feature has been eliminated. Thus, we removed | 392 | The minibuffer history feature has been eliminated. Thus, we removed |
| 374 | the optional argument @var{hist} from the minibuffer input functions | 393 | the optional argument @var{hist} from the minibuffer input functions |
| 375 | @code{read-from-minibuffer} and @code{completing-read}. | 394 | @code{read-from-minibuffer} and @code{completing-read}. |
| 376 | 395 | ||
| 396 | @item | ||
| 377 | The @var{initial} argument to @code{read-from-minibuffer} and other | 397 | The @var{initial} argument to @code{read-from-minibuffer} and other |
| 378 | minibuffer input functions can no longer be a cons cell | 398 | minibuffer input functions can no longer be a cons cell |
| 379 | @code{(@var{string} . @var{position})}. | 399 | @code{(@var{string} . @var{position})}. |
| 380 | 400 | ||
| 401 | @item | ||
| 381 | In the function @code{read-no-blanks-input}, the @var{initial} argument | 402 | In the function @code{read-no-blanks-input}, the @var{initial} argument |
| 382 | is no longer optional. | 403 | is no longer optional. |
| 404 | @end bullet | ||
| 383 | 405 | ||
| 384 | @section New Features for Defining Commands | 406 | @section New Features for Defining Commands |
| 385 | 407 | ||
| @@ -399,15 +421,20 @@ special meaning. | |||
| 399 | 421 | ||
| 400 | @section Removed Features for Reading Input | 422 | @section Removed Features for Reading Input |
| 401 | 423 | ||
| 424 | @itemize @bullet | ||
| 425 | @item | ||
| 402 | We removed the third argument (@var{meta}) from the function | 426 | We removed the third argument (@var{meta}) from the function |
| 403 | @code{set-input-mode}. Consequently, we added the variable | 427 | @code{set-input-mode}. Consequently, we added the variable |
| 404 | @code{meta-flag}; set it to @code{t} to enable use of a Meta key, and | 428 | @code{meta-flag}; set it to @code{t} to enable use of a Meta key, and |
| 405 | to @code{nil} to disable it. (Those are the only two alternatives.) | 429 | to @code{nil} to disable it. (Those are the only two alternatives.) |
| 406 | 430 | ||
| 431 | @item | ||
| 407 | We also removed the variable @code{extra-keyboard-modifiers}. | 432 | We also removed the variable @code{extra-keyboard-modifiers}. |
| 408 | 433 | ||
| 434 | @item | ||
| 409 | We removed the function @code{keyboard-translate} and the variables | 435 | We removed the function @code{keyboard-translate} and the variables |
| 410 | @code{num-input-keys} and @code{function-key-map}. | 436 | @code{num-input-keys} and @code{function-key-map}. |
| 437 | @end itemize | ||
| 411 | 438 | ||
| 412 | @section Removed Syntax Table Features | 439 | @section Removed Syntax Table Features |
| 413 | 440 | ||
| @@ -427,10 +454,13 @@ We abolished the variable @code{words-include-escapes}. | |||
| 427 | 454 | ||
| 428 | @section The Case Table | 455 | @section The Case Table |
| 429 | 456 | ||
| 457 | @itemize @bullet | ||
| 458 | @item | ||
| 430 | Case tables do not exist in Emacs 18. Due to this change, we have | 459 | Case tables do not exist in Emacs 18. Due to this change, we have |
| 431 | removed the associated functions @code{set-standard-case-table}, | 460 | removed the associated functions @code{set-standard-case-table}, |
| 432 | @code{standard-case-table}, @code{current-case-table}, | 461 | @code{standard-case-table}, @code{current-case-table}, |
| 433 | @code{set-case-table}, and @code{set-case-syntax-pair}. | 462 | @code{set-case-table}, and @code{set-case-syntax-pair}. |
| 463 | @end itemize | ||
| 434 | 464 | ||
| 435 | @section Features for Dealing with Buffers | 465 | @section Features for Dealing with Buffers |
| 436 | 466 | ||
| @@ -480,11 +510,12 @@ is local in the current buffer. | |||
| 480 | 510 | ||
| 481 | @section Features for Subprocesses | 511 | @section Features for Subprocesses |
| 482 | 512 | ||
| 513 | @itemize @bullet | ||
| 514 | @item | ||
| 483 | @code{call-process} and @code{call-process-region} no longer indicate | 515 | @code{call-process} and @code{call-process-region} no longer indicate |
| 484 | the termination status of the subprocess. We call on users to have faith | 516 | the termination status of the subprocess. We call on users to have faith |
| 485 | that the subprocess executed properly. | 517 | that the subprocess executed properly. |
| 486 | 518 | ||
| 487 | @itemize | ||
| 488 | @item | 519 | @item |
| 489 | The standard asynchronous subprocess features do not work on VMS; | 520 | The standard asynchronous subprocess features do not work on VMS; |
| 490 | instead, special VMS asynchronous subprocess functions have been added. | 521 | instead, special VMS asynchronous subprocess functions have been added. |
| @@ -540,11 +571,15 @@ We removed the variable @code{command-debug-status} and the function | |||
| 540 | 571 | ||
| 541 | @section Memory Allocation Changes | 572 | @section Memory Allocation Changes |
| 542 | 573 | ||
| 574 | @itemize @bullet | ||
| 575 | @item | ||
| 543 | We removed the function @code{memory-limit}. | 576 | We removed the function @code{memory-limit}. |
| 544 | 577 | ||
| 578 | @item | ||
| 545 | The list returned by @code{garbage-collect} no longer contains an | 579 | The list returned by @code{garbage-collect} no longer contains an |
| 546 | element to describe floating point numbers, since there aren't any | 580 | element to describe floating point numbers, since there aren't any |
| 547 | floating point numbers in Emacs 18. | 581 | floating point numbers in Emacs 18. |
| 582 | @end itemize | ||
| 548 | 583 | ||
| 549 | @section Hook Changes | 584 | @section Hook Changes |
| 550 | 585 | ||
diff --git a/lispref/internals.texi b/lispref/internals.texi index ec05340fb5d..8f15e308ad4 100644 --- a/lispref/internals.texi +++ b/lispref/internals.texi | |||
| @@ -39,12 +39,12 @@ routines, but not the editing commands. | |||
| 39 | the real runnable Emacs executable. These arguments direct | 39 | the real runnable Emacs executable. These arguments direct |
| 40 | @file{temacs} to evaluate the Lisp files specified in the file | 40 | @file{temacs} to evaluate the Lisp files specified in the file |
| 41 | @file{loadup.el}. These files set up the normal Emacs editing | 41 | @file{loadup.el}. These files set up the normal Emacs editing |
| 42 | environment, resulting in an Emacs which is still impure but no longer | 42 | environment, resulting in an Emacs that is still impure but no longer |
| 43 | bare. | 43 | bare. |
| 44 | 44 | ||
| 45 | It takes a substantial time to load the standard Lisp files. Luckily, | 45 | It takes a substantial time to load the standard Lisp files. Luckily, |
| 46 | you don't have to do this each time you run Emacs; @file{temacs} can | 46 | you don't have to do this each time you run Emacs; @file{temacs} can |
| 47 | dump out an executable program called @file{emacs} which has these files | 47 | dump out an executable program called @file{emacs} that has these files |
| 48 | preloaded. @file{emacs} starts more quickly because it does not need to | 48 | preloaded. @file{emacs} starts more quickly because it does not need to |
| 49 | load the files. This is the Emacs executable that is normally | 49 | load the files. This is the Emacs executable that is normally |
| 50 | installed. | 50 | installed. |
| @@ -64,7 +64,7 @@ extra time is not too severe a problem. | |||
| 64 | 64 | ||
| 65 | @cindex @file{site-load.el} | 65 | @cindex @file{site-load.el} |
| 66 | You can specify additional files to preload by writing a library named | 66 | You can specify additional files to preload by writing a library named |
| 67 | @file{site-load.el} which loads them. You may need to increase the | 67 | @file{site-load.el} that loads them. You may need to increase the |
| 68 | value of @code{PURESIZE}, in @file{src/puresize.h}, to make room for the | 68 | value of @code{PURESIZE}, in @file{src/puresize.h}, to make room for the |
| 69 | additional files. (Try adding increments of 20000 until it is big | 69 | additional files. (Try adding increments of 20000 until it is big |
| 70 | enough.) However, the advantage of preloading additional files | 70 | enough.) However, the advantage of preloading additional files |
| @@ -134,7 +134,8 @@ which reduces their usefulness at present, but we hope they will be | |||
| 134 | convenient in the future. | 134 | convenient in the future. |
| 135 | 135 | ||
| 136 | @defvar emacs-major-version | 136 | @defvar emacs-major-version |
| 137 | The major version number of Emacs, as an integer. | 137 | The major version number of Emacs, as an integer. For Emacs version |
| 138 | 19.23, the value is 19. | ||
| 138 | @end defvar | 139 | @end defvar |
| 139 | 140 | ||
| 140 | @defvar emacs-minor-version | 141 | @defvar emacs-minor-version |
| @@ -148,14 +149,14 @@ The minor version number of Emacs, as an integer. For Emacs version | |||
| 148 | 149 | ||
| 149 | Emacs Lisp uses two kinds of storage for user-created Lisp objects: | 150 | Emacs Lisp uses two kinds of storage for user-created Lisp objects: |
| 150 | @dfn{normal storage} and @dfn{pure storage}. Normal storage is where | 151 | @dfn{normal storage} and @dfn{pure storage}. Normal storage is where |
| 151 | all the new data which is created during an Emacs session is kept; see | 152 | all the new data created during an Emacs session is kept; see the |
| 152 | the following section for information on normal storage. Pure storage | 153 | following section for information on normal storage. Pure storage is |
| 153 | is used for certain data in the preloaded standard Lisp files---data | 154 | used for certain data in the preloaded standard Lisp files---data that |
| 154 | that should never change during actual use of Emacs. | 155 | should never change during actual use of Emacs. |
| 155 | 156 | ||
| 156 | Pure storage is allocated only while @file{temacs} is loading the | 157 | Pure storage is allocated only while @file{temacs} is loading the |
| 157 | standard preloaded Lisp libraries. In the file @file{emacs}, it is | 158 | standard preloaded Lisp libraries. In the file @file{emacs}, it is |
| 158 | marked as read-only (on operating systems which permit this), so that | 159 | marked as read-only (on operating systems that permit this), so that |
| 159 | the memory space can be shared by all the Emacs jobs running on the | 160 | the memory space can be shared by all the Emacs jobs running on the |
| 160 | machine at once. Pure storage is not expandable; a fixed amount is | 161 | machine at once. Pure storage is not expandable; a fixed amount is |
| 161 | allocated when Emacs is compiled, and if that is not sufficient for the | 162 | allocated when Emacs is compiled, and if that is not sufficient for the |
| @@ -221,26 +222,26 @@ might be a more intuitive metaphor for this facility.) | |||
| 221 | The garbage collector operates by finding and marking all Lisp objects | 222 | The garbage collector operates by finding and marking all Lisp objects |
| 222 | that are still accessible to Lisp programs. To begin with, it assumes | 223 | that are still accessible to Lisp programs. To begin with, it assumes |
| 223 | all the symbols, their values and associated function definitions, and | 224 | all the symbols, their values and associated function definitions, and |
| 224 | any data presently on the stack, are accessible. Any objects which can | 225 | any data presently on the stack, are accessible. Any objects that can |
| 225 | be reached indirectly through other accessible objects are also | 226 | be reached indirectly through other accessible objects are also |
| 226 | accessible. | 227 | accessible. |
| 227 | 228 | ||
| 228 | When marking is finished, all objects still unmarked are garbage. No | 229 | When marking is finished, all objects still unmarked are garbage. No |
| 229 | matter what the Lisp program or the user does, it is impossible to refer | 230 | matter what the Lisp program or the user does, it is impossible to refer |
| 230 | to them, since there is no longer a way to reach them. Their space | 231 | to them, since there is no longer a way to reach them. Their space |
| 231 | might as well be reused, since no one will miss them. The second, | 232 | might as well be reused, since no one will miss them. The second |
| 232 | ``sweep'' phase of the garbage collector arranges to reuse them. | 233 | (``sweep'') phase of the garbage collector arranges to reuse them. |
| 233 | 234 | ||
| 234 | @cindex free list | 235 | @cindex free list |
| 235 | The sweep phase puts unused cons cells onto a @dfn{free list} | 236 | The sweep phase puts unused cons cells onto a @dfn{free list} |
| 236 | for future allocation; likewise for symbols and markers. It compacts | 237 | for future allocation; likewise for symbols and markers. It compacts |
| 237 | the accessible strings so they occupy fewer 8k blocks; then it frees the | 238 | the accessible strings so they occupy fewer 8k blocks; then it frees the |
| 238 | other 8k blocks. Vectors, buffers, windows and other large objects are | 239 | other 8k blocks. Vectors, buffers, windows, and other large objects are |
| 239 | individually allocated and freed using @code{malloc} and @code{free}. | 240 | individually allocated and freed using @code{malloc} and @code{free}. |
| 240 | 241 | ||
| 241 | @cindex CL note---allocate more storage | 242 | @cindex CL note---allocate more storage |
| 242 | @quotation | 243 | @quotation |
| 243 | @b{Common Lisp note:} unlike other Lisps, GNU Emacs Lisp does not | 244 | @b{Common Lisp note:} Unlike other Lisps, GNU Emacs Lisp does not |
| 244 | call the garbage collector when the free list is empty. Instead, it | 245 | call the garbage collector when the free list is empty. Instead, it |
| 245 | simply requests the operating system to allocate more storage, and | 246 | simply requests the operating system to allocate more storage, and |
| 246 | processing continues until @code{gc-cons-threshold} bytes have been | 247 | processing continues until @code{gc-cons-threshold} bytes have been |
| @@ -333,7 +334,7 @@ called. | |||
| 333 | The initial threshold value is 100,000. If you specify a larger | 334 | The initial threshold value is 100,000. If you specify a larger |
| 334 | value, garbage collection will happen less often. This reduces the | 335 | value, garbage collection will happen less often. This reduces the |
| 335 | amount of time spent garbage collecting, but increases total memory use. | 336 | amount of time spent garbage collecting, but increases total memory use. |
| 336 | You may want to do this when running a program which creates lots of | 337 | You may want to do this when running a program that creates lots of |
| 337 | Lisp data. | 338 | Lisp data. |
| 338 | 339 | ||
| 339 | You can make collections more frequent by specifying a smaller value, | 340 | You can make collections more frequent by specifying a smaller value, |
| @@ -469,11 +470,11 @@ should be a single sentence. | |||
| 469 | name list that every C function must have, followed by ordinary C | 470 | name list that every C function must have, followed by ordinary C |
| 470 | declarations for the arguments. For a function with a fixed maximum | 471 | declarations for the arguments. For a function with a fixed maximum |
| 471 | number of arguments, declare a C argument for each Lisp argument, and | 472 | number of arguments, declare a C argument for each Lisp argument, and |
| 472 | give them all type @code{Lisp_Object}. If the function has no upper | 473 | give them all type @code{Lisp_Object}. When a Lisp function has no |
| 473 | limit on the number of arguments in Lisp, then in C it receives two | 474 | upper limit on the number of arguments, its implementation in C actually |
| 474 | arguments: the first is the number of Lisp arguments, and the second is | 475 | receives exactly two arguments: the first is the number of Lisp |
| 475 | the address of a block containing their values. They have types | 476 | arguments, and the second is the address of a block containing their |
| 476 | @code{int} and @w{@code{Lisp_Object *}}. | 477 | values. They have types @code{int} and @w{@code{Lisp_Object *}}. |
| 477 | 478 | ||
| 478 | Within the function @code{For} itself, note the use of the macros | 479 | Within the function @code{For} itself, note the use of the macros |
| 479 | @code{GCPRO1} and @code{UNGCPRO}. @code{GCPRO1} is used to ``protect'' | 480 | @code{GCPRO1} and @code{UNGCPRO}. @code{GCPRO1} is used to ``protect'' |
| @@ -524,8 +525,8 @@ file, add to it a @code{syms_of_@var{filename}} (e.g., | |||
| 524 | of these functions are called, and add a call to | 525 | of these functions are called, and add a call to |
| 525 | @code{syms_of_@var{filename}} there. | 526 | @code{syms_of_@var{filename}} there. |
| 526 | 527 | ||
| 527 | This function @code{syms_of_@var{filename}} is also the place to | 528 | The function @code{syms_of_@var{filename}} is also the place to define |
| 528 | define any C variables which are to be visible as Lisp variables. | 529 | any C variables that are to be visible as Lisp variables. |
| 529 | @code{DEFVAR_LISP} makes a C variable of type @code{Lisp_Object} visible | 530 | @code{DEFVAR_LISP} makes a C variable of type @code{Lisp_Object} visible |
| 530 | in Lisp. @code{DEFVAR_INT} makes a C variable of type @code{int} | 531 | in Lisp. @code{DEFVAR_INT} makes a C variable of type @code{int} |
| 531 | visible in Lisp with a value that is always an integer. | 532 | visible in Lisp with a value that is always an integer. |
| @@ -643,7 +644,7 @@ Many are accessible indirectly in Lisp programs via Lisp primitives. | |||
| 643 | 644 | ||
| 644 | @table @code | 645 | @table @code |
| 645 | @item name | 646 | @item name |
| 646 | The buffer name is a string which names the buffer. It is guaranteed to | 647 | The buffer name is a string that names the buffer. It is guaranteed to |
| 647 | be unique. @xref{Buffer Names}. | 648 | be unique. @xref{Buffer Names}. |
| 648 | 649 | ||
| 649 | @item save_modified | 650 | @item save_modified |
| @@ -696,7 +697,7 @@ gap, must check each of these markers and perhaps update it. | |||
| 696 | @xref{Markers}. | 697 | @xref{Markers}. |
| 697 | 698 | ||
| 698 | @item backed_up | 699 | @item backed_up |
| 699 | This field is a flag which tells whether a backup file has been made | 700 | This field is a flag that tells whether a backup file has been made |
| 700 | for the visited file of this buffer. | 701 | for the visited file of this buffer. |
| 701 | 702 | ||
| 702 | @item mark | 703 | @item mark |
| @@ -744,7 +745,7 @@ The frame that this window is on. | |||
| 744 | Non-@code{nil} if this window is a minibuffer window. | 745 | Non-@code{nil} if this window is a minibuffer window. |
| 745 | 746 | ||
| 746 | @item buffer | 747 | @item buffer |
| 747 | The buffer which the window is displaying. This may change often during | 748 | The buffer that the window is displaying. This may change often during |
| 748 | the life of the window. | 749 | the life of the window. |
| 749 | 750 | ||
| 750 | @item dedicated | 751 | @item dedicated |
| @@ -756,7 +757,7 @@ This is the value of point in the current buffer when this window is | |||
| 756 | selected; when it is not selected, it retains its previous value. | 757 | selected; when it is not selected, it retains its previous value. |
| 757 | 758 | ||
| 758 | @item start | 759 | @item start |
| 759 | he position in the buffer which is the first character to be displayed | 760 | The position in the buffer that is the first character to be displayed |
| 760 | in the window. | 761 | in the window. |
| 761 | 762 | ||
| 762 | @item force_start | 763 | @item force_start |
| @@ -806,7 +807,7 @@ to a window's parent. | |||
| 806 | Parent windows do not display buffers, and play little role in display | 807 | Parent windows do not display buffers, and play little role in display |
| 807 | except to shape their child windows. Emacs Lisp programs usually have | 808 | except to shape their child windows. Emacs Lisp programs usually have |
| 808 | no access to the parent windows; they operate on the windows at the | 809 | no access to the parent windows; they operate on the windows at the |
| 809 | leaves of the tree, that actually display buffers. | 810 | leaves of the tree, which actually display buffers. |
| 810 | 811 | ||
| 811 | @item hscroll | 812 | @item hscroll |
| 812 | This is the number of columns that the display in the window is scrolled | 813 | This is the number of columns that the display in the window is scrolled |
| @@ -869,8 +870,9 @@ A flag, non-@code{nil} if this is really a child process. | |||
| 869 | It is @code{nil} for a network connection. | 870 | It is @code{nil} for a network connection. |
| 870 | 871 | ||
| 871 | @item mark | 872 | @item mark |
| 872 | A marker indicating the position of end of last output from this process | 873 | A marker indicating the position of the end of the last output from this |
| 873 | inserted into the buffer. This is usually the end of the buffer. | 874 | process inserted into the buffer. This is often but not always the end |
| 875 | of the buffer. | ||
| 874 | 876 | ||
| 875 | @item kill_without_query | 877 | @item kill_without_query |
| 876 | If this is non-@code{nil}, killing Emacs while this process is still | 878 | If this is non-@code{nil}, killing Emacs while this process is still |
diff --git a/lispref/tips.texi b/lispref/tips.texi index e4c2a9f9c12..dbb04e071d1 100644 --- a/lispref/tips.texi +++ b/lispref/tips.texi | |||
| @@ -144,10 +144,10 @@ always, @code{forward-line} is more convenient as well as more | |||
| 144 | predictable and robust. @xref{Text Lines}. | 144 | predictable and robust. @xref{Text Lines}. |
| 145 | 145 | ||
| 146 | @item | 146 | @item |
| 147 | Don't use functions that set the mark in your Lisp code (unless you are | 147 | Don't call functions that set the mark, unless setting the mark is one |
| 148 | writing a command to set the mark). The mark is a user-level feature, | 148 | of the intended features of your program. The mark is a user-level |
| 149 | so it is incorrect to change the mark except to supply a value for the | 149 | feature, so it is incorrect to change the mark except to supply a value |
| 150 | user's benefit. @xref{The Mark}. | 150 | for the user's benefit. @xref{The Mark}. |
| 151 | 151 | ||
| 152 | In particular, don't use these functions: | 152 | In particular, don't use these functions: |
| 153 | 153 | ||
| @@ -228,7 +228,7 @@ Function calls are slow in Emacs Lisp even when a compiled function | |||
| 228 | is calling another compiled function. | 228 | is calling another compiled function. |
| 229 | 229 | ||
| 230 | @item | 230 | @item |
| 231 | Using the primitive list-searching functions @code{memq}, @code{assq} or | 231 | Using the primitive list-searching functions @code{memq}, @code{assq}, or |
| 232 | @code{assoc} is even faster than explicit iteration. It may be worth | 232 | @code{assoc} is even faster than explicit iteration. It may be worth |
| 233 | rearranging a data structure so that one of these primitive search | 233 | rearranging a data structure so that one of these primitive search |
| 234 | functions can be used. | 234 | functions can be used. |
| @@ -273,7 +273,7 @@ the speed. @xref{Inline Functions}. | |||
| 273 | 273 | ||
| 274 | @itemize @bullet | 274 | @itemize @bullet |
| 275 | @item | 275 | @item |
| 276 | Every command, function or variable intended for users to know about | 276 | Every command, function, or variable intended for users to know about |
| 277 | should have a documentation string. | 277 | should have a documentation string. |
| 278 | 278 | ||
| 279 | @item | 279 | @item |
| @@ -282,12 +282,12 @@ string, and you can save space by using a comment instead. | |||
| 282 | 282 | ||
| 283 | @item | 283 | @item |
| 284 | The first line of the documentation string should consist of one or two | 284 | The first line of the documentation string should consist of one or two |
| 285 | complete sentences which stand on their own as a summary. @kbd{M-x | 285 | complete sentences that stand on their own as a summary. @kbd{M-x |
| 286 | apropos} displays just the first line, and if it doesn't stand on its | 286 | apropos} displays just the first line, and if it doesn't stand on its |
| 287 | own, the result looks bad. In particular, start the first line with a | 287 | own, the result looks bad. In particular, start the first line with a |
| 288 | capital letter and end with a period. | 288 | capital letter and end with a period. |
| 289 | 289 | ||
| 290 | The documentation string can have additional lines which expand on the | 290 | The documentation string can have additional lines that expand on the |
| 291 | details of how to use the function or variable. The additional lines | 291 | details of how to use the function or variable. The additional lines |
| 292 | should be made up of complete sentences also, but they may be filled if | 292 | should be made up of complete sentences also, but they may be filled if |
| 293 | that looks good. | 293 | that looks good. |
| @@ -316,7 +316,7 @@ Do not start or end a documentation string with whitespace. | |||
| 316 | 316 | ||
| 317 | @item | 317 | @item |
| 318 | Format the documentation string so that it fits in an Emacs window on an | 318 | Format the documentation string so that it fits in an Emacs window on an |
| 319 | 80 column screen. It is a good idea for most lines to be no wider than | 319 | 80-column screen. It is a good idea for most lines to be no wider than |
| 320 | 60 characters. The first line can be wider if necessary to fit the | 320 | 60 characters. The first line can be wider if necessary to fit the |
| 321 | information that ought to be there. | 321 | information that ought to be there. |
| 322 | 322 | ||
| @@ -334,8 +334,8 @@ starting double-quote is not part of the string! | |||
| 334 | @item | 334 | @item |
| 335 | A variable's documentation string should start with @samp{*} if the | 335 | A variable's documentation string should start with @samp{*} if the |
| 336 | variable is one that users would often want to set interactively. If | 336 | variable is one that users would often want to set interactively. If |
| 337 | the value is a long list, or a function, or if the variable would only | 337 | the value is a long list, or a function, or if the variable would be set |
| 338 | be set in init files, then don't start the documentation string with | 338 | only in init files, then don't start the documentation string with |
| 339 | @samp{*}. @xref{Defining Variables}. | 339 | @samp{*}. @xref{Defining Variables}. |
| 340 | 340 | ||
| 341 | @item | 341 | @item |
| @@ -413,7 +413,7 @@ Lisp mode and related modes, the @kbd{M-;} (@code{indent-for-comment}) | |||
| 413 | command automatically inserts such a @samp{;} in the right place, or | 413 | command automatically inserts such a @samp{;} in the right place, or |
| 414 | aligns such a comment if it is already present. | 414 | aligns such a comment if it is already present. |
| 415 | 415 | ||
| 416 | (The following examples are taken from the Emacs sources.) | 416 | This and following examples are taken from the Emacs sources. |
| 417 | 417 | ||
| 418 | @smallexample | 418 | @smallexample |
| 419 | @group | 419 | @group |
| @@ -444,7 +444,7 @@ Every function that has no documentation string (because it is use only | |||
| 444 | internally within the package it belongs to), should have instead a | 444 | internally within the package it belongs to), should have instead a |
| 445 | two-semicolon comment right before the function, explaining what the | 445 | two-semicolon comment right before the function, explaining what the |
| 446 | function does and how to call it properly. Explain precisely what each | 446 | function does and how to call it properly. Explain precisely what each |
| 447 | argument means and how the function interprets its possible value. | 447 | argument means and how the function interprets its possible values. |
| 448 | 448 | ||
| 449 | @item ;;; | 449 | @item ;;; |
| 450 | Comments that start with three semicolons, @samp{;;;}, should start at | 450 | Comments that start with three semicolons, @samp{;;;}, should start at |
| @@ -460,7 +460,7 @@ For example: | |||
| 460 | @end group | 460 | @end group |
| 461 | @end smallexample | 461 | @end smallexample |
| 462 | 462 | ||
| 463 | Another use for triple-semicolon comments is for commenting out line | 463 | Another use for triple-semicolon comments is for commenting out lines |
| 464 | within a function. We use triple-semicolons for this precisely so that | 464 | within a function. We use triple-semicolons for this precisely so that |
| 465 | they remain at the left margin. | 465 | they remain at the left margin. |
| 466 | 466 | ||
| @@ -485,7 +485,7 @@ program. For example: | |||
| 485 | The indentation commands of the Lisp modes in Emacs, such as @kbd{M-;} | 485 | The indentation commands of the Lisp modes in Emacs, such as @kbd{M-;} |
| 486 | (@code{indent-for-comment}) and @key{TAB} (@code{lisp-indent-line}) | 486 | (@code{indent-for-comment}) and @key{TAB} (@code{lisp-indent-line}) |
| 487 | automatically indent comments according to these conventions, | 487 | automatically indent comments according to these conventions, |
| 488 | depending on the the number of semicolons. @xref{Comments,, | 488 | depending on the number of semicolons. @xref{Comments,, |
| 489 | Manipulating Comments, emacs, The GNU Emacs Manual}. | 489 | Manipulating Comments, emacs, The GNU Emacs Manual}. |
| 490 | 490 | ||
| 491 | @node Library Headers | 491 | @node Library Headers |
| @@ -512,7 +512,7 @@ them. This section explains these conventions. First, an example: | |||
| 512 | ;; Keywords: docs | 512 | ;; Keywords: docs |
| 513 | 513 | ||
| 514 | ;; This file is part of GNU Emacs. | 514 | ;; This file is part of GNU Emacs. |
| 515 | @var{copying conditions}@dots{} | 515 | @var{copying permissions}@dots{} |
| 516 | @end group | 516 | @end group |
| 517 | @end smallexample | 517 | @end smallexample |
| 518 | 518 | ||