diff options
| author | Joakim Verona | 2012-03-06 09:23:09 +0100 |
|---|---|---|
| committer | Joakim Verona | 2012-03-06 09:23:09 +0100 |
| commit | 28485daaf752ff5264ed2f6a32ec15588beaa929 (patch) | |
| tree | a480205aa664c61b1d212833144c0a2d44f7ac01 /doc/lispref | |
| parent | e8e42079e76ca6255bbd53312994ba8e1b3b0ee8 (diff) | |
| parent | 2e86d8576c668e149cc100f3222bcf19b38019dc (diff) | |
| download | emacs-28485daaf752ff5264ed2f6a32ec15588beaa929.tar.gz emacs-28485daaf752ff5264ed2f6a32ec15588beaa929.zip | |
upstream
Diffstat (limited to 'doc/lispref')
34 files changed, 1328 insertions, 1410 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 575902336cd..7f11c65f9e1 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,172 @@ | |||
| 1 | 2012-03-05 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * positions.texi (Text Lines): Document count-words. | ||
| 4 | |||
| 5 | 2012-03-04 Chong Yidong <cyd@gnu.org> | ||
| 6 | |||
| 7 | * frames.texi (Frames): Remove little-used "terminal frame" and | ||
| 8 | "window frame" terminology. | ||
| 9 | (Frame Parameters, Font and Color Parameters, Initial Parameters) | ||
| 10 | (Size and Position, Visibility of Frames): Callers changed. | ||
| 11 | (Frames): Clarify which terminals in framep are graphical. | ||
| 12 | (Initial Parameters): --geometry is not the only option which adds | ||
| 13 | to initial-frame-alist. | ||
| 14 | (Position Parameters): Note that icon-left and icon-top are for | ||
| 15 | old window managers only. | ||
| 16 | (Size Parameters): Sizes are in characters even on graphical | ||
| 17 | displays. | ||
| 18 | (Management Parameters): Note that window-id and outer-window-id | ||
| 19 | can't really be changed, and that auto-raise isn't always obeyed. | ||
| 20 | (Cursor Parameters): Document cursor-type explicitly. | ||
| 21 | (Size and Position): The aliases set-screen-height and | ||
| 22 | set-screen-width have been deleted. | ||
| 23 | (Visibility of Frames): Mention "minimization". | ||
| 24 | |||
| 25 | * os.texi (Startup Summary): Minor clarifications. | ||
| 26 | (Startup Summary, Suspending Emacs): Standardize on "text | ||
| 27 | terminal" terminology. | ||
| 28 | |||
| 29 | * windows.texi (Basic Windows, Coordinates and Windows) | ||
| 30 | (Coordinates and Windows): | ||
| 31 | * display.texi (Refresh Screen, Line Height, Face Attributes) | ||
| 32 | (Overlay Arrow, Beeping, Glyphless Chars): Likewise. | ||
| 33 | |||
| 34 | 2012-03-04 Glenn Morris <rgm@gnu.org> | ||
| 35 | |||
| 36 | * abbrevs.texi: Small copyedits throughout. | ||
| 37 | (Abbrev Mode): Remove this section, folding it into the top-level. | ||
| 38 | (Abbrev Tables): Don't mention irrelevant return values. | ||
| 39 | (Abbrev Expansion): Add cross-ref for wrapper hooks. | ||
| 40 | (Standard Abbrev Tables): Emacs Lisp mode now has its own table. | ||
| 41 | (Abbrev Table Properties): Update nil :regexp description. | ||
| 42 | |||
| 43 | 2012-03-03 Glenn Morris <rgm@gnu.org> | ||
| 44 | |||
| 45 | * internals.texi: Change @appendix section commands to @section. | ||
| 46 | (Building Emacs): Say less about CANNOT_DUMP platforms. | ||
| 47 | Replace deleted eval-at-startup with custom-initialize-delay. | ||
| 48 | (Pure Storage): Small changes. | ||
| 49 | (Memory Usage): Copyedit. | ||
| 50 | (Writing Emacs Primitives): Update Fcoordinates_in_window_p and For | ||
| 51 | example definitions. Give examples of things with non-nil | ||
| 52 | interactive args. Mention eval_sub. Remove old info about | ||
| 53 | strings and GCPRO. Mention cus-start.el. | ||
| 54 | (Buffer Internals, Window Internals, Process Internals): | ||
| 55 | Misc small updates and fixes for fields. | ||
| 56 | |||
| 57 | * tips.texi: Copyedits. | ||
| 58 | (Coding Conventions): Mention autoloads. | ||
| 59 | Combine partially duplicated macro items. Fix xref. | ||
| 60 | Refer to Library Headers for copyright notice. | ||
| 61 | (Programming Tips): edit-options is long-obsolete. | ||
| 62 | (Compilation Tips): Mention loading bytecomp for byte-compile props. | ||
| 63 | (Warning Tips): Mention declare-function. | ||
| 64 | (Documentation Tips): Remove old info. | ||
| 65 | (Comment Tips): Mention comment-dwim, not indent-for-comment. | ||
| 66 | (Library Headers): General update. | ||
| 67 | |||
| 68 | 2012-03-02 Glenn Morris <rgm@gnu.org> | ||
| 69 | |||
| 70 | * backups.texi (Reverting): Un-duplicate revert-buffer-in-progress-p, | ||
| 71 | and relocate entry. Mention buffer-stale-function. | ||
| 72 | |||
| 73 | * elisp.texi, vol1.texi, vol2.texi: Standardize some menu entries. | ||
| 74 | |||
| 75 | * hooks.texi (Standard Hooks): General update. | ||
| 76 | Put related hooks together. Add and remove items. | ||
| 77 | * commands.texi (Keyboard Macros): Remove cross-ref to Standard Hooks. | ||
| 78 | * modes.texi (Hooks): Tweak cross-ref description. | ||
| 79 | |||
| 80 | 2012-03-01 Michael Albinus <michael.albinus@gmx.de> | ||
| 81 | |||
| 82 | * files.texi (Kinds of Files): The return value of file-equal-p is | ||
| 83 | unspecified, if FILE1 or FILE2 does not exist. | ||
| 84 | |||
| 85 | 2012-03-01 Glenn Morris <rgm@gnu.org> | ||
| 86 | |||
| 87 | * hooks.texi (Standard Hooks): Remove mode-specific hooks. | ||
| 88 | |||
| 89 | * maps.texi (Standard Keymaps): General update. | ||
| 90 | Remove mode-specific maps, talk about the more general keymaps. | ||
| 91 | * help.texi (Help Functions): Add vindex for Helper-help-map. | ||
| 92 | * keymaps.texi (Active Keymaps): Minor rephrasing. | ||
| 93 | |||
| 94 | 2012-02-29 Glenn Morris <rgm@gnu.org> | ||
| 95 | |||
| 96 | * elisp.texi, vol1.texi, vol2.texi: Use "" quotes in menus. | ||
| 97 | |||
| 98 | 2012-02-28 Thierry Volpiatto <thierry.volpiatto@gmail.com> | ||
| 99 | |||
| 100 | * files.texi (Kinds of Files): Rename files-equal-p to file-equal-p. | ||
| 101 | Update changed behavior of file-subdir-of-p. | ||
| 102 | |||
| 103 | 2012-02-28 Glenn Morris <rgm@gnu.org> | ||
| 104 | |||
| 105 | * advice.texi, anti.texi, display.texi, elisp.texi: | ||
| 106 | * processes.texi, variables.texi, vol1.texi, vol2.texi: | ||
| 107 | Standardize possessive apostrophe usage. | ||
| 108 | |||
| 109 | * locals.texi: Remove file. | ||
| 110 | * elisp.texi, vol1.texi, vol2.texi: Don't include locals.texi. | ||
| 111 | Remove menu entry. | ||
| 112 | * errors.texi, maps.texi: Adjust node pointers. | ||
| 113 | * internals.texi (Buffer Internals): Remove cross-refs to locals.texi. | ||
| 114 | * makefile.w32-in (srcs): | ||
| 115 | * Makefile.in (srcs): Remove locals.texi. | ||
| 116 | |||
| 117 | * frames.texi (Mouse Position): Fix cross-ref. | ||
| 118 | |||
| 119 | 2012-02-27 Chong Yidong <cyd@gnu.org> | ||
| 120 | |||
| 121 | * buffers.texi (Creating Buffers): Clarify that | ||
| 122 | generate-new-buffer uses generate-new-buffer-names. | ||
| 123 | (Killing Buffers): Remove bogus example duplicating buffer-live-p. | ||
| 124 | |||
| 125 | * files.texi (Directory Names): Index entry for file name abbreviations. | ||
| 126 | (Relative File Names, File Name Expansion): Refer to it. | ||
| 127 | (Locating Files): Move locate-user-emacs-file documentation to | ||
| 128 | Standard File Names. | ||
| 129 | (Standard File Names): Add locate-user-emacs-file; update examples. | ||
| 130 | |||
| 131 | 2012-02-26 Michael Albinus <michael.albinus@gmx.de> | ||
| 132 | |||
| 133 | * files.texi (Magic File Names): Add files-equal-p and file-subdir-of-p. | ||
| 134 | |||
| 135 | 2012-02-26 Chong Yidong <cyd@gnu.org> | ||
| 136 | |||
| 137 | * files.texi (Kinds of Files): Improve documentation of | ||
| 138 | files-equal-p and file-subdir-of-p. | ||
| 139 | |||
| 140 | 2012-02-26 Glenn Morris <rgm@gnu.org> | ||
| 141 | |||
| 142 | * intro.texi (Acknowledgements): Small changes. | ||
| 143 | |||
| 144 | 2012-02-25 Glenn Morris <rgm@gnu.org> | ||
| 145 | |||
| 146 | * errors.texi: Don't try to list _all_ the error symbols. | ||
| 147 | Add circular-list, cl-assertion-failed, compression-error. | ||
| 148 | * elisp.texi, vol1.texi, vol2.texi: | ||
| 149 | * control.texi (Error Symbols): Tweak "Standard Errors" description. | ||
| 150 | |||
| 151 | 2012-02-25 Thierry Volpiatto <thierry.volpiatto@gmail.com> | ||
| 152 | |||
| 153 | * files.texi (files-equal-p, file-subdir-of-p): New, | ||
| 154 | add initial documentation. | ||
| 155 | |||
| 156 | 2012-02-25 Chong Yidong <cyd@gnu.org> | ||
| 157 | |||
| 158 | * files.texi (File Attributes): Document file-selinux-context. | ||
| 159 | (Changing Files): Link to it. | ||
| 160 | (Changing Files): Document set-file-selinux-context. | ||
| 161 | |||
| 162 | * backups.texi (Making Backups): Return value of backup-buffer is | ||
| 163 | changed. Mention default value of backup-directory-alist. | ||
| 164 | (Rename or Copy): Note that backup-by-copying-when-mismatch is t. | ||
| 165 | (Auto-Saving): New minor mode behavior for auto-save-mode. | ||
| 166 | (Reverting): Add defvar for revert-buffer-in-progress-p. | ||
| 167 | |||
| 168 | * searching.texi (Regexp Backslash): Add index entry (Bug#10869). | ||
| 169 | |||
| 1 | 2012-02-24 Glenn Morris <rgm@gnu.org> | 170 | 2012-02-24 Glenn Morris <rgm@gnu.org> |
| 2 | 171 | ||
| 3 | * errors.texi (Standard Errors): Mention dbus-error. | 172 | * errors.texi (Standard Errors): Mention dbus-error. |
diff --git a/doc/lispref/Makefile.in b/doc/lispref/Makefile.in index 4128eb06d7f..5094a3f8ab6 100644 --- a/doc/lispref/Makefile.in +++ b/doc/lispref/Makefile.in | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # Makefile for the GNU Emacs Lisp Reference Manual. | 1 | # Makefile for the GNU Emacs Lisp Reference Manual. |
| 2 | 2 | ||
| 3 | # Copyright (C) 1990-1996, 1998-2012 Free Software Foundation, Inc. | 3 | # Copyright (C) 1990-1996, 1998-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | # This file is part of GNU Emacs. | 5 | # This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -70,7 +70,6 @@ srcs = \ | |||
| 70 | $(srcdir)/keymaps.texi \ | 70 | $(srcdir)/keymaps.texi \ |
| 71 | $(srcdir)/lists.texi \ | 71 | $(srcdir)/lists.texi \ |
| 72 | $(srcdir)/loading.texi \ | 72 | $(srcdir)/loading.texi \ |
| 73 | $(srcdir)/locals.texi \ | ||
| 74 | $(srcdir)/macros.texi \ | 73 | $(srcdir)/macros.texi \ |
| 75 | $(srcdir)/maps.texi \ | 74 | $(srcdir)/maps.texi \ |
| 76 | $(srcdir)/markers.texi \ | 75 | $(srcdir)/markers.texi \ |
diff --git a/doc/lispref/README b/doc/lispref/README index df808e4bcab..0230f4718c8 100644 --- a/doc/lispref/README +++ b/doc/lispref/README | |||
| @@ -1,37 +1,36 @@ | |||
| 1 | Copyright (C) 2001-2012 Free Software Foundation, Inc. | 1 | Copyright (C) 2001-2012 Free Software Foundation, Inc. -*- outline -*- |
| 2 | See the end of the file for license conditions. | 2 | See the end of the file for license conditions. |
| 3 | 3 | ||
| 4 | 4 | ||
| 5 | README for Edition 3.0 of the Emacs Lisp Reference Manual. | 5 | README for the Emacs Lisp Reference Manual. |
| 6 | 6 | ||
| 7 | * This directory contains the texinfo source files for the Emacs Lisp | 7 | * This directory contains the texinfo source files for the Emacs Lisp |
| 8 | Reference Manual. | 8 | Reference Manual. |
| 9 | 9 | ||
| 10 | * Report bugs in the Lisp Manual or in Emacs using M-x report-emacs-bug. | 10 | * Report bugs in the Lisp Manual (or in Emacs) using M-x report-emacs-bug. |
| 11 | To ask questions, use the newsgroup gnu.emacs.help. | 11 | To ask questions, use the help-gnu-emacs mailing list. |
| 12 | 12 | ||
| 13 | * The Emacs Lisp Reference Manual is quite large. It totals around | 13 | * The Emacs Lisp Reference Manual is quite large. It totals around |
| 14 | 1100 pages in smallbook format; the info files total around 3.0 megabytes. | 14 | 1100 pages in smallbook format; the info files total around 3.0 megabytes. |
| 15 | 15 | ||
| 16 | * You can format this manual either for Info or for printing hardcopy | 16 | * You can format this manual for Info, for printing hardcopy using TeX, |
| 17 | using TeX. | 17 | or for HTML. |
| 18 | 18 | ||
| 19 | * You can buy nicely printed copies from the Free Software Foundation. | 19 | * You can buy nicely printed copies from the Free Software Foundation. |
| 20 | Buying a manual from the Free Software Foundation helps support our GNU | 20 | Buying a manual from the Free Software Foundation helps support our GNU |
| 21 | development work. See <http://shop.fsf.org/>. | 21 | development work. See <http://shop.fsf.org/>. |
| 22 | (At time of writing, this manual is out of print.) | ||
| 22 | 23 | ||
| 23 | * The master file for formatting this manual for Tex is called | 24 | * The master file for formatting this manual for Tex is called `elisp.texi'. |
| 24 | `elisp.texi'. It contains @include commands to include all the | 25 | It contains @include commands to include all the chapters that make up |
| 25 | chapters that make up the manual. In addition, `elisp.texi' has | 26 | the manual. |
| 26 | the title page in a new format designed by Karl Berry, using the | ||
| 27 | @titlespec command. | ||
| 28 | 27 | ||
| 29 | * This distribution contains a Makefile that you can use with GNU Make. | 28 | * This distribution contains a Makefile that you can use with GNU Make. |
| 30 | 29 | ||
| 31 | ** To create a DVI file with a sorted index, run `make elisp.dvi'. | ||
| 32 | |||
| 33 | ** To make an Info file, you need to install Texinfo, then run `make info'. | 30 | ** To make an Info file, you need to install Texinfo, then run `make info'. |
| 34 | 31 | ||
| 32 | ** Use `make elisp.pdf' or `make elisp.html' to create PDF or HTML versions. | ||
| 33 | |||
| 35 | 34 | ||
| 36 | This file is part of GNU Emacs. | 35 | This file is part of GNU Emacs. |
| 37 | 36 | ||
diff --git a/doc/lispref/abbrevs.texi b/doc/lispref/abbrevs.texi index f7fd8b541ed..a64e8a0bd51 100644 --- a/doc/lispref/abbrevs.texi +++ b/doc/lispref/abbrevs.texi | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | @c -*-texinfo-*- | 1 | @c -*-texinfo-*- |
| 2 | @c This is part of the GNU Emacs Lisp Reference Manual. | 2 | @c This is part of the GNU Emacs Lisp Reference Manual. |
| 3 | @c Copyright (C) 1990-1994, 1999, 2001-2012 Free Software Foundation, Inc. | 3 | @c Copyright (C) 1990-1994, 1999, 2001-2012 Free Software Foundation, Inc. |
| 4 | @c See the file elisp.texi for copying conditions. | 4 | @c See the file elisp.texi for copying conditions. |
| 5 | @setfilename ../../info/abbrevs | 5 | @setfilename ../../info/abbrevs |
| 6 | @node Abbrevs, Processes, Syntax Tables, Top | 6 | @node Abbrevs, Processes, Syntax Tables, Top |
| @@ -37,14 +37,15 @@ When abbrevs are saved to an abbrev file, system abbrevs are omitted. | |||
| 37 | Because the symbols used for abbrevs are not interned in the usual | 37 | Because the symbols used for abbrevs are not interned in the usual |
| 38 | obarray, they will never appear as the result of reading a Lisp | 38 | obarray, they will never appear as the result of reading a Lisp |
| 39 | expression; in fact, normally they are never used except by the code | 39 | expression; in fact, normally they are never used except by the code |
| 40 | that handles abbrevs. Therefore, it is safe to use them in an | 40 | that handles abbrevs. Therefore, it is safe to use them in a |
| 41 | extremely nonstandard way. | 41 | nonstandard way. |
| 42 | 42 | ||
| 43 | For the user-level commands for abbrevs, see @ref{Abbrevs,, Abbrev | 43 | If the minor mode Abbrev mode is enabled, the buffer-local variable |
| 44 | Mode, emacs, The GNU Emacs Manual}. | 44 | @code{abbrev-mode} is non-@code{nil}, and abbrevs are automatically |
| 45 | expanded in the buffer. For the user-level commands for abbrevs, see | ||
| 46 | @ref{Abbrevs,, Abbrev Mode, emacs, The GNU Emacs Manual}. | ||
| 45 | 47 | ||
| 46 | @menu | 48 | @menu |
| 47 | * Abbrev Mode:: Setting up Emacs for abbreviation. | ||
| 48 | * Tables: Abbrev Tables. Creating and working with abbrev tables. | 49 | * Tables: Abbrev Tables. Creating and working with abbrev tables. |
| 49 | * Defining Abbrevs:: Specifying abbreviations and their expansions. | 50 | * Defining Abbrevs:: Specifying abbreviations and their expansions. |
| 50 | * Files: Abbrev Files. Saving abbrevs in files. | 51 | * Files: Abbrev Files. Saving abbrevs in files. |
| @@ -56,22 +57,7 @@ Mode, emacs, The GNU Emacs Manual}. | |||
| 56 | Which properties have which effect. | 57 | Which properties have which effect. |
| 57 | @end menu | 58 | @end menu |
| 58 | 59 | ||
| 59 | @node Abbrev Mode, Abbrev Tables, Abbrevs, Abbrevs | 60 | @node Abbrev Tables, Defining Abbrevs, Abbrevs, Abbrevs |
| 60 | @comment node-name, next, previous, up | ||
| 61 | @section Setting Up Abbrev Mode | ||
| 62 | |||
| 63 | Abbrev mode is a minor mode controlled by the variable | ||
| 64 | @code{abbrev-mode}. | ||
| 65 | |||
| 66 | @defopt abbrev-mode | ||
| 67 | If this variable is non-@code{nil}, abbrevs are automatically expanded | ||
| 68 | in the buffer. If the value is @code{nil}, abbrevs may be defined, | ||
| 69 | but they are not expanded automatically. | ||
| 70 | |||
| 71 | This variable automatically becomes buffer-local when set in any fashion. | ||
| 72 | @end defopt | ||
| 73 | |||
| 74 | @node Abbrev Tables, Defining Abbrevs, Abbrev Mode, Abbrevs | ||
| 75 | @section Abbrev Tables | 61 | @section Abbrev Tables |
| 76 | 62 | ||
| 77 | This section describes how to create and manipulate abbrev tables. | 63 | This section describes how to create and manipulate abbrev tables. |
| @@ -90,14 +76,15 @@ abbrev table. | |||
| 90 | 76 | ||
| 91 | @defun clear-abbrev-table abbrev-table | 77 | @defun clear-abbrev-table abbrev-table |
| 92 | This function undefines all the abbrevs in @var{abbrev-table}, leaving | 78 | This function undefines all the abbrevs in @var{abbrev-table}, leaving |
| 93 | it empty. It always returns @code{nil}. | 79 | it empty. |
| 80 | @c Don't see why this needs saying. | ||
| 81 | @c It always returns @code{nil}. | ||
| 94 | @end defun | 82 | @end defun |
| 95 | 83 | ||
| 96 | @defun copy-abbrev-table abbrev-table | 84 | @defun copy-abbrev-table abbrev-table |
| 97 | This function returns a copy of @var{abbrev-table}---a new abbrev | 85 | This function returns a copy of @var{abbrev-table}---a new abbrev |
| 98 | table containing the same abbrev definitions. There is one difference | 86 | table containing the same abbrev definitions. It does @emph{not} copy |
| 99 | between the contents of @var{abbrev-table} and the returned copy: all | 87 | any property lists; only the names, values, and functions. |
| 100 | abbrevs in the latter have their property lists set to @code{nil}. | ||
| 101 | @end defun | 88 | @end defun |
| 102 | 89 | ||
| 103 | @defun define-abbrev-table tabname definitions &optional docstring &rest props | 90 | @defun define-abbrev-table tabname definitions &optional docstring &rest props |
| @@ -106,8 +93,7 @@ name, i.e., as a variable whose value is an abbrev table. It defines | |||
| 106 | abbrevs in the table according to @var{definitions}, a list of | 93 | abbrevs in the table according to @var{definitions}, a list of |
| 107 | elements of the form @code{(@var{abbrevname} @var{expansion} | 94 | elements of the form @code{(@var{abbrevname} @var{expansion} |
| 108 | [@var{hook}] [@var{props}...])}. These elements are passed as | 95 | [@var{hook}] [@var{props}...])}. These elements are passed as |
| 109 | arguments to @code{define-abbrev}. The return value is always | 96 | arguments to @code{define-abbrev}. @c The return value is always @code{nil}. |
| 110 | @code{nil}. | ||
| 111 | 97 | ||
| 112 | The optional string @var{docstring} is the documentation string of the | 98 | The optional string @var{docstring} is the documentation string of the |
| 113 | variable @var{tabname}. The property list @var{props} is applied to | 99 | variable @var{tabname}. The property list @var{props} is applied to |
| @@ -115,7 +101,7 @@ the abbrev table (@pxref{Abbrev Table Properties}). | |||
| 115 | 101 | ||
| 116 | If this function is called more than once for the same @var{tabname}, | 102 | If this function is called more than once for the same @var{tabname}, |
| 117 | subsequent calls add the definitions in @var{definitions} to | 103 | subsequent calls add the definitions in @var{definitions} to |
| 118 | @var{tabname}, rather than overriding the entire original contents. | 104 | @var{tabname}, rather than overwriting the entire original contents. |
| 119 | (A subsequent call only overrides abbrevs explicitly redefined or | 105 | (A subsequent call only overrides abbrevs explicitly redefined or |
| 120 | undefined in @var{definitions}.) | 106 | undefined in @var{definitions}.) |
| 121 | @end defun | 107 | @end defun |
| @@ -128,7 +114,7 @@ This is a list of symbols whose values are abbrev tables. | |||
| 128 | @defun insert-abbrev-table-description name &optional human | 114 | @defun insert-abbrev-table-description name &optional human |
| 129 | This function inserts before point a description of the abbrev table | 115 | This function inserts before point a description of the abbrev table |
| 130 | named @var{name}. The argument @var{name} is a symbol whose value is an | 116 | named @var{name}. The argument @var{name} is a symbol whose value is an |
| 131 | abbrev table. The return value is always @code{nil}. | 117 | abbrev table. @c The return value is always @code{nil}. |
| 132 | 118 | ||
| 133 | If @var{human} is non-@code{nil}, the description is human-oriented. | 119 | If @var{human} is non-@code{nil}, the description is human-oriented. |
| 134 | System abbrevs are listed and identified as such. Otherwise the | 120 | System abbrevs are listed and identified as such. Otherwise the |
| @@ -146,7 +132,7 @@ to add these to @var{name} separately.) | |||
| 146 | abbrev in an abbrev table. | 132 | abbrev in an abbrev table. |
| 147 | 133 | ||
| 148 | When a major mode defines a system abbrev, it should call | 134 | When a major mode defines a system abbrev, it should call |
| 149 | @code{define-abbrev} and specify a @code{t} for the @code{:system} | 135 | @code{define-abbrev} and specify @code{t} for the @code{:system} |
| 150 | property. Be aware that any saved non-``system'' abbrevs are restored | 136 | property. Be aware that any saved non-``system'' abbrevs are restored |
| 151 | at startup, i.e. before some major modes are loaded. Therefore, major | 137 | at startup, i.e. before some major modes are loaded. Therefore, major |
| 152 | modes should not assume that their abbrev tables are empty when they | 138 | modes should not assume that their abbrev tables are empty when they |
| @@ -177,12 +163,12 @@ property is non-@code{nil}, @var{hook} can explicitly control whether | |||
| 177 | to insert the self-inserting input character that triggered the | 163 | to insert the self-inserting input character that triggered the |
| 178 | expansion. If @var{hook} returns non-@code{nil} in this case, that | 164 | expansion. If @var{hook} returns non-@code{nil} in this case, that |
| 179 | inhibits insertion of the character. By contrast, if @var{hook} | 165 | inhibits insertion of the character. By contrast, if @var{hook} |
| 180 | returns @code{nil}, @code{expand-abbrev} also returns @code{nil}, as | 166 | returns @code{nil}, @code{expand-abbrev} (or @code{abbrev-insert}) |
| 181 | if expansion had not really occurred. | 167 | also returns @code{nil}, as if expansion had not really occurred. |
| 182 | 168 | ||
| 183 | Normally, @code{define-abbrev} sets the variable | 169 | Normally, @code{define-abbrev} sets the variable |
| 184 | @code{abbrevs-changed} to @code{t}, if it actually changes the abbrev. | 170 | @code{abbrevs-changed} to @code{t}, if it actually changes the abbrev. |
| 185 | (This is so that some commands will offer to save the abbrevs.) It | 171 | This is so that some commands will offer to save the abbrevs. It |
| 186 | does not do this for a system abbrev, since those aren't saved anyway. | 172 | does not do this for a system abbrev, since those aren't saved anyway. |
| 187 | @end defun | 173 | @end defun |
| 188 | 174 | ||
| @@ -202,7 +188,8 @@ The abbrevs are saved in the form of a Lisp program to define the same | |||
| 202 | abbrev tables with the same contents. Therefore, you can load the file | 188 | abbrev tables with the same contents. Therefore, you can load the file |
| 203 | with @code{load} (@pxref{How Programs Do Loading}). However, the | 189 | with @code{load} (@pxref{How Programs Do Loading}). However, the |
| 204 | function @code{quietly-read-abbrev-file} is provided as a more | 190 | function @code{quietly-read-abbrev-file} is provided as a more |
| 205 | convenient interface. | 191 | convenient interface. Emacs automatically calls this function at |
| 192 | startup. | ||
| 206 | 193 | ||
| 207 | User-level facilities such as @code{save-some-buffers} can save | 194 | User-level facilities such as @code{save-some-buffers} can save |
| 208 | abbrevs in a file automatically, under the control of variables | 195 | abbrevs in a file automatically, under the control of variables |
| @@ -216,17 +203,18 @@ This is the default file name for reading and saving abbrevs. | |||
| 216 | This function reads abbrev definitions from a file named @var{filename}, | 203 | This function reads abbrev definitions from a file named @var{filename}, |
| 217 | previously written with @code{write-abbrev-file}. If @var{filename} is | 204 | previously written with @code{write-abbrev-file}. If @var{filename} is |
| 218 | omitted or @code{nil}, the file specified in @code{abbrev-file-name} is | 205 | omitted or @code{nil}, the file specified in @code{abbrev-file-name} is |
| 219 | used. @code{save-abbrevs} is set to @code{t} so that changes will be | 206 | used. |
| 220 | saved. | ||
| 221 | 207 | ||
| 222 | This function does not display any messages. It returns @code{nil}. | 208 | As the name implies, this function does not display any messages. |
| 209 | @c It returns @code{nil}. | ||
| 223 | @end defun | 210 | @end defun |
| 224 | 211 | ||
| 225 | @defopt save-abbrevs | 212 | @defopt save-abbrevs |
| 226 | A non-@code{nil} value for @code{save-abbrevs} means that Emacs should | 213 | A non-@code{nil} value for @code{save-abbrevs} means that Emacs should |
| 227 | offer the user to save abbrevs when files are saved. If the value is | 214 | offer to save abbrevs (if any have changed) when files are saved. If |
| 228 | @code{silently}, Emacs saves the abbrevs without asking the user. | 215 | the value is @code{silently}, Emacs saves the abbrevs without asking |
| 229 | @code{abbrev-file-name} specifies the file to save the abbrevs in. | 216 | the user. @code{abbrev-file-name} specifies the file to save the |
| 217 | abbrevs in. | ||
| 230 | @end defopt | 218 | @end defopt |
| 231 | 219 | ||
| 232 | @defvar abbrevs-changed | 220 | @defvar abbrevs-changed |
| @@ -254,7 +242,7 @@ use for communication. | |||
| 254 | 242 | ||
| 255 | @defun abbrev-symbol abbrev &optional table | 243 | @defun abbrev-symbol abbrev &optional table |
| 256 | This function returns the symbol representing the abbrev named | 244 | This function returns the symbol representing the abbrev named |
| 257 | @var{abbrev}. The value returned is @code{nil} if that abbrev is not | 245 | @var{abbrev}. It returns @code{nil} if that abbrev is not |
| 258 | defined. The optional second argument @var{table} is the abbrev table | 246 | defined. The optional second argument @var{table} is the abbrev table |
| 259 | in which to look it up. If @var{table} is @code{nil}, this function | 247 | in which to look it up. If @var{table} is @code{nil}, this function |
| 260 | tries first the current buffer's local abbrev table, and second the | 248 | tries first the current buffer's local abbrev table, and second the |
| @@ -263,8 +251,8 @@ global abbrev table. | |||
| 263 | 251 | ||
| 264 | @defun abbrev-expansion abbrev &optional table | 252 | @defun abbrev-expansion abbrev &optional table |
| 265 | This function returns the string that @var{abbrev} would expand into (as | 253 | This function returns the string that @var{abbrev} would expand into (as |
| 266 | defined by the abbrev tables used for the current buffer). If | 254 | defined by the abbrev tables used for the current buffer). It returns |
| 267 | @var{abbrev} is not a valid abbrev, the function returns @code{nil}. | 255 | @code{nil} if @var{abbrev} is not a valid abbrev. |
| 268 | The optional argument @var{table} specifies the abbrev table to use, | 256 | The optional argument @var{table} specifies the abbrev table to use, |
| 269 | as in @code{abbrev-symbol}. | 257 | as in @code{abbrev-symbol}. |
| 270 | @end defun | 258 | @end defun |
| @@ -274,7 +262,7 @@ This command expands the abbrev before point, if any. If point does not | |||
| 274 | follow an abbrev, this command does nothing. The command returns the | 262 | follow an abbrev, this command does nothing. The command returns the |
| 275 | abbrev symbol if it did expansion, @code{nil} otherwise. | 263 | abbrev symbol if it did expansion, @code{nil} otherwise. |
| 276 | 264 | ||
| 277 | If the abbrev symbol has a hook function which is a symbol whose | 265 | If the abbrev symbol has a hook function that is a symbol whose |
| 278 | @code{no-self-insert} property is non-@code{nil}, and if the hook | 266 | @code{no-self-insert} property is non-@code{nil}, and if the hook |
| 279 | function returns @code{nil} as its value, then @code{expand-abbrev} | 267 | function returns @code{nil} as its value, then @code{expand-abbrev} |
| 280 | returns @code{nil} even though expansion did occur. | 268 | returns @code{nil} even though expansion did occur. |
| @@ -346,14 +334,14 @@ has already been unexpanded. This contains information left by | |||
| 346 | @end defvar | 334 | @end defvar |
| 347 | 335 | ||
| 348 | @defvar abbrev-expand-functions | 336 | @defvar abbrev-expand-functions |
| 349 | This is a special hook run @emph{around} the @code{expand-abbrev} | 337 | This is a wrapper hook (@pxref{Running Hooks}) run around the |
| 350 | function. Each function on this hook is called with a single | 338 | @code{expand-abbrev} function. Each function on this hook is called |
| 351 | argument: a function that performs the normal abbrev expansion. The | 339 | with a single argument: a function that performs the normal abbrev |
| 352 | hook function can hence do anything it wants before and after | 340 | expansion. The hook function can hence do anything it wants before |
| 353 | performing the expansion. It can also choose not to call its | 341 | and after performing the expansion. It can also choose not to call |
| 354 | argument, thus overriding the default behavior; or it may even call it | 342 | its argument, thus overriding the default behavior; or it may even |
| 355 | several times. The function should return the abbrev symbol if | 343 | call it several times. The function should return the abbrev symbol |
| 356 | expansion took place. | 344 | if expansion took place. |
| 357 | @end defvar | 345 | @end defvar |
| 358 | 346 | ||
| 359 | The following sample code shows a simple use of | 347 | The following sample code shows a simple use of |
| @@ -361,8 +349,7 @@ expansion took place. | |||
| 361 | mode for editing certain files in which lines that start with @samp{#} | 349 | mode for editing certain files in which lines that start with @samp{#} |
| 362 | are comments. You want to use Text mode abbrevs for those lines. The | 350 | are comments. You want to use Text mode abbrevs for those lines. The |
| 363 | regular local abbrev table, @code{foo-mode-abbrev-table} is | 351 | regular local abbrev table, @code{foo-mode-abbrev-table} is |
| 364 | appropriate for all other lines. Then you can put the following code | 352 | appropriate for all other lines. @xref{Standard Abbrev Tables}, for the |
| 365 | in your @file{.emacs} file. @xref{Standard Abbrev Tables}, for the | ||
| 366 | definitions of @code{local-abbrev-table} and @code{text-mode-abbrev-table}. | 353 | definitions of @code{local-abbrev-table} and @code{text-mode-abbrev-table}. |
| 367 | 354 | ||
| 368 | @smallexample | 355 | @smallexample |
| @@ -419,14 +406,16 @@ This is the local abbrev table used in Text mode. | |||
| 419 | @end defvar | 406 | @end defvar |
| 420 | 407 | ||
| 421 | @defvar lisp-mode-abbrev-table | 408 | @defvar lisp-mode-abbrev-table |
| 422 | This is the local abbrev table used in Lisp mode and Emacs Lisp mode. | 409 | This is the local abbrev table used in Lisp mode. It is the parent |
| 410 | of the local abbrev table used in Emacs Lisp mode. @xref{Abbrev Table | ||
| 411 | Properties}. | ||
| 423 | @end defvar | 412 | @end defvar |
| 424 | 413 | ||
| 425 | @node Abbrev Properties, Abbrev Table Properties, Standard Abbrev Tables, Abbrevs | 414 | @node Abbrev Properties, Abbrev Table Properties, Standard Abbrev Tables, Abbrevs |
| 426 | @section Abbrev Properties | 415 | @section Abbrev Properties |
| 427 | 416 | ||
| 428 | Abbrevs have properties, some of which influence the way they work. | 417 | Abbrevs have properties, some of which influence the way they work. |
| 429 | You can provide them as arguments to @code{define-abbrev} and you can | 418 | You can provide them as arguments to @code{define-abbrev}, and |
| 430 | manipulate them with the following functions: | 419 | manipulate them with the following functions: |
| 431 | 420 | ||
| 432 | @defun abbrev-put abbrev prop val | 421 | @defun abbrev-put abbrev prop val |
| @@ -467,8 +456,7 @@ modifies the capitalization of the expansion. | |||
| 467 | 456 | ||
| 468 | Like abbrevs, abbrev tables have properties, some of which influence | 457 | Like abbrevs, abbrev tables have properties, some of which influence |
| 469 | the way they work. You can provide them as arguments to | 458 | the way they work. You can provide them as arguments to |
| 470 | @code{define-abbrev-table} and you can manipulate them with the | 459 | @code{define-abbrev-table}, and manipulate them with the functions: |
| 471 | functions: | ||
| 472 | 460 | ||
| 473 | @defun abbrev-table-put table prop val | 461 | @defun abbrev-table-put table prop val |
| 474 | Set the property @var{prop} of abbrev table @var{table} to value @var{val}. | 462 | Set the property @var{prop} of abbrev table @var{table} to value @var{val}. |
| @@ -484,8 +472,8 @@ The following properties have special meaning: | |||
| 484 | @table @code | 472 | @table @code |
| 485 | @item :enable-function | 473 | @item :enable-function |
| 486 | This is like the @code{:enable-function} abbrev property except that | 474 | This is like the @code{:enable-function} abbrev property except that |
| 487 | it applies to all abbrevs in the table and is used even before trying | 475 | it applies to all abbrevs in the table. It is used before even trying |
| 488 | to find the abbrev before point so it can dynamically modify the | 476 | to find the abbrev before point, so it can dynamically modify the |
| 489 | abbrev table. | 477 | abbrev table. |
| 490 | 478 | ||
| 491 | @item :case-fixed | 479 | @item :case-fixed |
| @@ -494,15 +482,16 @@ applies to all abbrevs in the table. | |||
| 494 | 482 | ||
| 495 | @item :regexp | 483 | @item :regexp |
| 496 | If non-@code{nil}, this property is a regular expression that | 484 | If non-@code{nil}, this property is a regular expression that |
| 497 | indicates how to extract the name of the abbrev before point before | 485 | indicates how to extract the name of the abbrev before point, before |
| 498 | looking it up in the table. When the regular expression matches | 486 | looking it up in the table. When the regular expression matches |
| 499 | before point, the abbrev name is expected to be in submatch 1. | 487 | before point, the abbrev name is expected to be in submatch 1. |
| 500 | If this property is @code{nil}, @code{expand-function} defaults to | 488 | If this property is @code{nil}, the default is to use |
| 501 | @code{"\\<\\(\\w+\\)\\W"}. This property allows the use of abbrevs | 489 | @code{backward-word} and @code{forward-word} to find the name. This |
| 502 | whose name contains characters of non-word syntax. | 490 | property allows the use of abbrevs whose name contains characters of |
| 491 | non-word syntax. | ||
| 503 | 492 | ||
| 504 | @item :parents | 493 | @item :parents |
| 505 | This property holds the list of tables from which to inherit | 494 | This property holds a list of tables from which to inherit |
| 506 | other abbrevs. | 495 | other abbrevs. |
| 507 | 496 | ||
| 508 | @item :abbrev-table-modiff | 497 | @item :abbrev-table-modiff |
diff --git a/doc/lispref/advice.texi b/doc/lispref/advice.texi index 78b4ac9aa2d..a2f59b2ddc9 100644 --- a/doc/lispref/advice.texi +++ b/doc/lispref/advice.texi | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | @c -*-texinfo-*- | 1 | @c -*-texinfo-*- |
| 2 | @c This is part of the GNU Emacs Lisp Reference Manual. | 2 | @c This is part of the GNU Emacs Lisp Reference Manual. |
| 3 | @c Copyright (C) 1998-1999, 2001-2012 Free Software Foundation, Inc. | 3 | @c Copyright (C) 1998-1999, 2001-2012 Free Software Foundation, Inc. |
| 4 | @c See the file elisp.texi for copying conditions. | 4 | @c See the file elisp.texi for copying conditions. |
| 5 | @setfilename ../../info/advising | 5 | @setfilename ../../info/advising |
| 6 | @node Advising Functions, Debugging, Byte Compilation, Top | 6 | @node Advising Functions, Debugging, Byte Compilation, Top |
| @@ -31,7 +31,7 @@ who debug calls to the original function may not notice that it has | |||
| 31 | been modified with advice. Therefore, if you have the possibility to | 31 | been modified with advice. Therefore, if you have the possibility to |
| 32 | change the code of that function to run a hook, please solve the | 32 | change the code of that function to run a hook, please solve the |
| 33 | problem that way. Advice should be reserved for the cases where you | 33 | problem that way. Advice should be reserved for the cases where you |
| 34 | cannot get the function changed. In particular, Emacs' own source | 34 | cannot get the function changed. In particular, Emacs's own source |
| 35 | files should not put advice on functions in Emacs. There are | 35 | files should not put advice on functions in Emacs. There are |
| 36 | currently a few exceptions to this convention, but we aim to correct | 36 | currently a few exceptions to this convention, but we aim to correct |
| 37 | them. | 37 | them. |
diff --git a/doc/lispref/anti.texi b/doc/lispref/anti.texi index 6b9473e99d4..2463d6535fd 100644 --- a/doc/lispref/anti.texi +++ b/doc/lispref/anti.texi | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | @c -*-texinfo-*- | 1 | @c -*-texinfo-*- |
| 2 | @c This is part of the GNU Emacs Lisp Reference Manual. | 2 | @c This is part of the GNU Emacs Lisp Reference Manual. |
| 3 | @c Copyright (C) 1999, 2002-2012 Free Software Foundation, Inc. | 3 | @c Copyright (C) 1999, 2002-2012 Free Software Foundation, Inc. |
| 4 | @c See the file elisp.texi for copying conditions. | 4 | @c See the file elisp.texi for copying conditions. |
| 5 | 5 | ||
| 6 | @c This node must have no pointers. | 6 | @c This node must have no pointers. |
| @@ -29,7 +29,7 @@ different scripts. | |||
| 29 | The @code{^} interactive spec code, the function | 29 | The @code{^} interactive spec code, the function |
| 30 | @code{handle-shift-selection}, and the variable | 30 | @code{handle-shift-selection}, and the variable |
| 31 | @code{this-command-keys-shift-translated} have all been removed. | 31 | @code{this-command-keys-shift-translated} have all been removed. |
| 32 | Shift-translated keys are no longer treated specially, making Emacs' | 32 | Shift-translated keys are no longer treated specially, making Emacs's |
| 33 | handling of keybindings much more consistent. | 33 | handling of keybindings much more consistent. |
| 34 | 34 | ||
| 35 | @item | 35 | @item |
| @@ -93,9 +93,9 @@ are always drawn using the X core font driver. | |||
| 93 | @item | 93 | @item |
| 94 | Display terminals are no longer represented using a ``terminal'' data | 94 | Display terminals are no longer represented using a ``terminal'' data |
| 95 | type; this is not necessary, because we have removed the ability to | 95 | type; this is not necessary, because we have removed the ability to |
| 96 | display on graphical and text-only terminals simultaneously. For the | 96 | display on graphical and text terminals simultaneously. For the same |
| 97 | same reason, the @code{window-system} variable is no longer | 97 | reason, the @code{window-system} variable is no longer frame-local, |
| 98 | frame-local, and the @code{window-system} function has been removed. | 98 | and the @code{window-system} function has been removed. |
| 99 | 99 | ||
| 100 | @item | 100 | @item |
| 101 | The functions @code{list-system-processes} and | 101 | The functions @code{list-system-processes} and |
diff --git a/doc/lispref/backups.texi b/doc/lispref/backups.texi index a4b3a0b9bef..a1c5f20f28c 100644 --- a/doc/lispref/backups.texi +++ b/doc/lispref/backups.texi | |||
| @@ -57,12 +57,13 @@ buffer, if appropriate. It is called by @code{save-buffer} before | |||
| 57 | saving the buffer the first time. | 57 | saving the buffer the first time. |
| 58 | 58 | ||
| 59 | If a backup was made by renaming, the return value is a cons cell of | 59 | If a backup was made by renaming, the return value is a cons cell of |
| 60 | the form (@var{modes} . @var{backupname}), where @var{modes} are the | 60 | the form (@var{modes} @var{context} @var{backupname}), where |
| 61 | mode bits of the original file, as returned by @code{file-modes} | 61 | @var{modes} are the mode bits of the original file, as returned by |
| 62 | (@pxref{File Attributes,, Other Information about Files}), and | 62 | @code{file-modes} (@pxref{File Attributes,, Other Information about |
| 63 | @var{backupname} is the name of the backup. In all other cases, that | 63 | Files}), @var{context} is a list describing the original file's |
| 64 | is, if a backup was made by copying or if no backup was made, this | 64 | SELinux context (@pxref{File Attributes}), and @var{backupname} is the |
| 65 | function returns @code{nil}. | 65 | name of the backup. In all other cases, that is, if a backup was made |
| 66 | by copying or if no backup was made, this function returns @code{nil}. | ||
| 66 | @end defun | 67 | @end defun |
| 67 | 68 | ||
| 68 | @defvar buffer-backed-up | 69 | @defvar buffer-backed-up |
| @@ -139,8 +140,8 @@ For the common case of all backups going into one directory, the alist | |||
| 139 | should contain a single element pairing @samp{"."} with the appropriate | 140 | should contain a single element pairing @samp{"."} with the appropriate |
| 140 | directory name. | 141 | directory name. |
| 141 | 142 | ||
| 142 | If this variable is @code{nil}, or it fails to match a filename, the | 143 | If this variable is @code{nil} (the default), or it fails to match a |
| 143 | backup is made in the original file's directory. | 144 | filename, the backup is made in the original file's directory. |
| 144 | 145 | ||
| 145 | On MS-DOS filesystems without long names this variable is always | 146 | On MS-DOS filesystems without long names this variable is always |
| 146 | ignored. | 147 | ignored. |
| @@ -191,7 +192,7 @@ significance). @xref{Saving Buffers}. | |||
| 191 | 192 | ||
| 192 | @defopt backup-by-copying | 193 | @defopt backup-by-copying |
| 193 | If this variable is non-@code{nil}, Emacs always makes backup files by | 194 | If this variable is non-@code{nil}, Emacs always makes backup files by |
| 194 | copying. | 195 | copying. The default is @code{nil}. |
| 195 | @end defopt | 196 | @end defopt |
| 196 | 197 | ||
| 197 | The following three variables, when non-@code{nil}, cause the second | 198 | The following three variables, when non-@code{nil}, cause the second |
| @@ -200,7 +201,7 @@ treatment of files that don't fall into the special cases. | |||
| 200 | 201 | ||
| 201 | @defopt backup-by-copying-when-linked | 202 | @defopt backup-by-copying-when-linked |
| 202 | If this variable is non-@code{nil}, Emacs makes backups by copying for | 203 | If this variable is non-@code{nil}, Emacs makes backups by copying for |
| 203 | files with multiple names (hard links). | 204 | files with multiple names (hard links). The default is @code{nil}. |
| 204 | 205 | ||
| 205 | This variable is significant only if @code{backup-by-copying} is | 206 | This variable is significant only if @code{backup-by-copying} is |
| 206 | @code{nil}, since copying is always used when that variable is | 207 | @code{nil}, since copying is always used when that variable is |
| @@ -208,8 +209,9 @@ non-@code{nil}. | |||
| 208 | @end defopt | 209 | @end defopt |
| 209 | 210 | ||
| 210 | @defopt backup-by-copying-when-mismatch | 211 | @defopt backup-by-copying-when-mismatch |
| 211 | If this variable is non-@code{nil}, Emacs makes backups by copying in cases | 212 | If this variable is non-@code{nil} (the default), Emacs makes backups |
| 212 | where renaming would change either the owner or the group of the file. | 213 | by copying in cases where renaming would change either the owner or |
| 214 | the group of the file. | ||
| 213 | 215 | ||
| 214 | The value has no effect when renaming would not alter the owner or | 216 | The value has no effect when renaming would not alter the owner or |
| 215 | group of the file; that is, for files which are owned by the user and | 217 | group of the file; that is, for files which are owned by the user and |
| @@ -441,10 +443,11 @@ buffer-auto-save-file-name | |||
| 441 | 443 | ||
| 442 | @deffn Command auto-save-mode arg | 444 | @deffn Command auto-save-mode arg |
| 443 | When used interactively without an argument, this command is a toggle | 445 | When used interactively without an argument, this command is a toggle |
| 444 | switch: it turns on auto-saving of the current buffer if it is off, and | 446 | switch: it turns on auto-saving of the current buffer if it is off, |
| 445 | vice versa. With an argument @var{arg}, the command turns auto-saving | 447 | and vice versa. When called from Lisp with no argument, it turns |
| 446 | on if the value of @var{arg} is @code{t}, a nonempty list, or a positive | 448 | auto-saving on. With an argument @var{arg}, it turns auto-saving on |
| 447 | integer. Otherwise, it turns auto-saving off. | 449 | if the value of @var{arg} is @code{t}, a nonempty list, or a positive |
| 450 | integer; otherwise, it turns auto-saving off. | ||
| 448 | @end deffn | 451 | @end deffn |
| 449 | 452 | ||
| 450 | @defun auto-save-file-name-p filename | 453 | @defun auto-save-file-name-p filename |
| @@ -696,11 +699,13 @@ operation, reverting preserves all the markers. If they are not | |||
| 696 | identical, reverting does change the buffer; in that case, it preserves | 699 | identical, reverting does change the buffer; in that case, it preserves |
| 697 | the markers in the unchanged text (if any) at the beginning and end of | 700 | the markers in the unchanged text (if any) at the beginning and end of |
| 698 | the buffer. Preserving any additional markers would be problematical. | 701 | the buffer. Preserving any additional markers would be problematical. |
| 699 | |||
| 700 | This command binds @code{revert-buffer-in-progress-p} to a | ||
| 701 | non-@code{nil} value while it operates. | ||
| 702 | @end deffn | 702 | @end deffn |
| 703 | 703 | ||
| 704 | @defvar revert-buffer-in-progress-p | ||
| 705 | @code{revert-buffer} binds this variable to a non-@code{nil} value | ||
| 706 | while it is working. | ||
| 707 | @end defvar | ||
| 708 | |||
| 704 | You can customize how @code{revert-buffer} does its work by setting | 709 | You can customize how @code{revert-buffer} does its work by setting |
| 705 | the variables described in the rest of this section. | 710 | the variables described in the rest of this section. |
| 706 | 711 | ||
| @@ -754,3 +759,16 @@ This normal hook is run by @code{revert-buffer} after inserting | |||
| 754 | the modified contents---but only if @code{revert-buffer-function} is | 759 | the modified contents---but only if @code{revert-buffer-function} is |
| 755 | @code{nil}. | 760 | @code{nil}. |
| 756 | @end defvar | 761 | @end defvar |
| 762 | |||
| 763 | @c FIXME? Move this section from arevert-xtra to here? | ||
| 764 | @defvar buffer-stale-function | ||
| 765 | The value of this variable, if non-@code{nil}, specifies a function | ||
| 766 | to call to check whether a non-file buffer needs reverting | ||
| 767 | @iftex | ||
| 768 | (@pxref{Supporting additional buffers,,, emacs-xtra, Specialized Emacs Features}). | ||
| 769 | @end iftex | ||
| 770 | @ifnottex | ||
| 771 | (@pxref{Supporting additional buffers,,, emacs}). | ||
| 772 | @end ifnottex | ||
| 773 | @end defvar | ||
| 774 | |||
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index c2e792cd585..125a886ecb2 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi | |||
| @@ -417,7 +417,7 @@ This buffer-local variable holds the abbreviated truename of the file | |||
| 417 | visited in the current buffer, or @code{nil} if no file is visited. | 417 | visited in the current buffer, or @code{nil} if no file is visited. |
| 418 | It is a permanent local, unaffected by | 418 | It is a permanent local, unaffected by |
| 419 | @code{kill-all-local-variables}. @xref{Truenames}, and | 419 | @code{kill-all-local-variables}. @xref{Truenames}, and |
| 420 | @ref{Definition of abbreviate-file-name}. | 420 | @ref{abbreviate-file-name}. |
| 421 | @end defvar | 421 | @end defvar |
| 422 | 422 | ||
| 423 | @defvar buffer-file-number | 423 | @defvar buffer-file-number |
| @@ -502,9 +502,8 @@ buffer's recorded last file modification time as reported by | |||
| 502 | last file modification time, after which @code{visited-file-modtime} | 502 | last file modification time, after which @code{visited-file-modtime} |
| 503 | returns zero. | 503 | returns zero. |
| 504 | 504 | ||
| 505 | @c Wordy to avoid overfull hbox. --rjc 16mar92 | 505 | When the function @code{set-visited-file-name} is called |
| 506 | When the function @code{set-visited-file-name} is called interactively, it | 506 | interactively, it prompts for @var{filename} in the minibuffer. |
| 507 | prompts for @var{filename} in the minibuffer. | ||
| 508 | @end deffn | 507 | @end deffn |
| 509 | 508 | ||
| 510 | @defvar list-buffers-directory | 509 | @defvar list-buffers-directory |
| @@ -913,7 +912,7 @@ To replace a buffer in all the windows that display it, use | |||
| 913 | This command switches to the last buffer in the local buffer list of | 912 | This command switches to the last buffer in the local buffer list of |
| 914 | the selected frame. More precisely, it calls the function | 913 | the selected frame. More precisely, it calls the function |
| 915 | @code{switch-to-buffer} (@pxref{Switching Buffers}), to display the | 914 | @code{switch-to-buffer} (@pxref{Switching Buffers}), to display the |
| 916 | buffer returned by @code{last-buffer}, see above, in the selected | 915 | buffer returned by @code{last-buffer} (see above), in the selected |
| 917 | window. | 916 | window. |
| 918 | @end deffn | 917 | @end deffn |
| 919 | 918 | ||
| @@ -959,11 +958,12 @@ buffer initially disables undo information recording (@pxref{Undo}). | |||
| 959 | 958 | ||
| 960 | @defun generate-new-buffer name | 959 | @defun generate-new-buffer name |
| 961 | This function returns a newly created, empty buffer, but does not make | 960 | This function returns a newly created, empty buffer, but does not make |
| 962 | it current. If there is no buffer named @var{name}, then that is the | 961 | it current. The name of the buffer is generated by passing @var{name} |
| 963 | name of the new buffer. If that name is in use, this function adds | 962 | to the function @code{generate-new-buffer-name} (@pxref{Buffer |
| 964 | suffixes of the form @samp{<@var{n}>} to @var{name}, where @var{n} is an | 963 | Names}). Thus, if there is no buffer named @var{name}, then that is |
| 965 | integer. It tries successive integers starting with 2 until it finds an | 964 | the name of the new buffer; if that name is in use, a suffix of the |
| 966 | available name. | 965 | form @samp{<@var{n}>}, where @var{n} is an integer, is appended to |
| 966 | @var{name}. | ||
| 967 | 967 | ||
| 968 | An error is signaled if @var{name} is not a string. | 968 | An error is signaled if @var{name} is not a string. |
| 969 | 969 | ||
| @@ -985,9 +985,6 @@ An error is signaled if @var{name} is not a string. | |||
| 985 | The major mode for the new buffer is set to Fundamental mode. The default | 985 | The major mode for the new buffer is set to Fundamental mode. The default |
| 986 | value of the variable @code{major-mode} is handled at a higher level. | 986 | value of the variable @code{major-mode} is handled at a higher level. |
| 987 | @xref{Auto Major Mode}. | 987 | @xref{Auto Major Mode}. |
| 988 | |||
| 989 | See the related function @code{generate-new-buffer-name} in @ref{Buffer | ||
| 990 | Names}. | ||
| 991 | @end defun | 988 | @end defun |
| 992 | 989 | ||
| 993 | @node Killing Buffers | 990 | @node Killing Buffers |
| @@ -1005,25 +1002,26 @@ their identity, however; if you kill two distinct buffers, they remain | |||
| 1005 | distinct according to @code{eq} although both are dead. | 1002 | distinct according to @code{eq} although both are dead. |
| 1006 | 1003 | ||
| 1007 | If you kill a buffer that is current or displayed in a window, Emacs | 1004 | If you kill a buffer that is current or displayed in a window, Emacs |
| 1008 | automatically selects or displays some other buffer instead. This means | 1005 | automatically selects or displays some other buffer instead. This |
| 1009 | that killing a buffer can in general change the current buffer. | 1006 | means that killing a buffer can change the current buffer. Therefore, |
| 1010 | Therefore, when you kill a buffer, you should also take the precautions | 1007 | when you kill a buffer, you should also take the precautions |
| 1011 | associated with changing the current buffer (unless you happen to know | 1008 | associated with changing the current buffer (unless you happen to know |
| 1012 | that the buffer being killed isn't current). @xref{Current Buffer}. | 1009 | that the buffer being killed isn't current). @xref{Current Buffer}. |
| 1013 | 1010 | ||
| 1014 | If you kill a buffer that is the base buffer of one or more indirect | 1011 | If you kill a buffer that is the base buffer of one or more indirect |
| 1015 | buffers, the indirect buffers are automatically killed as well. | 1012 | @iftex |
| 1016 | 1013 | buffers, | |
| 1017 | The @code{buffer-name} of a killed buffer is @code{nil}. You can use | 1014 | @end iftex |
| 1018 | this feature to test whether a buffer has been killed: | 1015 | @ifnottex |
| 1016 | buffers (@pxref{Indirect Buffers}), | ||
| 1017 | @end ifnottex | ||
| 1018 | the indirect buffers are automatically killed as well. | ||
| 1019 | 1019 | ||
| 1020 | @example | 1020 | @cindex live buffer |
| 1021 | @group | 1021 | The @code{buffer-name} of a buffer is @code{nil} if, and only if, |
| 1022 | (defun buffer-killed-p (buffer) | 1022 | the buffer is killed. A buffer that has not been killed is called a |
| 1023 | "Return t if BUFFER is killed." | 1023 | @dfn{live} buffer. To test whether a buffer is live or killed, use |
| 1024 | (not (buffer-name buffer))) | 1024 | the function @code{buffer-live-p} (see below). |
| 1025 | @end group | ||
| 1026 | @end example | ||
| 1027 | 1025 | ||
| 1028 | @deffn Command kill-buffer &optional buffer-or-name | 1026 | @deffn Command kill-buffer &optional buffer-or-name |
| 1029 | This function kills the buffer @var{buffer-or-name}, freeing all its | 1027 | This function kills the buffer @var{buffer-or-name}, freeing all its |
| @@ -1032,9 +1030,8 @@ memory for other uses or to be returned to the operating system. If | |||
| 1032 | buffer. | 1030 | buffer. |
| 1033 | 1031 | ||
| 1034 | Any processes that have this buffer as the @code{process-buffer} are | 1032 | Any processes that have this buffer as the @code{process-buffer} are |
| 1035 | sent the @code{SIGHUP} signal, which normally causes them to terminate. | 1033 | sent the @code{SIGHUP} (``hangup'') signal, which normally causes them |
| 1036 | (The basic meaning of @code{SIGHUP} is that a dialup line has been | 1034 | to terminate. @xref{Signals to Processes}. |
| 1037 | disconnected.) @xref{Signals to Processes}. | ||
| 1038 | 1035 | ||
| 1039 | If the buffer is visiting a file and contains unsaved changes, | 1036 | If the buffer is visiting a file and contains unsaved changes, |
| 1040 | @code{kill-buffer} asks the user to confirm before the buffer is killed. | 1037 | @code{kill-buffer} asks the user to confirm before the buffer is killed. |
| @@ -1099,8 +1096,8 @@ automatically becomes buffer-local when set for any reason. | |||
| 1099 | @end defvar | 1096 | @end defvar |
| 1100 | 1097 | ||
| 1101 | @defun buffer-live-p object | 1098 | @defun buffer-live-p object |
| 1102 | This function returns @code{t} if @var{object} is a buffer which has | 1099 | This function returns @code{t} if @var{object} is a live buffer (a |
| 1103 | not been killed, @code{nil} otherwise. | 1100 | buffer which has not been killed), @code{nil} otherwise. |
| 1104 | @end defun | 1101 | @end defun |
| 1105 | 1102 | ||
| 1106 | @node Indirect Buffers | 1103 | @node Indirect Buffers |
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index f4e7c922331..617f050f498 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | @c -*-texinfo-*- | 1 | @c -*-texinfo-*- |
| 2 | @c This is part of the GNU Emacs Lisp Reference Manual. | 2 | @c This is part of the GNU Emacs Lisp Reference Manual. |
| 3 | @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 | 3 | @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. |
| 4 | @c Free Software Foundation, Inc. | ||
| 5 | @c See the file elisp.texi for copying conditions. | 4 | @c See the file elisp.texi for copying conditions. |
| 6 | @setfilename ../../info/commands | 5 | @setfilename ../../info/commands |
| 7 | @node Command Loop, Keymaps, Minibuffers, Top | 6 | @node Command Loop, Keymaps, Minibuffers, Top |
| @@ -3430,7 +3429,7 @@ buffer-local. @xref{Multiple Terminals}. | |||
| 3430 | @end defvar | 3429 | @end defvar |
| 3431 | 3430 | ||
| 3432 | @defvar kbd-macro-termination-hook | 3431 | @defvar kbd-macro-termination-hook |
| 3433 | This normal hook (@pxref{Standard Hooks}) is run when a keyboard | 3432 | This normal hook is run when a keyboard macro terminates, regardless |
| 3434 | macro terminates, regardless of what caused it to terminate (reaching | 3433 | of what caused it to terminate (reaching the macro end or an error |
| 3435 | the macro end or an error which ended the macro prematurely). | 3434 | which ended the macro prematurely). |
| 3436 | @end defvar | 3435 | @end defvar |
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index c23c93300a6..8c45a1a4faf 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi | |||
| @@ -1234,7 +1234,7 @@ make it possible to categorize errors at various levels of generality | |||
| 1234 | when you write an error handler. Using error symbols alone would | 1234 | when you write an error handler. Using error symbols alone would |
| 1235 | eliminate all but the narrowest level of classification. | 1235 | eliminate all but the narrowest level of classification. |
| 1236 | 1236 | ||
| 1237 | @xref{Standard Errors}, for a list of all the standard error symbols | 1237 | @xref{Standard Errors}, for a list of the main error symbols |
| 1238 | and their conditions. | 1238 | and their conditions. |
| 1239 | 1239 | ||
| 1240 | @node Cleanups | 1240 | @node Cleanups |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index ae8a5fde29f..281ddda9cec 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | @c -*-texinfo-*- | 1 | @c -*-texinfo-*- |
| 2 | @c This is part of the GNU Emacs Lisp Reference Manual. | 2 | @c This is part of the GNU Emacs Lisp Reference Manual. |
| 3 | @c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc. | 3 | @c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc. |
| 4 | @c See the file elisp.texi for copying conditions. | 4 | @c See the file elisp.texi for copying conditions. |
| 5 | @setfilename ../../info/display | 5 | @setfilename ../../info/display |
| 6 | @node Display, System Interface, Processes, Top | 6 | @node Display, System Interface, Processes, Top |
| @@ -28,7 +28,7 @@ that Emacs presents to the user. | |||
| 28 | * Display Property:: Enabling special display features. | 28 | * Display Property:: Enabling special display features. |
| 29 | * Images:: Displaying images in Emacs buffers. | 29 | * Images:: Displaying images in Emacs buffers. |
| 30 | * Buttons:: Adding clickable buttons to Emacs buffers. | 30 | * Buttons:: Adding clickable buttons to Emacs buffers. |
| 31 | * Abstract Display:: Emacs' Widget for Object Collections. | 31 | * Abstract Display:: Emacs's Widget for Object Collections. |
| 32 | * Blinking:: How Emacs shows the matching open parenthesis. | 32 | * Blinking:: How Emacs shows the matching open parenthesis. |
| 33 | * Usual Display:: The usual conventions for displaying nonprinting chars. | 33 | * Usual Display:: The usual conventions for displaying nonprinting chars. |
| 34 | * Display Tables:: How to specify other conventions. | 34 | * Display Tables:: How to specify other conventions. |
| @@ -62,7 +62,7 @@ you call these functions when input is available, they don't redisplay | |||
| 62 | immediately, but the requested redisplay does happen | 62 | immediately, but the requested redisplay does happen |
| 63 | eventually---after all the input has been processed. | 63 | eventually---after all the input has been processed. |
| 64 | 64 | ||
| 65 | On text-only terminals, suspending and resuming Emacs normally also | 65 | On text terminals, suspending and resuming Emacs normally also |
| 66 | refreshes the screen. Some terminal emulators record separate | 66 | refreshes the screen. Some terminal emulators record separate |
| 67 | contents for display-oriented programs such as Emacs and for ordinary | 67 | contents for display-oriented programs such as Emacs and for ordinary |
| 68 | sequential display. If you are using such a terminal, you might want | 68 | sequential display. If you are using such a terminal, you might want |
| @@ -1809,7 +1809,7 @@ into a Lisp value as described above. However, in this case the | |||
| 1809 | numeric height value specifies the line spacing, rather than the line | 1809 | numeric height value specifies the line spacing, rather than the line |
| 1810 | height. | 1810 | height. |
| 1811 | 1811 | ||
| 1812 | On text-only terminals, the line spacing cannot be altered. | 1812 | On text terminals, the line spacing cannot be altered. |
| 1813 | 1813 | ||
| 1814 | @node Faces | 1814 | @node Faces |
| 1815 | @section Faces | 1815 | @section Faces |
| @@ -2058,7 +2058,7 @@ floating point and function values are not allowed. | |||
| 2058 | Font weight---one of the symbols (from densest to faintest) | 2058 | Font weight---one of the symbols (from densest to faintest) |
| 2059 | @code{ultra-bold}, @code{extra-bold}, @code{bold}, @code{semi-bold}, | 2059 | @code{ultra-bold}, @code{extra-bold}, @code{bold}, @code{semi-bold}, |
| 2060 | @code{normal}, @code{semi-light}, @code{light}, @code{extra-light}, or | 2060 | @code{normal}, @code{semi-light}, @code{light}, @code{extra-light}, or |
| 2061 | @code{ultra-light}. On text-only terminals that support | 2061 | @code{ultra-light}. On text terminals which support |
| 2062 | variable-brightness text, any weight greater than normal is displayed | 2062 | variable-brightness text, any weight greater than normal is displayed |
| 2063 | as extra bright, and any weight less than normal is displayed as | 2063 | as extra bright, and any weight less than normal is displayed as |
| 2064 | half-bright. | 2064 | half-bright. |
| @@ -2066,8 +2066,8 @@ half-bright. | |||
| 2066 | @item :slant | 2066 | @item :slant |
| 2067 | Font slant---one of the symbols @code{italic}, @code{oblique}, | 2067 | Font slant---one of the symbols @code{italic}, @code{oblique}, |
| 2068 | @code{normal}, @code{reverse-italic}, or @code{reverse-oblique}. On | 2068 | @code{normal}, @code{reverse-italic}, or @code{reverse-oblique}. On |
| 2069 | text-only terminals that support variable-brightness text, slanted | 2069 | text terminals that support variable-brightness text, slanted text is |
| 2070 | text is displayed as half-bright. | 2070 | displayed as half-bright. |
| 2071 | 2071 | ||
| 2072 | @item :foreground | 2072 | @item :foreground |
| 2073 | Foreground color, a string. The value can be a system-defined color | 2073 | Foreground color, a string. The value can be a system-defined color |
| @@ -3649,9 +3649,9 @@ this list. | |||
| 3649 | 3649 | ||
| 3650 | Each variable on this list can have properties | 3650 | Each variable on this list can have properties |
| 3651 | @code{overlay-arrow-string} and @code{overlay-arrow-bitmap} that | 3651 | @code{overlay-arrow-string} and @code{overlay-arrow-bitmap} that |
| 3652 | specify an overlay arrow string (for text-only terminals) or fringe | 3652 | specify an overlay arrow string (for text terminals) or fringe bitmap |
| 3653 | bitmap (for graphical terminals) to display at the corresponding | 3653 | (for graphical terminals) to display at the corresponding overlay |
| 3654 | overlay arrow position. If either property is not set, the default | 3654 | arrow position. If either property is not set, the default |
| 3655 | @code{overlay-arrow-string} or @code{overlay-arrow} fringe indicator | 3655 | @code{overlay-arrow-string} or @code{overlay-arrow} fringe indicator |
| 3656 | is used. | 3656 | is used. |
| 3657 | 3657 | ||
| @@ -4941,7 +4941,7 @@ using @code{equal}. If @var{frame} is @code{nil}, it defaults to the | |||
| 4941 | selected frame. If @var{frame} is @code{t}, the image is flushed on | 4941 | selected frame. If @var{frame} is @code{t}, the image is flushed on |
| 4942 | all existing frames. | 4942 | all existing frames. |
| 4943 | 4943 | ||
| 4944 | In Emacs' current implementation, each graphical terminal possesses an | 4944 | In Emacs's current implementation, each graphical terminal possesses an |
| 4945 | image cache, which is shared by all the frames on that terminal | 4945 | image cache, which is shared by all the frames on that terminal |
| 4946 | (@pxref{Multiple Terminals}). Thus, refreshing an image in one frame | 4946 | (@pxref{Multiple Terminals}). Thus, refreshing an image in one frame |
| 4947 | also refreshes it in all other frames on the same terminal. | 4947 | also refreshes it in all other frames on the same terminal. |
| @@ -6043,8 +6043,8 @@ This is a synonym for @code{ding}. | |||
| 6043 | 6043 | ||
| 6044 | @defopt visible-bell | 6044 | @defopt visible-bell |
| 6045 | This variable determines whether Emacs should flash the screen to | 6045 | This variable determines whether Emacs should flash the screen to |
| 6046 | represent a bell. Non-@code{nil} means yes, @code{nil} means no. This | 6046 | represent a bell. Non-@code{nil} means yes, @code{nil} means no. |
| 6047 | is effective on graphical displays, and on text-only terminals | 6047 | This is effective on graphical displays, and on text terminals |
| 6048 | provided the terminal's Termcap entry defines the visible bell | 6048 | provided the terminal's Termcap entry defines the visible bell |
| 6049 | capability (@samp{vb}). | 6049 | capability (@samp{vb}). |
| 6050 | @end defopt | 6050 | @end defopt |
| @@ -6340,7 +6340,7 @@ such changes affect all of Emacs display. | |||
| 6340 | they appear in a buffer, but in some special way (e.g. as a box | 6340 | they appear in a buffer, but in some special way (e.g. as a box |
| 6341 | containing a hexadecimal code). These include characters that cannot | 6341 | containing a hexadecimal code). These include characters that cannot |
| 6342 | be displayed with any available font (on a graphical display), or that | 6342 | be displayed with any available font (on a graphical display), or that |
| 6343 | cannot be encoded by the terminal's coding system (on a text-only | 6343 | cannot be encoded by the terminal's coding system (on a text |
| 6344 | terminal). Specific characters can also be defined to be glyphless. | 6344 | terminal). Specific characters can also be defined to be glyphless. |
| 6345 | 6345 | ||
| 6346 | @defvar glyphless-char-display | 6346 | @defvar glyphless-char-display |
| @@ -6355,7 +6355,7 @@ Don't display the character. | |||
| 6355 | 6355 | ||
| 6356 | @item @code{thin-space} | 6356 | @item @code{thin-space} |
| 6357 | Display a thin space, 1-pixel wide on graphical displays, or | 6357 | Display a thin space, 1-pixel wide on graphical displays, or |
| 6358 | 1-character wide on text-only terminals. | 6358 | 1-character wide on text terminals. |
| 6359 | 6359 | ||
| 6360 | @item @code{empty-box} | 6360 | @item @code{empty-box} |
| 6361 | Display an empty box. | 6361 | Display an empty box. |
| @@ -6374,7 +6374,7 @@ Except for @code{zero-width}, these methods display using the | |||
| 6374 | 6374 | ||
| 6375 | An entry can also be a cons cell @code{(@var{graphical} | 6375 | An entry can also be a cons cell @code{(@var{graphical} |
| 6376 | . @var{text})}, where @var{graphical} and @var{text} are the display | 6376 | . @var{text})}, where @var{graphical} and @var{text} are the display |
| 6377 | methods on graphical displays and text-only terminals respectively. | 6377 | methods on graphical displays and text terminals respectively. |
| 6378 | 6378 | ||
| 6379 | The char-table has one extra slot, which determines how to display any | 6379 | The char-table has one extra slot, which determines how to display any |
| 6380 | character that cannot be displayed with any available font, or cannot | 6380 | character that cannot be displayed with any available font, or cannot |
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 05245331af2..7a444ee4039 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi | |||
| @@ -44,8 +44,7 @@ | |||
| 44 | This is edition @value{VERSION} of the GNU Emacs Lisp Reference Manual,@* | 44 | This is edition @value{VERSION} of the GNU Emacs Lisp Reference Manual,@* |
| 45 | corresponding to Emacs version @value{EMACSVER}. | 45 | corresponding to Emacs version @value{EMACSVER}. |
| 46 | 46 | ||
| 47 | Copyright @copyright{} 1990-1996, 1998-2012 Free Software | 47 | Copyright @copyright{} 1990-1996, 1998-2012 Free Software Foundation, Inc. |
| 48 | Foundation, Inc. | ||
| 49 | 48 | ||
| 50 | @quotation | 49 | @quotation |
| 51 | Permission is granted to copy, distribute and/or modify this document | 50 | Permission is granted to copy, distribute and/or modify this document |
| @@ -170,11 +169,9 @@ Appendices | |||
| 170 | * Tips:: Advice and coding conventions for Emacs Lisp. | 169 | * Tips:: Advice and coding conventions for Emacs Lisp. |
| 171 | * GNU Emacs Internals:: Building and dumping Emacs; | 170 | * GNU Emacs Internals:: Building and dumping Emacs; |
| 172 | internal data structures. | 171 | internal data structures. |
| 173 | * Standard Errors:: List of all error symbols. | 172 | * Standard Errors:: List of some standard error symbols. |
| 174 | * Standard Buffer-Local Variables:: | 173 | * Standard Keymaps:: List of some standard keymaps. |
| 175 | List of variables buffer-local in all buffers. | 174 | * Standard Hooks:: List of some standard hook variables. |
| 176 | * Standard Keymaps:: List of standard keymaps. | ||
| 177 | * Standard Hooks:: List of standard hook variables. | ||
| 178 | 175 | ||
| 179 | * Index:: Index including concepts, functions, variables, | 176 | * Index:: Index including concepts, functions, variables, |
| 180 | and other terms. | 177 | and other terms. |
| @@ -908,7 +905,7 @@ Buffers | |||
| 908 | is visited. | 905 | is visited. |
| 909 | * Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved. | 906 | * Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved. |
| 910 | * Modification Time:: Determining whether the visited file was changed | 907 | * Modification Time:: Determining whether the visited file was changed |
| 911 | ``behind Emacs's back''. | 908 | "behind Emacs's back". |
| 912 | * Read Only Buffers:: Modifying text is not allowed in a | 909 | * Read Only Buffers:: Modifying text is not allowed in a |
| 913 | read-only buffer. | 910 | read-only buffer. |
| 914 | * The Buffer List:: How to look at all the existing buffers. | 911 | * The Buffer List:: How to look at all the existing buffers. |
| @@ -975,7 +972,7 @@ Frames | |||
| 975 | * Window System Selections::Transferring text to and from other X clients. | 972 | * Window System Selections::Transferring text to and from other X clients. |
| 976 | * Drag and Drop:: Internals of Drag-and-Drop implementation. | 973 | * Drag and Drop:: Internals of Drag-and-Drop implementation. |
| 977 | * Color Names:: Getting the definitions of color names. | 974 | * Color Names:: Getting the definitions of color names. |
| 978 | * Text Terminal Colors:: Defining colors for text-only terminals. | 975 | * Text Terminal Colors:: Defining colors for text terminals. |
| 979 | * Resources:: Getting resource values from the server. | 976 | * Resources:: Getting resource values from the server. |
| 980 | * Display Feature Testing:: Determining the features of a terminal. | 977 | * Display Feature Testing:: Determining the features of a terminal. |
| 981 | 978 | ||
| @@ -1189,7 +1186,6 @@ Parsing Expressions | |||
| 1189 | 1186 | ||
| 1190 | Abbrevs and Abbrev Expansion | 1187 | Abbrevs and Abbrev Expansion |
| 1191 | 1188 | ||
| 1192 | * Abbrev Mode:: Setting up Emacs for abbreviation. | ||
| 1193 | * Abbrev Tables:: Creating and working with abbrev tables. | 1189 | * Abbrev Tables:: Creating and working with abbrev tables. |
| 1194 | * Defining Abbrevs:: Specifying abbreviations and their expansions. | 1190 | * Defining Abbrevs:: Specifying abbreviations and their expansions. |
| 1195 | * Abbrev Files:: Saving abbrevs in files. | 1191 | * Abbrev Files:: Saving abbrevs in files. |
| @@ -1266,7 +1262,7 @@ Emacs Display | |||
| 1266 | * Display Property:: Enabling special display features. | 1262 | * Display Property:: Enabling special display features. |
| 1267 | * Images:: Displaying images in Emacs buffers. | 1263 | * Images:: Displaying images in Emacs buffers. |
| 1268 | * Buttons:: Adding clickable buttons to Emacs buffers. | 1264 | * Buttons:: Adding clickable buttons to Emacs buffers. |
| 1269 | * Abstract Display:: Emacs' Widget for Object Collections. | 1265 | * Abstract Display:: Emacs's Widget for Object Collections. |
| 1270 | * Blinking:: How Emacs shows the matching open parenthesis. | 1266 | * Blinking:: How Emacs shows the matching open parenthesis. |
| 1271 | * Usual Display:: The usual conventions for displaying | 1267 | * Usual Display:: The usual conventions for displaying |
| 1272 | nonprinting chars. | 1268 | nonprinting chars. |
| @@ -1512,7 +1508,6 @@ Object Internals | |||
| 1512 | @include tips.texi | 1508 | @include tips.texi |
| 1513 | @include internals.texi | 1509 | @include internals.texi |
| 1514 | @include errors.texi | 1510 | @include errors.texi |
| 1515 | @include locals.texi | ||
| 1516 | @include maps.texi | 1511 | @include maps.texi |
| 1517 | @include hooks.texi | 1512 | @include hooks.texi |
| 1518 | 1513 | ||
diff --git a/doc/lispref/errors.texi b/doc/lispref/errors.texi index fcf4ec24af7..76ab8b235f5 100644 --- a/doc/lispref/errors.texi +++ b/doc/lispref/errors.texi | |||
| @@ -3,11 +3,11 @@ | |||
| 3 | @c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc. | 3 | @c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc. |
| 4 | @c See the file elisp.texi for copying conditions. | 4 | @c See the file elisp.texi for copying conditions. |
| 5 | @setfilename ../../info/errors | 5 | @setfilename ../../info/errors |
| 6 | @node Standard Errors, Standard Buffer-Local Variables, GNU Emacs Internals, Top | 6 | @node Standard Errors, Standard Keymaps, GNU Emacs Internals, Top |
| 7 | @appendix Standard Errors | 7 | @appendix Standard Errors |
| 8 | @cindex standard errors | 8 | @cindex standard errors |
| 9 | 9 | ||
| 10 | Here is the complete list of the error symbols in standard Emacs, | 10 | Here is a list of the more important error symbols in standard Emacs, |
| 11 | grouped by concept. The list includes each symbol's message (on the | 11 | grouped by concept. The list includes each symbol's message (on the |
| 12 | @code{error-message} property of the symbol) and a cross reference to a | 12 | @code{error-message} property of the symbol) and a cross reference to a |
| 13 | description of how the error can occur. | 13 | description of how the error can occur. |
| @@ -24,6 +24,15 @@ conditions, that means it has none. | |||
| 24 | As a special exception, the error symbol @code{quit} does not have the | 24 | As a special exception, the error symbol @code{quit} does not have the |
| 25 | condition @code{error}, because quitting is not considered an error. | 25 | condition @code{error}, because quitting is not considered an error. |
| 26 | 26 | ||
| 27 | @c You can grep for "(put 'foo 'error-conditions ...) to find | ||
| 28 | @c examples defined in Lisp. Eg soap-client.el, sasl.el. | ||
| 29 | Most of these error symbols are defined in C (mainly @file{data.c}), | ||
| 30 | but some are defined in Lisp. For example, the file @file{userlock.el} | ||
| 31 | defines the @code{file-locked} and @code{file-supersession} errors. | ||
| 32 | Several of the specialized Lisp libraries distributed with Emacs | ||
| 33 | define their own error symbols. We do not attempt to list of all | ||
| 34 | those here. | ||
| 35 | |||
| 27 | @xref{Errors}, for an explanation of how errors are generated and | 36 | @xref{Errors}, for an explanation of how errors are generated and |
| 28 | handled. | 37 | handled. |
| 29 | 38 | ||
| @@ -54,10 +63,16 @@ sequence or buffer.@* | |||
| 54 | @code{"Buffer is read-only"}@* | 63 | @code{"Buffer is read-only"}@* |
| 55 | @xref{Read Only Buffers}. | 64 | @xref{Read Only Buffers}. |
| 56 | 65 | ||
| 57 | @ignore | ||
| 58 | @item circular-list | 66 | @item circular-list |
| 59 | @code{"List contains a loop"}@* | 67 | @code{"List contains a loop"}@* |
| 60 | @end ignore | 68 | This happens when some operations (e.g. resolving face names) |
| 69 | encounter circular structures.@* | ||
| 70 | @xref{Circular Objects}. | ||
| 71 | |||
| 72 | @item cl-assertion-failed | ||
| 73 | @code{"Assertion failed"}@* | ||
| 74 | This happens when the @code{assert} macro fails a test.@* | ||
| 75 | @xref{Assertions,,, cl, Common Lisp Extensions}. | ||
| 61 | 76 | ||
| 62 | @item coding-system-error | 77 | @item coding-system-error |
| 63 | @code{"Invalid coding system"}@* | 78 | @code{"Invalid coding system"}@* |
| @@ -105,14 +120,23 @@ do have @code{error-message} properties, and if no data is provided, | |||
| 105 | the @code{error-message} property @emph{is} used.@* | 120 | the @code{error-message} property @emph{is} used.@* |
| 106 | @xref{Files}. | 121 | @xref{Files}. |
| 107 | 122 | ||
| 123 | @c jka-compr.el | ||
| 124 | @item compression-error | ||
| 125 | This is a subcategory of @code{file-error}, which results from | ||
| 126 | problems handling a compressed file.@* | ||
| 127 | @xref{How Programs Do Loading}. | ||
| 128 | |||
| 129 | @c userlock.el | ||
| 108 | @item file-locked | 130 | @item file-locked |
| 109 | This is a subcategory of @code{file-error}.@* | 131 | This is a subcategory of @code{file-error}.@* |
| 110 | @xref{File Locks}. | 132 | @xref{File Locks}. |
| 111 | 133 | ||
| 134 | @c userlock.el | ||
| 112 | @item file-supersession | 135 | @item file-supersession |
| 113 | This is a subcategory of @code{file-error}.@* | 136 | This is a subcategory of @code{file-error}.@* |
| 114 | @xref{Modification Time}. | 137 | @xref{Modification Time}. |
| 115 | 138 | ||
| 139 | @c net/ange-ftp.el | ||
| 116 | @item ftp-error | 140 | @item ftp-error |
| 117 | This is a subcategory of @code{file-error}, which results from problems | 141 | This is a subcategory of @code{file-error}, which results from problems |
| 118 | in accessing a remote file using ftp.@* | 142 | in accessing a remote file using ftp.@* |
| @@ -130,6 +154,7 @@ in accessing a remote file using ftp.@* | |||
| 130 | @code{"Invalid regexp"}@* | 154 | @code{"Invalid regexp"}@* |
| 131 | @xref{Regular Expressions}. | 155 | @xref{Regular Expressions}. |
| 132 | 156 | ||
| 157 | @c simple.el | ||
| 133 | @item mark-inactive | 158 | @item mark-inactive |
| 134 | @code{"The mark is not active now"}@* | 159 | @code{"The mark is not active now"}@* |
| 135 | @xref{The Mark}. | 160 | @xref{The Mark}. |
| @@ -139,6 +164,7 @@ in accessing a remote file using ftp.@* | |||
| 139 | @xref{Catch and Throw}. | 164 | @xref{Catch and Throw}. |
| 140 | 165 | ||
| 141 | @ignore | 166 | @ignore |
| 167 | @c Not actually used for anything? Probably definition should be removed. | ||
| 142 | @item protected-field | 168 | @item protected-field |
| 143 | @code{"Attempt to modify a protected field"} | 169 | @code{"Attempt to modify a protected field"} |
| 144 | @end ignore | 170 | @end ignore |
| @@ -160,6 +186,7 @@ and any symbols that start with @samp{:}, | |||
| 160 | may not be changed.@* | 186 | may not be changed.@* |
| 161 | @xref{Constant Variables, , Variables that Never Change}. | 187 | @xref{Constant Variables, , Variables that Never Change}. |
| 162 | 188 | ||
| 189 | @c simple.el | ||
| 163 | @item text-read-only | 190 | @item text-read-only |
| 164 | @code{"Text is read-only"}@* | 191 | @code{"Text is read-only"}@* |
| 165 | This is a subcategory of @code{buffer-read-only}.@* | 192 | This is a subcategory of @code{buffer-read-only}.@* |
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 69e0003a46b..77c6766dc5d 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi | |||
| @@ -1018,6 +1018,20 @@ a regular file (not a directory, named pipe, terminal, or | |||
| 1018 | other I/O device). | 1018 | other I/O device). |
| 1019 | @end defun | 1019 | @end defun |
| 1020 | 1020 | ||
| 1021 | @defun file-equal-p file1 file2 | ||
| 1022 | This function returns @code{t} if the files @var{file1} and | ||
| 1023 | @var{file2} name the same file. If @var{file1} or @var{file2} does | ||
| 1024 | not exist, the return value is unspecified. | ||
| 1025 | @end defun | ||
| 1026 | |||
| 1027 | @defun file-subdir-of-p dir1 dir2 | ||
| 1028 | This function returns @code{t} if directory @var{dir1} is a | ||
| 1029 | subdirectory of @var{dir2}, or if @var{dir1} and @var{dir2} are the | ||
| 1030 | same directory. It compares the @code{file-truename} values of the | ||
| 1031 | two directories (@pxref{Truenames}). If @var{dir2} | ||
| 1032 | do not name an existing directory, the return value is @code{nil}. | ||
| 1033 | @end defun | ||
| 1034 | |||
| 1021 | @node Truenames | 1035 | @node Truenames |
| 1022 | @subsection Truenames | 1036 | @subsection Truenames |
| 1023 | @cindex truename (of file) | 1037 | @cindex truename (of file) |
| @@ -1129,6 +1143,18 @@ both others and group, and that the sticky bit is set. | |||
| 1129 | 1143 | ||
| 1130 | @xref{Changing Files}, for functions that change file permissions, | 1144 | @xref{Changing Files}, for functions that change file permissions, |
| 1131 | such as @code{set-file-modes}. | 1145 | such as @code{set-file-modes}. |
| 1146 | |||
| 1147 | @cindex MS-DOS and file modes | ||
| 1148 | @cindex file modes and MS-DOS | ||
| 1149 | @strong{MS-DOS note:} On MS-DOS, there is no such thing as an | ||
| 1150 | ``executable'' file mode bit. So @code{file-modes} considers a file | ||
| 1151 | executable if its name ends in one of the standard executable | ||
| 1152 | extensions, such as @file{.com}, @file{.bat}, @file{.exe}, and some | ||
| 1153 | others. Files that begin with the Unix-standard @samp{#!} signature, | ||
| 1154 | such as shell and Perl scripts, are also considered executable. | ||
| 1155 | Directories are also reported as executable, for compatibility with | ||
| 1156 | Unix. These conventions are also followed by @code{file-attributes}, | ||
| 1157 | below. | ||
| 1132 | @end defun | 1158 | @end defun |
| 1133 | 1159 | ||
| 1134 | If the @var{filename} argument to the next two functions is a | 1160 | If the @var{filename} argument to the next two functions is a |
| @@ -1304,16 +1330,26 @@ is on the file-system device whose number is 1014478468. | |||
| 1304 | @end table | 1330 | @end table |
| 1305 | @end defun | 1331 | @end defun |
| 1306 | 1332 | ||
| 1307 | @cindex MS-DOS and file modes | 1333 | @cindex SELinux context |
| 1308 | @cindex file modes and MS-DOS | 1334 | SELinux is a Linux kernel feature which provides more sophisticated |
| 1309 | On MS-DOS, there is no such thing as an ``executable'' file mode bit. | 1335 | file access controls than ordinary ``Unix-style'' file permissions. |
| 1310 | So Emacs considers a file executable if its name ends in one of the | 1336 | If Emacs has been compiled with SELinux support on a system with |
| 1311 | standard executable extensions, such as @file{.com}, @file{.bat}, | 1337 | SELinux enabled, you can use the function @code{file-selinux-context} |
| 1312 | @file{.exe}, and some others. Files that begin with the Unix-standard | 1338 | to retrieve a file's SELinux security context. For the function |
| 1313 | @samp{#!} signature, such as shell and Perl scripts, are also considered | 1339 | @code{set-file-selinux-context}, see @ref{Changing Files}. |
| 1314 | as executable files. This is reflected in the values returned by | 1340 | |
| 1315 | @code{file-modes} and @code{file-attributes}. Directories are also | 1341 | @defun file-selinux-context filename |
| 1316 | reported with executable bit set, for compatibility with Unix. | 1342 | This function returns the SELinux security context of the file |
| 1343 | @var{filename}. This return value is a list of the form | ||
| 1344 | @code{(@var{user} @var{role} @var{type} @var{range})}, whose elements | ||
| 1345 | are the context's user, role, type, and range respectively, as Lisp | ||
| 1346 | strings. See the SELinux documentation for details about what these | ||
| 1347 | actually mean. | ||
| 1348 | |||
| 1349 | If the file does not exist or is inaccessible, or if the system does | ||
| 1350 | not support SELinux, or if Emacs was not compiled with SELinux | ||
| 1351 | support, then the return value is @code{(nil nil nil nil)}. | ||
| 1352 | @end defun | ||
| 1317 | 1353 | ||
| 1318 | @node Locating Files | 1354 | @node Locating Files |
| 1319 | @subsection How to Locate Files in Standard Places | 1355 | @subsection How to Locate Files in Standard Places |
| @@ -1322,8 +1358,10 @@ reported with executable bit set, for compatibility with Unix. | |||
| 1322 | 1358 | ||
| 1323 | This section explains how to search for a file in a list of | 1359 | This section explains how to search for a file in a list of |
| 1324 | directories (a @dfn{path}), or for an executable file in the standard | 1360 | directories (a @dfn{path}), or for an executable file in the standard |
| 1325 | list of executable file directories, or for an Emacs-specific user | 1361 | list of executable file directories. |
| 1326 | configuration file. | 1362 | |
| 1363 | To search for a user-specific configuration file, @xref{Standard | ||
| 1364 | File Names}, for the @code{locate-user-emacs-file} function. | ||
| 1327 | 1365 | ||
| 1328 | @defun locate-file filename path &optional suffixes predicate | 1366 | @defun locate-file filename path &optional suffixes predicate |
| 1329 | This function searches for a file whose name is @var{filename} in a | 1367 | This function searches for a file whose name is @var{filename} in a |
| @@ -1370,32 +1408,6 @@ in @code{exec-path}, and tries all the file-name extensions in | |||
| 1370 | @code{exec-suffixes} (@pxref{Subprocess Creation}). | 1408 | @code{exec-suffixes} (@pxref{Subprocess Creation}). |
| 1371 | @end defun | 1409 | @end defun |
| 1372 | 1410 | ||
| 1373 | @defun locate-user-emacs-file base-name &optional old-name | ||
| 1374 | This function returns an absolute file name for an Emacs-specific | ||
| 1375 | configuration or data file. The argument @file{base-name} should be a | ||
| 1376 | relative file name. The return value is the absolute name of a file | ||
| 1377 | in the directory specified by @code{user-emacs-directory}; if that | ||
| 1378 | directory does not exist, this function creates it. | ||
| 1379 | |||
| 1380 | If the optional argument @var{old-name} is non-@code{nil}, it | ||
| 1381 | specifies a file in the user's home directory, | ||
| 1382 | @file{~/@var{old-name}}. If such a file exists, the return value is | ||
| 1383 | the absolute name of that file, instead of the file specified by | ||
| 1384 | @var{base-name}. This argument is intended to be used by Emacs | ||
| 1385 | packages to provide backward compatibility. For instance, prior to | ||
| 1386 | the introduction of @code{user-emacs-directory}, the abbrev file was | ||
| 1387 | located in @file{~/.abbrev_defs}, so the definition of | ||
| 1388 | @code{abbrev-file-name} is | ||
| 1389 | |||
| 1390 | @example | ||
| 1391 | (defcustom abbrev-file-name | ||
| 1392 | (locate-user-emacs-file "abbrev_defs" ".abbrev_defs") | ||
| 1393 | "Default name of file from which to read abbrevs." | ||
| 1394 | @dots{} | ||
| 1395 | :type 'file) | ||
| 1396 | @end example | ||
| 1397 | @end defun | ||
| 1398 | |||
| 1399 | @node Changing Files | 1411 | @node Changing Files |
| 1400 | @section Changing File Names and Attributes | 1412 | @section Changing File Names and Attributes |
| 1401 | @c @cindex renaming files Duplicates rename-file | 1413 | @c @cindex renaming files Duplicates rename-file |
| @@ -1528,15 +1540,9 @@ non-@code{nil}, we attempt to copy the user and group ownership of the | |||
| 1528 | file. This works only on some operating systems, and only if you have | 1540 | file. This works only on some operating systems, and only if you have |
| 1529 | the correct permissions to do so. | 1541 | the correct permissions to do so. |
| 1530 | 1542 | ||
| 1531 | @cindex SELinux | 1543 | If the optional argument @var{preserve-selinux} is non-@code{nil}, and |
| 1532 | If the optional argument @var{preserve-selinux} is non-@code{nil}, we | 1544 | Emacs has been compiled with SELinux support, this function attempts |
| 1533 | attempt to copy the SELinux@footnote{@samp{Security-Enhanced Linux} | 1545 | to copy the file's SELinux context (@pxref{File Attributes}). |
| 1534 | is a kernel feature that allows for finer access controls to be set on | ||
| 1535 | files, and a system security policy to define who can access what. | ||
| 1536 | The functions @code{file-selinux-context} and @code{set-file-selinux-context} | ||
| 1537 | get and set, respectively, the SELinux properties of a file.} | ||
| 1538 | context of the file. For this to work, Emacs must have been built | ||
| 1539 | with libselinux support. | ||
| 1540 | @end deffn | 1546 | @end deffn |
| 1541 | 1547 | ||
| 1542 | @deffn Command make-symbolic-link filename newname &optional ok-if-exists | 1548 | @deffn Command make-symbolic-link filename newname &optional ok-if-exists |
| @@ -1667,6 +1673,16 @@ time and must be in the format returned by @code{current-time} | |||
| 1667 | (@pxref{Time of Day}). | 1673 | (@pxref{Time of Day}). |
| 1668 | @end defun | 1674 | @end defun |
| 1669 | 1675 | ||
| 1676 | @defun set-file-selinux-context filename context | ||
| 1677 | This function sets the SELinux security context of the file | ||
| 1678 | @var{filename} to @var{context}. @xref{File Attributes}, for a brief | ||
| 1679 | description of SELinux contexts. The @var{context} argument should be | ||
| 1680 | a list @code{(@var{user} @var{role} @var{type} @var{range})}, like the | ||
| 1681 | return value of @code{file-selinux-context}. The function does | ||
| 1682 | nothing if SELinux is disabled, or if Emacs was compiled without | ||
| 1683 | SELinux support. | ||
| 1684 | @end defun | ||
| 1685 | |||
| 1670 | @node File Names | 1686 | @node File Names |
| 1671 | @section File Names | 1687 | @section File Names |
| 1672 | @cindex file names | 1688 | @cindex file names |
| @@ -1838,14 +1854,15 @@ not an extension. | |||
| 1838 | 1854 | ||
| 1839 | All the directories in the file system form a tree starting at the | 1855 | All the directories in the file system form a tree starting at the |
| 1840 | root directory. A file name can specify all the directory names | 1856 | root directory. A file name can specify all the directory names |
| 1841 | starting from the root of the tree; then it is called an @dfn{absolute} | 1857 | starting from the root of the tree; then it is called an |
| 1842 | file name. Or it can specify the position of the file in the tree | 1858 | @dfn{absolute} file name. Or it can specify the position of the file |
| 1843 | relative to a default directory; then it is called a @dfn{relative} file | 1859 | in the tree relative to a default directory; then it is called a |
| 1844 | name. On Unix and GNU/Linux, an absolute file name starts with a slash | 1860 | @dfn{relative} file name. On Unix and GNU/Linux, an absolute file |
| 1845 | or a tilde (@samp{~}), and a relative one does not. On MS-DOS and | 1861 | name starts with a @samp{/} or a @samp{~} |
| 1846 | MS-Windows, an absolute file name starts with a slash or a backslash, or | 1862 | (@pxref{abbreviate-file-name}), and a relative one does not. On |
| 1847 | with a drive specification @samp{@var{x}:/}, where @var{x} is the | 1863 | MS-DOS and MS-Windows, an absolute file name starts with a slash or a |
| 1848 | @dfn{drive letter}. | 1864 | backslash, or with a drive specification @samp{@var{x}:/}, where |
| 1865 | @var{x} is the @dfn{drive letter}. | ||
| 1849 | 1866 | ||
| 1850 | @defun file-name-absolute-p filename | 1867 | @defun file-name-absolute-p filename |
| 1851 | This function returns @code{t} if file @var{filename} is an absolute | 1868 | This function returns @code{t} if file @var{filename} is an absolute |
| @@ -1981,8 +1998,10 @@ because this is not portable. Always use | |||
| 1981 | To convert a directory name to its abbreviation, use this | 1998 | To convert a directory name to its abbreviation, use this |
| 1982 | function: | 1999 | function: |
| 1983 | 2000 | ||
| 2001 | @cindex file name abbreviations | ||
| 2002 | @cindex abbreviated file names | ||
| 1984 | @defun abbreviate-file-name filename | 2003 | @defun abbreviate-file-name filename |
| 1985 | @anchor{Definition of abbreviate-file-name} | 2004 | @anchor{abbreviate-file-name} |
| 1986 | This function returns an abbreviated form of @var{filename}. It | 2005 | This function returns an abbreviated form of @var{filename}. It |
| 1987 | applies the abbreviations specified in @code{directory-abbrev-alist} | 2006 | applies the abbreviations specified in @code{directory-abbrev-alist} |
| 1988 | (@pxref{File Aliases,,File Aliases, emacs, The GNU Emacs Manual}), | 2007 | (@pxref{File Aliases,,File Aliases, emacs, The GNU Emacs Manual}), |
| @@ -2000,11 +2019,15 @@ because it recognizes abbreviations even as part of the name. | |||
| 2000 | @subsection Functions that Expand Filenames | 2019 | @subsection Functions that Expand Filenames |
| 2001 | @cindex expansion of file names | 2020 | @cindex expansion of file names |
| 2002 | 2021 | ||
| 2003 | @dfn{Expansion} of a file name means converting a relative file name | 2022 | @dfn{Expanding} a file name means converting a relative file name to |
| 2004 | to an absolute one. Since this is done relative to a default directory, | 2023 | an absolute one. Since this is done relative to a default directory, |
| 2005 | you must specify the default directory name as well as the file name to | 2024 | you must specify the default directory name as well as the file name |
| 2006 | be expanded. Expansion also simplifies file names by eliminating | 2025 | to be expanded. It also involves expanding abbreviations like |
| 2007 | redundancies such as @file{./} and @file{@var{name}/../}. | 2026 | @file{~/} |
| 2027 | @ifnottex | ||
| 2028 | (@pxref{abbreviate-file-name}), | ||
| 2029 | @end ifnottex | ||
| 2030 | and eliminating redundancies like @file{./} and @file{@var{name}/../}. | ||
| 2008 | 2031 | ||
| 2009 | @defun expand-file-name filename &optional directory | 2032 | @defun expand-file-name filename &optional directory |
| 2010 | This function converts @var{filename} to an absolute file name. If | 2033 | This function converts @var{filename} to an absolute file name. If |
| @@ -2369,49 +2392,60 @@ filter out a directory named @file{foo.elc}. | |||
| 2369 | @node Standard File Names | 2392 | @node Standard File Names |
| 2370 | @subsection Standard File Names | 2393 | @subsection Standard File Names |
| 2371 | 2394 | ||
| 2372 | Most of the file names used in Lisp programs are entered by the user. | 2395 | Sometimes, an Emacs Lisp program needs to specify a standard file |
| 2373 | But occasionally a Lisp program needs to specify a standard file name | 2396 | name for a particular use---typically, to hold configuration data |
| 2374 | for a particular use---typically, to hold customization information | 2397 | specified by the current user. Usually, such files should be located |
| 2375 | about each user. For example, abbrev definitions are stored (by | 2398 | in the directory specified by @code{user-emacs-directory}, which is |
| 2376 | default) in the file @file{~/.abbrev_defs}; the @code{completion} | 2399 | @file{~/.emacs.d} by default (@pxref{Init File}). For example, abbrev |
| 2377 | package stores completions in the file @file{~/.completions}. These are | 2400 | definitions are stored by default in @file{~/.emacs.d/abbrev_defs}. |
| 2378 | two of the many standard file names used by parts of Emacs for certain | 2401 | The easiest way to specify such a file name is to use the function |
| 2379 | purposes. | 2402 | @code{locate-user-emacs-file}. |
| 2380 | |||
| 2381 | Various operating systems have their own conventions for valid file | ||
| 2382 | names and for which file names to use for user profile data. A Lisp | ||
| 2383 | program which reads a file using a standard file name ought to use, on | ||
| 2384 | each type of system, a file name suitable for that system. The function | ||
| 2385 | @code{convert-standard-filename} makes this easy to do. | ||
| 2386 | 2403 | ||
| 2387 | @defun convert-standard-filename filename | 2404 | @defun locate-user-emacs-file base-name &optional old-name |
| 2388 | This function alters the file name @var{filename} to fit the conventions | 2405 | This function returns an absolute file name for an Emacs-specific |
| 2389 | of the operating system in use, and returns the result as a new string. | 2406 | configuration or data file. The argument @file{base-name} should be a |
| 2390 | @end defun | 2407 | relative file name. The return value is the absolute name of a file |
| 2408 | in the directory specified by @code{user-emacs-directory}; if that | ||
| 2409 | directory does not exist, this function creates it. | ||
| 2391 | 2410 | ||
| 2392 | The recommended way to specify a standard file name in a Lisp program | 2411 | If the optional argument @var{old-name} is non-@code{nil}, it |
| 2393 | is to choose a name which fits the conventions of GNU and Unix systems, | 2412 | specifies a file in the user's home directory, |
| 2394 | usually with a nondirectory part that starts with a period, and pass it | 2413 | @file{~/@var{old-name}}. If such a file exists, the return value is |
| 2395 | to @code{convert-standard-filename} instead of using it directly. Here | 2414 | the absolute name of that file, instead of the file specified by |
| 2396 | is an example from the @code{completion} package: | 2415 | @var{base-name}. This argument is intended to be used by Emacs |
| 2416 | packages to provide backward compatibility. For instance, prior to | ||
| 2417 | the introduction of @code{user-emacs-directory}, the abbrev file was | ||
| 2418 | located in @file{~/.abbrev_defs}. Here is the definition of | ||
| 2419 | @code{abbrev-file-name}: | ||
| 2397 | 2420 | ||
| 2398 | @example | 2421 | @example |
| 2399 | (defvar save-completions-file-name | 2422 | (defcustom abbrev-file-name |
| 2400 | (convert-standard-filename "~/.completions") | 2423 | (locate-user-emacs-file "abbrev_defs" ".abbrev_defs") |
| 2401 | "*The file name to save completions to.") | 2424 | "Default name of file from which to read abbrevs." |
| 2425 | @dots{} | ||
| 2426 | :type 'file) | ||
| 2402 | @end example | 2427 | @end example |
| 2428 | @end defun | ||
| 2403 | 2429 | ||
| 2404 | On GNU and Unix systems, and on some other systems as well, | 2430 | A lower-level function for standardizing file names, which |
| 2405 | @code{convert-standard-filename} returns its argument unchanged. On | 2431 | @code{locate-user-emacs-file} uses as a subroutine, is |
| 2406 | some other systems, it alters the name to fit the system's conventions. | 2432 | @code{convert-standard-filename}. |
| 2407 | 2433 | ||
| 2408 | For example, on MS-DOS the alterations made by this function include | 2434 | @defun convert-standard-filename filename |
| 2409 | converting a leading @samp{.} to @samp{_}, converting a @samp{_} in the | 2435 | This function returns a file name based on @var{filename}, which fits |
| 2410 | middle of the name to @samp{.} if there is no other @samp{.}, inserting | 2436 | the conventions of the current operating system. |
| 2411 | a @samp{.} after eight characters if there is none, and truncating to | 2437 | |
| 2412 | three characters after the @samp{.}. (It makes other changes as well.) | 2438 | On GNU and Unix systems, this simply returns @var{filename}. On other |
| 2413 | Thus, @file{.abbrev_defs} becomes @file{_abbrev.def}, and | 2439 | operating systems, it may enforce system-specific file name |
| 2414 | @file{.completions} becomes @file{_complet.ion}. | 2440 | conventions; for example, on MS-DOS this function performs a variety |
| 2441 | of changes to enforce MS-DOS file name limitations, including | ||
| 2442 | converting any leading @samp{.} to @samp{_} and truncating to three | ||
| 2443 | characters after the @samp{.}. | ||
| 2444 | |||
| 2445 | The recommended way to use this function is to specify a name which | ||
| 2446 | fits the conventions of GNU and Unix systems, and pass it to | ||
| 2447 | @code{convert-standard-filename}. | ||
| 2448 | @end defun | ||
| 2415 | 2449 | ||
| 2416 | @node Contents of Directories | 2450 | @node Contents of Directories |
| 2417 | @section Contents of Directories | 2451 | @section Contents of Directories |
| @@ -2684,9 +2718,9 @@ first, before handlers for jobs such as remote file access. | |||
| 2684 | @code{file-name-nondirectory}, | 2718 | @code{file-name-nondirectory}, |
| 2685 | @code{file-name-sans-versions}, @code{file-newer-than-file-p}, | 2719 | @code{file-name-sans-versions}, @code{file-newer-than-file-p}, |
| 2686 | @code{file-ownership-preserved-p}, | 2720 | @code{file-ownership-preserved-p}, |
| 2687 | @code{file-readable-p}, @code{file-regular-p}, @code{file-symlink-p}, | 2721 | @code{file-readable-p}, @code{file-regular-p}, @code{file-subdir-of-p}, |
| 2688 | @code{file-truename}, @code{file-writable-p}, | 2722 | @code{file-symlink-p}, @code{file-truename}, @code{file-writable-p}, |
| 2689 | @code{find-backup-file-name}, | 2723 | @code{file-equal-p}, @code{find-backup-file-name}, |
| 2690 | @c Not sure why it was here: @code{find-file-noselect},@* | 2724 | @c Not sure why it was here: @code{find-file-noselect},@* |
| 2691 | @code{get-file-buffer}, | 2725 | @code{get-file-buffer}, |
| 2692 | @code{insert-directory}, | 2726 | @code{insert-directory}, |
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 27303637e42..a01ad051489 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | @c -*-texinfo-*- | 1 | @c -*-texinfo-*- |
| 2 | @c This is part of the GNU Emacs Lisp Reference Manual. | 2 | @c This is part of the GNU Emacs Lisp Reference Manual. |
| 3 | @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 | 3 | @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. |
| 4 | @c Free Software Foundation, Inc. | ||
| 5 | @c See the file elisp.texi for copying conditions. | 4 | @c See the file elisp.texi for copying conditions. |
| 6 | @setfilename ../../info/frames | 5 | @setfilename ../../info/frames |
| 7 | @node Frames, Positions, Windows, Top | 6 | @node Frames, Positions, Windows, Top |
| @@ -24,26 +23,25 @@ into smaller windows. @xref{Splitting Windows}. | |||
| 24 | more Emacs frames. In Emacs Lisp, a @dfn{terminal object} is a Lisp | 23 | more Emacs frames. In Emacs Lisp, a @dfn{terminal object} is a Lisp |
| 25 | object that represents a terminal. @xref{Terminal Type}. | 24 | object that represents a terminal. @xref{Terminal Type}. |
| 26 | 25 | ||
| 27 | @cindex terminal frame | 26 | @cindex text terminal |
| 28 | @cindex window frame | 27 | @cindex graphical terminal |
| 29 | There are two classes of terminals: text-only terminals and | 28 | @cindex graphical display |
| 30 | graphical terminals. Text-only terminals are non-graphics-capable | 29 | There are two classes of terminals: @dfn{text terminals} and |
| 31 | display devices, including ``terminal emulators'' such as xterm. On | 30 | @dfn{graphical terminals}. Text terminals are non-graphics-capable |
| 32 | text-only terminals, each frame occupies the entire terminal screen; | 31 | displays, including @command{xterm} and other terminal emulators. On |
| 33 | although you can create additional frames and switch between them, | 32 | a text terminal, each Emacs frame occupies the terminal's entire |
| 34 | only one frame can be shown at any given time. We refer to frames on | 33 | screen; although you can create additional frames and switch between |
| 35 | text-only terminals as @dfn{terminal frames}. Graphical terminals, on | 34 | them, the terminal only shows one frame at a time. Graphical |
| 36 | the other hand, are graphics-capable windowing systems, such as the X | 35 | terminals, on the other hand, are managed by graphical display systems |
| 37 | Window System. On a graphical terminal, Emacs can display multiple | 36 | such as the X Window System, which allow Emacs to show multiple frames |
| 38 | frames simultaneously. We refer to such frames as @dfn{window | 37 | simultaneously on the same display. |
| 39 | frames}. | ||
| 40 | 38 | ||
| 41 | On GNU and Unix systems, you can create additional frames on any | 39 | On GNU and Unix systems, you can create additional frames on any |
| 42 | available terminal, within a single Emacs session, regardless of | 40 | available terminal, within a single Emacs session, regardless of |
| 43 | whether Emacs was started on a text-only or graphical terminal. Emacs | 41 | whether Emacs was started on a text or graphical terminal. Emacs can |
| 44 | can display on both graphical and text-only terminals simultaneously. | 42 | display on both graphical and text terminals simultaneously. This |
| 45 | This comes in handy, for instance, when you connect to the same | 43 | comes in handy, for instance, when you connect to the same session |
| 46 | session from several remote locations. @xref{Multiple Terminals}. | 44 | from several remote locations. @xref{Multiple Terminals}. |
| 47 | 45 | ||
| 48 | @defun framep object | 46 | @defun framep object |
| 49 | This predicate returns a non-@code{nil} value if @var{object} is a | 47 | This predicate returns a non-@code{nil} value if @var{object} is a |
| @@ -51,14 +49,15 @@ frame, and @code{nil} otherwise. For a frame, the value indicates which | |||
| 51 | kind of display the frame uses: | 49 | kind of display the frame uses: |
| 52 | 50 | ||
| 53 | @table @code | 51 | @table @code |
| 54 | @item x | ||
| 55 | The frame is displayed in an X window. | ||
| 56 | @item t | 52 | @item t |
| 57 | A terminal frame on a character display. | 53 | The frame is displayed on a text terminal. |
| 54 | @item x | ||
| 55 | The frame is displayed on an X graphical terminal. | ||
| 58 | @item w32 | 56 | @item w32 |
| 59 | The frame is displayed on MS-Windows 9X/NT. | 57 | The frame is displayed on a MS-Windows graphical terminal. |
| 60 | @item ns | 58 | @item ns |
| 61 | The frame is displayed on a GNUstep or Macintosh Cocoa display. | 59 | The frame is displayed on a GNUstep or Macintosh Cocoa graphical |
| 60 | terminal. | ||
| 62 | @item pc | 61 | @item pc |
| 63 | The frame is displayed on an MS-DOS terminal. | 62 | The frame is displayed on an MS-DOS terminal. |
| 64 | @end table | 63 | @end table |
| @@ -72,10 +71,10 @@ selected frame. | |||
| 72 | 71 | ||
| 73 | @defun terminal-live-p object | 72 | @defun terminal-live-p object |
| 74 | This predicate returns a non-@code{nil} value if @var{object} is a | 73 | This predicate returns a non-@code{nil} value if @var{object} is a |
| 75 | terminal that is alive (i.e.@: was not deleted), and @code{nil} | 74 | terminal that is live (i.e.@: not deleted), and @code{nil} otherwise. |
| 76 | otherwise. For live terminals, the return value indicates what kind | 75 | For live terminals, the return value indicates what kind of frames are |
| 77 | of frames are displayed on that terminal; the list of possible values | 76 | displayed on that terminal; the list of possible values is the same as |
| 78 | is the same as for @code{framep} above. | 77 | for @code{framep} above. |
| 79 | @end defun | 78 | @end defun |
| 80 | 79 | ||
| 81 | @menu | 80 | @menu |
| @@ -100,7 +99,7 @@ is the same as for @code{framep} above. | |||
| 100 | * Window System Selections:: Transferring text to and from other X clients. | 99 | * Window System Selections:: Transferring text to and from other X clients. |
| 101 | * Drag and Drop:: Internals of Drag-and-Drop implementation. | 100 | * Drag and Drop:: Internals of Drag-and-Drop implementation. |
| 102 | * Color Names:: Getting the definitions of color names. | 101 | * Color Names:: Getting the definitions of color names. |
| 103 | * Text Terminal Colors:: Defining colors for text-only terminals. | 102 | * Text Terminal Colors:: Defining colors for text terminals. |
| 104 | * Resources:: Getting resource values from the server. | 103 | * Resources:: Getting resource values from the server. |
| 105 | * Display Feature Testing:: Determining the features of a terminal. | 104 | * Display Feature Testing:: Determining the features of a terminal. |
| 106 | @end menu | 105 | @end menu |
| @@ -119,7 +118,7 @@ for the new frame. @xref{Frame Parameters}. If you specify the | |||
| 119 | @code{terminal} parameter in @var{alist}, the new frame is created on | 118 | @code{terminal} parameter in @var{alist}, the new frame is created on |
| 120 | that terminal. Otherwise, if you specify the @code{window-system} | 119 | that terminal. Otherwise, if you specify the @code{window-system} |
| 121 | frame parameter in @var{alist}, that determines whether the frame | 120 | frame parameter in @var{alist}, that determines whether the frame |
| 122 | should be displayed on a text-only or graphical terminal. | 121 | should be displayed on a text terminal or a graphical terminal. |
| 123 | @xref{Window Systems}. If neither is specified, the new frame is | 122 | @xref{Window Systems}. If neither is specified, the new frame is |
| 124 | created in the same terminal as the selected frame. | 123 | created in the same terminal as the selected frame. |
| 125 | 124 | ||
| @@ -164,15 +163,15 @@ frame. | |||
| 164 | @cindex multiple X displays | 163 | @cindex multiple X displays |
| 165 | @cindex displays, multiple | 164 | @cindex displays, multiple |
| 166 | 165 | ||
| 167 | Emacs represents each terminal, whether graphical or text-only, as a | 166 | Emacs represents each terminal as a @dfn{terminal object} data type |
| 168 | @dfn{terminal object} data type (@pxref{Terminal Type}). On GNU and | 167 | (@pxref{Terminal Type}). On GNU and Unix systems, Emacs can use |
| 169 | Unix systems, Emacs can use multiple terminals simultaneously in each | 168 | multiple terminals simultaneously in each session. On other systems, |
| 170 | session. On other systems, it can only use a single terminal. Each | 169 | it can only use a single terminal. Each terminal object has the |
| 171 | terminal object has the following attributes: | 170 | following attributes: |
| 172 | 171 | ||
| 173 | @itemize @bullet | 172 | @itemize @bullet |
| 174 | @item | 173 | @item |
| 175 | The name of the device used by the terminal (e.g., @samp{:0.0} or | 174 | The name of the device used by the terminal (e.g.@: @samp{:0.0} or |
| 176 | @file{/dev/tty}). | 175 | @file{/dev/tty}). |
| 177 | 176 | ||
| 178 | @item | 177 | @item |
| @@ -181,7 +180,7 @@ The terminal and keyboard coding systems used on the terminal. | |||
| 181 | 180 | ||
| 182 | @item | 181 | @item |
| 183 | The kind of display associated with the terminal. This is the symbol | 182 | The kind of display associated with the terminal. This is the symbol |
| 184 | returned by the function @code{terminal-live-p} (i.e., @code{x}, | 183 | returned by the function @code{terminal-live-p} (i.e.@: @code{x}, |
| 185 | @code{t}, @code{w32}, @code{ns}, or @code{pc}). @xref{Frames}. | 184 | @code{t}, @code{w32}, @code{ns}, or @code{pc}). @xref{Frames}. |
| 186 | 185 | ||
| 187 | @item | 186 | @item |
| @@ -190,7 +189,7 @@ A list of terminal parameters. @xref{Terminal Parameters}. | |||
| 190 | 189 | ||
| 191 | There is no primitive for creating terminal objects. Emacs creates | 190 | There is no primitive for creating terminal objects. Emacs creates |
| 192 | them as needed, such as when you call @code{make-frame-on-display} | 191 | them as needed, such as when you call @code{make-frame-on-display} |
| 193 | (which is described below). | 192 | (described below). |
| 194 | 193 | ||
| 195 | @defun terminal-name &optional terminal | 194 | @defun terminal-name &optional terminal |
| 196 | This function returns the file name of the device used by | 195 | This function returns the file name of the device used by |
| @@ -200,7 +199,7 @@ a frame, meaning that frame's terminal. | |||
| 200 | @end defun | 199 | @end defun |
| 201 | 200 | ||
| 202 | @defun terminal-list | 201 | @defun terminal-list |
| 203 | This function returns a list of all terminal objects currently in use. | 202 | This function returns a list of all live terminal objects. |
| 204 | @end defun | 203 | @end defun |
| 205 | 204 | ||
| 206 | @defun get-device-terminal device | 205 | @defun get-device-terminal device |
| @@ -249,15 +248,15 @@ never be buffer-local (@pxref{Buffer-Local Variables}). | |||
| 249 | 248 | ||
| 250 | On GNU and Unix systems, each X display is a separate graphical | 249 | On GNU and Unix systems, each X display is a separate graphical |
| 251 | terminal. When Emacs is started from within the X window system, it | 250 | terminal. When Emacs is started from within the X window system, it |
| 252 | uses the X display chosen with the @code{DISPLAY} environment | 251 | uses the X display specified by the @env{DISPLAY} environment |
| 253 | variable, or with the @samp{--display} option. @xref{Initial | 252 | variable, or by the @samp{--display} option (@pxref{Initial Options,,, |
| 254 | Options,,, emacs, The GNU Emacs Manual}. Emacs can connect to other X | 253 | emacs, The GNU Emacs Manual}). Emacs can connect to other X displays |
| 255 | displays via the command @code{make-frame-on-display}. Each X display | 254 | via the command @code{make-frame-on-display}. Each X display has its |
| 256 | has its own selected frame and its own minibuffer windows; however, | 255 | own selected frame and its own minibuffer windows; however, only one |
| 257 | only one of those frames is ``@emph{the} selected frame'' at any given | 256 | of those frames is ``@emph{the} selected frame'' at any given moment |
| 258 | moment (@pxref{Input Focus}). Emacs can even connect to other | 257 | (@pxref{Input Focus}). Emacs can even connect to other text |
| 259 | text-only terminals, by interacting with the @command{emacsclient} | 258 | terminals, by interacting with the @command{emacsclient} program. |
| 260 | program. @xref{Emacs Server,,, emacs, The GNU Emacs Manual}. | 259 | @xref{Emacs Server,,, emacs, The GNU Emacs Manual}. |
| 261 | 260 | ||
| 262 | A single X server can handle more than one display. Each X display | 261 | A single X server can handle more than one display. Each X display |
| 263 | has a three-part name, @samp{@var{host}:@var{server}.@var{screen}}. | 262 | has a three-part name, @samp{@var{host}:@var{server}.@var{screen}}. |
| @@ -268,8 +267,8 @@ server, Emacs knows by the similarity in their names that they share a | |||
| 268 | single keyboard. | 267 | single keyboard. |
| 269 | 268 | ||
| 270 | On some ``multi-monitor'' setups, a single X display outputs to more | 269 | On some ``multi-monitor'' setups, a single X display outputs to more |
| 271 | than one monitor. Currently, there is no way for Emacs to distinguish | 270 | than one physical monitor. Currently, there is no way for Emacs to |
| 272 | between the different physical monitors. | 271 | distinguish between the different physical monitors. |
| 273 | 272 | ||
| 274 | @deffn Command make-frame-on-display display &optional parameters | 273 | @deffn Command make-frame-on-display display &optional parameters |
| 275 | This function creates and returns a new frame on @var{display}, taking | 274 | This function creates and returns a new frame on @var{display}, taking |
| @@ -278,8 +277,8 @@ the other frame parameters from the alist @var{parameters}. | |||
| 278 | 277 | ||
| 279 | Before creating the frame, this function ensures that Emacs is ``set | 278 | Before creating the frame, this function ensures that Emacs is ``set |
| 280 | up'' to display graphics. For instance, if Emacs has not processed X | 279 | up'' to display graphics. For instance, if Emacs has not processed X |
| 281 | resources (e.g., if it was started on a text-only terminal), it does | 280 | resources (e.g.@: if it was started on a text terminal), it does so at |
| 282 | so at this time. In all other respects, this function behaves like | 281 | this time. In all other respects, this function behaves like |
| 283 | @code{make-frame} (@pxref{Creating Frames}). | 282 | @code{make-frame} (@pxref{Creating Frames}). |
| 284 | @end deffn | 283 | @end deffn |
| 285 | 284 | ||
| @@ -325,15 +324,15 @@ on that display (@pxref{Deleting Frames}). | |||
| 325 | Just what parameters a frame has depends on what display mechanism it | 324 | Just what parameters a frame has depends on what display mechanism it |
| 326 | uses. | 325 | uses. |
| 327 | 326 | ||
| 328 | Frame parameters exist mostly for the sake of window systems. A | 327 | Frame parameters exist mostly for the sake of graphical displays. |
| 329 | terminal frame has a few parameters, mostly for compatibility's sake; | 328 | Most frame parameters have no effect when applied to a frame on a text |
| 330 | only the @code{height}, @code{width}, @code{name}, @code{title}, | 329 | terminal; only the @code{height}, @code{width}, @code{name}, |
| 331 | @code{menu-bar-lines}, @code{buffer-list} and @code{buffer-predicate} | 330 | @code{title}, @code{menu-bar-lines}, @code{buffer-list} and |
| 332 | parameters do something special. If the terminal supports colors, the | 331 | @code{buffer-predicate} parameters do something special. If the |
| 333 | parameters @code{foreground-color}, @code{background-color}, | 332 | terminal supports colors, the parameters @code{foreground-color}, |
| 334 | @code{background-mode} and @code{display-type} are also meaningful. | 333 | @code{background-color}, @code{background-mode} and |
| 335 | If the terminal supports frame transparency, the parameter | 334 | @code{display-type} are also meaningful. If the terminal supports |
| 336 | @code{alpha} is also meaningful. | 335 | frame transparency, the parameter @code{alpha} is also meaningful. |
| 337 | 336 | ||
| 338 | @menu | 337 | @menu |
| 339 | * Parameter Access:: How to change a frame's parameters. | 338 | * Parameter Access:: How to change a frame's parameters. |
| @@ -387,12 +386,13 @@ parameter values to frames that will be created henceforth. | |||
| 387 | @node Initial Parameters | 386 | @node Initial Parameters |
| 388 | @subsection Initial Frame Parameters | 387 | @subsection Initial Frame Parameters |
| 389 | 388 | ||
| 390 | You can specify the parameters for the initial startup frame | 389 | You can specify the parameters for the initial startup frame by |
| 391 | by setting @code{initial-frame-alist} in your init file (@pxref{Init File}). | 390 | setting @code{initial-frame-alist} in your init file (@pxref{Init |
| 391 | File}). | ||
| 392 | 392 | ||
| 393 | @defopt initial-frame-alist | 393 | @defopt initial-frame-alist |
| 394 | This variable's value is an alist of parameter values used when creating | 394 | This variable's value is an alist of parameter values used when |
| 395 | the initial window frame. You can set this variable to specify the | 395 | creating the initial frame. You can set this variable to specify the |
| 396 | appearance of the initial frame without altering subsequent frames. | 396 | appearance of the initial frame without altering subsequent frames. |
| 397 | Each element has the form: | 397 | Each element has the form: |
| 398 | 398 | ||
| @@ -444,11 +444,13 @@ Functions that display a buffer in a separate frame can override the | |||
| 444 | default parameters by supplying their own parameters. @xref{Definition | 444 | default parameters by supplying their own parameters. @xref{Definition |
| 445 | of special-display-frame-alist}. | 445 | of special-display-frame-alist}. |
| 446 | 446 | ||
| 447 | If you use options that specify window appearance when you invoke Emacs, | 447 | If you invoke Emacs with command-line options that specify frame |
| 448 | they take effect by adding elements to @code{default-frame-alist}. One | 448 | appearance, those options take effect by adding elements to either |
| 449 | exception is @samp{-geometry}, which adds the specified position to | 449 | @code{initial-frame-alist} or @code{default-frame-alist}. Options |
| 450 | @code{initial-frame-alist} instead. @xref{Emacs Invocation,, Command | 450 | which affect just the initial frame, such as @samp{-geometry} and |
| 451 | Line Arguments for Emacs Invocation, emacs, The GNU Emacs Manual}. | 451 | @samp{--maximized}, add to @code{initial-frame-alist}; the others add |
| 452 | to @code{default-frame-alist}. @pxref{Emacs Invocation,, Command Line | ||
| 453 | Arguments for Emacs Invocation, emacs, The GNU Emacs Manual}. | ||
| 452 | 454 | ||
| 453 | @node Window Frame Parameters | 455 | @node Window Frame Parameters |
| 454 | @subsection Window Frame Parameters | 456 | @subsection Window Frame Parameters |
| @@ -459,8 +461,8 @@ it uses. This section describes the parameters that have special | |||
| 459 | meanings on some or all kinds of terminals. Of these, @code{name}, | 461 | meanings on some or all kinds of terminals. Of these, @code{name}, |
| 460 | @code{title}, @code{height}, @code{width}, @code{buffer-list} and | 462 | @code{title}, @code{height}, @code{width}, @code{buffer-list} and |
| 461 | @code{buffer-predicate} provide meaningful information in terminal | 463 | @code{buffer-predicate} provide meaningful information in terminal |
| 462 | frames, and @code{tty-color-mode} is meaningful @emph{only} in | 464 | frames, and @code{tty-color-mode} is meaningful only for frames on |
| 463 | terminal frames. | 465 | text terminals. |
| 464 | 466 | ||
| 465 | @menu | 467 | @menu |
| 466 | * Basic Parameters:: Parameters that are fundamental. | 468 | * Basic Parameters:: Parameters that are fundamental. |
| @@ -524,7 +526,7 @@ named, this parameter will be @code{nil}. | |||
| 524 | @cindex window position on display | 526 | @cindex window position on display |
| 525 | 527 | ||
| 526 | Position parameters' values are normally measured in pixels, but on | 528 | Position parameters' values are normally measured in pixels, but on |
| 527 | text-only terminals they count characters or lines instead. | 529 | text terminals they count characters or lines instead. |
| 528 | 530 | ||
| 529 | @table @code | 531 | @table @code |
| 530 | @vindex left, a frame parameter | 532 | @vindex left, a frame parameter |
| @@ -561,19 +563,17 @@ to the top (or bottom) edge of the screen. It works just like | |||
| 561 | 563 | ||
| 562 | @vindex icon-left, a frame parameter | 564 | @vindex icon-left, a frame parameter |
| 563 | @item icon-left | 565 | @item icon-left |
| 564 | The screen position of the left edge @emph{of the frame's icon}, in | 566 | The screen position of the left edge of the frame's icon, in pixels, |
| 565 | pixels, counting from the left edge of the screen. This takes effect if | 567 | counting from the left edge of the screen. This takes effect when the |
| 566 | and when the frame is iconified. | 568 | frame is iconified, if the window manager supports this feature. If |
| 567 | 569 | you specify a value for this parameter, then you must also specify a | |
| 568 | If you specify a value for this parameter, then you must also specify | 570 | value for @code{icon-top} and vice versa. |
| 569 | a value for @code{icon-top} and vice versa. The window manager may | ||
| 570 | ignore these two parameters. | ||
| 571 | 571 | ||
| 572 | @vindex icon-top, a frame parameter | 572 | @vindex icon-top, a frame parameter |
| 573 | @item icon-top | 573 | @item icon-top |
| 574 | The screen position of the top edge @emph{of the frame's icon}, in | 574 | The screen position of the top edge of the frame's icon, in pixels, |
| 575 | pixels, counting from the top edge of the screen. This takes effect if | 575 | counting from the top edge of the screen. This takes effect when the |
| 576 | and when the frame is iconified. | 576 | frame is iconified, if the window manager supports this feature. |
| 577 | 577 | ||
| 578 | @vindex user-position, a frame parameter | 578 | @vindex user-position, a frame parameter |
| 579 | @item user-position | 579 | @item user-position |
| @@ -601,8 +601,9 @@ parameters represent the user's stated preference; otherwise, use | |||
| 601 | @subsubsection Size Parameters | 601 | @subsubsection Size Parameters |
| 602 | @cindex window size on display | 602 | @cindex window size on display |
| 603 | 603 | ||
| 604 | Size parameters' values are normally measured in pixels, but on | 604 | Frame parameters specify frame sizes in character units. On |
| 605 | text-only terminals they count characters or lines instead. | 605 | graphical displays, the @code{default} face determines the actual |
| 606 | pixel sizes of these character units (@pxref{Face Attributes}). | ||
| 606 | 607 | ||
| 607 | @table @code | 608 | @table @code |
| 608 | @vindex height, a frame parameter | 609 | @vindex height, a frame parameter |
| @@ -757,8 +758,9 @@ If non-@code{nil}, this frame's window is never split automatically. | |||
| 757 | @subsubsection Window Management Parameters | 758 | @subsubsection Window Management Parameters |
| 758 | @cindex window manager interaction, and frame parameters | 759 | @cindex window manager interaction, and frame parameters |
| 759 | 760 | ||
| 760 | These frame parameters, meaningful only on window system displays, | 761 | The following frame parameters control various aspects of the |
| 761 | interact with the window manager. | 762 | frame's interaction with the window manager. They have no effect on |
| 763 | text terminals. | ||
| 762 | 764 | ||
| 763 | @table @code | 765 | @table @code |
| 764 | @vindex visibility, a frame parameter | 766 | @vindex visibility, a frame parameter |
| @@ -769,11 +771,13 @@ iconified. @xref{Visibility of Frames}. | |||
| 769 | 771 | ||
| 770 | @vindex auto-raise, a frame parameter | 772 | @vindex auto-raise, a frame parameter |
| 771 | @item auto-raise | 773 | @item auto-raise |
| 772 | Whether selecting the frame raises it (non-@code{nil} means yes). | 774 | If non-@code{nil}, Emacs automatically raises the frame when it is |
| 775 | selected. Some window managers do not allow this. | ||
| 773 | 776 | ||
| 774 | @vindex auto-lower, a frame parameter | 777 | @vindex auto-lower, a frame parameter |
| 775 | @item auto-lower | 778 | @item auto-lower |
| 776 | Whether deselecting the frame lowers it (non-@code{nil} means yes). | 779 | If non-@code{nil}, Emacs automatically lowers the frame when it is |
| 780 | deselected. Some window managers do not allow this. | ||
| 777 | 781 | ||
| 778 | @vindex icon-type, a frame parameter | 782 | @vindex icon-type, a frame parameter |
| 779 | @item icon-type | 783 | @item icon-type |
| @@ -789,12 +793,15 @@ appears. If this is @code{nil}, the frame's title is used. | |||
| 789 | 793 | ||
| 790 | @vindex window-id, a frame parameter | 794 | @vindex window-id, a frame parameter |
| 791 | @item window-id | 795 | @item window-id |
| 792 | The number of the window-system window used by the frame | 796 | The ID number which the graphical display uses for this frame. Emacs |
| 793 | to contain the actual Emacs windows. | 797 | assigns this parameter when the frame is created; changing the |
| 798 | parameter has no effect on the actual ID number. | ||
| 794 | 799 | ||
| 795 | @vindex outer-window-id, a frame parameter | 800 | @vindex outer-window-id, a frame parameter |
| 796 | @item outer-window-id | 801 | @item outer-window-id |
| 797 | The number of the outermost window-system window used for the whole frame. | 802 | The ID number of the outermost window-system window in which the frame |
| 803 | exists. As with @code{window-id}, changing this parameter has no | ||
| 804 | actual effect. | ||
| 798 | 805 | ||
| 799 | @vindex wait-for-wm, a frame parameter | 806 | @vindex wait-for-wm, a frame parameter |
| 800 | @item wait-for-wm | 807 | @item wait-for-wm |
| @@ -849,9 +856,26 @@ Display a horizontal bar @var{height} pixels high. | |||
| 849 | @end table | 856 | @end table |
| 850 | 857 | ||
| 851 | @vindex cursor-type | 858 | @vindex cursor-type |
| 852 | The buffer-local variable @code{cursor-type} overrides the value of | 859 | The @code{cursor-type} frame parameter may be overridden by the |
| 853 | the @code{cursor-type} frame parameter, but if it is @code{t}, that | 860 | variables @code{cursor-type} and |
| 854 | means to use the cursor specified for the frame. | 861 | @code{cursor-in-non-selected-windows}: |
| 862 | |||
| 863 | @defvar cursor-type | ||
| 864 | This buffer-local variable controls how the cursor looks in a selected | ||
| 865 | window showing the buffer. If its value is @code{t}, that means to | ||
| 866 | use the cursor specified by the @code{cursor-type} frame parameter. | ||
| 867 | Otherwise, the value should be one of the cursor types listed above, | ||
| 868 | and it overrides the @code{cursor-type} frame parameter. | ||
| 869 | @end defvar | ||
| 870 | |||
| 871 | @defopt cursor-in-non-selected-windows | ||
| 872 | This buffer-local variable controls how the cursor looks in a window | ||
| 873 | that is not selected. It supports the same values as the | ||
| 874 | @code{cursor-type} frame parameter; also, @code{nil} means don't | ||
| 875 | display a cursor in nonselected windows, and @code{t} (the default) | ||
| 876 | means use a standard modification of the usual cursor type (solid box | ||
| 877 | becomes hollow box, and bar becomes a narrower bar). | ||
| 878 | @end defopt | ||
| 855 | 879 | ||
| 856 | @defopt blink-cursor-alist | 880 | @defopt blink-cursor-alist |
| 857 | This variable specifies how to blink the cursor. Each element has the | 881 | This variable specifies how to blink the cursor. Each element has the |
| @@ -867,15 +891,6 @@ variable do not take effect immediately, only when you specify the | |||
| 867 | @code{cursor-type} frame parameter. | 891 | @code{cursor-type} frame parameter. |
| 868 | @end defopt | 892 | @end defopt |
| 869 | 893 | ||
| 870 | @defopt cursor-in-non-selected-windows | ||
| 871 | This variable controls how the cursor looks in a window that is not | ||
| 872 | selected. It supports the same values as the @code{cursor-type} frame | ||
| 873 | parameter; also, @code{nil} means don't display a cursor in | ||
| 874 | nonselected windows, and @code{t} (the default) means use a standard | ||
| 875 | modification of the usual cursor type (solid box becomes hollow box, | ||
| 876 | and bar becomes a narrower bar). | ||
| 877 | @end defopt | ||
| 878 | |||
| 879 | @node Font and Color Parameters | 894 | @node Font and Color Parameters |
| 880 | @subsubsection Font and Color Parameters | 895 | @subsubsection Font and Color Parameters |
| 881 | @cindex font and color, frame parameters | 896 | @cindex font and color, frame parameters |
| @@ -904,7 +919,7 @@ to whether the background color is a light one or a dark one. | |||
| 904 | @cindex standard colors for character terminals | 919 | @cindex standard colors for character terminals |
| 905 | This parameter overrides the terminal's color support as given by the | 920 | This parameter overrides the terminal's color support as given by the |
| 906 | system's terminal capabilities database in that this parameter's value | 921 | system's terminal capabilities database in that this parameter's value |
| 907 | specifies the color mode to use in terminal frames. The value can be | 922 | specifies the color mode to use on a text terminal. The value can be |
| 908 | either a symbol or a number. A number specifies the number of colors | 923 | either a symbol or a number. A number specifies the number of colors |
| 909 | to use (and, indirectly, what commands to issue to produce each | 924 | to use (and, indirectly, what commands to issue to produce each |
| 910 | color). For example, @code{(tty-color-mode . 8)} specifies use of the | 925 | color). For example, @code{(tty-color-mode . 8)} specifies use of the |
| @@ -1048,17 +1063,17 @@ selected frame. | |||
| 1048 | @defunx frame-pixel-width &optional frame | 1063 | @defunx frame-pixel-width &optional frame |
| 1049 | These functions return the height and width of the main display area | 1064 | These functions return the height and width of the main display area |
| 1050 | of @var{frame}, measured in pixels. If you don't supply @var{frame}, | 1065 | of @var{frame}, measured in pixels. If you don't supply @var{frame}, |
| 1051 | they use the selected frame. For a text-only terminal, the results are | 1066 | they use the selected frame. For a text terminal, the results are in |
| 1052 | in characters rather than pixels. | 1067 | characters rather than pixels. |
| 1053 | 1068 | ||
| 1054 | These values include the internal borders, and windows' scroll bars and | 1069 | These values include the internal borders, and windows' scroll bars |
| 1055 | fringes (which belong to individual windows, not to the frame itself). | 1070 | and fringes (which belong to individual windows, not to the frame |
| 1056 | The exact value of the heights depends on the window-system and toolkit | 1071 | itself). The exact value of the heights depends on the window-system |
| 1057 | in use. With Gtk+, the height does not include any tool bar or menu | 1072 | and toolkit in use. With Gtk+, the height does not include any tool |
| 1058 | bar. With the Motif or Lucid toolkits, it includes the tool bar but | 1073 | bar or menu bar. With the Motif or Lucid toolkits, it includes the |
| 1059 | not the menu bar. In a graphical version with no toolkit, it includes | 1074 | tool bar but not the menu bar. In a graphical version with no |
| 1060 | both the tool bar and menu bar. For a text-only terminal, the result | 1075 | toolkit, it includes both the tool bar and menu bar. For a text |
| 1061 | includes the menu bar. | 1076 | terminal, the result includes the menu bar. |
| 1062 | @end defun | 1077 | @end defun |
| 1063 | 1078 | ||
| 1064 | @defun frame-char-height &optional frame | 1079 | @defun frame-char-height &optional frame |
| @@ -1085,13 +1100,13 @@ fit. | |||
| 1085 | 1100 | ||
| 1086 | If @var{pretend} is non-@code{nil}, then Emacs displays @var{lines} | 1101 | If @var{pretend} is non-@code{nil}, then Emacs displays @var{lines} |
| 1087 | lines of output in @var{frame}, but does not change its value for the | 1102 | lines of output in @var{frame}, but does not change its value for the |
| 1088 | actual height of the frame. This is only useful for a terminal frame. | 1103 | actual height of the frame. This is only useful on text terminals. |
| 1089 | Using a smaller height than the terminal actually implements may be | 1104 | Using a smaller height than the terminal actually implements may be |
| 1090 | useful to reproduce behavior observed on a smaller screen, or if the | 1105 | useful to reproduce behavior observed on a smaller screen, or if the |
| 1091 | terminal malfunctions when using its whole screen. Setting the frame | 1106 | terminal malfunctions when using its whole screen. Setting the frame |
| 1092 | height ``for real'' does not always work, because knowing the correct | 1107 | height ``for real'' does not always work, because knowing the correct |
| 1093 | actual size may be necessary for correct cursor positioning on a | 1108 | actual size may be necessary for correct cursor positioning on |
| 1094 | terminal frame. | 1109 | text terminals. |
| 1095 | @end defun | 1110 | @end defun |
| 1096 | 1111 | ||
| 1097 | @defun set-frame-width frame width &optional pretend | 1112 | @defun set-frame-width frame width &optional pretend |
| @@ -1100,13 +1115,6 @@ The argument @var{pretend} has the same meaning as in | |||
| 1100 | @code{set-frame-height}. | 1115 | @code{set-frame-height}. |
| 1101 | @end defun | 1116 | @end defun |
| 1102 | 1117 | ||
| 1103 | @findex set-screen-height | ||
| 1104 | @findex set-screen-width | ||
| 1105 | The older functions @code{set-screen-height} and | ||
| 1106 | @code{set-screen-width} were used to specify the height and width of the | ||
| 1107 | screen, in Emacs versions that did not support multiple frames. They | ||
| 1108 | are semi-obsolete, but still work; they apply to the selected frame. | ||
| 1109 | |||
| 1110 | @node Geometry | 1118 | @node Geometry |
| 1111 | @subsection Geometry | 1119 | @subsection Geometry |
| 1112 | 1120 | ||
| @@ -1231,9 +1239,10 @@ while processing @code{frame-title-format} or | |||
| 1231 | @section Deleting Frames | 1239 | @section Deleting Frames |
| 1232 | @cindex deleting frames | 1240 | @cindex deleting frames |
| 1233 | 1241 | ||
| 1234 | Frames remain potentially visible until you explicitly @dfn{delete} | 1242 | A @dfn{live frame} is one that has not been deleted. When a frame |
| 1235 | them. A deleted frame cannot appear on the screen, but continues to | 1243 | is deleted, it is removed from its terminal display, although it may |
| 1236 | exist as a Lisp object until there are no references to it. | 1244 | continue to exist as a Lisp object until there are no more references |
| 1245 | to it. | ||
| 1237 | 1246 | ||
| 1238 | @deffn Command delete-frame &optional frame force | 1247 | @deffn Command delete-frame &optional frame force |
| 1239 | @vindex delete-frame-functions | 1248 | @vindex delete-frame-functions |
| @@ -1264,25 +1273,25 @@ calls the function @code{delete-frame}. @xref{Misc Events}. | |||
| 1264 | @cindex frames, scanning all | 1273 | @cindex frames, scanning all |
| 1265 | 1274 | ||
| 1266 | @defun frame-list | 1275 | @defun frame-list |
| 1267 | The function @code{frame-list} returns a list of all the live frames, | 1276 | This function returns a list of all the live frames, i.e.@: those that |
| 1268 | i.e.@: those that have not been deleted. It is analogous to | 1277 | have not been deleted. It is analogous to @code{buffer-list} for |
| 1269 | @code{buffer-list} for buffers, and includes frames on all terminals. | 1278 | buffers, and includes frames on all terminals. The list that you get |
| 1270 | The list that you get is newly created, so modifying the list doesn't | 1279 | is newly created, so modifying the list doesn't have any effect on the |
| 1271 | have any effect on the internals of Emacs. | 1280 | internals of Emacs. |
| 1272 | @end defun | 1281 | @end defun |
| 1273 | 1282 | ||
| 1274 | @defun visible-frame-list | 1283 | @defun visible-frame-list |
| 1275 | This function returns a list of just the currently visible frames. | 1284 | This function returns a list of just the currently visible frames. |
| 1276 | @xref{Visibility of Frames}. (Terminal frames always count as | 1285 | @xref{Visibility of Frames}. Frames on text terminals always count as |
| 1277 | ``visible,'' even though only the selected one is actually displayed.) | 1286 | ``visible'', even though only the selected one is actually displayed. |
| 1278 | @end defun | 1287 | @end defun |
| 1279 | 1288 | ||
| 1280 | @defun next-frame &optional frame minibuf | 1289 | @defun next-frame &optional frame minibuf |
| 1281 | The function @code{next-frame} lets you cycle conveniently through all | 1290 | This function lets you cycle conveniently through all the frames on |
| 1282 | the frames on the current display from an arbitrary starting point. It | 1291 | the current display from an arbitrary starting point. It returns the |
| 1283 | returns the ``next'' frame after @var{frame} in the cycle. If | 1292 | ``next'' frame after @var{frame} in the cycle. If @var{frame} is |
| 1284 | @var{frame} is omitted or @code{nil}, it defaults to the selected frame | 1293 | omitted or @code{nil}, it defaults to the selected frame (@pxref{Input |
| 1285 | (@pxref{Input Focus}). | 1294 | Focus}). |
| 1286 | 1295 | ||
| 1287 | The second argument, @var{minibuf}, says which frames to consider: | 1296 | The second argument, @var{minibuf}, says which frames to consider: |
| 1288 | 1297 | ||
| @@ -1370,20 +1379,20 @@ function @code{select-frame}. This does not alter the window system's | |||
| 1370 | concept of focus; rather, it escapes from the window manager's control | 1379 | concept of focus; rather, it escapes from the window manager's control |
| 1371 | until that control is somehow reasserted. | 1380 | until that control is somehow reasserted. |
| 1372 | 1381 | ||
| 1373 | When using a text-only terminal, only one frame can be displayed at a | 1382 | When using a text terminal, only one frame can be displayed at a time |
| 1374 | time on the terminal, so after a call to @code{select-frame}, the next | 1383 | on the terminal, so after a call to @code{select-frame}, the next |
| 1375 | redisplay actually displays the newly selected frame. This frame | 1384 | redisplay actually displays the newly selected frame. This frame |
| 1376 | remains selected until a subsequent call to @code{select-frame}. Each | 1385 | remains selected until a subsequent call to @code{select-frame}. Each |
| 1377 | terminal frame has a number which appears in the mode line before the | 1386 | frame on a text terminal has a number which appears in the mode line |
| 1378 | buffer name (@pxref{Mode Line Variables}). | 1387 | before the buffer name (@pxref{Mode Line Variables}). |
| 1379 | 1388 | ||
| 1380 | @defun select-frame-set-input-focus frame &optional norecord | 1389 | @defun select-frame-set-input-focus frame &optional norecord |
| 1381 | This function selects @var{frame}, raises it (should it happen to be | 1390 | This function selects @var{frame}, raises it (should it happen to be |
| 1382 | obscured by other frames) and tries to give it the X server's focus. | 1391 | obscured by other frames) and tries to give it the X server's focus. |
| 1383 | On a text-only terminal, the next redisplay displays the new frame on | 1392 | On a text terminal, the next redisplay displays the new frame on the |
| 1384 | the entire terminal screen. The optional argument @var{norecord} has | 1393 | entire terminal screen. The optional argument @var{norecord} has the |
| 1385 | the same meaning as for @code{select-frame} (see below). The return | 1394 | same meaning as for @code{select-frame} (see below). The return value |
| 1386 | value of this function is not significant. | 1395 | of this function is not significant. |
| 1387 | @end defun | 1396 | @end defun |
| 1388 | 1397 | ||
| 1389 | @defun select-frame frame &optional norecord | 1398 | @defun select-frame frame &optional norecord |
| @@ -1467,20 +1476,34 @@ position consistent with the new selected frame. | |||
| 1467 | @cindex visible frame | 1476 | @cindex visible frame |
| 1468 | @cindex invisible frame | 1477 | @cindex invisible frame |
| 1469 | @cindex iconified frame | 1478 | @cindex iconified frame |
| 1479 | @cindex minimized frame | ||
| 1470 | @cindex frame visibility | 1480 | @cindex frame visibility |
| 1471 | 1481 | ||
| 1472 | A window frame may be @dfn{visible}, @dfn{invisible}, or | 1482 | A frame on a graphical display may be @dfn{visible}, @dfn{invisible}, |
| 1473 | @dfn{iconified}. If it is visible, you can see its contents, unless | 1483 | or @dfn{iconified}. If it is visible, its contents are displayed in |
| 1474 | other windows cover it. If it is iconified, the frame's contents do | 1484 | the usual manner. If it is iconified, its contents are not displayed, |
| 1475 | not appear on the screen, but an icon does. (Note: because of the | 1485 | but there is a little icon somewhere to bring the frame back into view |
| 1476 | way in which some window managers implement the concept of multiple | 1486 | (some window managers refer to this state as @dfn{minimized} rather |
| 1477 | workspaces, or desktops, all frames on other workspaces may appear to | 1487 | than @dfn{iconified}, but from Emacs' point of view they are the same |
| 1478 | Emacs to be iconified.) If the frame is invisible, it doesn't show on | 1488 | thing). If a frame is invisible, it is not displayed at all. |
| 1479 | the screen, not even as an icon. | ||
| 1480 | 1489 | ||
| 1481 | Visibility is meaningless for terminal frames, since only the selected | 1490 | Visibility is meaningless on text terminals, since only the selected |
| 1482 | one is actually displayed in any case. | 1491 | one is actually displayed in any case. |
| 1483 | 1492 | ||
| 1493 | @defun frame-visible-p frame | ||
| 1494 | This function returns the visibility status of frame @var{frame}. The | ||
| 1495 | value is @code{t} if @var{frame} is visible, @code{nil} if it is | ||
| 1496 | invisible, and @code{icon} if it is iconified. | ||
| 1497 | |||
| 1498 | On a text terminal, all frames are considered visible, whether they | ||
| 1499 | are currently being displayed or not. | ||
| 1500 | @end defun | ||
| 1501 | |||
| 1502 | @deffn Command iconify-frame &optional frame | ||
| 1503 | This function iconifies frame @var{frame}. If you omit @var{frame}, it | ||
| 1504 | iconifies the selected frame. | ||
| 1505 | @end deffn | ||
| 1506 | |||
| 1484 | @deffn Command make-frame-visible &optional frame | 1507 | @deffn Command make-frame-visible &optional frame |
| 1485 | This function makes frame @var{frame} visible. If you omit | 1508 | This function makes frame @var{frame} visible. If you omit |
| 1486 | @var{frame}, it makes the selected frame visible. This does not raise | 1509 | @var{frame}, it makes the selected frame visible. This does not raise |
| @@ -1496,29 +1519,12 @@ Unless @var{force} is non-@code{nil}, this function refuses to make | |||
| 1496 | @var{frame} invisible if all other frames are invisible.. | 1519 | @var{frame} invisible if all other frames are invisible.. |
| 1497 | @end deffn | 1520 | @end deffn |
| 1498 | 1521 | ||
| 1499 | @deffn Command iconify-frame &optional frame | ||
| 1500 | This function iconifies frame @var{frame}. If you omit @var{frame}, it | ||
| 1501 | iconifies the selected frame. | ||
| 1502 | @end deffn | ||
| 1503 | |||
| 1504 | @defun frame-visible-p frame | ||
| 1505 | This returns the visibility status of frame @var{frame}. The value is | ||
| 1506 | @code{t} if @var{frame} is visible, @code{nil} if it is invisible, and | ||
| 1507 | @code{icon} if it is iconified. | ||
| 1508 | |||
| 1509 | On a text-only terminal, all frames are considered visible, whether | ||
| 1510 | they are currently being displayed or not, and this function returns | ||
| 1511 | @code{t} for all frames. | ||
| 1512 | @end defun | ||
| 1513 | |||
| 1514 | The visibility status of a frame is also available as a frame | 1522 | The visibility status of a frame is also available as a frame |
| 1515 | parameter. You can read or change it as such. @xref{Management | 1523 | parameter. You can read or change it as such. @xref{Management |
| 1516 | Parameters}. | 1524 | Parameters}. The user can also iconify and deiconify frames with the |
| 1517 | 1525 | window manager. This happens below the level at which Emacs can exert | |
| 1518 | The user can iconify and deiconify frames with the window manager. | 1526 | any control, but Emacs does provide events that you can use to keep |
| 1519 | This happens below the level at which Emacs can exert any control, but | 1527 | track of such changes. @xref{Misc Events}. |
| 1520 | Emacs does provide events that you can use to keep track of such | ||
| 1521 | changes. @xref{Misc Events}. | ||
| 1522 | 1528 | ||
| 1523 | @node Raising and Lowering | 1529 | @node Raising and Lowering |
| 1524 | @section Raising and Lowering Frames | 1530 | @section Raising and Lowering Frames |
| @@ -1709,7 +1715,7 @@ displayed on @var{frame} is visible; otherwise it returns @code{nil}. | |||
| 1709 | @var{frame} omitted or @code{nil} means the selected frame. This is | 1715 | @var{frame} omitted or @code{nil} means the selected frame. This is |
| 1710 | useful when @code{make-pointer-invisible} is set to @code{t}: it | 1716 | useful when @code{make-pointer-invisible} is set to @code{t}: it |
| 1711 | allows to know if the pointer has been hidden. | 1717 | allows to know if the pointer has been hidden. |
| 1712 | @xref{Mouse Avoidance,,,emacs}. | 1718 | @xref{Mouse Avoidance,,,emacs, The Emacs Manual}. |
| 1713 | @end defun | 1719 | @end defun |
| 1714 | 1720 | ||
| 1715 | @need 3000 | 1721 | @need 3000 |
| @@ -2111,10 +2117,10 @@ and that name is still supported as an alias. | |||
| 2111 | 2117 | ||
| 2112 | @node Text Terminal Colors | 2118 | @node Text Terminal Colors |
| 2113 | @section Text Terminal Colors | 2119 | @section Text Terminal Colors |
| 2114 | @cindex colors on text-only terminals | 2120 | @cindex colors on text terminals |
| 2115 | 2121 | ||
| 2116 | Text-only terminals usually support only a small number of colors, | 2122 | Text terminals usually support only a small number of colors, and |
| 2117 | and the computer uses small integers to select colors on the terminal. | 2123 | the computer uses small integers to select colors on the terminal. |
| 2118 | This means that the computer cannot reliably tell what the selected | 2124 | This means that the computer cannot reliably tell what the selected |
| 2119 | color looks like; instead, you have to inform your application which | 2125 | color looks like; instead, you have to inform your application which |
| 2120 | small integers correspond to which colors. However, Emacs does know | 2126 | small integers correspond to which colors. However, Emacs does know |
| @@ -2128,10 +2134,10 @@ in @ref{Color Names}. | |||
| 2128 | 2134 | ||
| 2129 | These functions accept a display (either a frame or the name of a | 2135 | These functions accept a display (either a frame or the name of a |
| 2130 | terminal) as an optional argument. We hope in the future to make | 2136 | terminal) as an optional argument. We hope in the future to make |
| 2131 | Emacs support different colors on different text-only terminals; then | 2137 | Emacs support different colors on different text terminals; then this |
| 2132 | this argument will specify which terminal to operate on (the default | 2138 | argument will specify which terminal to operate on (the default being |
| 2133 | being the selected frame's terminal; @pxref{Input Focus}). At | 2139 | the selected frame's terminal; @pxref{Input Focus}). At present, |
| 2134 | present, though, the @var{frame} argument has no effect. | 2140 | though, the @var{frame} argument has no effect. |
| 2135 | 2141 | ||
| 2136 | @defun tty-color-define name number &optional rgb frame | 2142 | @defun tty-color-define name number &optional rgb frame |
| 2137 | This function associates the color name @var{name} with | 2143 | This function associates the color name @var{name} with |
| @@ -2145,12 +2151,12 @@ Emacs will not know what it looks like. | |||
| 2145 | @end defun | 2151 | @end defun |
| 2146 | 2152 | ||
| 2147 | @defun tty-color-clear &optional frame | 2153 | @defun tty-color-clear &optional frame |
| 2148 | This function clears the table of defined colors for a text-only terminal. | 2154 | This function clears the table of defined colors for a text terminal. |
| 2149 | @end defun | 2155 | @end defun |
| 2150 | 2156 | ||
| 2151 | @defun tty-color-alist &optional frame | 2157 | @defun tty-color-alist &optional frame |
| 2152 | This function returns an alist recording the known colors supported by a | 2158 | This function returns an alist recording the known colors supported by |
| 2153 | text-only terminal. | 2159 | a text terminal. |
| 2154 | 2160 | ||
| 2155 | Each element has the form @code{(@var{name} @var{number} . @var{rgb})} | 2161 | Each element has the form @code{(@var{name} @var{number} . @var{rgb})} |
| 2156 | or @code{(@var{name} @var{number})}. Here, @var{name} is the color | 2162 | or @code{(@var{name} @var{number})}. Here, @var{name} is the color |
| @@ -2266,8 +2272,8 @@ a mouse. | |||
| 2266 | @defun display-graphic-p &optional display | 2272 | @defun display-graphic-p &optional display |
| 2267 | This function returns @code{t} if @var{display} is a graphic display | 2273 | This function returns @code{t} if @var{display} is a graphic display |
| 2268 | capable of displaying several frames and several different fonts at | 2274 | capable of displaying several frames and several different fonts at |
| 2269 | once. This is true for displays that use a window system such as X, and | 2275 | once. This is true for displays that use a window system such as X, |
| 2270 | false for text-only terminals. | 2276 | and false for text terminals. |
| 2271 | @end defun | 2277 | @end defun |
| 2272 | 2278 | ||
| 2273 | @defun display-mouse-p &optional display | 2279 | @defun display-mouse-p &optional display |
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi index a98797f3618..537514d7fb9 100644 --- a/doc/lispref/help.texi +++ b/doc/lispref/help.texi | |||
| @@ -636,6 +636,7 @@ in the minibuffer with the message @samp{Help (Type ? for further | |||
| 636 | options)}, and then provides assistance in finding out what the key | 636 | options)}, and then provides assistance in finding out what the key |
| 637 | bindings are, and what the mode is intended for. It returns @code{nil}. | 637 | bindings are, and what the mode is intended for. It returns @code{nil}. |
| 638 | 638 | ||
| 639 | @vindex Helper-help-map | ||
| 639 | This can be customized by changing the map @code{Helper-help-map}. | 640 | This can be customized by changing the map @code{Helper-help-map}. |
| 640 | @end deffn | 641 | @end deffn |
| 641 | 642 | ||
diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi index 551d9141574..0d29c25c8b1 100644 --- a/doc/lispref/hooks.texi +++ b/doc/lispref/hooks.texi | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | @c -*-texinfo-*- | 1 | @c -*-texinfo-*- |
| 2 | @c This is part of the GNU Emacs Lisp Reference Manual. | 2 | @c This is part of the GNU Emacs Lisp Reference Manual. |
| 3 | @c Copyright (C) 1990-1993, 1998, 2001-2012 Free Software Foundation, Inc. | 3 | @c Copyright (C) 1990-1993, 1998, 2001-2012 Free Software Foundation, Inc. |
| 4 | @c See the file elisp.texi for copying conditions. | 4 | @c See the file elisp.texi for copying conditions. |
| 5 | @setfilename ../../info/hooks | 5 | @setfilename ../../info/hooks |
| 6 | @node Standard Hooks, Index, Standard Keymaps, Top | 6 | @node Standard Hooks, Index, Standard Keymaps, Top |
| @@ -8,7 +8,7 @@ | |||
| 8 | @cindex standard hooks | 8 | @cindex standard hooks |
| 9 | @cindex hook variables, list of | 9 | @cindex hook variables, list of |
| 10 | 10 | ||
| 11 | The following is a list of hook variables that let you provide | 11 | The following is a list of some hook variables that let you provide |
| 12 | functions to be called from within Emacs on suitable occasions. | 12 | functions to be called from within Emacs on suitable occasions. |
| 13 | 13 | ||
| 14 | Most of these variables have names ending with @samp{-hook}. They are | 14 | Most of these variables have names ending with @samp{-hook}. They are |
| @@ -18,117 +18,92 @@ arguments and their values are completely ignored. The recommended way | |||
| 18 | to put a new function on such a hook is to call @code{add-hook}. | 18 | to put a new function on such a hook is to call @code{add-hook}. |
| 19 | @xref{Hooks}, for more information about using hooks. | 19 | @xref{Hooks}, for more information about using hooks. |
| 20 | 20 | ||
| 21 | Every major mode defines a mode hook named | ||
| 22 | @samp{@var{modename}-mode-hook}. The major mode command runs this | ||
| 23 | normal hook with @code{run-mode-hooks} as the very last thing it does. | ||
| 24 | @xref{Mode Hooks}. Most minor modes have mode hooks too. Mode hooks | ||
| 25 | are omitted in the list below. | ||
| 26 | |||
| 27 | The variables whose names end in @samp{-hooks} or @samp{-functions} are | 21 | The variables whose names end in @samp{-hooks} or @samp{-functions} are |
| 28 | usually @dfn{abnormal hooks}; their values are lists of functions, but | 22 | usually @dfn{abnormal hooks}; their values are lists of functions, but |
| 29 | these functions are called in a special way (they are passed arguments, | 23 | these functions are called in a special way (they are passed arguments, |
| 30 | or their values are used). The variables whose names end in | 24 | or their values are used). The variables whose names end in |
| 31 | @samp{-function} have single functions as their values. | 25 | @samp{-function} have single functions as their values. |
| 32 | 26 | ||
| 27 | This is not an exhaustive list, it only covers the more general hooks. | ||
| 28 | For example, every major mode defines a hook named | ||
| 29 | @samp{@var{modename}-mode-hook}. The major mode command runs this | ||
| 30 | normal hook with @code{run-mode-hooks} as the very last thing it does. | ||
| 31 | @xref{Mode Hooks}. Most minor modes have mode hooks too. | ||
| 32 | |||
| 33 | A special feature allows you to specify expressions to evaluate if and | 33 | A special feature allows you to specify expressions to evaluate if and |
| 34 | when a file is loaded (@pxref{Hooks for Loading}). That feature is | 34 | when a file is loaded (@pxref{Hooks for Loading}). That feature is |
| 35 | not exactly a hook, but does a similar job. | 35 | not exactly a hook, but does a similar job. |
| 36 | 36 | ||
| 37 | @c We need to xref to where each hook is documented or else document | 37 | @c We need to xref to where each hook is documented or else document it here. |
| 38 | @c it here. | 38 | @c Add vindex for anything not indexed elsewhere. |
| 39 | @c This list is in alphabetical order, grouped by topic. | ||
| 40 | @c TODO It should probably be more thoroughly ordered by topic. | ||
| 39 | 41 | ||
| 40 | @table @code | 42 | @table @code |
| 41 | @item abbrev-expand-functions | ||
| 42 | @xref{Abbrev Expansion}. | ||
| 43 | |||
| 44 | @item activate-mark-hook | 43 | @item activate-mark-hook |
| 44 | @itemx deactivate-mark-hook | ||
| 45 | @xref{The Mark}. | 45 | @xref{The Mark}. |
| 46 | 46 | ||
| 47 | @item after-change-functions | 47 | @item after-change-functions |
| 48 | @itemx before-change-functions | ||
| 49 | @itemx first-change-hook | ||
| 48 | @xref{Change Hooks}. | 50 | @xref{Change Hooks}. |
| 49 | 51 | ||
| 50 | @item after-change-major-mode-hook | 52 | @item after-change-major-mode-hook |
| 53 | @itemx change-major-mode-after-body-hook | ||
| 51 | @xref{Mode Hooks}. | 54 | @xref{Mode Hooks}. |
| 52 | 55 | ||
| 53 | @item after-init-hook | 56 | @item after-init-hook |
| 57 | @itemx before-init-hook | ||
| 58 | @itemx emacs-startup-hook | ||
| 54 | @xref{Init File}. | 59 | @xref{Init File}. |
| 55 | 60 | ||
| 56 | @item after-insert-file-functions | 61 | @item after-insert-file-functions |
| 62 | @itemx write-region-annotate-functions | ||
| 63 | @itemx write-region-post-annotation-function | ||
| 57 | @xref{Format Conversion}. | 64 | @xref{Format Conversion}. |
| 58 | 65 | ||
| 59 | @item after-make-frame-functions | 66 | @item after-make-frame-functions |
| 67 | @itemx before-make-frame-hook | ||
| 60 | @xref{Creating Frames}. | 68 | @xref{Creating Frames}. |
| 61 | 69 | ||
| 70 | @c Not general enough? | ||
| 71 | @ignore | ||
| 62 | @item after-revert-hook | 72 | @item after-revert-hook |
| 73 | @itemx before-revert-hook | ||
| 74 | @itemx buffer-stale-function | ||
| 75 | @itemx revert-buffer-function | ||
| 76 | @itemx revert-buffer-insert-file-contents-function | ||
| 63 | @xref{Reverting}. | 77 | @xref{Reverting}. |
| 78 | @end ignore | ||
| 64 | 79 | ||
| 65 | @item after-save-hook | 80 | @item after-save-hook |
| 81 | @itemx before-save-hook | ||
| 82 | @itemx write-contents-functions | ||
| 83 | @itemx write-file-functions | ||
| 66 | @xref{Saving Buffers}. | 84 | @xref{Saving Buffers}. |
| 67 | 85 | ||
| 68 | @item auto-fill-function | 86 | @item after-setting-font-hook |
| 69 | @xref{Auto Filling}. | 87 | @vindex after-setting-font-hook |
| 88 | Hook run after a frame's font changes. | ||
| 70 | 89 | ||
| 71 | @item auto-save-hook | 90 | @item auto-save-hook |
| 72 | @xref{Auto-Saving}. | 91 | @xref{Auto-Saving}. |
| 73 | 92 | ||
| 74 | @item before-change-functions | ||
| 75 | @xref{Change Hooks}. | ||
| 76 | |||
| 77 | @item before-hack-local-variables-hook | 93 | @item before-hack-local-variables-hook |
| 94 | @itemx hack-local-variables-hook | ||
| 78 | @xref{File Local Variables}. | 95 | @xref{File Local Variables}. |
| 79 | 96 | ||
| 80 | @item before-init-hook | ||
| 81 | @xref{Init File}. | ||
| 82 | |||
| 83 | @item before-make-frame-hook | ||
| 84 | @xref{Creating Frames}. | ||
| 85 | |||
| 86 | @item before-revert-hook | ||
| 87 | @xref{Reverting}. | ||
| 88 | |||
| 89 | @item before-save-hook | ||
| 90 | @xref{Saving Buffers}. | ||
| 91 | |||
| 92 | @item blink-paren-function | ||
| 93 | @xref{Blinking}. | ||
| 94 | |||
| 95 | @item buffer-access-fontify-functions | 97 | @item buffer-access-fontify-functions |
| 96 | @xref{Lazy Properties}. | 98 | @xref{Lazy Properties}. |
| 97 | 99 | ||
| 98 | @item calendar-initial-window-hook | 100 | @item buffer-list-update-hook |
| 99 | @iftex | 101 | @vindex buffer-list-update-hook |
| 100 | @inforef{Calendar Customizing,, emacs-xtra}. | 102 | Hook run when the buffer list changes. |
| 101 | @end iftex | 103 | |
| 102 | @ifnottex | 104 | @item buffer-quit-function |
| 103 | @xref{Calendar Customizing,,, emacs}. | 105 | @vindex buffer-quit-function |
| 104 | @end ifnottex | 106 | Function to call to ``quit'' the current buffer. |
| 105 | |||
| 106 | @item calendar-load-hook | ||
| 107 | @iftex | ||
| 108 | @inforef{Calendar Customizing,, emacs-xtra}. | ||
| 109 | @end iftex | ||
| 110 | @ifnottex | ||
| 111 | @xref{Calendar Customizing,,, emacs}. | ||
| 112 | @end ifnottex | ||
| 113 | |||
| 114 | @item calendar-today-invisible-hook | ||
| 115 | @iftex | ||
| 116 | @inforef{Calendar Customizing,, emacs-xtra}. | ||
| 117 | @end iftex | ||
| 118 | @ifnottex | ||
| 119 | @xref{Calendar Customizing,,, emacs}. | ||
| 120 | @end ifnottex | ||
| 121 | |||
| 122 | @item calendar-today-visible-hook | ||
| 123 | @iftex | ||
| 124 | @inforef{Calendar Customizing,, emacs-xtra}. | ||
| 125 | @end iftex | ||
| 126 | @ifnottex | ||
| 127 | @xref{Calendar Customizing,,, emacs}. | ||
| 128 | @end ifnottex | ||
| 129 | |||
| 130 | @item change-major-mode-after-body-hook | ||
| 131 | @xref{Mode Hooks}. | ||
| 132 | 107 | ||
| 133 | @item change-major-mode-hook | 108 | @item change-major-mode-hook |
| 134 | @xref{Creating Buffer-Local}. | 109 | @xref{Creating Buffer-Local}. |
| @@ -136,217 +111,175 @@ not exactly a hook, but does a similar job. | |||
| 136 | @item command-line-functions | 111 | @item command-line-functions |
| 137 | @xref{Command-Line Arguments}. | 112 | @xref{Command-Line Arguments}. |
| 138 | 113 | ||
| 139 | @item comment-indent-function | 114 | @item delayed-warnings-hook |
| 140 | @xref{Options for Comments,, Options Controlling Comments, emacs, the | 115 | @vindex delayed-warnings-hook |
| 141 | GNU Emacs Manual}. | 116 | The command loop runs this soon after @code{post-command-hook} (q.v.). |
| 142 | |||
| 143 | @item compilation-finish-functions | ||
| 144 | Functions to call when a compilation process finishes. | ||
| 145 | |||
| 146 | @item custom-define-hook | ||
| 147 | Hook called after defining each customize option. | ||
| 148 | |||
| 149 | @item deactivate-mark-hook | ||
| 150 | @xref{The Mark}. | ||
| 151 | 117 | ||
| 152 | @item delete-frame-functions | 118 | @item delete-frame-functions |
| 153 | Functions to call when Emacs deletes a frame. @xref{Deleting Frames}. | 119 | @xref{Deleting Frames}. |
| 154 | 120 | ||
| 155 | @item delete-terminal-functions | 121 | @item delete-terminal-functions |
| 156 | Functions to call when Emacs deletes a terminal. @xref{Multiple | 122 | @xref{Multiple Terminals}. |
| 157 | Terminals}. | ||
| 158 | |||
| 159 | @item desktop-after-read-hook | ||
| 160 | Normal hook run after a successful @code{desktop-read}. May be used | ||
| 161 | to show a buffer list. @xref{Saving Emacs Sessions,, Saving Emacs | ||
| 162 | Sessions, emacs, the GNU Emacs Manual}. | ||
| 163 | |||
| 164 | @item desktop-no-desktop-file-hook | ||
| 165 | Normal hook run when @code{desktop-read} can't find a desktop file. | ||
| 166 | May be used to show a dired buffer. @xref{Saving Emacs Sessions,, | ||
| 167 | Saving Emacs Sessions, emacs, the GNU Emacs Manual}. | ||
| 168 | |||
| 169 | @item desktop-save-hook | ||
| 170 | Normal hook run before the desktop is saved in a desktop file. This | ||
| 171 | is useful for truncating history lists, for example. @xref{Saving | ||
| 172 | Emacs Sessions,, Saving Emacs Sessions, emacs, the GNU Emacs Manual}. | ||
| 173 | |||
| 174 | @item diary-hook | ||
| 175 | List of functions called after the display of the diary. Can be used | ||
| 176 | for appointment notification. | ||
| 177 | |||
| 178 | @item diary-list-entries-hook | ||
| 179 | @iftex | ||
| 180 | @inforef{Fancy Diary Display,, emacs-xtra}. | ||
| 181 | @end iftex | ||
| 182 | @ifnottex | ||
| 183 | @xref{Fancy Diary Display,,, emacs}. | ||
| 184 | @end ifnottex | ||
| 185 | |||
| 186 | @item diary-mark-entries-hook | ||
| 187 | @iftex | ||
| 188 | @inforef{Fancy Diary Display,, emacs-xtra}. | ||
| 189 | @end iftex | ||
| 190 | @ifnottex | ||
| 191 | @xref{Fancy Diary Display,,, emacs}. | ||
| 192 | @end ifnottex | ||
| 193 | |||
| 194 | @item diary-nongregorian-listing-hook | ||
| 195 | @iftex | ||
| 196 | @inforef{Non-Gregorian Diary,, emacs-xtra}. | ||
| 197 | @end iftex | ||
| 198 | @ifnottex | ||
| 199 | @xref{Non-Gregorian Diary,,, emacs}. | ||
| 200 | @end ifnottex | ||
| 201 | |||
| 202 | @item diary-nongregorian-marking-hook | ||
| 203 | @iftex | ||
| 204 | @inforef{Non-Gregorian Diary,, emacs-xtra}. | ||
| 205 | @end iftex | ||
| 206 | @ifnottex | ||
| 207 | @xref{Non-Gregorian Diary,,, emacs}. | ||
| 208 | @end ifnottex | ||
| 209 | |||
| 210 | @item diary-print-entries-hook | ||
| 211 | @iftex | ||
| 212 | @inforef{Diary Display,, emacs-xtra}. | ||
| 213 | @end iftex | ||
| 214 | @ifnottex | ||
| 215 | @xref{Diary Display,,, emacs}. | ||
| 216 | @end ifnottex | ||
| 217 | 123 | ||
| 124 | @ignore | ||
| 218 | @item disabled-command-function | 125 | @item disabled-command-function |
| 219 | @xref{Disabling Commands}. | 126 | @xref{Disabling Commands}. |
| 127 | @end ignore | ||
| 128 | |||
| 129 | @item display-buffer-function | ||
| 130 | @itemx pop-up-frame-function | ||
| 131 | @itemx special-display-function | ||
| 132 | @itemx split-window-preferred-function | ||
| 133 | @xref{Choosing Window Options}. | ||
| 220 | 134 | ||
| 221 | @item echo-area-clear-hook | 135 | @item echo-area-clear-hook |
| 222 | @xref{Echo Area Customization}. | 136 | @xref{Echo Area Customization}. |
| 223 | 137 | ||
| 224 | @item emacs-startup-hook | ||
| 225 | @xref{Init File}. | ||
| 226 | |||
| 227 | @item find-file-hook | 138 | @item find-file-hook |
| 139 | @itemx find-file-not-found-functions | ||
| 228 | @xref{Visiting Functions}. | 140 | @xref{Visiting Functions}. |
| 229 | 141 | ||
| 230 | @item find-file-not-found-functions | 142 | @item font-lock-extend-after-change-region-function |
| 231 | @xref{Visiting Functions}. | 143 | @xref{Region to Refontify}. |
| 232 | |||
| 233 | @item first-change-hook | ||
| 234 | @xref{Change Hooks}. | ||
| 235 | 144 | ||
| 236 | @item font-lock-beginning-of-syntax-function | 145 | @item font-lock-extend-region-functions |
| 237 | @xref{Syntactic Font Lock}. | 146 | @xref{Multiline Font Lock}. |
| 238 | 147 | ||
| 239 | @item font-lock-fontify-buffer-function | 148 | @item font-lock-fontify-buffer-function |
| 149 | @itemx font-lock-fontify-region-function | ||
| 150 | @itemx font-lock-mark-block-function | ||
| 151 | @itemx font-lock-unfontify-buffer-function | ||
| 152 | @itemx font-lock-unfontify-region-function | ||
| 240 | @xref{Other Font Lock Variables}. | 153 | @xref{Other Font Lock Variables}. |
| 241 | 154 | ||
| 242 | @item font-lock-fontify-region-function | 155 | @item fontification-functions |
| 243 | @xref{Other Font Lock Variables}. | 156 | @xref{Auto Faces,, Automatic Face Assignment}. |
| 244 | |||
| 245 | @item font-lock-mark-block-function | ||
| 246 | @xref{Other Font Lock Variables}. | ||
| 247 | |||
| 248 | @item font-lock-syntactic-face-function | ||
| 249 | @xref{Syntactic Font Lock}. | ||
| 250 | |||
| 251 | @item font-lock-unfontify-buffer-function | ||
| 252 | @xref{Other Font Lock Variables}. | ||
| 253 | |||
| 254 | @item hack-local-variables-hook | ||
| 255 | @xref{File Local Variables}. | ||
| 256 | |||
| 257 | @item font-lock-unfontify-region-function | ||
| 258 | @xref{Other Font Lock Variables}. | ||
| 259 | 157 | ||
| 260 | @item kbd-macro-termination-hook | 158 | @item frame-auto-hide-function |
| 261 | @xref{Keyboard Macros}. | 159 | @xref{Quitting Windows}. |
| 262 | 160 | ||
| 263 | @item kill-buffer-hook | 161 | @item kill-buffer-hook |
| 264 | @xref{Killing Buffers}. | 162 | @itemx kill-buffer-query-functions |
| 265 | |||
| 266 | @item kill-buffer-query-functions | ||
| 267 | @xref{Killing Buffers}. | 163 | @xref{Killing Buffers}. |
| 268 | 164 | ||
| 269 | @item kill-emacs-hook | 165 | @item kill-emacs-hook |
| 166 | @itemx kill-emacs-query-functions | ||
| 270 | @xref{Killing Emacs}. | 167 | @xref{Killing Emacs}. |
| 271 | 168 | ||
| 272 | @item kill-emacs-query-functions | ||
| 273 | @xref{Killing Emacs}. | ||
| 274 | |||
| 275 | @item lisp-indent-function | ||
| 276 | |||
| 277 | @item mail-setup-hook | ||
| 278 | @xref{Mail Misc,, Mail Miscellany, emacs, the GNU Emacs Manual}. | ||
| 279 | |||
| 280 | @item menu-bar-update-hook | 169 | @item menu-bar-update-hook |
| 281 | @xref{Menu Bar}. | 170 | @xref{Menu Bar}. |
| 282 | 171 | ||
| 283 | @item minibuffer-setup-hook | 172 | @item minibuffer-setup-hook |
| 173 | @itemx minibuffer-exit-hook | ||
| 284 | @xref{Minibuffer Misc}. | 174 | @xref{Minibuffer Misc}. |
| 285 | 175 | ||
| 286 | @item minibuffer-exit-hook | 176 | @item mouse-leave-buffer-hook |
| 287 | @xref{Minibuffer Misc}. | 177 | @vindex mouse-leave-buffer-hook |
| 178 | Hook run when about to switch windows with a mouse command. | ||
| 288 | 179 | ||
| 289 | @item mouse-position-function | 180 | @item mouse-position-function |
| 290 | @xref{Mouse Position}. | 181 | @xref{Mouse Position}. |
| 291 | 182 | ||
| 292 | @item occur-hook | ||
| 293 | |||
| 294 | @item post-command-hook | 183 | @item post-command-hook |
| 184 | @itemx pre-command-hook | ||
| 295 | @xref{Command Overview}. | 185 | @xref{Command Overview}. |
| 296 | 186 | ||
| 187 | @item post-gc-hook | ||
| 188 | @xref{Garbage Collection}. | ||
| 189 | |||
| 297 | @item post-self-insert-hook | 190 | @item post-self-insert-hook |
| 298 | @xref{Keymaps and Minor Modes}. | 191 | @xref{Keymaps and Minor Modes}. |
| 299 | 192 | ||
| 300 | @item pre-command-hook | 193 | @ignore |
| 301 | @xref{Command Overview}. | ||
| 302 | |||
| 303 | @item prog-mode-hook | 194 | @item prog-mode-hook |
| 195 | @itemx special-mode-hook | ||
| 196 | @vindex special-mode-hook | ||
| 304 | @xref{Basic Major Modes}. | 197 | @xref{Basic Major Modes}. |
| 305 | 198 | @end ignore | |
| 306 | @item resume-tty-functions | ||
| 307 | @xref{Suspending Emacs}. | ||
| 308 | |||
| 309 | @item scheme-indent-function | ||
| 310 | 199 | ||
| 311 | @item suspend-hook | 200 | @item suspend-hook |
| 201 | @itemx suspend-resume-hook | ||
| 202 | @itemx suspend-tty-functions | ||
| 203 | @itemx resume-tty-functions | ||
| 312 | @xref{Suspending Emacs}. | 204 | @xref{Suspending Emacs}. |
| 313 | 205 | ||
| 314 | @item suspend-resume-hook | 206 | @item syntax-begin-function |
| 315 | @xref{Suspending Emacs}. | 207 | @itemx syntax-propertize-extend-region-functions |
| 316 | 208 | @itemx syntax-propertize-function | |
| 317 | @item suspend-tty-functions | 209 | @itemx font-lock-syntactic-face-function |
| 318 | @xref{Suspending Emacs}. | 210 | @xref{Syntactic Font Lock}. @xref{Syntax Properties}. |
| 319 | 211 | ||
| 320 | @item temp-buffer-setup-hook | 212 | @item temp-buffer-setup-hook |
| 321 | @xref{Temporary Displays}. | 213 | @itemx temp-buffer-show-function |
| 322 | 214 | @itemx temp-buffer-show-hook | |
| 323 | @item temp-buffer-show-function | ||
| 324 | @xref{Temporary Displays}. | ||
| 325 | |||
| 326 | @item temp-buffer-show-hook | ||
| 327 | @xref{Temporary Displays}. | 215 | @xref{Temporary Displays}. |
| 328 | 216 | ||
| 329 | @item term-setup-hook | 217 | @item term-setup-hook |
| 330 | @xref{Terminal-Specific}. | 218 | @xref{Terminal-Specific}. |
| 331 | 219 | ||
| 332 | @item window-configuration-change-hook | 220 | @item window-configuration-change-hook |
| 333 | @xref{Window Hooks}. | 221 | @itemx window-scroll-functions |
| 334 | 222 | @itemx window-size-change-functions | |
| 335 | @item window-scroll-functions | ||
| 336 | @xref{Window Hooks}. | 223 | @xref{Window Hooks}. |
| 337 | 224 | ||
| 338 | @item window-setup-hook | 225 | @item window-setup-hook |
| 339 | @xref{Window Systems}. | 226 | @xref{Window Systems}. |
| 340 | 227 | ||
| 341 | @item window-size-change-functions | 228 | @item window-text-change-functions |
| 342 | @xref{Window Hooks}. | 229 | @vindex window-text-change-functions |
| 343 | 230 | Functions to call in redisplay when text in the window might change. | |
| 344 | @item write-contents-functions | ||
| 345 | @xref{Saving Buffers}. | ||
| 346 | |||
| 347 | @item write-file-functions | ||
| 348 | @xref{Saving Buffers}. | ||
| 349 | 231 | ||
| 350 | @item write-region-annotate-functions | ||
| 351 | @xref{Format Conversion}. | ||
| 352 | @end table | 232 | @end table |
| 233 | |||
| 234 | @ignore | ||
| 235 | Some -hook, -function, -functions from preloaded Lisp or C files that | ||
| 236 | I thought did not need to be mentioned here: | ||
| 237 | |||
| 238 | Lisp: | ||
| 239 | after-load-functions | ||
| 240 | auto-coding-functions | ||
| 241 | choose-completion-string-functions | ||
| 242 | completing-read-function | ||
| 243 | completion-annotate-function | ||
| 244 | completion-at-point-functions | ||
| 245 | completion-in-region-functions | ||
| 246 | completion-list-insert-choice-function | ||
| 247 | describe-current-input-method-function | ||
| 248 | filter-buffer-substring-functions | ||
| 249 | font-lock-function | ||
| 250 | inactivate-current-input-method-function | ||
| 251 | menu-bar-select-buffer-function | ||
| 252 | read-file-name-function | ||
| 253 | replace-re-search-function | ||
| 254 | replace-search-function | ||
| 255 | yank-undo-function | ||
| 256 | |||
| 257 | C hooks: | ||
| 258 | kbd-macro-termination-hook | ||
| 259 | signal-hook-function | ||
| 260 | |||
| 261 | C functions: | ||
| 262 | redisplay-end-trigger-functions | ||
| 263 | x-lost-selection-functions | ||
| 264 | x-sent-selection-functions | ||
| 265 | |||
| 266 | C function: | ||
| 267 | auto-composition-function | ||
| 268 | auto-fill-function | ||
| 269 | command-error-function | ||
| 270 | compose-chars-after-function | ||
| 271 | composition-function-table | ||
| 272 | deferred-action-function | ||
| 273 | input-method-function | ||
| 274 | load-read-function | ||
| 275 | load-source-file-function | ||
| 276 | macro-declaration-function | ||
| 277 | read-buffer-function | ||
| 278 | ring-bell-function | ||
| 279 | select-safe-coding-system-function | ||
| 280 | set-auto-coding-function | ||
| 281 | show-help-function | ||
| 282 | signal-hook-function | ||
| 283 | undo-outer-limit-function | ||
| 284 | |||
| 285 | @end ignore | ||
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index df6193cf13b..83bbc140b13 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | @c -*-texinfo-*- | 1 | @c -*-texinfo-*- |
| 2 | @c This is part of the GNU Emacs Lisp Reference Manual. | 2 | @c This is part of the GNU Emacs Lisp Reference Manual. |
| 3 | @c Copyright (C) 1990-1993, 1998-1999, 2001-2012 Free Software Foundation, Inc. | 3 | @c Copyright (C) 1990-1993, 1998-1999, 2001-2012 Free Software Foundation, Inc. |
| 4 | @c See the file elisp.texi for copying conditions. | 4 | @c See the file elisp.texi for copying conditions. |
| 5 | @setfilename ../../info/internals | 5 | @setfilename ../../info/internals |
| 6 | @node GNU Emacs Internals, Standard Errors, Tips, Top | 6 | @node GNU Emacs Internals, Standard Errors, Tips, Top |
| @@ -21,7 +21,7 @@ internal aspects of GNU Emacs that may be of interest to C programmers. | |||
| 21 | @end menu | 21 | @end menu |
| 22 | 22 | ||
| 23 | @node Building Emacs | 23 | @node Building Emacs |
| 24 | @appendixsec Building Emacs | 24 | @section Building Emacs |
| 25 | @cindex building Emacs | 25 | @cindex building Emacs |
| 26 | @pindex temacs | 26 | @pindex temacs |
| 27 | 27 | ||
| @@ -44,7 +44,7 @@ environment, resulting in an Emacs that is still impure but no longer | |||
| 44 | bare. | 44 | bare. |
| 45 | 45 | ||
| 46 | @cindex dumping Emacs | 46 | @cindex dumping Emacs |
| 47 | It takes a substantial time to load the standard Lisp files. Luckily, | 47 | It takes some time to load the standard Lisp files. Luckily, |
| 48 | you don't have to do this each time you run Emacs; @file{temacs} can | 48 | you don't have to do this each time you run Emacs; @file{temacs} can |
| 49 | dump out an executable program called @file{emacs} that has these files | 49 | dump out an executable program called @file{emacs} that has these files |
| 50 | preloaded. @file{emacs} starts more quickly because it does not need to | 50 | preloaded. @file{emacs} starts more quickly because it does not need to |
| @@ -61,23 +61,22 @@ The argument @samp{dump} tells @file{loadup.el} to dump a new executable | |||
| 61 | named @file{emacs}. The variable @code{preloaded-file-list} stores a | 61 | named @file{emacs}. The variable @code{preloaded-file-list} stores a |
| 62 | list of the Lisp files that were dumped with the @file{emacs} executable. | 62 | list of the Lisp files that were dumped with the @file{emacs} executable. |
| 63 | 63 | ||
| 64 | Some operating systems don't support dumping. On those systems, you | 64 | If you port Emacs to a new operating system, and are not able to |
| 65 | must start Emacs with the @samp{temacs -l loadup} command each time you | 65 | implement dumping, then Emacs must load @file{loadup.el} each time it |
| 66 | use it. This takes a substantial time, but since you need to start | 66 | starts. |
| 67 | Emacs once a day at most---or once a week if you never log out---the | ||
| 68 | extra time is not too severe a problem. | ||
| 69 | 67 | ||
| 70 | @cindex @file{site-load.el} | 68 | @cindex @file{site-load.el} |
| 71 | |||
| 72 | You can specify additional files to preload by writing a library named | 69 | You can specify additional files to preload by writing a library named |
| 73 | @file{site-load.el} that loads them. You may need to add a definition | 70 | @file{site-load.el} that loads them. You may need to rebuild Emacs |
| 71 | with an added definition | ||
| 74 | 72 | ||
| 75 | @example | 73 | @example |
| 76 | #define SITELOAD_PURESIZE_EXTRA @var{n} | 74 | #define SITELOAD_PURESIZE_EXTRA @var{n} |
| 77 | @end example | 75 | @end example |
| 78 | 76 | ||
| 79 | @noindent | 77 | @noindent |
| 80 | to make @var{n} added bytes of pure space to hold the additional files. | 78 | to make @var{n} added bytes of pure space to hold the additional files; |
| 79 | see @file{src/puresize.h}. | ||
| 81 | (Try adding increments of 20000 until it is big enough.) However, the | 80 | (Try adding increments of 20000 until it is big enough.) However, the |
| 82 | advantage of preloading additional files decreases as machines get | 81 | advantage of preloading additional files decreases as machines get |
| 83 | faster. On modern machines, it is usually not advisable. | 82 | faster. On modern machines, it is usually not advisable. |
| @@ -108,11 +107,11 @@ Load the files with @file{site-init.el}, then copy the files into the | |||
| 108 | installation directory for Lisp files when you install Emacs. | 107 | installation directory for Lisp files when you install Emacs. |
| 109 | 108 | ||
| 110 | @item | 109 | @item |
| 111 | Specify a non-@code{nil} value for | 110 | Specify a @code{nil} value for @code{byte-compile-dynamic-docstrings} |
| 112 | @code{byte-compile-dynamic-docstrings} as a local variable in each of these | 111 | as a local variable in each of these files, and load them with either |
| 113 | files, and load them with either @file{site-load.el} or | 112 | @file{site-load.el} or @file{site-init.el}. (This method has the |
| 114 | @file{site-init.el}. (This method has the drawback that the | 113 | drawback that the documentation strings take up space in Emacs all the |
| 115 | documentation strings take up space in Emacs all the time.) | 114 | time.) |
| 116 | @end itemize | 115 | @end itemize |
| 117 | 116 | ||
| 118 | It is not advisable to put anything in @file{site-load.el} or | 117 | It is not advisable to put anything in @file{site-load.el} or |
| @@ -121,17 +120,27 @@ expect in an ordinary unmodified Emacs. If you feel you must override | |||
| 121 | normal features for your site, do it with @file{default.el}, so that | 120 | normal features for your site, do it with @file{default.el}, so that |
| 122 | users can override your changes if they wish. @xref{Startup Summary}. | 121 | users can override your changes if they wish. @xref{Startup Summary}. |
| 123 | 122 | ||
| 124 | In a package that can be preloaded, it is sometimes useful to | 123 | In a package that can be preloaded, it is sometimes necessary (or |
| 125 | specify a computation to be done when Emacs subsequently starts up. | 124 | useful) to delay certain evaluations until Emacs subsequently starts |
| 126 | For this, use @code{eval-at-startup}: | 125 | up. The vast majority of such cases relate to the values of |
| 126 | customizable variables. For example, @code{tutorial-directory} is a | ||
| 127 | variable defined in @file{startup.el}, which is preloaded. The default | ||
| 128 | value is set based on @code{data-directory}. The variable needs to | ||
| 129 | access the value of @code{data-directory} when Emacs starts, not when | ||
| 130 | it is dumped, because the Emacs executable has probably been installed | ||
| 131 | in a different location since it was dumped. | ||
| 132 | |||
| 133 | @defun custom-initialize-delay symbol value | ||
| 134 | This function delays the initialization of @var{symbol} to the next | ||
| 135 | Emacs start. You normally use this function by specifying it as the | ||
| 136 | @code{:initialize} property of a customizable variable. (The argument | ||
| 137 | @var{value} is unused, and is provided only for compatiblity with the | ||
| 138 | form Custom expects.) | ||
| 139 | @end defun | ||
| 127 | 140 | ||
| 128 | @defmac eval-at-startup body@dots{} | 141 | In the unlikely event that you need a more general functionality than |
| 129 | This evaluates the @var{body} forms, either immediately if running in | 142 | @code{custom-initialize-delay} provides, you can use |
| 130 | an Emacs that has already started up, or later when Emacs does start | 143 | @code{before-init-hook} (@pxref{Startup Summary}). |
| 131 | up. Since the value of the @var{body} forms is not necessarily | ||
| 132 | available when the @code{eval-at-startup} form is run, that form | ||
| 133 | always returns @code{nil}. | ||
| 134 | @end defmac | ||
| 135 | 144 | ||
| 136 | @defun dump-emacs to-file from-file | 145 | @defun dump-emacs to-file from-file |
| 137 | @cindex unexec | 146 | @cindex unexec |
| @@ -144,15 +153,15 @@ you must run Emacs with @samp{-batch}. | |||
| 144 | @end defun | 153 | @end defun |
| 145 | 154 | ||
| 146 | @node Pure Storage | 155 | @node Pure Storage |
| 147 | @appendixsec Pure Storage | 156 | @section Pure Storage |
| 148 | @cindex pure storage | 157 | @cindex pure storage |
| 149 | 158 | ||
| 150 | Emacs Lisp uses two kinds of storage for user-created Lisp objects: | 159 | Emacs Lisp uses two kinds of storage for user-created Lisp objects: |
| 151 | @dfn{normal storage} and @dfn{pure storage}. Normal storage is where | 160 | @dfn{normal storage} and @dfn{pure storage}. Normal storage is where |
| 152 | all the new data created during an Emacs session are kept; see the | 161 | all the new data created during an Emacs session are kept |
| 153 | following section for information on normal storage. Pure storage is | 162 | (@pxref{Garbage Collection}). Pure storage is used for certain data |
| 154 | used for certain data in the preloaded standard Lisp files---data that | 163 | in the preloaded standard Lisp files---data that should never change |
| 155 | should never change during actual use of Emacs. | 164 | during actual use of Emacs. |
| 156 | 165 | ||
| 157 | Pure storage is allocated only while @file{temacs} is loading the | 166 | Pure storage is allocated only while @file{temacs} is loading the |
| 158 | standard preloaded Lisp libraries. In the file @file{emacs}, it is | 167 | standard preloaded Lisp libraries. In the file @file{emacs}, it is |
| @@ -161,14 +170,14 @@ the memory space can be shared by all the Emacs jobs running on the | |||
| 161 | machine at once. Pure storage is not expandable; a fixed amount is | 170 | machine at once. Pure storage is not expandable; a fixed amount is |
| 162 | allocated when Emacs is compiled, and if that is not sufficient for | 171 | allocated when Emacs is compiled, and if that is not sufficient for |
| 163 | the preloaded libraries, @file{temacs} allocates dynamic memory for | 172 | the preloaded libraries, @file{temacs} allocates dynamic memory for |
| 164 | the part that didn't fit. If that happens, you should increase the | 173 | the part that didn't fit. The resulting image will work, but garbage |
| 165 | compilation parameter @code{PURESIZE} in the file | 174 | collection (@pxref{Garbage Collection}) is disabled in this situation, |
| 166 | @file{src/puresize.h} and rebuild Emacs, even though the resulting | 175 | causing a memory leak. Such an overflow normally won't happen unless |
| 167 | image will work: garbage collection is disabled in this situation, | 176 | you try to preload additional libraries or add features to the |
| 168 | causing a memory leak. Such an overflow normally won't happen unless you | 177 | standard ones. Emacs will display a warning about the overflow when |
| 169 | try to preload additional libraries or add features to the standard | 178 | it starts. If this happens, you should increase the compilation |
| 170 | ones. Emacs will display a warning about the overflow when it | 179 | parameter @code{SYSTEM_PURESIZE_EXTRA} in the file |
| 171 | starts. | 180 | @file{src/puresize.h} and rebuild Emacs. |
| 172 | 181 | ||
| 173 | @defun purecopy object | 182 | @defun purecopy object |
| 174 | This function makes a copy in pure storage of @var{object}, and returns | 183 | This function makes a copy in pure storage of @var{object}, and returns |
| @@ -179,8 +188,7 @@ not make copies of other objects such as symbols, but just returns | |||
| 179 | them unchanged. It signals an error if asked to copy markers. | 188 | them unchanged. It signals an error if asked to copy markers. |
| 180 | 189 | ||
| 181 | This function is a no-op except while Emacs is being built and dumped; | 190 | This function is a no-op except while Emacs is being built and dumped; |
| 182 | it is usually called only in the file @file{emacs/lisp/loaddefs.el}, but | 191 | it is usually called only in preloaded Lisp files. |
| 183 | a few packages call it just in case you decide to preload them. | ||
| 184 | @end defun | 192 | @end defun |
| 185 | 193 | ||
| 186 | @defvar pure-bytes-used | 194 | @defvar pure-bytes-used |
| @@ -205,7 +213,7 @@ You should not change this flag in a running Emacs. | |||
| 205 | @end defvar | 213 | @end defvar |
| 206 | 214 | ||
| 207 | @node Garbage Collection | 215 | @node Garbage Collection |
| 208 | @appendixsec Garbage Collection | 216 | @section Garbage Collection |
| 209 | @cindex garbage collection | 217 | @cindex garbage collection |
| 210 | 218 | ||
| 211 | @cindex memory allocation | 219 | @cindex memory allocation |
| @@ -354,7 +362,7 @@ object consists of a header and the storage for the string text | |||
| 354 | itself; the latter is only allocated when the string is created.) | 362 | itself; the latter is only allocated when the string is created.) |
| 355 | @end table | 363 | @end table |
| 356 | 364 | ||
| 357 | If there was overflow in pure space (see the previous section), | 365 | If there was overflow in pure space (@pxref{Pure Storage}), |
| 358 | @code{garbage-collect} returns @code{nil}, because a real garbage | 366 | @code{garbage-collect} returns @code{nil}, because a real garbage |
| 359 | collection can not be done in this situation. | 367 | collection can not be done in this situation. |
| 360 | @end deffn | 368 | @end deffn |
| @@ -362,7 +370,7 @@ collection can not be done in this situation. | |||
| 362 | @defopt garbage-collection-messages | 370 | @defopt garbage-collection-messages |
| 363 | If this variable is non-@code{nil}, Emacs displays a message at the | 371 | If this variable is non-@code{nil}, Emacs displays a message at the |
| 364 | beginning and end of garbage collection. The default value is | 372 | beginning and end of garbage collection. The default value is |
| 365 | @code{nil}, meaning there are no such messages. | 373 | @code{nil}. |
| 366 | @end defopt | 374 | @end defopt |
| 367 | 375 | ||
| 368 | @defvar post-gc-hook | 376 | @defvar post-gc-hook |
| @@ -381,7 +389,7 @@ that the subsequent garbage collection does not happen immediately when | |||
| 381 | the threshold is exhausted, but only the next time the Lisp evaluator is | 389 | the threshold is exhausted, but only the next time the Lisp evaluator is |
| 382 | called. | 390 | called. |
| 383 | 391 | ||
| 384 | The initial threshold value is 400,000. If you specify a larger | 392 | The initial threshold value is 800,000. If you specify a larger |
| 385 | value, garbage collection will happen less often. This reduces the | 393 | value, garbage collection will happen less often. This reduces the |
| 386 | amount of time spent garbage collecting, but increases total memory use. | 394 | amount of time spent garbage collecting, but increases total memory use. |
| 387 | You may want to do this when running a program that creates lots of | 395 | You may want to do this when running a program that creates lots of |
| @@ -448,7 +456,7 @@ point number. | |||
| 448 | These functions and variables give information about the total amount | 456 | These functions and variables give information about the total amount |
| 449 | of memory allocation that Emacs has done, broken down by data type. | 457 | of memory allocation that Emacs has done, broken down by data type. |
| 450 | Note the difference between these and the values returned by | 458 | Note the difference between these and the values returned by |
| 451 | @code{(garbage-collect)}; those count objects that currently exist, but | 459 | @code{garbage-collect}; those count objects that currently exist, but |
| 452 | these count the number or size of all allocations, including those for | 460 | these count the number or size of all allocations, including those for |
| 453 | objects that have since been freed. | 461 | objects that have since been freed. |
| 454 | 462 | ||
| @@ -494,7 +502,7 @@ Emacs session. | |||
| 494 | @end defvar | 502 | @end defvar |
| 495 | 503 | ||
| 496 | @node Writing Emacs Primitives | 504 | @node Writing Emacs Primitives |
| 497 | @appendixsec Writing Emacs Primitives | 505 | @section Writing Emacs Primitives |
| 498 | @cindex primitive function internals | 506 | @cindex primitive function internals |
| 499 | @cindex writing Emacs primitives | 507 | @cindex writing Emacs primitives |
| 500 | 508 | ||
| @@ -512,7 +520,7 @@ appearance.) | |||
| 512 | @group | 520 | @group |
| 513 | DEFUN ("or", For, Sor, 0, UNEVALLED, 0, | 521 | DEFUN ("or", For, Sor, 0, UNEVALLED, 0, |
| 514 | doc: /* Eval args until one of them yields non-nil, then return that | 522 | doc: /* Eval args until one of them yields non-nil, then return that |
| 515 | value. The remaining args are not evalled at all. | 523 | value. The remaining args are not evalled at all. |
| 516 | If all args return nil, return nil. | 524 | If all args return nil, return nil. |
| 517 | @end group | 525 | @end group |
| 518 | @group | 526 | @group |
| @@ -530,7 +538,7 @@ usage: (or CONDITIONS ...) */) | |||
| 530 | @group | 538 | @group |
| 531 | while (CONSP (args)) | 539 | while (CONSP (args)) |
| 532 | @{ | 540 | @{ |
| 533 | val = Feval (XCAR (args)); | 541 | val = eval_sub (XCAR (args)); |
| 534 | if (!NILP (val)) | 542 | if (!NILP (val)) |
| 535 | break; | 543 | break; |
| 536 | args = XCDR (args); | 544 | args = XCDR (args); |
| @@ -595,6 +603,8 @@ the argument of @code{interactive} in a Lisp function. In the case of | |||
| 595 | called interactively. A value of @code{""} indicates a function that | 603 | called interactively. A value of @code{""} indicates a function that |
| 596 | should receive no arguments when called interactively. If the value | 604 | should receive no arguments when called interactively. If the value |
| 597 | begins with a @samp{(}, the string is evaluated as a Lisp form. | 605 | begins with a @samp{(}, the string is evaluated as a Lisp form. |
| 606 | For examples of the last two forms, see @code{widen} and | ||
| 607 | @code{narrow-to-region} in @file{editfns.c}. | ||
| 598 | 608 | ||
| 599 | @item doc | 609 | @item doc |
| 600 | This is the documentation string. It uses C comment syntax rather | 610 | This is the documentation string. It uses C comment syntax rather |
| @@ -633,19 +643,22 @@ have types @code{int} and @w{@code{Lisp_Object *}}. | |||
| 633 | ``protect'' a variable from garbage collection---to inform the garbage | 643 | ``protect'' a variable from garbage collection---to inform the garbage |
| 634 | collector that it must look in that variable and regard its contents | 644 | collector that it must look in that variable and regard its contents |
| 635 | as an accessible object. GC protection is necessary whenever you call | 645 | as an accessible object. GC protection is necessary whenever you call |
| 636 | @code{Feval} or anything that can directly or indirectly call | 646 | @code{eval_sub} (or @code{Feval}) either directly or indirectly. |
| 637 | @code{Feval}. At such a time, any Lisp object that this function may | 647 | At such a time, any Lisp object that this function may refer to again |
| 638 | refer to again must be protected somehow. | 648 | must be protected somehow. |
| 639 | 649 | ||
| 640 | It suffices to ensure that at least one pointer to each object is | 650 | It suffices to ensure that at least one pointer to each object is |
| 641 | GC-protected; that way, the object cannot be recycled, so all pointers | 651 | GC-protected; that way, the object cannot be recycled, so all pointers |
| 642 | to it remain valid. Thus, a particular local variable can do without | 652 | to it remain valid. Thus, a particular local variable can do without |
| 643 | protection if it is certain that the object it points to will be | 653 | protection if it is certain that the object it points to will be |
| 644 | preserved by some other pointer (such as another local variable which | 654 | preserved by some other pointer (such as another local variable that |
| 645 | has a @code{GCPRO})@footnote{Formerly, strings were a special | 655 | has a @code{GCPRO}). |
| 646 | exception; in older Emacs versions, every local variable that might | 656 | @ignore |
| 647 | point to a string needed a @code{GCPRO}.}. Otherwise, the local | 657 | @footnote{Formerly, strings were a special exception; in older Emacs |
| 648 | variable needs a @code{GCPRO}. | 658 | versions, every local variable that might point to a string needed a |
| 659 | @code{GCPRO}.}. | ||
| 660 | @end ignore | ||
| 661 | Otherwise, the local variable needs a @code{GCPRO}. | ||
| 649 | 662 | ||
| 650 | The macro @code{GCPRO1} protects just one local variable. If you | 663 | The macro @code{GCPRO1} protects just one local variable. If you |
| 651 | want to protect two variables, use @code{GCPRO2} instead; repeating | 664 | want to protect two variables, use @code{GCPRO2} instead; repeating |
| @@ -674,6 +687,7 @@ with initializers are allocated in an area of memory that becomes | |||
| 674 | read-only (on certain operating systems) as a result of dumping Emacs. | 687 | read-only (on certain operating systems) as a result of dumping Emacs. |
| 675 | @xref{Pure Storage}. | 688 | @xref{Pure Storage}. |
| 676 | 689 | ||
| 690 | @c FIXME is this still true? I don't think so... | ||
| 677 | Do not use static variables within functions---place all static | 691 | Do not use static variables within functions---place all static |
| 678 | variables at top level in the file. This is necessary because Emacs on | 692 | variables at top level in the file. This is necessary because Emacs on |
| 679 | some operating systems defines the keyword @code{static} as a null | 693 | some operating systems defines the keyword @code{static} as a null |
| @@ -688,12 +702,11 @@ store a suitable subr object in its function cell. The code looks like | |||
| 688 | this: | 702 | this: |
| 689 | 703 | ||
| 690 | @example | 704 | @example |
| 691 | defsubr (&@var{subr-structure-name}); | 705 | defsubr (&@var{sname}); |
| 692 | @end example | 706 | @end example |
| 693 | 707 | ||
| 694 | @noindent | 708 | @noindent |
| 695 | Here @var{subr-structure-name} is the name you used as the third | 709 | Here @var{sname} is the name you used as the third argument to @code{DEFUN}. |
| 696 | argument to @code{DEFUN}. | ||
| 697 | 710 | ||
| 698 | If you add a new primitive to a file that already has Lisp primitives | 711 | If you add a new primitive to a file that already has Lisp primitives |
| 699 | defined in it, find the function (near the end of the file) named | 712 | defined in it, find the function (near the end of the file) named |
| @@ -718,6 +731,11 @@ with a value that is either @code{t} or @code{nil}. Note that variables | |||
| 718 | defined with @code{DEFVAR_BOOL} are automatically added to the list | 731 | defined with @code{DEFVAR_BOOL} are automatically added to the list |
| 719 | @code{byte-boolean-vars} used by the byte compiler. | 732 | @code{byte-boolean-vars} used by the byte compiler. |
| 720 | 733 | ||
| 734 | @cindex defining customization variables in C | ||
| 735 | If you want to make a Lisp variables that is defined in C behave | ||
| 736 | like one declared with @code{defcustom}, add an appropriate entry to | ||
| 737 | @file{cus-start.el}. | ||
| 738 | |||
| 721 | @cindex @code{staticpro}, protection from GC | 739 | @cindex @code{staticpro}, protection from GC |
| 722 | If you define a file-scope C variable of type @code{Lisp_Object}, | 740 | If you define a file-scope C variable of type @code{Lisp_Object}, |
| 723 | you must protect it from garbage-collection by calling @code{staticpro} | 741 | you must protect it from garbage-collection by calling @code{staticpro} |
| @@ -734,48 +752,53 @@ of macros and functions to manipulate Lisp objects. | |||
| 734 | @smallexample | 752 | @smallexample |
| 735 | @group | 753 | @group |
| 736 | DEFUN ("coordinates-in-window-p", Fcoordinates_in_window_p, | 754 | DEFUN ("coordinates-in-window-p", Fcoordinates_in_window_p, |
| 737 | Scoordinates_in_window_p, 2, 2, | 755 | Scoordinates_in_window_p, 2, 2, 0, |
| 738 | "xSpecify coordinate pair: \nXExpression which evals to window: ", | 756 | doc: /* Return non-nil if COORDINATES are in WINDOW. |
| 739 | "Return non-nil if COORDINATES is in WINDOW.\n\ | 757 | ... |
| 740 | COORDINATES is a cons of the form (X . Y), X and Y being distances\n\ | ||
| 741 | ... | ||
| 742 | @end group | 758 | @end group |
| 743 | @group | 759 | @group |
| 744 | If they are on the border between WINDOW and its right sibling,\n\ | 760 | or `right-margin' is returned. */) |
| 745 | `vertical-line' is returned.") | 761 | (register Lisp_Object coordinates, Lisp_Object window) |
| 746 | (coordinates, window) | ||
| 747 | register Lisp_Object coordinates, window; | ||
| 748 | @{ | 762 | @{ |
| 763 | struct window *w; | ||
| 764 | struct frame *f; | ||
| 749 | int x, y; | 765 | int x, y; |
| 766 | Lisp_Object lx, ly; | ||
| 750 | @end group | 767 | @end group |
| 751 | 768 | ||
| 752 | @group | 769 | @group |
| 753 | CHECK_LIVE_WINDOW (window, 0); | 770 | CHECK_LIVE_WINDOW (window); |
| 754 | CHECK_CONS (coordinates, 1); | 771 | w = XWINDOW (window); |
| 755 | x = XINT (Fcar (coordinates)); | 772 | f = XFRAME (w->frame); |
| 756 | y = XINT (Fcdr (coordinates)); | 773 | CHECK_CONS (coordinates); |
| 774 | lx = Fcar (coordinates); | ||
| 775 | ly = Fcdr (coordinates); | ||
| 776 | CHECK_NUMBER_OR_FLOAT (lx); | ||
| 777 | CHECK_NUMBER_OR_FLOAT (ly); | ||
| 778 | x = FRAME_PIXEL_X_FROM_CANON_X (f, lx) + FRAME_INTERNAL_BORDER_WIDTH(f); | ||
| 779 | y = FRAME_PIXEL_Y_FROM_CANON_Y (f, ly) + FRAME_INTERNAL_BORDER_WIDTH(f); | ||
| 757 | @end group | 780 | @end group |
| 758 | 781 | ||
| 759 | @group | 782 | @group |
| 760 | switch (coordinates_in_window (XWINDOW (window), &x, &y)) | 783 | switch (coordinates_in_window (w, x, y)) |
| 761 | @{ | 784 | @{ |
| 762 | case 0: /* NOT in window at all. */ | 785 | case ON_NOTHING: /* NOT in window at all. */ |
| 763 | return Qnil; | 786 | return Qnil; |
| 764 | @end group | 787 | @end group |
| 765 | 788 | ||
| 766 | @group | 789 | ... |
| 767 | case 1: /* In text part of window. */ | ||
| 768 | return Fcons (make_number (x), make_number (y)); | ||
| 769 | @end group | ||
| 770 | 790 | ||
| 771 | @group | 791 | @group |
| 772 | case 2: /* In mode line of window. */ | 792 | case ON_MODE_LINE: /* In mode line of window. */ |
| 773 | return Qmode_line; | 793 | return Qmode_line; |
| 774 | @end group | 794 | @end group |
| 775 | 795 | ||
| 796 | ... | ||
| 797 | |||
| 776 | @group | 798 | @group |
| 777 | case 3: /* On right border of window. */ | 799 | case ON_SCROLL_BAR: /* On scroll-bar of window. */ |
| 778 | return Qvertical_line; | 800 | /* Historically we are supposed to return nil in this case. */ |
| 801 | return Qnil; | ||
| 779 | @end group | 802 | @end group |
| 780 | 803 | ||
| 781 | @group | 804 | @group |
| @@ -806,14 +829,15 @@ number of arguments. They work by calling @code{Ffuncall}. | |||
| 806 | functions. | 829 | functions. |
| 807 | 830 | ||
| 808 | If you define a function which is side-effect free, update the code | 831 | If you define a function which is side-effect free, update the code |
| 809 | in @file{byte-opt.el} which binds @code{side-effect-free-fns} and | 832 | in @file{byte-opt.el} that binds @code{side-effect-free-fns} and |
| 810 | @code{side-effect-and-error-free-fns} so that the compiler optimizer | 833 | @code{side-effect-and-error-free-fns} so that the compiler optimizer |
| 811 | knows about it. | 834 | knows about it. |
| 812 | 835 | ||
| 813 | @node Object Internals | 836 | @node Object Internals |
| 814 | @appendixsec Object Internals | 837 | @section Object Internals |
| 815 | @cindex object internals | 838 | @cindex object internals |
| 816 | 839 | ||
| 840 | @c FIXME Is this still true? Does --with-wide-int affect anything? | ||
| 817 | GNU Emacs Lisp manipulates many different types of data. The actual | 841 | GNU Emacs Lisp manipulates many different types of data. The actual |
| 818 | data are stored in a heap and the only access that programs have to it | 842 | data are stored in a heap and the only access that programs have to it |
| 819 | is through pointers. Each pointer is 32 bits wide on 32-bit machines, | 843 | is through pointers. Each pointer is 32 bits wide on 32-bit machines, |
| @@ -838,15 +862,15 @@ explicitly using a suitable predicate (@pxref{Type Predicates}). | |||
| 838 | @end menu | 862 | @end menu |
| 839 | 863 | ||
| 840 | @node Buffer Internals | 864 | @node Buffer Internals |
| 841 | @appendixsubsec Buffer Internals | 865 | @subsection Buffer Internals |
| 842 | @cindex internals, of buffer | 866 | @cindex internals, of buffer |
| 843 | @cindex buffer internals | 867 | @cindex buffer internals |
| 844 | 868 | ||
| 845 | Two structures are used to represent buffers in C. The | 869 | Two structures (see @file{buffer.h}) are used to represent buffers |
| 846 | @code{buffer_text} structure contains fields describing the text of a | 870 | in C. The @code{buffer_text} structure contains fields describing the |
| 847 | buffer; the @code{buffer} structure holds other fields. In the case | 871 | text of a buffer; the @code{buffer} structure holds other fields. In |
| 848 | of indirect buffers, two or more @code{buffer} structures reference | 872 | the case of indirect buffers, two or more @code{buffer} structures |
| 849 | the same @code{buffer_text} structure. | 873 | reference the same @code{buffer_text} structure. |
| 850 | 874 | ||
| 851 | Here are some of the fields in @code{struct buffer_text}: | 875 | Here are some of the fields in @code{struct buffer_text}: |
| 852 | 876 | ||
| @@ -904,8 +928,9 @@ The interval tree which records the text properties of this buffer. | |||
| 904 | Some of the fields of @code{struct buffer} are: | 928 | Some of the fields of @code{struct buffer} are: |
| 905 | 929 | ||
| 906 | @table @code | 930 | @table @code |
| 907 | @item next | 931 | @item header |
| 908 | Points to the next buffer, in the chain of all buffers (including | 932 | A @code{struct vectorlike_header} structure where @code{header.next} |
| 933 | points to the next buffer, in the chain of all buffers (including | ||
| 909 | killed buffers). This chain is used only for garbage collection, in | 934 | killed buffers). This chain is used only for garbage collection, in |
| 910 | order to collect killed buffers properly. Note that vectors, and most | 935 | order to collect killed buffers properly. Note that vectors, and most |
| 911 | kinds of objects allocated as vectors, are all on one chain, but | 936 | kinds of objects allocated as vectors, are all on one chain, but |
| @@ -979,6 +1004,8 @@ after the current overlay center. @xref{Managing Overlays}. | |||
| 979 | and @code{overlays_after} is sorted in order of increasing beginning | 1004 | and @code{overlays_after} is sorted in order of increasing beginning |
| 980 | position. | 1005 | position. |
| 981 | 1006 | ||
| 1007 | @c FIXME? the following are now all Lisp_Object BUFFER_INTERNAL_FIELD (foo). | ||
| 1008 | |||
| 982 | @item name | 1009 | @item name |
| 983 | A Lisp string that names the buffer. It is guaranteed to be unique. | 1010 | A Lisp string that names the buffer. It is guaranteed to be unique. |
| 984 | @xref{Buffer Names}. | 1011 | @xref{Buffer Names}. |
| @@ -1001,6 +1028,7 @@ the value of the buffer-local variable @code{buffer-file-name} | |||
| 1001 | @item undo_list | 1028 | @item undo_list |
| 1002 | @itemx backed_up | 1029 | @itemx backed_up |
| 1003 | @itemx auto_save_file_name | 1030 | @itemx auto_save_file_name |
| 1031 | @itemx auto_save_file_format | ||
| 1004 | @itemx read_only | 1032 | @itemx read_only |
| 1005 | @itemx file_format | 1033 | @itemx file_format |
| 1006 | @itemx file_truename | 1034 | @itemx file_truename |
| @@ -1011,8 +1039,7 @@ These fields store the values of Lisp variables that are automatically | |||
| 1011 | buffer-local (@pxref{Buffer-Local Variables}), whose corresponding | 1039 | buffer-local (@pxref{Buffer-Local Variables}), whose corresponding |
| 1012 | variable names have the additional prefix @code{buffer-} and have | 1040 | variable names have the additional prefix @code{buffer-} and have |
| 1013 | underscores replaced with dashes. For instance, @code{undo_list} | 1041 | underscores replaced with dashes. For instance, @code{undo_list} |
| 1014 | stores the value of @code{buffer-undo-list}. @xref{Standard | 1042 | stores the value of @code{buffer-undo-list}. |
| 1015 | Buffer-Local Variables}. | ||
| 1016 | 1043 | ||
| 1017 | @item mark | 1044 | @item mark |
| 1018 | The mark for the buffer. The mark is a marker, hence it is also | 1045 | The mark for the buffer. The mark is a marker, hence it is also |
| @@ -1068,15 +1095,15 @@ when the buffer is not current. | |||
| 1068 | @itemx truncate_lines | 1095 | @itemx truncate_lines |
| 1069 | @itemx word_wrap | 1096 | @itemx word_wrap |
| 1070 | @itemx ctl_arrow | 1097 | @itemx ctl_arrow |
| 1098 | @itemx bidi_display_reordering | ||
| 1099 | @itemx bidi_paragraph_direction | ||
| 1071 | @itemx selective_display | 1100 | @itemx selective_display |
| 1072 | @itemx selective_display_ellipses | 1101 | @itemx selective_display_ellipses |
| 1073 | @itemx overwrite_mode | 1102 | @itemx overwrite_mode |
| 1074 | @itemx abbrev_mode | 1103 | @itemx abbrev_mode |
| 1075 | @itemx display_table | ||
| 1076 | @itemx mark_active | 1104 | @itemx mark_active |
| 1077 | @itemx enable_multibyte_characters | 1105 | @itemx enable_multibyte_characters |
| 1078 | @itemx buffer_file_coding_system | 1106 | @itemx buffer_file_coding_system |
| 1079 | @itemx auto_save_file_format | ||
| 1080 | @itemx cache_long_line_scans | 1107 | @itemx cache_long_line_scans |
| 1081 | @itemx point_before_scroll | 1108 | @itemx point_before_scroll |
| 1082 | @itemx left_fringe_width | 1109 | @itemx left_fringe_width |
| @@ -1095,7 +1122,6 @@ These fields store the values of Lisp variables that are automatically | |||
| 1095 | buffer-local (@pxref{Buffer-Local Variables}), whose corresponding | 1122 | buffer-local (@pxref{Buffer-Local Variables}), whose corresponding |
| 1096 | variable names have underscores replaced with dashes. For instance, | 1123 | variable names have underscores replaced with dashes. For instance, |
| 1097 | @code{mode_line_format} stores the value of @code{mode-line-format}. | 1124 | @code{mode_line_format} stores the value of @code{mode-line-format}. |
| 1098 | @xref{Standard Buffer-Local Variables}. | ||
| 1099 | 1125 | ||
| 1100 | @item last_selected_window | 1126 | @item last_selected_window |
| 1101 | This is the last window that was selected with this buffer in it, or @code{nil} | 1127 | This is the last window that was selected with this buffer in it, or @code{nil} |
| @@ -1103,11 +1129,12 @@ if that window no longer displays this buffer. | |||
| 1103 | @end table | 1129 | @end table |
| 1104 | 1130 | ||
| 1105 | @node Window Internals | 1131 | @node Window Internals |
| 1106 | @appendixsubsec Window Internals | 1132 | @subsection Window Internals |
| 1107 | @cindex internals, of window | 1133 | @cindex internals, of window |
| 1108 | @cindex window internals | 1134 | @cindex window internals |
| 1109 | 1135 | ||
| 1110 | Windows have the following accessible fields: | 1136 | The fields of a window (for a complete list, see the definition of |
| 1137 | @code{struct window} in @file{window.h}) include: | ||
| 1111 | 1138 | ||
| 1112 | @table @code | 1139 | @table @code |
| 1113 | @item frame | 1140 | @item frame |
| @@ -1131,13 +1158,14 @@ leaves of the tree, which actually display buffers. | |||
| 1131 | These fields contain the window's leftmost child and its topmost child | 1158 | These fields contain the window's leftmost child and its topmost child |
| 1132 | respectively. @code{hchild} is used if the window is subdivided | 1159 | respectively. @code{hchild} is used if the window is subdivided |
| 1133 | horizontally by child windows, and @code{vchild} if it is subdivided | 1160 | horizontally by child windows, and @code{vchild} if it is subdivided |
| 1134 | vertically. | 1161 | vertically. In a live window, only one of @code{hchild}, @code{vchild}, |
| 1162 | and @code{buffer} (q.v.) is non-@code{nil}. | ||
| 1135 | 1163 | ||
| 1136 | @item next | 1164 | @item next |
| 1137 | @itemx prev | 1165 | @itemx prev |
| 1138 | The next sibling and previous sibling of this window. @code{next} is | 1166 | The next sibling and previous sibling of this window. @code{next} is |
| 1139 | @code{nil} if the window is the rightmost or bottommost in its group; | 1167 | @code{nil} if the window is the right-most or bottom-most in its group; |
| 1140 | @code{prev} is @code{nil} if it is the leftmost or topmost in its | 1168 | @code{prev} is @code{nil} if it is the left-most or top-most in its |
| 1141 | group. | 1169 | group. |
| 1142 | 1170 | ||
| 1143 | @item left_col | 1171 | @item left_col |
| @@ -1208,11 +1236,19 @@ window was last updated. | |||
| 1208 | @item vertical_scroll_bar | 1236 | @item vertical_scroll_bar |
| 1209 | This window's vertical scroll bar. | 1237 | This window's vertical scroll bar. |
| 1210 | 1238 | ||
| 1211 | @item left_margin_width | 1239 | @item left_margin_cols |
| 1212 | @itemx right_margin_width | 1240 | @itemx right_margin_cols |
| 1213 | The widths of the left and right margins in this window. A value of | 1241 | The widths of the left and right margins in this window. A value of |
| 1214 | @code{nil} means to use the buffer's value of @code{left-margin-width} | 1242 | @code{nil} means no margin. |
| 1215 | or @code{right-margin-width}. | 1243 | |
| 1244 | @item left_fringe_width | ||
| 1245 | @itemx right_fringe_width | ||
| 1246 | The widths of the left and right fringes in this window. A value of | ||
| 1247 | @code{nil} or @code{t} means use the values of the frame. | ||
| 1248 | |||
| 1249 | @item fringes_outside_margins | ||
| 1250 | A non-@code{nil} value means the fringes outside the display margins; | ||
| 1251 | othersize they are between the margin and the text. | ||
| 1216 | 1252 | ||
| 1217 | @item window_end_pos | 1253 | @item window_end_pos |
| 1218 | This is computed as @code{z} minus the buffer position of the last glyph | 1254 | This is computed as @code{z} minus the buffer position of the last glyph |
| @@ -1228,7 +1264,7 @@ The window-relative vertical position of the line containing | |||
| 1228 | 1264 | ||
| 1229 | @item window_end_valid | 1265 | @item window_end_valid |
| 1230 | This field is set to a non-@code{nil} value if @code{window_end_pos} is truly | 1266 | This field is set to a non-@code{nil} value if @code{window_end_pos} is truly |
| 1231 | valid. This is @code{nil} if nontrivial redisplay is preempted since in that | 1267 | valid. This is @code{nil} if nontrivial redisplay is pre-empted, since in that |
| 1232 | case the display that @code{window_end_pos} was computed for did not get | 1268 | case the display that @code{window_end_pos} was computed for did not get |
| 1233 | onto the screen. | 1269 | onto the screen. |
| 1234 | 1270 | ||
| @@ -1242,13 +1278,19 @@ The value of @code{cursor} as of the last redisplay that finished. | |||
| 1242 | A structure describing where the cursor of this window physically is. | 1278 | A structure describing where the cursor of this window physically is. |
| 1243 | 1279 | ||
| 1244 | @item phys_cursor_type | 1280 | @item phys_cursor_type |
| 1245 | The type of cursor that was last displayed on this window. | 1281 | @c FIXME What is this? |
| 1282 | @c itemx phys_cursor_ascent | ||
| 1283 | @itemx phys_cursor_height | ||
| 1284 | @itemx phys_cursor_width | ||
| 1285 | The type, height, and width of the cursor that was last displayed on | ||
| 1286 | this window. | ||
| 1246 | 1287 | ||
| 1247 | @item phys_cursor_on_p | 1288 | @item phys_cursor_on_p |
| 1248 | This field is non-zero if the cursor is physically on. | 1289 | This field is non-zero if the cursor is physically on. |
| 1249 | 1290 | ||
| 1250 | @item cursor_off_p | 1291 | @item cursor_off_p |
| 1251 | Non-zero means the cursor in this window is logically on. | 1292 | Non-zero means the cursor in this window is logically off. This is |
| 1293 | used for blinking the cursor. | ||
| 1252 | 1294 | ||
| 1253 | @item last_cursor_off_p | 1295 | @item last_cursor_off_p |
| 1254 | This field contains the value of @code{cursor_off_p} as of the time of | 1296 | This field contains the value of @code{cursor_off_p} as of the time of |
| @@ -1279,7 +1321,8 @@ This is used for displaying the line number of point in the mode line. | |||
| 1279 | 1321 | ||
| 1280 | @item base_line_pos | 1322 | @item base_line_pos |
| 1281 | The position in the buffer for which the line number is known, or | 1323 | The position in the buffer for which the line number is known, or |
| 1282 | @code{nil} meaning none is known. | 1324 | @code{nil} meaning none is known. If it is a buffer, don't display |
| 1325 | the line number as long as the window shows that buffer. | ||
| 1283 | 1326 | ||
| 1284 | @item region_showing | 1327 | @item region_showing |
| 1285 | If the region (or part of it) is highlighted in this window, this field | 1328 | If the region (or part of it) is highlighted in this window, this field |
| @@ -1291,18 +1334,17 @@ The column number currently displayed in this window's mode line, or @code{nil} | |||
| 1291 | if column numbers are not being displayed. | 1334 | if column numbers are not being displayed. |
| 1292 | 1335 | ||
| 1293 | @item current_matrix | 1336 | @item current_matrix |
| 1294 | A glyph matrix describing the current display of this window. | 1337 | @itemx desired_matrix |
| 1295 | 1338 | Glyph matrices describing the current and desired display of this window. | |
| 1296 | @item desired_matrix | ||
| 1297 | A glyph matrix describing the desired display of this window. | ||
| 1298 | @end table | 1339 | @end table |
| 1299 | 1340 | ||
| 1300 | @node Process Internals | 1341 | @node Process Internals |
| 1301 | @appendixsubsec Process Internals | 1342 | @subsection Process Internals |
| 1302 | @cindex internals, of process | 1343 | @cindex internals, of process |
| 1303 | @cindex process internals | 1344 | @cindex process internals |
| 1304 | 1345 | ||
| 1305 | The fields of a process are: | 1346 | The fields of a process (for a complete list, see the definition of |
| 1347 | @code{struct Lisp_Process} in @file{process.h}) include: | ||
| 1306 | 1348 | ||
| 1307 | @table @code | 1349 | @table @code |
| 1308 | @item name | 1350 | @item name |
| @@ -1314,21 +1356,24 @@ process. For a network or serial process, it is @code{nil} if the | |||
| 1314 | process is running or @code{t} if the process is stopped. | 1356 | process is running or @code{t} if the process is stopped. |
| 1315 | 1357 | ||
| 1316 | @item filter | 1358 | @item filter |
| 1317 | A function used to accept output from the process instead of a buffer, | 1359 | If non-@code{nil}, a function used to accept output from the process |
| 1318 | or @code{nil}. | 1360 | instead of a buffer. |
| 1319 | 1361 | ||
| 1320 | @item sentinel | 1362 | @item sentinel |
| 1321 | A function called whenever the process receives a signal, or @code{nil}. | 1363 | If non-@code{nil}, a function called whenever the state of the process |
| 1364 | changes. | ||
| 1322 | 1365 | ||
| 1323 | @item buffer | 1366 | @item buffer |
| 1324 | The associated buffer of the process. | 1367 | The associated buffer of the process. |
| 1325 | 1368 | ||
| 1326 | @item pid | 1369 | @item pid |
| 1327 | An integer, the operating system's process @acronym{ID}. | 1370 | An integer, the operating system's process @acronym{ID}. |
| 1371 | Pseudo-processes such as network or serial connections use a value of 0. | ||
| 1328 | 1372 | ||
| 1329 | @item childp | 1373 | @item childp |
| 1330 | A flag, non-@code{nil} if this is really a child process. | 1374 | A flag, @code{t} if this is really a child process. For a network or |
| 1331 | It is @code{nil} for a network or serial connection. | 1375 | serial connection, it is a plist based on the arguments to |
| 1376 | @code{make-network-process} or @code{make-serial-process}. | ||
| 1332 | 1377 | ||
| 1333 | @item mark | 1378 | @item mark |
| 1334 | A marker indicating the position of the end of the last output from this | 1379 | A marker indicating the position of the end of the last output from this |
| @@ -1339,10 +1384,8 @@ of the buffer. | |||
| 1339 | If this is non-zero, killing Emacs while this process is still running | 1384 | If this is non-zero, killing Emacs while this process is still running |
| 1340 | does not ask for confirmation about killing the process. | 1385 | does not ask for confirmation about killing the process. |
| 1341 | 1386 | ||
| 1342 | @item raw_status_low | 1387 | @item raw_status |
| 1343 | @itemx raw_status_high | 1388 | The raw process status, as returned by the @code{wait} system call. |
| 1344 | These two fields record 16 bits each of the process status returned by | ||
| 1345 | the @code{wait} system call. | ||
| 1346 | 1389 | ||
| 1347 | @item status | 1390 | @item status |
| 1348 | The process status, as @code{process-status} should return it. | 1391 | The process status, as @code{process-status} should return it. |
| @@ -1363,11 +1406,6 @@ The file descriptor for input from the process. | |||
| 1363 | @item outfd | 1406 | @item outfd |
| 1364 | The file descriptor for output to the process. | 1407 | The file descriptor for output to the process. |
| 1365 | 1408 | ||
| 1366 | @item subtty | ||
| 1367 | The file descriptor for the terminal that the subprocess is using. (On | ||
| 1368 | some systems, there is no need to record this, so the value is | ||
| 1369 | @code{nil}.) | ||
| 1370 | |||
| 1371 | @item tty_name | 1409 | @item tty_name |
| 1372 | The name of the terminal that the subprocess is using, | 1410 | The name of the terminal that the subprocess is using, |
| 1373 | or @code{nil} if it is using pipes. | 1411 | or @code{nil} if it is using pipes. |
| @@ -1387,15 +1425,14 @@ Coding-system for encoding the output to this process. | |||
| 1387 | @item encoding_buf | 1425 | @item encoding_buf |
| 1388 | A working buffer for encoding. | 1426 | A working buffer for encoding. |
| 1389 | 1427 | ||
| 1390 | @item encoding_carryover | ||
| 1391 | Size of carryover in encoding. | ||
| 1392 | |||
| 1393 | @item inherit_coding_system_flag | 1428 | @item inherit_coding_system_flag |
| 1394 | Flag to set @code{coding-system} of the process buffer from the | 1429 | Flag to set @code{coding-system} of the process buffer from the |
| 1395 | coding system used to decode process output. | 1430 | coding system used to decode process output. |
| 1396 | 1431 | ||
| 1397 | @item type | 1432 | @item type |
| 1398 | Symbol indicating the type of process: @code{real}, @code{network}, | 1433 | Symbol indicating the type of process: @code{real}, @code{network}, |
| 1399 | @code{serial} | 1434 | @code{serial}. |
| 1400 | 1435 | ||
| 1401 | @end table | 1436 | @end table |
| 1437 | |||
| 1438 | @c FIXME Mention src/globals.h somewhere in this file? | ||
diff --git a/doc/lispref/intro.texi b/doc/lispref/intro.texi index a68bcfa0fe7..365c5f3122e 100644 --- a/doc/lispref/intro.texi +++ b/doc/lispref/intro.texi | |||
| @@ -522,16 +522,16 @@ The minor version number of Emacs, as an integer. For Emacs version | |||
| 522 | @node Acknowledgements | 522 | @node Acknowledgements |
| 523 | @section Acknowledgements | 523 | @section Acknowledgements |
| 524 | 524 | ||
| 525 | This manual was written by Robert Krawitz, Bil Lewis, Dan LaLiberte, | 525 | This manual was originally written by Robert Krawitz, Bil Lewis, Dan |
| 526 | Richard@tie{}M. Stallman and Chris Welty, the volunteers of the GNU | 526 | LaLiberte, Richard@tie{}M. Stallman and Chris Welty, the volunteers of |
| 527 | manual group, in an effort extending over several years. | 527 | the GNU manual group, in an effort extending over several years. |
| 528 | Robert@tie{}J. Chassell helped to review and edit the manual, with the | 528 | Robert@tie{}J. Chassell helped to review and edit the manual, with the |
| 529 | support of the Defense Advanced Research Projects Agency, ARPA Order | 529 | support of the Defense Advanced Research Projects Agency, ARPA Order |
| 530 | 6082, arranged by Warren@tie{}A. Hunt, Jr.@: of Computational Logic, | 530 | 6082, arranged by Warren@tie{}A. Hunt, Jr.@: of Computational Logic, |
| 531 | Inc. Additional sections were written by Miles Bader, Lars Brinkhoff, | 531 | Inc. Additional sections have since been written by Miles Bader, Lars |
| 532 | Chong Yidong, Kenichi Handa, Lute Kamstra, Juri Linkov, Glenn Morris, | 532 | Brinkhoff, Chong Yidong, Kenichi Handa, Lute Kamstra, Juri Linkov, |
| 533 | Thien-Thi Nguyen, Dan Nicolaescu, Martin Rudalics, Kim F. Storm, Luc | 533 | Glenn Morris, Thien-Thi Nguyen, Dan Nicolaescu, Martin Rudalics, Kim |
| 534 | Teirlinck, and Eli Zaretskii. | 534 | F. Storm, Luc Teirlinck, and Eli Zaretskii, and others. |
| 535 | 535 | ||
| 536 | Corrections were supplied by Drew Adams, Juanma Barranquero, Karl | 536 | Corrections were supplied by Drew Adams, Juanma Barranquero, Karl |
| 537 | Berry, Jim Blandy, Bard Bloom, Stephane Boucher, David Boyes, Alan | 537 | Berry, Jim Blandy, Bard Bloom, Stephane Boucher, David Boyes, Alan |
| @@ -546,3 +546,6 @@ Friedrich Pukelsheim, Arnold D. Robbins, Raul Rockwell, Jason Rumney, | |||
| 546 | Per Starbäck, Shinichirou Sugou, Kimmo Suominen, Edward Tharp, Bill | 546 | Per Starbäck, Shinichirou Sugou, Kimmo Suominen, Edward Tharp, Bill |
| 547 | Trost, Rickard Westman, Jean White, Eduard Wiebe, Matthew Wilding, | 547 | Trost, Rickard Westman, Jean White, Eduard Wiebe, Matthew Wilding, |
| 548 | Carl Witty, Dale Worley, Rusty Wright, and David D. Zuhn. | 548 | Carl Witty, Dale Worley, Rusty Wright, and David D. Zuhn. |
| 549 | |||
| 550 | For a more complete list of contributors, please see the relevant | ||
| 551 | ChangeLog file in the Emacs sources. | ||
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index 5652d94114e..669f058ef13 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | @c -*-texinfo-*- | 1 | @c -*-texinfo-*- |
| 2 | @c This is part of the GNU Emacs Lisp Reference Manual. | 2 | @c This is part of the GNU Emacs Lisp Reference Manual. |
| 3 | @c Copyright (C) 1990-1994, 1998-2012 Free Software Foundation, Inc. | 3 | @c Copyright (C) 1990-1994, 1998-2012 Free Software Foundation, Inc. |
| 4 | @c See the file elisp.texi for copying conditions. | 4 | @c See the file elisp.texi for copying conditions. |
| 5 | @setfilename ../../info/keymaps | 5 | @setfilename ../../info/keymaps |
| 6 | @node Keymaps, Modes, Command Loop, Top | 6 | @node Keymaps, Modes, Command Loop, Top |
| @@ -686,7 +686,7 @@ and exit commands. @xref{Intro to Minibuffers}. | |||
| 686 | Emacs has other keymaps that are used in a different way---translating | 686 | Emacs has other keymaps that are used in a different way---translating |
| 687 | events within @code{read-key-sequence}. @xref{Translation Keymaps}. | 687 | events within @code{read-key-sequence}. @xref{Translation Keymaps}. |
| 688 | 688 | ||
| 689 | @xref{Standard Keymaps}, for a list of standard keymaps. | 689 | @xref{Standard Keymaps}, for a list of some standard keymaps. |
| 690 | 690 | ||
| 691 | @defun current-active-maps &optional olp position | 691 | @defun current-active-maps &optional olp position |
| 692 | This returns the list of active keymaps that would be used by the | 692 | This returns the list of active keymaps that would be used by the |
diff --git a/doc/lispref/locals.texi b/doc/lispref/locals.texi deleted file mode 100644 index a075d955add..00000000000 --- a/doc/lispref/locals.texi +++ /dev/null | |||
| @@ -1,217 +0,0 @@ | |||
| 1 | @c -*-texinfo-*- | ||
| 2 | @c This is part of the GNU Emacs Lisp Reference Manual. | ||
| 3 | @c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc. | ||
| 4 | @c See the file elisp.texi for copying conditions. | ||
| 5 | @setfilename ../../info/locals | ||
| 6 | @node Standard Buffer-Local Variables, Standard Keymaps, Standard Errors, Top | ||
| 7 | @appendix Buffer-Local Variables | ||
| 8 | @c The title "Standard Buffer-Local Variables" is too long for | ||
| 9 | @c smallbook. --rjc 30mar92 | ||
| 10 | @cindex buffer-local variables, general-purpose | ||
| 11 | @cindex standard buffer-local variables | ||
| 12 | |||
| 13 | The table below lists the general-purpose Emacs variables that | ||
| 14 | automatically become buffer-local in each buffer. Most become | ||
| 15 | buffer-local only when set; a few of them are always local in every | ||
| 16 | buffer. Many Lisp packages define such variables for their internal | ||
| 17 | use, but we don't try to list them all here. | ||
| 18 | |||
| 19 | Every buffer-specific minor mode defines a buffer-local variable | ||
| 20 | named @samp{@var{modename}-mode}. @xref{Minor Mode Conventions}. | ||
| 21 | Minor mode variables will not be listed here. | ||
| 22 | |||
| 23 | @table @code | ||
| 24 | @item auto-fill-function | ||
| 25 | @xref{Auto Filling}. | ||
| 26 | |||
| 27 | @item buffer-auto-save-file-format | ||
| 28 | @xref{Format Conversion}. | ||
| 29 | |||
| 30 | @item buffer-auto-save-file-name | ||
| 31 | @xref{Auto-Saving}. | ||
| 32 | |||
| 33 | @item buffer-backed-up | ||
| 34 | @xref{Making Backups}. | ||
| 35 | |||
| 36 | @item buffer-display-count | ||
| 37 | @xref{Buffers and Windows}. | ||
| 38 | |||
| 39 | @item buffer-display-table | ||
| 40 | @xref{Active Display Table}. | ||
| 41 | |||
| 42 | @item buffer-display-time | ||
| 43 | @xref{Buffers and Windows}. | ||
| 44 | |||
| 45 | @item buffer-file-coding-system | ||
| 46 | @xref{Encoding and I/O}. | ||
| 47 | |||
| 48 | @item buffer-file-format | ||
| 49 | @xref{Format Conversion}. | ||
| 50 | |||
| 51 | @item buffer-file-name | ||
| 52 | @xref{Buffer File Name}. | ||
| 53 | |||
| 54 | @item buffer-file-number | ||
| 55 | @xref{Buffer File Name}. | ||
| 56 | |||
| 57 | @item buffer-file-truename | ||
| 58 | @xref{Buffer File Name}. | ||
| 59 | |||
| 60 | @item buffer-file-type | ||
| 61 | @xref{MS-DOS File Types}. | ||
| 62 | |||
| 63 | @item buffer-invisibility-spec | ||
| 64 | @xref{Invisible Text}. | ||
| 65 | |||
| 66 | @item buffer-offer-save | ||
| 67 | @xref{Killing Buffers}. | ||
| 68 | |||
| 69 | @item buffer-save-without-query | ||
| 70 | @xref{Killing Buffers}. | ||
| 71 | |||
| 72 | @item buffer-read-only | ||
| 73 | @xref{Read Only Buffers}. | ||
| 74 | |||
| 75 | @item buffer-saved-size | ||
| 76 | @xref{Auto-Saving}. | ||
| 77 | |||
| 78 | @item buffer-undo-list | ||
| 79 | @xref{Undo}. | ||
| 80 | |||
| 81 | @item cache-long-line-scans | ||
| 82 | @xref{Truncation}. | ||
| 83 | |||
| 84 | @item case-fold-search | ||
| 85 | @xref{Searching and Case}. | ||
| 86 | |||
| 87 | @item comment-column | ||
| 88 | @xref{Comments,,, emacs, The GNU Emacs Manual}. | ||
| 89 | |||
| 90 | @item ctl-arrow | ||
| 91 | @xref{Usual Display}. | ||
| 92 | |||
| 93 | @item cursor-in-non-selected-windows | ||
| 94 | @xref{Basic Windows}. | ||
| 95 | |||
| 96 | @item cursor-type | ||
| 97 | @xref{Cursor Parameters}. | ||
| 98 | |||
| 99 | @item default-directory | ||
| 100 | @xref{File Name Expansion}. | ||
| 101 | |||
| 102 | @item defun-prompt-regexp | ||
| 103 | @xref{List Motion}. | ||
| 104 | |||
| 105 | @item desktop-save-buffer | ||
| 106 | @xref{Desktop Save Mode}. | ||
| 107 | |||
| 108 | @item enable-multibyte-characters | ||
| 109 | @ref{Text Representations}. | ||
| 110 | |||
| 111 | @item fill-column | ||
| 112 | @xref{Margins}. | ||
| 113 | |||
| 114 | @item fill-prefix | ||
| 115 | @xref{Margins}. | ||
| 116 | |||
| 117 | @item font-lock-defaults | ||
| 118 | @xref{Font Lock Basics}. | ||
| 119 | |||
| 120 | @item fringe-cursor-alist | ||
| 121 | @xref{Fringe Cursors}. | ||
| 122 | |||
| 123 | @item fringe-indicator-alist | ||
| 124 | @xref{Fringe Indicators}. | ||
| 125 | |||
| 126 | @item fringes-outside-margins | ||
| 127 | @xref{Fringes}. | ||
| 128 | |||
| 129 | @item goal-column | ||
| 130 | @xref{Moving Point,,, emacs, The GNU Emacs Manual}. | ||
| 131 | |||
| 132 | @item header-line-format | ||
| 133 | @xref{Header Lines}. | ||
| 134 | |||
| 135 | @item indicate-buffer-boundaries | ||
| 136 | @xref{Usual Display}. | ||
| 137 | |||
| 138 | @item indicate-empty-lines | ||
| 139 | @xref{Usual Display}. | ||
| 140 | |||
| 141 | @item left-fringe-width | ||
| 142 | @xref{Fringe Size/Pos}. | ||
| 143 | |||
| 144 | @item left-margin | ||
| 145 | @xref{Margins}. | ||
| 146 | |||
| 147 | @item left-margin-width | ||
| 148 | @xref{Display Margins}. | ||
| 149 | |||
| 150 | @item line-spacing | ||
| 151 | @xref{Line Height}. | ||
| 152 | |||
| 153 | @item local-abbrev-table | ||
| 154 | @xref{Standard Abbrev Tables}. | ||
| 155 | |||
| 156 | @item major-mode | ||
| 157 | @xref{Mode Help}. | ||
| 158 | |||
| 159 | @item mark-active | ||
| 160 | @xref{The Mark}. | ||
| 161 | |||
| 162 | @item mark-ring | ||
| 163 | @xref{The Mark}. | ||
| 164 | |||
| 165 | @item mode-line-buffer-identification | ||
| 166 | @xref{Mode Line Variables}. | ||
| 167 | |||
| 168 | @item mode-line-format | ||
| 169 | @xref{Mode Line Data}. | ||
| 170 | |||
| 171 | @item mode-line-modified | ||
| 172 | @xref{Mode Line Variables}. | ||
| 173 | |||
| 174 | @item mode-line-process | ||
| 175 | @xref{Mode Line Variables}. | ||
| 176 | |||
| 177 | @item mode-name | ||
| 178 | @xref{Mode Line Variables}. | ||
| 179 | |||
| 180 | @item point-before-scroll | ||
| 181 | Used for communication between mouse commands and scroll-bar commands. | ||
| 182 | |||
| 183 | @item right-fringe-width | ||
| 184 | @xref{Fringe Size/Pos}. | ||
| 185 | |||
| 186 | @item right-margin-width | ||
| 187 | @xref{Display Margins}. | ||
| 188 | |||
| 189 | @item save-buffer-coding-system | ||
| 190 | @xref{Encoding and I/O}. | ||
| 191 | |||
| 192 | @item scroll-bar-width | ||
| 193 | @xref{Scroll Bars}. | ||
| 194 | |||
| 195 | @item scroll-down-aggressively | ||
| 196 | @itemx scroll-up-aggressively | ||
| 197 | @xref{Textual Scrolling}. | ||
| 198 | |||
| 199 | @item selective-display | ||
| 200 | @itemx selective-display-ellipses | ||
| 201 | @xref{Selective Display}. | ||
| 202 | |||
| 203 | @item tab-width | ||
| 204 | @xref{Usual Display}. | ||
| 205 | |||
| 206 | @item truncate-lines | ||
| 207 | @xref{Truncation}. | ||
| 208 | |||
| 209 | @item vertical-scroll-bar | ||
| 210 | @xref{Scroll Bars}. | ||
| 211 | |||
| 212 | @item window-size-fixed | ||
| 213 | @xref{Resizing Windows}. | ||
| 214 | |||
| 215 | @item write-contents-functions | ||
| 216 | @xref{Saving Buffers}. | ||
| 217 | @end table | ||
diff --git a/doc/lispref/makefile.w32-in b/doc/lispref/makefile.w32-in index 11b6beab84d..0a4aea2d7e0 100644 --- a/doc/lispref/makefile.w32-in +++ b/doc/lispref/makefile.w32-in | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # -*- Makefile -*- for the GNU Emacs Lisp Reference Manual. | 1 | # -*- Makefile -*- for the GNU Emacs Lisp Reference Manual. |
| 2 | 2 | ||
| 3 | # Copyright (C) 2003-2012 Free Software Foundation, Inc. | 3 | # Copyright (C) 2003-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | # This file is part of GNU Emacs. | 5 | # This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -72,7 +72,6 @@ srcs = \ | |||
| 72 | $(srcdir)/keymaps.texi \ | 72 | $(srcdir)/keymaps.texi \ |
| 73 | $(srcdir)/lists.texi \ | 73 | $(srcdir)/lists.texi \ |
| 74 | $(srcdir)/loading.texi \ | 74 | $(srcdir)/loading.texi \ |
| 75 | $(srcdir)/locals.texi \ | ||
| 76 | $(srcdir)/macros.texi \ | 75 | $(srcdir)/macros.texi \ |
| 77 | $(srcdir)/maps.texi \ | 76 | $(srcdir)/maps.texi \ |
| 78 | $(srcdir)/markers.texi \ | 77 | $(srcdir)/markers.texi \ |
diff --git a/doc/lispref/maps.texi b/doc/lispref/maps.texi index 24cd64a6b35..b303562028b 100644 --- a/doc/lispref/maps.texi +++ b/doc/lispref/maps.texi | |||
| @@ -1,39 +1,40 @@ | |||
| 1 | @c -*-texinfo-*- | 1 | @c -*-texinfo-*- |
| 2 | @c This is part of the GNU Emacs Lisp Reference Manual. | 2 | @c This is part of the GNU Emacs Lisp Reference Manual. |
| 3 | @c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc. | 3 | @c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc. |
| 4 | @c See the file elisp.texi for copying conditions. | 4 | @c See the file elisp.texi for copying conditions. |
| 5 | @setfilename ../../info/maps | 5 | @setfilename ../../info/maps |
| 6 | @node Standard Keymaps, Standard Hooks, Standard Buffer-Local Variables, Top | 6 | @node Standard Keymaps, Standard Hooks, Standard Errors, Top |
| 7 | @appendix Standard Keymaps | 7 | @appendix Standard Keymaps |
| 8 | @cindex standard keymaps | 8 | @cindex keymaps, standard |
| 9 | 9 | ||
| 10 | The following symbols are used as the names for various keymaps. | 10 | In this section we list some of the more general keymaps. Many of |
| 11 | Some of these exist when Emacs is first started, others are | 11 | these exist when Emacs is first started, but some are loaded only when |
| 12 | loaded only when their respective mode is used. This is not | 12 | the respective feature is accessed. |
| 13 | an exhaustive list. | ||
| 14 | 13 | ||
| 15 | Several keymaps are used in the minibuffer. @xref{Completion Commands}. | 14 | There are many other, more specialized, maps than these; in particular |
| 16 | 15 | those associated with major and minor modes. The minibuffer uses | |
| 17 | Almost all of these maps are used as local maps. Indeed, of the modes | 16 | several keymaps (@pxref{Completion Commands}). For more details on |
| 18 | that presently exist, only Vip mode and Terminal mode ever change the | 17 | keymaps, @pxref{Keymaps}. |
| 19 | global keymap. | ||
| 20 | 18 | ||
| 19 | @c Don't list individual major mode keymaps here, only more general things. | ||
| 20 | @c Only add vindex for things not covered elsewhere in this manual. | ||
| 21 | @c Don't add xrefs to things covered in {Keymaps}. | ||
| 21 | @table @code | 22 | @table @code |
| 22 | @item apropos-mode-map | 23 | @item 2C-mode-map |
| 23 | @vindex apropos-mode-map | 24 | A sparse keymap for subcommands of the prefix @kbd{C-x 6}.@* |
| 24 | A sparse keymap for @code{apropos} buffers. | 25 | @xref{Two-Column,, Two-Column Editing, emacs, The GNU Emacs Manual}. |
| 25 | 26 | ||
| 26 | @item Buffer-menu-mode-map | 27 | @item abbrev-map |
| 27 | @vindex Buffer-menu-mode-map | 28 | @vindex abbrev-map |
| 28 | A full keymap used by Buffer Menu mode. | 29 | A sparse keymap for subcommands of the prefix @kbd{C-x a}.@* |
| 30 | @xref{Defining Abbrevs,,, emacs, The GNU Emacs Manual}. | ||
| 29 | 31 | ||
| 30 | @item c-mode-map | 32 | @item button-buffer-map |
| 31 | @vindex c-mode-map | 33 | A sparse keymap useful for buffers containing buffers.@* |
| 32 | A sparse keymap used by C mode. | 34 | You may want to use this as a parent keymap. @xref{Buttons}. |
| 33 | 35 | ||
| 34 | @item command-history-map | 36 | @item button-map |
| 35 | @vindex command-history-map | 37 | A sparse keymap used by buttons. |
| 36 | A full keymap used by Command History mode. | ||
| 37 | 38 | ||
| 38 | @item ctl-x-4-map | 39 | @item ctl-x-4-map |
| 39 | A sparse keymap for subcommands of the prefix @kbd{C-x 4}. | 40 | A sparse keymap for subcommands of the prefix @kbd{C-x 4}. |
| @@ -44,196 +45,155 @@ A sparse keymap for subcommands of the prefix @kbd{C-x 5}. | |||
| 44 | @item ctl-x-map | 45 | @item ctl-x-map |
| 45 | A full keymap for @kbd{C-x} commands. | 46 | A full keymap for @kbd{C-x} commands. |
| 46 | 47 | ||
| 47 | @item custom-mode-map | 48 | @item ctl-x-r-map |
| 48 | A full keymap for Custom mode. | 49 | @vindex ctl-x-r-map |
| 49 | 50 | A sparse keymap for subcommands of the prefix @kbd{C-x r}.@* | |
| 50 | @item debugger-mode-map | 51 | @xref{Registers,,, emacs, The GNU Emacs Manual}. |
| 51 | @vindex debugger-mode-map | ||
| 52 | A full keymap used by Debugger mode. | ||
| 53 | |||
| 54 | @item dired-mode-map | ||
| 55 | @vindex dired-mode-map | ||
| 56 | A full keymap for @code{dired-mode} buffers. | ||
| 57 | |||
| 58 | @item edit-abbrevs-map | ||
| 59 | @vindex edit-abbrevs-map | ||
| 60 | A sparse keymap used in @code{edit-abbrevs}. | ||
| 61 | |||
| 62 | @item edit-tab-stops-map | ||
| 63 | @vindex edit-tab-stops-map | ||
| 64 | A sparse keymap used in @code{edit-tab-stops}. | ||
| 65 | |||
| 66 | @item electric-buffer-menu-mode-map | ||
| 67 | @vindex electric-buffer-menu-mode-map | ||
| 68 | A full keymap used by Electric Buffer Menu mode. | ||
| 69 | |||
| 70 | @item electric-history-map | ||
| 71 | @vindex electric-history-map | ||
| 72 | A full keymap used by Electric Command History mode. | ||
| 73 | |||
| 74 | @item emacs-lisp-mode-map | ||
| 75 | @vindex emacs-lisp-mode-map | ||
| 76 | A sparse keymap used by Emacs Lisp mode. | ||
| 77 | 52 | ||
| 78 | @item esc-map | 53 | @item esc-map |
| 79 | A full keymap for @kbd{ESC} (or @kbd{Meta}) commands. | 54 | A full keymap for @kbd{ESC} (or @kbd{Meta}) commands. |
| 80 | 55 | ||
| 81 | @item facemenu-menu | 56 | @item facemenu-keymap |
| 82 | @vindex facemenu-menu | 57 | A sparse keymap used for the @kbd{M-o} prefix key. |
| 83 | The sparse keymap that displays the Text Properties menu. | ||
| 84 | |||
| 85 | @item facemenu-background-menu | ||
| 86 | @vindex facemenu-background-menu | ||
| 87 | The sparse keymap that displays the Background Color submenu of the Text | ||
| 88 | Properties menu. | ||
| 89 | |||
| 90 | @item facemenu-face-menu | ||
| 91 | @vindex facemenu-face-menu | ||
| 92 | The sparse keymap that displays the Face submenu of the Text Properties menu. | ||
| 93 | 58 | ||
| 94 | @item facemenu-foreground-menu | 59 | @item function-key-map |
| 95 | @vindex facemenu-foreground-menu | 60 | The parent keymap of all @code{local-function-key-map} (q.v.) instances. |
| 96 | The sparse keymap that displays the Foreground Color submenu of the Text | ||
| 97 | Properties menu. | ||
| 98 | |||
| 99 | @item facemenu-indentation-menu | ||
| 100 | @vindex facemenu-indentation-menu | ||
| 101 | The sparse keymap that displays the Indentation submenu of the Text | ||
| 102 | Properties menu. | ||
| 103 | |||
| 104 | @item facemenu-justification-menu | ||
| 105 | @vindex facemenu-justification-menu | ||
| 106 | The sparse keymap that displays the Justification submenu of the Text | ||
| 107 | Properties menu. | ||
| 108 | |||
| 109 | @item facemenu-special-menu | ||
| 110 | @vindex facemenu-special-menu | ||
| 111 | The sparse keymap that displays the Special Props submenu of the Text | ||
| 112 | Properties menu. | ||
| 113 | |||
| 114 | @item local-function-key-map | ||
| 115 | The keymap for translating key sequences to preferred alternatives.@* | ||
| 116 | If there are none, then it contains an empty sparse keymap. | ||
| 117 | @xref{Translation Keymaps}. | ||
| 118 | 61 | ||
| 62 | @ignore | ||
| 63 | @c Doesn't exist. | ||
| 119 | @item fundamental-mode-map | 64 | @item fundamental-mode-map |
| 120 | @vindex fundamental-mode-map | 65 | @vindex fundamental-mode-map |
| 121 | The sparse keymap for Fundamental mode.@* | 66 | The sparse keymap for Fundamental mode.@* |
| 122 | It is empty and should not be changed. | 67 | It is empty and should not be changed. |
| 68 | @end ignore | ||
| 123 | 69 | ||
| 124 | @item global-map | 70 | @item global-map |
| 125 | The full keymap containing default global key bindings.@* | 71 | The full keymap containing default global key bindings.@* |
| 126 | Modes should not modify the Global map. | 72 | Modes should not modify the Global map. |
| 127 | 73 | ||
| 128 | @item grep-mode-map | 74 | @item goto-map |
| 129 | @vindex grep-mode-map | 75 | A sparse keymap used for the @kbd{M-g} prefix key. |
| 130 | The keymap for @code{grep-mode} buffers. | ||
| 131 | 76 | ||
| 132 | @item help-map | 77 | @item help-map |
| 133 | The sparse keymap for the keys that follow the help character @kbd{C-h}. | 78 | A sparse keymap for the keys following the help character @kbd{C-h}.@* |
| 134 | 79 | @xref{Help Functions}. | |
| 135 | @item help-mode-map | ||
| 136 | @vindex help-mode-map | ||
| 137 | The sparse keymap for Help mode. | ||
| 138 | 80 | ||
| 139 | @item Helper-help-map | 81 | @item Helper-help-map |
| 140 | @vindex Helper-help-map | ||
| 141 | A full keymap used by the help utility package.@* | 82 | A full keymap used by the help utility package.@* |
| 142 | It has the same keymap in its value cell and in its function | 83 | It has the same keymap in its value cell and in its function cell. |
| 143 | cell. | ||
| 144 | |||
| 145 | @item Info-edit-map | ||
| 146 | @vindex Info-edit-map | ||
| 147 | A sparse keymap used by the @code{Info-edit} command. | ||
| 148 | |||
| 149 | @item Info-mode-map | ||
| 150 | @vindex Info-mode-map | ||
| 151 | A sparse keymap containing Info commands. | ||
| 152 | 84 | ||
| 153 | @item input-decode-map | 85 | @item input-decode-map |
| 154 | The keymap for translating keypad and function keys.@* | 86 | The keymap for translating keypad and function keys.@* |
| 155 | If there are none, then it contains an empty sparse keymap. | 87 | If there are none, then it contains an empty sparse keymap. |
| 156 | @xref{Translation Keymaps}. | 88 | @xref{Translation Keymaps}. |
| 157 | 89 | ||
| 158 | @item isearch-mode-map | ||
| 159 | @vindex isearch-mode-map | ||
| 160 | A keymap that defines the characters you can type within incremental | ||
| 161 | search. | ||
| 162 | |||
| 163 | @item key-translation-map | 90 | @item key-translation-map |
| 164 | A keymap for translating keys. This one overrides ordinary key | 91 | A keymap for translating keys. This one overrides ordinary key |
| 165 | bindings, unlike @code{local-function-key-map}. @xref{Translation | 92 | bindings, unlike @code{local-function-key-map}. @xref{Translation |
| 166 | Keymaps}. | 93 | Keymaps}. |
| 167 | 94 | ||
| 168 | @item kmacro-map | 95 | @item kmacro-keymap |
| 169 | @vindex kmacro-map | 96 | @vindex kmacro-keymap |
| 170 | A sparse keymap for keys that follows the @kbd{C-x C-k} prefix | 97 | A sparse keymap for keys that follows the @kbd{C-x C-k} prefix search.@* |
| 171 | search. | 98 | @xref{Keyboard Macros,,, emacs, The GNU Emacs Manual}. |
| 172 | |||
| 173 | @item lisp-interaction-mode-map | ||
| 174 | @vindex lisp-interaction-mode-map | ||
| 175 | A sparse keymap used by Lisp Interaction mode. | ||
| 176 | 99 | ||
| 177 | @item lisp-mode-map | 100 | @item local-function-key-map |
| 178 | @vindex lisp-mode-map | 101 | The keymap for translating key sequences to preferred alternatives.@* |
| 179 | A sparse keymap used by Lisp mode. | 102 | If there are none, then it contains an empty sparse keymap. |
| 180 | 103 | @xref{Translation Keymaps}. | |
| 181 | @item menu-bar-edit-menu | ||
| 182 | @vindex menu-bar-edit-menu | ||
| 183 | The keymap which displays the Edit menu in the menu bar. | ||
| 184 | 104 | ||
| 185 | @item menu-bar-file-menu | 105 | @item menu-bar-file-menu |
| 106 | @itemx menu-bar-edit-menu | ||
| 107 | @itemx menu-bar-options-menu | ||
| 108 | @itemx global-buffers-menu-map | ||
| 109 | @itemx menu-bar-tools-menu | ||
| 110 | @itemx menu-bar-help-menu | ||
| 111 | @cindex menu bar keymaps | ||
| 186 | @vindex menu-bar-file-menu | 112 | @vindex menu-bar-file-menu |
| 187 | The keymap which displays the File menu in the menu bar. | 113 | @vindex menu-bar-options-menu |
| 188 | 114 | @vindex global-buffers-menu-map | |
| 189 | @item menu-bar-help-menu | ||
| 190 | @vindex menu-bar-help-menu | ||
| 191 | The keymap which displays the Help menu in the menu bar. | ||
| 192 | |||
| 193 | @item menu-bar-mule-menu | ||
| 194 | @vindex menu-bar-mule-menu | ||
| 195 | The keymap which displays the Mule menu in the menu bar. | ||
| 196 | |||
| 197 | @item menu-bar-search-menu | ||
| 198 | @vindex menu-bar-search-menu | ||
| 199 | The keymap which displays the Search menu in the menu bar. | ||
| 200 | |||
| 201 | @item menu-bar-tools-menu | ||
| 202 | @vindex menu-bar-tools-menu | 115 | @vindex menu-bar-tools-menu |
| 203 | The keymap which displays the Tools menu in the menu bar. | 116 | @vindex menu-bar-help-menu |
| 117 | These keymaps display the main, top-level menus in the menu bar.@* | ||
| 118 | Some of them contain sub-menus. For example, the Edit menu contains | ||
| 119 | @code{menu-bar-search-menu}, etc. @xref{Menu Bar}. | ||
| 120 | @ignore | ||
| 121 | TODO list all submenus? | ||
| 122 | There are probably too many, and it would not be useful to do so, eg: | ||
| 123 | The Edit menu includes @code{yank-menu}, @code{menu-bar-search-menu}, | ||
| 124 | @code{menu-bar-replace-menu}, @code{menu-bar-goto-menu}, | ||
| 125 | @code{menu-bar-bookmark-map}, and @code{facemenu-menu}. | ||
| 126 | There is also mule-menu-keymap, set-coding-system-map, | ||
| 127 | setup-language-environment-map, describe-language-environment-map, | ||
| 128 | menu-bar-epatch-menu, menu-bar-ediff-merge-menu, menu-bar-ediff-menu, etc. | ||
| 129 | @end ignore | ||
| 130 | |||
| 131 | @item minibuffer-inactive-mode-map | ||
| 132 | A full keymap used in the minibuffer when it is not active.@* | ||
| 133 | @xref{Minibuffer Edit,, Editing in the Minibuffer, emacs, The GNU Emacs Manual}. | ||
| 134 | |||
| 135 | @item mode-line-coding-system-map | ||
| 136 | @itemx mode-line-input-method-map | ||
| 137 | @itemx mode-line-column-line-number-mode-map | ||
| 138 | @vindex mode-line-coding-system-map | ||
| 139 | @vindex mode-line-input-method-map | ||
| 140 | @vindex mode-line-column-line-number-mode-map | ||
| 141 | These keymaps control various areas of the mode line.@* | ||
| 142 | @xref{Mode Line Format}. | ||
| 204 | 143 | ||
| 205 | @item mode-specific-map | 144 | @item mode-specific-map |
| 206 | The keymap for characters following @kbd{C-c}. Note, this is in the | 145 | The keymap for characters following @kbd{C-c}. Note, this is in the |
| 207 | global map. This map is not actually mode specific: its name was chosen | 146 | global map. This map is not actually mode-specific: its name was chosen |
| 208 | to be informative for the user in @kbd{C-h b} (@code{display-bindings}), | 147 | to be informative in @kbd{C-h b} (@code{display-bindings}), |
| 209 | where it describes the main use of the @kbd{C-c} prefix key. | 148 | where it describes the main use of the @kbd{C-c} prefix key. |
| 210 | 149 | ||
| 211 | @item multi-query-replace-map | 150 | @c FIXME - don't mention this one? |
| 212 | A sparse keymap that extends @code{query-replace-map} for multi-buffer | 151 | @item mouse-appearance-menu-map |
| 213 | replacements. @xref{Search and Replace, query-replace-map}. | 152 | @vindex mouse-appearance-menu-map |
| 153 | A sparse keymap used for the @kbd{S-mouse-1} key. | ||
| 154 | |||
| 155 | @item mule-keymap | ||
| 156 | The global keymap used for the @kbd{C-x @key{RET}} prefix key. | ||
| 214 | 157 | ||
| 215 | @item occur-mode-map | 158 | @item narrow-map |
| 216 | @vindex occur-mode-map | 159 | @vindex narrow-map |
| 217 | A sparse keymap used by Occur mode. | 160 | A sparse keymap for subcommands of the prefix @kbd{C-x n}. |
| 161 | |||
| 162 | @item prog-mode-map | ||
| 163 | The keymap used by Prog mode.@* | ||
| 164 | @xref{Basic Major Modes}. | ||
| 218 | 165 | ||
| 219 | @item query-replace-map | 166 | @item query-replace-map |
| 167 | @itemx multi-query-replace-map | ||
| 220 | A sparse keymap used for responses in @code{query-replace} and related | 168 | A sparse keymap used for responses in @code{query-replace} and related |
| 221 | commands; also for @code{y-or-n-p} and @code{map-y-or-n-p}. The functions | 169 | commands; also for @code{y-or-n-p} and @code{map-y-or-n-p}. The functions |
| 222 | that use this map do not support prefix keys; they look up one event at a | 170 | that use this map do not support prefix keys; they look up one event at a |
| 223 | time. | 171 | time. @code{multi-query-replace-map} extends @code{query-replace-map} |
| 172 | for multi-buffer replacements. @xref{Search and Replace, query-replace-map}. | ||
| 224 | 173 | ||
| 225 | @item search-map | 174 | @item search-map |
| 226 | A sparse keymap that provides global bindings for search-related | 175 | A sparse keymap that provides global bindings for search-related commands. |
| 227 | commands. | ||
| 228 | 176 | ||
| 229 | @item text-mode-map | 177 | @item special-mode-map |
| 230 | @vindex text-mode-map | 178 | The keymap used by Special mode.@* |
| 231 | A sparse keymap used by Text mode. | 179 | @xref{Basic Major Modes}. |
| 232 | 180 | ||
| 233 | @item tool-bar-map | 181 | @item tool-bar-map |
| 234 | The keymap defining the contents of the tool bar. | 182 | The keymap defining the contents of the tool bar.@* |
| 183 | @xref{Tool Bar}. | ||
| 184 | |||
| 185 | @item universal-argument-map | ||
| 186 | @vindex universal-argument-map | ||
| 187 | A sparse keymap used while processing @kbd{C-u}.@* | ||
| 188 | @xref{Prefix Command Arguments}. | ||
| 189 | |||
| 190 | @item vc-prefix-map | ||
| 191 | The global keymap used for the @kbd{C-x v} prefix key. | ||
| 192 | |||
| 193 | @item x-alternatives-map | ||
| 194 | @vindex x-alternatives-map | ||
| 195 | @findex x-setup-function-keys | ||
| 196 | A sparse keymap used to map certain keys under graphical frames.@* | ||
| 197 | The function @code{x-setup-function-keys} uses this. | ||
| 235 | 198 | ||
| 236 | @item view-mode-map | ||
| 237 | @vindex view-mode-map | ||
| 238 | A full keymap used by View mode. | ||
| 239 | @end table | 199 | @end table |
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index a4ee6f8327f..b0e9d4a3139 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | @c -*-texinfo-*- | 1 | @c -*-texinfo-*- |
| 2 | @c This is part of the GNU Emacs Lisp Reference Manual. | 2 | @c This is part of the GNU Emacs Lisp Reference Manual. |
| 3 | @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. | 3 | @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. |
| 4 | @c See the file elisp.texi for copying conditions. | 4 | @c See the file elisp.texi for copying conditions. |
| 5 | @setfilename ../../info/modes | 5 | @setfilename ../../info/modes |
| 6 | @node Modes, Documentation, Keymaps, Top | 6 | @node Modes, Documentation, Keymaps, Top |
| @@ -38,7 +38,7 @@ user. For related topics such as keymaps and syntax tables, see | |||
| 38 | to be called on a particular occasion by an existing program. Emacs | 38 | to be called on a particular occasion by an existing program. Emacs |
| 39 | provides hooks for the sake of customization. Most often, hooks are set | 39 | provides hooks for the sake of customization. Most often, hooks are set |
| 40 | up in the init file (@pxref{Init File}), but Lisp programs can set them also. | 40 | up in the init file (@pxref{Init File}), but Lisp programs can set them also. |
| 41 | @xref{Standard Hooks}, for a list of standard hook variables. | 41 | @xref{Standard Hooks}, for a list of some standard hook variables. |
| 42 | 42 | ||
| 43 | @cindex normal hook | 43 | @cindex normal hook |
| 44 | Most of the hooks in Emacs are @dfn{normal hooks}. These variables | 44 | Most of the hooks in Emacs are @dfn{normal hooks}. These variables |
| @@ -1596,7 +1596,7 @@ where @var{get} is an expression that returns the current state, | |||
| 1596 | and @var{set} is a function of one argument (a state) that sets it. | 1596 | and @var{set} is a function of one argument (a state) that sets it. |
| 1597 | 1597 | ||
| 1598 | @item :after-hook @var{after-hook} | 1598 | @item :after-hook @var{after-hook} |
| 1599 | This defines a single lisp form which is evaluated after the mode hooks | 1599 | This defines a single Lisp form which is evaluated after the mode hooks |
| 1600 | have run. It should not be quoted. | 1600 | have run. It should not be quoted. |
| 1601 | @end table | 1601 | @end table |
| 1602 | 1602 | ||
| @@ -4030,8 +4030,3 @@ Here @var{desktop-buffer-misc} is the value returned by the function | |||
| 4030 | optionally bound to @code{desktop-save-buffer}. | 4030 | optionally bound to @code{desktop-save-buffer}. |
| 4031 | @end defvar | 4031 | @end defvar |
| 4032 | 4032 | ||
| 4033 | @ignore | ||
| 4034 | Local Variables: | ||
| 4035 | fill-column: 72 | ||
| 4036 | End: | ||
| 4037 | @end ignore | ||
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi index 995a4d89352..ba4803c73f2 100644 --- a/doc/lispref/objects.texi +++ b/doc/lispref/objects.texi | |||
| @@ -370,7 +370,7 @@ with other programming languages. Unlike some other languages, Emacs | |||
| 370 | Lisp supports this syntax only in character literals and strings. | 370 | Lisp supports this syntax only in character literals and strings. |
| 371 | 371 | ||
| 372 | @cindex @samp{\} in character constant | 372 | @cindex @samp{\} in character constant |
| 373 | @cindex backslash in character constant | 373 | @cindex backslash in character constants |
| 374 | @cindex octal character code | 374 | @cindex octal character code |
| 375 | The most general read syntax for a character represents the | 375 | The most general read syntax for a character represents the |
| 376 | character code in either octal or hex. To use octal, write a question | 376 | character code in either octal or hex. To use octal, write a question |
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index e63300cfac4..f7df5f4bf87 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -101,8 +101,8 @@ even earlier than this.) | |||
| 101 | It runs the normal hook @code{before-init-hook}. | 101 | It runs the normal hook @code{before-init-hook}. |
| 102 | 102 | ||
| 103 | @item | 103 | @item |
| 104 | It initializes the window frame and faces, if appropriate, and turns | 104 | It initializes the initial frame's faces, and turns on the menu bar |
| 105 | on the menu bar and tool bar, if the initial frame needs them. | 105 | and tool bar if needed. |
| 106 | 106 | ||
| 107 | @item | 107 | @item |
| 108 | It loads the library @file{site-start}, if it exists. This is not | 108 | It loads the library @file{site-start}, if it exists. This is not |
| @@ -144,7 +144,7 @@ If the buffer @samp{*scratch*} exists and is still in Fundamental mode | |||
| 144 | @code{initial-major-mode}. | 144 | @code{initial-major-mode}. |
| 145 | 145 | ||
| 146 | @item | 146 | @item |
| 147 | If started on a text-only terminal, it loads the terminal-specific | 147 | If started on a text terminal, it loads the terminal-specific |
| 148 | Lisp library, which is specified by the variable | 148 | Lisp library, which is specified by the variable |
| 149 | @code{term-file-prefix} (@pxref{Terminal-Specific}). This is not done | 149 | @code{term-file-prefix} (@pxref{Terminal-Specific}). This is not done |
| 150 | in @code{--batch} mode, nor if @code{term-file-prefix} is @code{nil}. | 150 | in @code{--batch} mode, nor if @code{term-file-prefix} is @code{nil}. |
| @@ -600,7 +600,7 @@ directly does not run this hook. | |||
| 600 | @subsection Suspending Emacs | 600 | @subsection Suspending Emacs |
| 601 | @cindex suspending Emacs | 601 | @cindex suspending Emacs |
| 602 | 602 | ||
| 603 | On text-only terminals, it is possible to @dfn{suspend Emacs}, which | 603 | On text terminals, it is possible to @dfn{suspend Emacs}, which |
| 604 | means stopping Emacs temporarily and returning control to its superior | 604 | means stopping Emacs temporarily and returning control to its superior |
| 605 | process, which is usually the shell. This allows you to resume | 605 | process, which is usually the shell. This allows you to resume |
| 606 | editing later in the same Emacs process, with the same buffers, the | 606 | editing later in the same Emacs process, with the same buffers, the |
| @@ -740,10 +740,10 @@ terminal object, a frame (meaning the terminal for that frame), or | |||
| 740 | 740 | ||
| 741 | @deffn Command suspend-frame | 741 | @deffn Command suspend-frame |
| 742 | This command @dfn{suspends} a frame. For GUI frames, it calls | 742 | This command @dfn{suspends} a frame. For GUI frames, it calls |
| 743 | @code{iconify-frame} (@pxref{Visibility of Frames}); for text-only | 743 | @code{iconify-frame} (@pxref{Visibility of Frames}); for frames on |
| 744 | frames, it calls either @code{suspend-emacs} or @code{suspend-tty}, | 744 | text terminals, it calls either @code{suspend-emacs} or |
| 745 | depending on whether the frame is displayed on the controlling | 745 | @code{suspend-tty}, depending on whether the frame is displayed on the |
| 746 | terminal device or not. | 746 | controlling terminal device or not. |
| 747 | @end deffn | 747 | @end deffn |
| 748 | 748 | ||
| 749 | @node System Environment | 749 | @node System Environment |
diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index 29b338369e5..99722c93902 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi | |||
| @@ -372,18 +372,17 @@ This function returns the number of lines between the positions | |||
| 372 | 1, even if @var{start} and @var{end} are on the same line. This is | 372 | 1, even if @var{start} and @var{end} are on the same line. This is |
| 373 | because the text between them, considered in isolation, must contain at | 373 | because the text between them, considered in isolation, must contain at |
| 374 | least one line unless it is empty. | 374 | least one line unless it is empty. |
| 375 | @end defun | ||
| 375 | 376 | ||
| 376 | Here is an example of using @code{count-lines}: | 377 | @deffn Command count-words start end |
| 378 | @cindex words in region | ||
| 379 | This function returns the number of words between the positions | ||
| 380 | @var{start} and @var{end} in the current buffer. | ||
| 377 | 381 | ||
| 378 | @example | 382 | This function can also be called interactively. In that case, it |
| 379 | @group | 383 | prints a message reporting the number of lines, words, and characters |
| 380 | (defun current-line () | 384 | in the buffer, or in the region if the region is active. |
| 381 | "Return the vertical position of point@dots{}" | 385 | @end deffn |
| 382 | (+ (count-lines (window-start) (point)) | ||
| 383 | (if (= (current-column) 0) 1 0))) | ||
| 384 | @end group | ||
| 385 | @end example | ||
| 386 | @end defun | ||
| 387 | 386 | ||
| 388 | @defun line-number-at-pos &optional pos | 387 | @defun line-number-at-pos &optional pos |
| 389 | @cindex line number | 388 | @cindex line number |
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 8b25868cfe9..04aa50ebc84 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -2712,7 +2712,7 @@ Unsigned integer in network byte order, with length 3. | |||
| 2712 | @itemx dword | 2712 | @itemx dword |
| 2713 | @itemx long | 2713 | @itemx long |
| 2714 | Unsigned integer in network byte order, with length 4. | 2714 | Unsigned integer in network byte order, with length 4. |
| 2715 | Note: These values may be limited by Emacs' integer implementation limits. | 2715 | Note: These values may be limited by Emacs's integer implementation limits. |
| 2716 | 2716 | ||
| 2717 | @item u16r | 2717 | @item u16r |
| 2718 | @itemx u24r | 2718 | @itemx u24r |
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index 3dc777897c1..5bda1940b51 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi | |||
| @@ -559,6 +559,7 @@ through @samp{f} and @samp{A} through @samp{F}. | |||
| 559 | 559 | ||
| 560 | @node Regexp Backslash | 560 | @node Regexp Backslash |
| 561 | @subsubsection Backslash Constructs in Regular Expressions | 561 | @subsubsection Backslash Constructs in Regular Expressions |
| 562 | @cindex backslash in regular expressions | ||
| 562 | 563 | ||
| 563 | For the most part, @samp{\} followed by any character matches only | 564 | For the most part, @samp{\} followed by any character matches only |
| 564 | that character. However, there are several exceptions: certain | 565 | that character. However, there are several exceptions: certain |
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index ad1f622bfac..5874a848807 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi | |||
| @@ -58,7 +58,7 @@ Separate the prefix from the rest of the name with a hyphen, @samp{-}. | |||
| 58 | This practice helps avoid name conflicts, since all global variables | 58 | This practice helps avoid name conflicts, since all global variables |
| 59 | in Emacs Lisp share the same name space, and all functions share | 59 | in Emacs Lisp share the same name space, and all functions share |
| 60 | another name space@footnote{The benefits of a Common Lisp-style | 60 | another name space@footnote{The benefits of a Common Lisp-style |
| 61 | package system are considered not to outweigh the costs.} | 61 | package system are considered not to outweigh the costs.}. |
| 62 | 62 | ||
| 63 | Occasionally, for a command name intended for users to use, it is more | 63 | Occasionally, for a command name intended for users to use, it is more |
| 64 | convenient if some words come before the package's name prefix. And | 64 | convenient if some words come before the package's name prefix. And |
| @@ -110,6 +110,17 @@ called before the first use of the macro in the file. @xref{Compiling | |||
| 110 | Macros}. | 110 | Macros}. |
| 111 | 111 | ||
| 112 | @item | 112 | @item |
| 113 | Avoid loading additional libraries at run time unless they are really | ||
| 114 | needed. If your file simply cannot work without some other library, | ||
| 115 | then just @code{require} that library at the top-level and be done | ||
| 116 | with it. But if your file contains several independent features, and | ||
| 117 | only one or two require the extra library, then consider putting | ||
| 118 | @code{require} statements inside the relevant functions rather than at | ||
| 119 | the top-level. Or use @code{autoload} statements to load the extra | ||
| 120 | library when needed. This way people who don't use those aspects of | ||
| 121 | your file do not need to load the extra library. | ||
| 122 | |||
| 123 | @item | ||
| 113 | Please don't require the @code{cl} package of Common Lisp extensions at | 124 | Please don't require the @code{cl} package of Common Lisp extensions at |
| 114 | run time. Use of this package is optional, and it is not part of the | 125 | run time. Use of this package is optional, and it is not part of the |
| 115 | standard Emacs namespace. If your package loads @code{cl} at run time, | 126 | standard Emacs namespace. If your package loads @code{cl} at run time, |
| @@ -194,11 +205,8 @@ replacements differs from that of the originals. | |||
| 194 | 205 | ||
| 195 | @item | 206 | @item |
| 196 | Constructs that define a function or variable should be macros, | 207 | Constructs that define a function or variable should be macros, |
| 197 | not functions, and their names should start with @samp{def}. | 208 | not functions, and their names should start with @samp{define-}. |
| 198 | 209 | The macro should receive the name to be | |
| 199 | @item | ||
| 200 | A macro that defines a function or variable should have a name that | ||
| 201 | starts with @samp{define-}. The macro should receive the name to be | ||
| 202 | defined as the first argument. That will help various tools find the | 210 | defined as the first argument. That will help various tools find the |
| 203 | definition automatically. Avoid constructing the names in the macro | 211 | definition automatically. Avoid constructing the names in the macro |
| 204 | itself, since that would confuse these tools. | 212 | itself, since that would confuse these tools. |
| @@ -207,7 +215,7 @@ itself, since that would confuse these tools. | |||
| 207 | In some other systems there is a convention of choosing variable names | 215 | In some other systems there is a convention of choosing variable names |
| 208 | that begin and end with @samp{*}. We don't use that convention in Emacs | 216 | that begin and end with @samp{*}. We don't use that convention in Emacs |
| 209 | Lisp, so please don't use it in your programs. (Emacs uses such names | 217 | Lisp, so please don't use it in your programs. (Emacs uses such names |
| 210 | only for special-purpose buffers.) The users will find Emacs more | 218 | only for special-purpose buffers.) People will find Emacs more |
| 211 | coherent if all libraries use the same conventions. | 219 | coherent if all libraries use the same conventions. |
| 212 | 220 | ||
| 213 | @item | 221 | @item |
| @@ -216,7 +224,7 @@ constants, you should make sure Emacs always decodes these characters | |||
| 216 | the same way, regardless of the user's settings. The easiest way to | 224 | the same way, regardless of the user's settings. The easiest way to |
| 217 | do this is to use the coding system @code{utf-8-emacs} (@pxref{Coding | 225 | do this is to use the coding system @code{utf-8-emacs} (@pxref{Coding |
| 218 | System Basics}), and specify that coding in the @samp{-*-} line or the | 226 | System Basics}), and specify that coding in the @samp{-*-} line or the |
| 219 | local variables list. @xref{File variables, , Local Variables in | 227 | local variables list. @xref{File Variables, , Local Variables in |
| 220 | Files, emacs, The GNU Emacs Manual}. | 228 | Files, emacs, The GNU Emacs Manual}. |
| 221 | 229 | ||
| 222 | @example | 230 | @example |
| @@ -224,8 +232,7 @@ Files, emacs, The GNU Emacs Manual}. | |||
| 224 | @end example | 232 | @end example |
| 225 | 233 | ||
| 226 | @item | 234 | @item |
| 227 | Indent each function with @kbd{C-M-q} (@code{indent-sexp}) using the | 235 | Indent the file using the default indentation parameters. |
| 228 | default indentation parameters. | ||
| 229 | 236 | ||
| 230 | @item | 237 | @item |
| 231 | Don't make a habit of putting close-parentheses on lines by | 238 | Don't make a habit of putting close-parentheses on lines by |
| @@ -233,29 +240,8 @@ themselves; Lisp programmers find this disconcerting. | |||
| 233 | 240 | ||
| 234 | @item | 241 | @item |
| 235 | Please put a copyright notice and copying permission notice on the | 242 | Please put a copyright notice and copying permission notice on the |
| 236 | file if you distribute copies. Use a notice like this one: | 243 | file if you distribute copies. @xref{Library Headers}. |
| 237 | |||
| 238 | @smallexample | ||
| 239 | ;; Copyright (C) @var{year} @var{name} | ||
| 240 | |||
| 241 | ;; This program is free software: you can redistribute it and/or | ||
| 242 | ;; modify it under the terms of the GNU General Public License as | ||
| 243 | ;; published by the Free Software Foundation, either version 3 of | ||
| 244 | ;; the License, or (at your option) any later version. | ||
| 245 | 244 | ||
| 246 | ;; This program is distributed in the hope that it will be useful, | ||
| 247 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 248 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 249 | ;; GNU General Public License for more details. | ||
| 250 | |||
| 251 | ;; You should have received a copy of the GNU General Public License | ||
| 252 | ;; along with this program. If not, see | ||
| 253 | ;; <http://www.gnu.org/licenses/>. | ||
| 254 | @end smallexample | ||
| 255 | |||
| 256 | If you have signed papers to assign the copyright to the Foundation, | ||
| 257 | then use @samp{Free Software Foundation, Inc.} as @var{name}. | ||
| 258 | Otherwise, use your name. @xref{Library Headers}. | ||
| 259 | @end itemize | 245 | @end itemize |
| 260 | 246 | ||
| 261 | @node Key Binding Conventions | 247 | @node Key Binding Conventions |
| @@ -324,11 +310,11 @@ Similarly, don't bind a key sequence ending in @key{C-g}, since that | |||
| 324 | is commonly used to cancel a key sequence. | 310 | is commonly used to cancel a key sequence. |
| 325 | 311 | ||
| 326 | @item | 312 | @item |
| 327 | Anything which acts like a temporary mode or state which the user can | 313 | Anything that acts like a temporary mode or state that the user can |
| 328 | enter and leave should define @kbd{@key{ESC} @key{ESC}} or | 314 | enter and leave should define @kbd{@key{ESC} @key{ESC}} or |
| 329 | @kbd{@key{ESC} @key{ESC} @key{ESC}} as a way to escape. | 315 | @kbd{@key{ESC} @key{ESC} @key{ESC}} as a way to escape. |
| 330 | 316 | ||
| 331 | For a state which accepts ordinary Emacs commands, or more generally any | 317 | For a state that accepts ordinary Emacs commands, or more generally any |
| 332 | kind of state in which @key{ESC} followed by a function key or arrow key | 318 | kind of state in which @key{ESC} followed by a function key or arrow key |
| 333 | is potentially meaningful, then you must not define @kbd{@key{ESC} | 319 | is potentially meaningful, then you must not define @kbd{@key{ESC} |
| 334 | @key{ESC}}, since that would preclude recognizing an escape sequence | 320 | @key{ESC}}, since that would preclude recognizing an escape sequence |
| @@ -398,8 +384,8 @@ An error message should start with a capital letter but should not end | |||
| 398 | with a period. | 384 | with a period. |
| 399 | 385 | ||
| 400 | @item | 386 | @item |
| 401 | A question asked in the minibuffer with @code{y-or-n-p} or | 387 | A question asked in the minibuffer with @code{yes-or-no-p} or |
| 402 | @code{yes-or-no-p} should start with a capital letter and end with | 388 | @code{y-or-n-p} should start with a capital letter and end with |
| 403 | @samp{? }. | 389 | @samp{? }. |
| 404 | 390 | ||
| 405 | @item | 391 | @item |
| @@ -457,10 +443,9 @@ to generate such messages. | |||
| 457 | 443 | ||
| 458 | @item | 444 | @item |
| 459 | Try to avoid using recursive edits. Instead, do what the Rmail @kbd{e} | 445 | Try to avoid using recursive edits. Instead, do what the Rmail @kbd{e} |
| 460 | command does: use a new local keymap that contains one command defined | 446 | command does: use a new local keymap that contains a command defined |
| 461 | to switch back to the old local keymap. Or do what the | 447 | to switch back to the old local keymap. Or simply switch to another |
| 462 | @code{edit-options} command does: switch to another buffer and let the | 448 | buffer and let the user switch back at will. @xref{Recursive Editing}. |
| 463 | user switch back at will. @xref{Recursive Editing}. | ||
| 464 | @end itemize | 449 | @end itemize |
| 465 | 450 | ||
| 466 | @node Compilation Tips | 451 | @node Compilation Tips |
| @@ -515,6 +500,10 @@ compiled specially (@pxref{Array Functions}): | |||
| 515 | @end group | 500 | @end group |
| 516 | @end example | 501 | @end example |
| 517 | 502 | ||
| 503 | @noindent | ||
| 504 | Note that in this case (and many others), you must first load the | ||
| 505 | @file{bytecomp} library, which defines the @code{byte-compile} property. | ||
| 506 | |||
| 518 | @item | 507 | @item |
| 519 | If calling a small function accounts for a substantial part of your | 508 | If calling a small function accounts for a substantial part of your |
| 520 | program's running time, make the function inline. This eliminates | 509 | program's running time, make the function inline. This eliminates |
| @@ -541,6 +530,11 @@ Such a definition has no effect except to tell the compiler | |||
| 541 | not to warn about uses of the variable @code{foo} in this file. | 530 | not to warn about uses of the variable @code{foo} in this file. |
| 542 | 531 | ||
| 543 | @item | 532 | @item |
| 533 | Similarly, to avoid a compiler warning about an undefined function | ||
| 534 | that you know @emph{will} be defined, use a @code{declare-function} | ||
| 535 | statement (@pxref{Declaring Functions}). | ||
| 536 | |||
| 537 | @item | ||
| 544 | If you use many functions and variables from a certain file, you can | 538 | If you use many functions and variables from a certain file, you can |
| 545 | add a @code{require} for that package to avoid compilation warnings | 539 | add a @code{require} for that package to avoid compilation warnings |
| 546 | for them. For instance, | 540 | for them. For instance, |
| @@ -561,8 +555,8 @@ functions and variables in your package. | |||
| 561 | 555 | ||
| 562 | @item | 556 | @item |
| 563 | The last resort for avoiding a warning, when you want to do something | 557 | The last resort for avoiding a warning, when you want to do something |
| 564 | that usually is a mistake but it's not a mistake in this one case, | 558 | that is usually a mistake but you know is not a mistake in your usage, |
| 565 | is to put a call to @code{with-no-warnings} around it. | 559 | is to put it inside @code{with-no-warnings}. @xref{Compiler Errors}. |
| 566 | @end itemize | 560 | @end itemize |
| 567 | 561 | ||
| 568 | @node Documentation Tips | 562 | @node Documentation Tips |
| @@ -580,11 +574,9 @@ Every command, function, or variable intended for users to know about | |||
| 580 | should have a documentation string. | 574 | should have a documentation string. |
| 581 | 575 | ||
| 582 | @item | 576 | @item |
| 583 | An internal variable or subroutine of a Lisp program might as well have | 577 | An internal variable or subroutine of a Lisp program might as well |
| 584 | a documentation string. In earlier Emacs versions, you could save space | 578 | have a documentation string. Documentation strings take up very |
| 585 | by using a comment instead of a documentation string, but that is no | 579 | little space in a running Emacs. |
| 586 | longer the case---documentation strings now take up very little space in | ||
| 587 | a running Emacs. | ||
| 588 | 580 | ||
| 589 | @item | 581 | @item |
| 590 | Format the documentation string so that it fits in an Emacs window on an | 582 | Format the documentation string so that it fits in an Emacs window on an |
| @@ -595,14 +587,14 @@ or it will look bad in the output of @code{apropos}. | |||
| 595 | You can fill the text if that looks good. However, rather than blindly | 587 | You can fill the text if that looks good. However, rather than blindly |
| 596 | filling the entire documentation string, you can often make it much more | 588 | filling the entire documentation string, you can often make it much more |
| 597 | readable by choosing certain line breaks with care. Use blank lines | 589 | readable by choosing certain line breaks with care. Use blank lines |
| 598 | between topics if the documentation string is long. | 590 | between sections if the documentation string is long. |
| 599 | 591 | ||
| 600 | @item | 592 | @item |
| 601 | The first line of the documentation string should consist of one or two | 593 | The first line of the documentation string should consist of one or two |
| 602 | complete sentences that stand on their own as a summary. @kbd{M-x | 594 | complete sentences that stand on their own as a summary. @kbd{M-x |
| 603 | apropos} displays just the first line, and if that line's contents don't | 595 | apropos} displays just the first line, and if that line's contents don't |
| 604 | stand on their own, the result looks bad. In particular, start the | 596 | stand on their own, the result looks bad. In particular, start the |
| 605 | first line with a capital letter and end with a period. | 597 | first line with a capital letter and end it with a period. |
| 606 | 598 | ||
| 607 | For a function, the first line should briefly answer the question, | 599 | For a function, the first line should briefly answer the question, |
| 608 | ``What does this function do?'' For a variable, the first line should | 600 | ``What does this function do?'' For a variable, the first line should |
| @@ -630,7 +622,7 @@ important arguments. | |||
| 630 | When a function's documentation string mentions the value of an argument | 622 | When a function's documentation string mentions the value of an argument |
| 631 | of the function, use the argument name in capital letters as if it were | 623 | of the function, use the argument name in capital letters as if it were |
| 632 | a name for that value. Thus, the documentation string of the function | 624 | a name for that value. Thus, the documentation string of the function |
| 633 | @code{eval} refers to its second argument as @samp{FORM}, because the | 625 | @code{eval} refers to its first argument as @samp{FORM}, because the |
| 634 | actual argument name is @code{form}: | 626 | actual argument name is @code{form}: |
| 635 | 627 | ||
| 636 | @example | 628 | @example |
| @@ -654,7 +646,7 @@ string. If the symbol's name is @code{foo}, write ``foo,'' not | |||
| 654 | 646 | ||
| 655 | This might appear to contradict the policy of writing function | 647 | This might appear to contradict the policy of writing function |
| 656 | argument values, but there is no real contradiction; the argument | 648 | argument values, but there is no real contradiction; the argument |
| 657 | @emph{value} is not the same thing as the @emph{symbol} which the | 649 | @emph{value} is not the same thing as the @emph{symbol} that the |
| 658 | function uses to hold the value. | 650 | function uses to hold the value. |
| 659 | 651 | ||
| 660 | If this puts a lower-case letter at the beginning of a sentence | 652 | If this puts a lower-case letter at the beginning of a sentence |
| @@ -825,8 +817,8 @@ In Dired, visit the file or directory named on this line. | |||
| 825 | @end example | 817 | @end example |
| 826 | 818 | ||
| 827 | @item | 819 | @item |
| 828 | When you define a variable that users ought to set interactively, you | 820 | When you define a variable that represents an option users might want |
| 829 | should use @code{defcustom}. @xref{Defining Variables}. | 821 | to set, use @code{defcustom}. @xref{Defining Variables}. |
| 830 | 822 | ||
| 831 | @item | 823 | @item |
| 832 | The documentation string for a variable that is a yes-or-no flag should | 824 | The documentation string for a variable that is a yes-or-no flag should |
| @@ -839,19 +831,14 @@ all non-@code{nil} values are equivalent and indicate explicitly what | |||
| 839 | @section Tips on Writing Comments | 831 | @section Tips on Writing Comments |
| 840 | @cindex comments, Lisp convention for | 832 | @cindex comments, Lisp convention for |
| 841 | 833 | ||
| 842 | We recommend these conventions for where to put comments and how to | 834 | We recommend these conventions for comments: |
| 843 | indent them: | ||
| 844 | 835 | ||
| 845 | @table @samp | 836 | @table @samp |
| 846 | @item ; | 837 | @item ; |
| 847 | Comments that start with a single semicolon, @samp{;}, should all be | 838 | Comments that start with a single semicolon, @samp{;}, should all be |
| 848 | aligned to the same column on the right of the source code. Such | 839 | aligned to the same column on the right of the source code. Such |
| 849 | comments usually explain how the code on the same line does its job. In | 840 | comments usually explain how the code on that line does its job. |
| 850 | Lisp mode and related modes, the @kbd{M-;} (@code{indent-for-comment}) | 841 | For example: |
| 851 | command automatically inserts such a @samp{;} in the right place, or | ||
| 852 | aligns such a comment if it is already present. | ||
| 853 | |||
| 854 | This and following examples are taken from the Emacs sources. | ||
| 855 | 842 | ||
| 856 | @smallexample | 843 | @smallexample |
| 857 | @group | 844 | @group |
| @@ -873,7 +860,7 @@ at that point. For example: | |||
| 873 | (prog1 (setq auto-fill-function | 860 | (prog1 (setq auto-fill-function |
| 874 | @dots{} | 861 | @dots{} |
| 875 | @dots{} | 862 | @dots{} |
| 876 | ;; update mode line | 863 | ;; Update mode line. |
| 877 | (force-mode-line-update))) | 864 | (force-mode-line-update))) |
| 878 | @end group | 865 | @end group |
| 879 | @end smallexample | 866 | @end smallexample |
| @@ -882,17 +869,17 @@ We also normally use two semicolons for comments outside functions. | |||
| 882 | 869 | ||
| 883 | @smallexample | 870 | @smallexample |
| 884 | @group | 871 | @group |
| 885 | ;; This Lisp code is run in Emacs | 872 | ;; This Lisp code is run in Emacs when it is to operate as |
| 886 | ;; when it is to operate as a server | 873 | ;; a server for other processes. |
| 887 | ;; for other processes. | ||
| 888 | @end group | 874 | @end group |
| 889 | @end smallexample | 875 | @end smallexample |
| 890 | 876 | ||
| 891 | Every function that has no documentation string (presumably one that is | 877 | If a function has no documentation string, it should instead have a |
| 892 | used only internally within the package it belongs to), should instead | 878 | two-semicolon comment right before the function, explaining what the |
| 893 | have a two-semicolon comment right before the function, explaining what | 879 | function does and how to call it properly. Explain precisely what |
| 894 | the function does and how to call it properly. Explain precisely what | 880 | each argument means and how the function interprets its possible |
| 895 | each argument means and how the function interprets its possible values. | 881 | values. It is much better to convert such comments to documentation |
| 882 | strings, though. | ||
| 896 | 883 | ||
| 897 | @item ;;; | 884 | @item ;;; |
| 898 | Comments that start with three semicolons, @samp{;;;}, should start at | 885 | Comments that start with three semicolons, @samp{;;;}, should start at |
| @@ -903,7 +890,7 @@ semicolons depends on whether the comment should be considered a | |||
| 903 | ``heading'' by Outline minor mode. By default, comments starting with | 890 | ``heading'' by Outline minor mode. By default, comments starting with |
| 904 | at least three semicolons (followed by a single space and a | 891 | at least three semicolons (followed by a single space and a |
| 905 | non-whitespace character) are considered headings, comments starting | 892 | non-whitespace character) are considered headings, comments starting |
| 906 | with two or less are not. | 893 | with two or fewer are not. |
| 907 | 894 | ||
| 908 | Another use for triple-semicolon comments is for commenting out lines | 895 | Another use for triple-semicolon comments is for commenting out lines |
| 909 | within a function. We use three semicolons for this precisely so that | 896 | within a function. We use three semicolons for this precisely so that |
| @@ -934,11 +921,11 @@ program. For example: | |||
| 934 | @end table | 921 | @end table |
| 935 | 922 | ||
| 936 | @noindent | 923 | @noindent |
| 937 | The indentation commands of the Lisp modes in Emacs, such as @kbd{M-;} | 924 | Generally speaking, the @kbd{M-;} (@code{comment-dwim}) command |
| 938 | (@code{indent-for-comment}) and @key{TAB} (@code{lisp-indent-line}), | 925 | automatically starts a comment of the appropriate type; or indents an |
| 939 | automatically indent comments according to these conventions, | 926 | existing comment to the right place, depending on the number of |
| 940 | depending on the number of semicolons. @xref{Comments,, | 927 | semicolons. |
| 941 | Manipulating Comments, emacs, The GNU Emacs Manual}. | 928 | @xref{Comments,, Manipulating Comments, emacs, The GNU Emacs Manual}. |
| 942 | 929 | ||
| 943 | @node Library Headers | 930 | @node Library Headers |
| 944 | @section Conventional Headers for Emacs Libraries | 931 | @section Conventional Headers for Emacs Libraries |
| @@ -947,39 +934,28 @@ Manipulating Comments, emacs, The GNU Emacs Manual}. | |||
| 947 | 934 | ||
| 948 | Emacs has conventions for using special comments in Lisp libraries | 935 | Emacs has conventions for using special comments in Lisp libraries |
| 949 | to divide them into sections and give information such as who wrote | 936 | to divide them into sections and give information such as who wrote |
| 950 | them. This section explains these conventions. | 937 | them. Using a standard format for these items makes it easier for |
| 951 | 938 | tools (and people) to extract the relevant information. This section | |
| 952 | We'll start with an example, a package that is included in the Emacs | 939 | explains these conventions, starting with an example: |
| 953 | distribution. | ||
| 954 | |||
| 955 | Parts of this example reflect its status as part of Emacs; for | ||
| 956 | example, the copyright notice lists the Free Software Foundation as the | ||
| 957 | copyright holder, and the copying permission says the file is part of | ||
| 958 | Emacs. When you write a package and post it, the copyright holder would | ||
| 959 | be you (unless your employer claims to own it instead), and you should | ||
| 960 | get the suggested copying permission from the end of the GNU General | ||
| 961 | Public License itself. Don't say your file is part of Emacs | ||
| 962 | if we haven't installed it in Emacs yet! | ||
| 963 | |||
| 964 | With that warning out of the way, on to the example: | ||
| 965 | 940 | ||
| 966 | @smallexample | 941 | @smallexample |
| 967 | @group | 942 | @group |
| 968 | ;;; lisp-mnt.el --- minor mode for Emacs Lisp maintainers | 943 | ;;; foo.el --- Support for the Foo programming language |
| 969 | 944 | ||
| 970 | ;; Copyright (C) 1992 Free Software Foundation, Inc. | 945 | ;; Copyright (C) 2010-2012 Your Name |
| 971 | @end group | 946 | @end group |
| 972 | 947 | ||
| 973 | ;; Author: Eric S. Raymond <esr@@snark.thyrsus.com> | 948 | ;; Author: Your Name <yourname@@example.com> |
| 974 | ;; Maintainer: Eric S. Raymond <esr@@snark.thyrsus.com> | 949 | ;; Maintainer: Someone Else <someone@@example.com> |
| 975 | ;; Created: 14 Jul 1992 | 950 | ;; Created: 14 Jul 2010 |
| 976 | ;; Version: 1.2 | ||
| 977 | @group | 951 | @group |
| 978 | ;; Keywords: docs | 952 | ;; Keywords: languages |
| 979 | 953 | ||
| 980 | ;; This file is part of GNU Emacs. | 954 | ;; This file is not part of GNU Emacs. |
| 955 | |||
| 956 | ;; This file is free software@dots{} | ||
| 981 | @dots{} | 957 | @dots{} |
| 982 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | 958 | ;; along with this file. If not, see <http://www.gnu.org/licenses/>. |
| 983 | @end group | 959 | @end group |
| 984 | @end smallexample | 960 | @end smallexample |
| 985 | 961 | ||
| @@ -990,8 +966,19 @@ if we haven't installed it in Emacs yet! | |||
| 990 | @end example | 966 | @end example |
| 991 | 967 | ||
| 992 | @noindent | 968 | @noindent |
| 993 | The description should be complete in one line. If the file | 969 | The description should be contained in one line. If the file |
| 994 | needs a @samp{-*-} specification, put it after @var{description}. | 970 | needs a @samp{-*-} specification, put it after @var{description}. |
| 971 | If this would make the first line too long, use a Local Variables | ||
| 972 | section at the end of the file. | ||
| 973 | |||
| 974 | The copyright notice usually lists your name (if you wrote the | ||
| 975 | file). If you have an employer who claims copyright on your work, you | ||
| 976 | might need to list them instead. Do not say that the copyright holder | ||
| 977 | is the Free Software Foundation (or that the file is part of GNU | ||
| 978 | Emacs) unless your file has been accepted into the Emacs distribution. | ||
| 979 | For more information on the form of copyright and license notices, see | ||
| 980 | @uref{http://www.gnu.org/licenses/gpl-howto.html, the guide on the GNU | ||
| 981 | website}. | ||
| 995 | 982 | ||
| 996 | After the copyright notice come several @dfn{header comment} lines, | 983 | After the copyright notice come several @dfn{header comment} lines, |
| 997 | each beginning with @samp{;; @var{header-name}:}. Here is a table of | 984 | each beginning with @samp{;; @var{header-name}:}. Here is a table of |
| @@ -999,55 +986,55 @@ the conventional possibilities for @var{header-name}: | |||
| 999 | 986 | ||
| 1000 | @table @samp | 987 | @table @samp |
| 1001 | @item Author | 988 | @item Author |
| 1002 | This line states the name and net address of at least the principal | 989 | This line states the name and email address of at least the principal |
| 1003 | author of the library. | 990 | author of the library. If there are multiple authors, list them on |
| 1004 | 991 | continuation lines led by @code{;;} and whitespace (this is easier | |
| 1005 | If there are multiple authors, you can list them on continuation lines | 992 | for tools to parse than having more than one author on one line). |
| 1006 | led by @code{;;} and a tab character, like this: | 993 | We recommend including a contact email address, of the form |
| 994 | @samp{<@dots{}>}. For example: | ||
| 1007 | 995 | ||
| 1008 | @smallexample | 996 | @smallexample |
| 1009 | @group | 997 | @group |
| 1010 | ;; Author: Ashwin Ram <Ram-Ashwin@@cs.yale.edu> | 998 | ;; Author: Your Name <yourname@@example.com> |
| 1011 | ;; Dave Sill <de5@@ornl.gov> | 999 | ;; Someone Else <someone@@example.com> |
| 1012 | ;; Dave Brennan <brennan@@hal.com> | 1000 | ;; Another Person <another@@example.com> |
| 1013 | ;; Eric Raymond <esr@@snark.thyrsus.com> | ||
| 1014 | @end group | 1001 | @end group |
| 1015 | @end smallexample | 1002 | @end smallexample |
| 1016 | 1003 | ||
| 1017 | @item Maintainer | 1004 | @item Maintainer |
| 1018 | This line should contain a single name/address as in the Author line, or | 1005 | This header has the same format as the Author header. It lists the |
| 1019 | an address only, or the string @samp{FSF}. If there is no maintainer | 1006 | person(s) who currently maintain(s) the file (respond to bug reports, |
| 1020 | line, the person(s) in the Author field are presumed to be the | 1007 | etc.). |
| 1021 | maintainers. The example above is mildly bogus because the maintainer | ||
| 1022 | line is redundant. | ||
| 1023 | |||
| 1024 | The idea behind the @samp{Author} and @samp{Maintainer} lines is to make | ||
| 1025 | possible a Lisp function to ``send mail to the maintainer'' without | ||
| 1026 | having to mine the name out by hand. | ||
| 1027 | 1008 | ||
| 1028 | Be sure to surround the network address with @samp{<@dots{}>} if | 1009 | If there is no maintainer line, the person(s) in the Author field |
| 1029 | you include the person's full name as well as the network address. | 1010 | is/are presumed to be the maintainers. Some files in Emacs use |
| 1011 | @samp{FSF} for the maintainer. This means that the original author is | ||
| 1012 | no longer responsible for the file, and that it is maintained as part | ||
| 1013 | of Emacs. | ||
| 1030 | 1014 | ||
| 1031 | @item Created | 1015 | @item Created |
| 1032 | This optional line gives the original creation date of the | 1016 | This optional line gives the original creation date of the file, and |
| 1033 | file. For historical interest only. | 1017 | is for historical interest only. |
| 1034 | 1018 | ||
| 1035 | @item Version | 1019 | @item Version |
| 1036 | If you wish to record version numbers for the individual Lisp program, put | 1020 | If you wish to record version numbers for the individual Lisp program, |
| 1037 | them in this line. | 1021 | put them in this line. Lisp files distributed with Emacs generally do |
| 1038 | 1022 | not have a @samp{Version} header, since the version number of Emacs | |
| 1039 | @item Adapted-By | 1023 | itself serves the same purpose. If you are distributing a collection |
| 1040 | In this header line, place the name of the person who adapted the | 1024 | of multiple files, we recommend not writing the version in every file, |
| 1041 | library for installation (to make it fit the style conventions, for | 1025 | but only the main one. |
| 1042 | example). | ||
| 1043 | 1026 | ||
| 1044 | @item Keywords | 1027 | @item Keywords |
| 1045 | This line lists keywords for the @code{finder-by-keyword} help command. | 1028 | This line lists keywords for the @code{finder-by-keyword} help command. |
| 1046 | Please use that command to see a list of the meaningful keywords. | 1029 | Please use that command to see a list of the meaningful keywords. |
| 1047 | 1030 | ||
| 1048 | This field is important; it's how people will find your package when | 1031 | This field is how people will find your package when they're looking |
| 1049 | they're looking for things by topic area. To separate the keywords, you | 1032 | for things by topic. To separate the keywords, you can use spaces, |
| 1050 | can use spaces, commas, or both. | 1033 | commas, or both. |
| 1034 | |||
| 1035 | The name of this field is unfortunate, since people often assume it is | ||
| 1036 | the place to write arbitrary keywords that describe their package, | ||
| 1037 | rather than just the relevant Finder keywords. | ||
| 1051 | 1038 | ||
| 1052 | @item Package-Version | 1039 | @item Package-Version |
| 1053 | If @samp{Version} is not suitable for use by the package manager, then | 1040 | If @samp{Version} is not suitable for use by the package manager, then |
| @@ -1060,7 +1047,7 @@ If this exists, it names packages on which the current package depends | |||
| 1060 | for proper operation. @xref{Packaging Basics}. This is used by the | 1047 | for proper operation. @xref{Packaging Basics}. This is used by the |
| 1061 | package manager both at download time (to ensure that a complete set | 1048 | package manager both at download time (to ensure that a complete set |
| 1062 | of packages is downloaded) and at activation time (to ensure that a | 1049 | of packages is downloaded) and at activation time (to ensure that a |
| 1063 | package is activated if and only if all its dependencies have been). | 1050 | package is only activated if all its dependencies have been). |
| 1064 | 1051 | ||
| 1065 | Its format is a list of lists. The @code{car} of each sub-list is the | 1052 | Its format is a list of lists. The @code{car} of each sub-list is the |
| 1066 | name of a package, as a symbol. The @code{cadr} of each sub-list is | 1053 | name of a package, as a symbol. The @code{cadr} of each sub-list is |
| @@ -1081,8 +1068,8 @@ appropriate. You can also put in header lines with other header | |||
| 1081 | names---they have no standard meanings, so they can't do any harm. | 1068 | names---they have no standard meanings, so they can't do any harm. |
| 1082 | 1069 | ||
| 1083 | We use additional stylized comments to subdivide the contents of the | 1070 | We use additional stylized comments to subdivide the contents of the |
| 1084 | library file. These should be separated by blank lines from anything | 1071 | library file. These should be separated from anything else by blank |
| 1085 | else. Here is a table of them: | 1072 | lines. Here is a table of them: |
| 1086 | 1073 | ||
| 1087 | @table @samp | 1074 | @table @samp |
| 1088 | @item ;;; Commentary: | 1075 | @item ;;; Commentary: |
| @@ -1092,16 +1079,12 @@ It should come right after the copying permissions, terminated by a | |||
| 1092 | text is used by the Finder package, so it should make sense in that | 1079 | text is used by the Finder package, so it should make sense in that |
| 1093 | context. | 1080 | context. |
| 1094 | 1081 | ||
| 1095 | @item ;;; Documentation: | ||
| 1096 | This was used in some files in place of @samp{;;; Commentary:}, | ||
| 1097 | but it is deprecated. | ||
| 1098 | |||
| 1099 | @item ;;; Change Log: | 1082 | @item ;;; Change Log: |
| 1100 | This begins change log information stored in the library file (if you | 1083 | This begins an optional log of changes to the file over time. Don't |
| 1101 | store the change history there). For Lisp files distributed with Emacs, | 1084 | put too much information in this section---it is better to keep the |
| 1102 | the change history is kept in the file @file{ChangeLog} and not in the | 1085 | detailed logs in a separate @file{ChangeLog} file (as Emacs does), |
| 1103 | source file at all; these files generally do not have a @samp{;;; Change | 1086 | and/or to use a version control system. @samp{History} is an |
| 1104 | Log:} line. @samp{History} is an alternative to @samp{Change Log}. | 1087 | alternative to @samp{Change Log}. |
| 1105 | 1088 | ||
| 1106 | @item ;;; Code: | 1089 | @item ;;; Code: |
| 1107 | This begins the actual code of the program. | 1090 | This begins the actual code of the program. |
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 94e71c96d0a..548d2e99414 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | @c -*-texinfo-*- | 1 | @c -*-texinfo-*- |
| 2 | @c This is part of the GNU Emacs Lisp Reference Manual. | 2 | @c This is part of the GNU Emacs Lisp Reference Manual. |
| 3 | @c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc. | 3 | @c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc. |
| 4 | @c See the file elisp.texi for copying conditions. | 4 | @c See the file elisp.texi for copying conditions. |
| 5 | @setfilename ../../info/variables | 5 | @setfilename ../../info/variables |
| 6 | @node Variables, Functions, Control Structures, Top | 6 | @node Variables, Functions, Control Structures, Top |
| @@ -479,7 +479,7 @@ not the buffer-local value. (But you should not be making | |||
| 479 | buffer-local bindings for a symbol that is defined with | 479 | buffer-local bindings for a symbol that is defined with |
| 480 | @code{defconst}.) | 480 | @code{defconst}.) |
| 481 | 481 | ||
| 482 | An example of the use of @code{defconst} is Emacs' definition of | 482 | An example of the use of @code{defconst} is Emacs's definition of |
| 483 | @code{float-pi}---the mathematical constant @math{pi}, which ought not | 483 | @code{float-pi}---the mathematical constant @math{pi}, which ought not |
| 484 | to be changed by anyone (attempts by the Indiana State Legislature | 484 | to be changed by anyone (attempts by the Indiana State Legislature |
| 485 | notwithstanding). As the second form illustrates, however, | 485 | notwithstanding). As the second form illustrates, however, |
diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi index addc4bd6d69..a92a807b747 100644 --- a/doc/lispref/vol1.texi +++ b/doc/lispref/vol1.texi | |||
| @@ -187,11 +187,9 @@ Appendices | |||
| 187 | * Tips:: Advice and coding conventions for Emacs Lisp. | 187 | * Tips:: Advice and coding conventions for Emacs Lisp. |
| 188 | * GNU Emacs Internals:: Building and dumping Emacs; | 188 | * GNU Emacs Internals:: Building and dumping Emacs; |
| 189 | internal data structures. | 189 | internal data structures. |
| 190 | * Standard Errors:: List of all error symbols. | 190 | * Standard Errors:: List of some standard error symbols. |
| 191 | * Standard Buffer-Local Variables:: | 191 | * Standard Keymaps:: List of some standard keymaps. |
| 192 | List of variables buffer-local in all buffers. | 192 | * Standard Hooks:: List of some standard hook variables. |
| 193 | * Standard Keymaps:: List of standard keymaps. | ||
| 194 | * Standard Hooks:: List of standard hook variables. | ||
| 195 | 193 | ||
| 196 | * Index:: Index including concepts, functions, variables, | 194 | * Index:: Index including concepts, functions, variables, |
| 197 | and other terms. | 195 | and other terms. |
| @@ -929,7 +927,7 @@ Buffers | |||
| 929 | is visited. | 927 | is visited. |
| 930 | * Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved. | 928 | * Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved. |
| 931 | * Modification Time:: Determining whether the visited file was changed | 929 | * Modification Time:: Determining whether the visited file was changed |
| 932 | ``behind Emacs's back''. | 930 | "behind Emacs's back". |
| 933 | * Read Only Buffers:: Modifying text is not allowed in a | 931 | * Read Only Buffers:: Modifying text is not allowed in a |
| 934 | read-only buffer. | 932 | read-only buffer. |
| 935 | * The Buffer List:: How to look at all the existing buffers. | 933 | * The Buffer List:: How to look at all the existing buffers. |
| @@ -996,7 +994,7 @@ Frames | |||
| 996 | * Window System Selections::Transferring text to and from other X clients. | 994 | * Window System Selections::Transferring text to and from other X clients. |
| 997 | * Drag and Drop:: Internals of Drag-and-Drop implementation. | 995 | * Drag and Drop:: Internals of Drag-and-Drop implementation. |
| 998 | * Color Names:: Getting the definitions of color names. | 996 | * Color Names:: Getting the definitions of color names. |
| 999 | * Text Terminal Colors:: Defining colors for text-only terminals. | 997 | * Text Terminal Colors:: Defining colors for text terminals. |
| 1000 | * Resources:: Getting resource values from the server. | 998 | * Resources:: Getting resource values from the server. |
| 1001 | * Display Feature Testing:: Determining the features of a terminal. | 999 | * Display Feature Testing:: Determining the features of a terminal. |
| 1002 | 1000 | ||
| @@ -1210,7 +1208,6 @@ Parsing Expressions | |||
| 1210 | 1208 | ||
| 1211 | Abbrevs and Abbrev Expansion | 1209 | Abbrevs and Abbrev Expansion |
| 1212 | 1210 | ||
| 1213 | * Abbrev Mode:: Setting up Emacs for abbreviation. | ||
| 1214 | * Abbrev Tables:: Creating and working with abbrev tables. | 1211 | * Abbrev Tables:: Creating and working with abbrev tables. |
| 1215 | * Defining Abbrevs:: Specifying abbreviations and their expansions. | 1212 | * Defining Abbrevs:: Specifying abbreviations and their expansions. |
| 1216 | * Abbrev Files:: Saving abbrevs in files. | 1213 | * Abbrev Files:: Saving abbrevs in files. |
| @@ -1287,7 +1284,7 @@ Emacs Display | |||
| 1287 | * Display Property:: Enabling special display features. | 1284 | * Display Property:: Enabling special display features. |
| 1288 | * Images:: Displaying images in Emacs buffers. | 1285 | * Images:: Displaying images in Emacs buffers. |
| 1289 | * Buttons:: Adding clickable buttons to Emacs buffers. | 1286 | * Buttons:: Adding clickable buttons to Emacs buffers. |
| 1290 | * Abstract Display:: Emacs' Widget for Object Collections. | 1287 | * Abstract Display:: Emacs's Widget for Object Collections. |
| 1291 | * Blinking:: How Emacs shows the matching open parenthesis. | 1288 | * Blinking:: How Emacs shows the matching open parenthesis. |
| 1292 | * Usual Display:: The usual conventions for displaying | 1289 | * Usual Display:: The usual conventions for displaying |
| 1293 | nonprinting chars. | 1290 | nonprinting chars. |
| @@ -1532,7 +1529,6 @@ Object Internals | |||
| 1532 | @c include tips.texi | 1529 | @c include tips.texi |
| 1533 | @c include internals.texi | 1530 | @c include internals.texi |
| 1534 | @c include errors.texi | 1531 | @c include errors.texi |
| 1535 | @c include locals.texi | ||
| 1536 | @c include maps.texi | 1532 | @c include maps.texi |
| 1537 | @c include hooks.texi | 1533 | @c include hooks.texi |
| 1538 | 1534 | ||
diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi index 0f6b020db49..97b21aba10b 100644 --- a/doc/lispref/vol2.texi +++ b/doc/lispref/vol2.texi | |||
| @@ -186,11 +186,9 @@ Appendices | |||
| 186 | * Tips:: Advice and coding conventions for Emacs Lisp. | 186 | * Tips:: Advice and coding conventions for Emacs Lisp. |
| 187 | * GNU Emacs Internals:: Building and dumping Emacs; | 187 | * GNU Emacs Internals:: Building and dumping Emacs; |
| 188 | internal data structures. | 188 | internal data structures. |
| 189 | * Standard Errors:: List of all error symbols. | 189 | * Standard Errors:: List of some standard error symbols. |
| 190 | * Standard Buffer-Local Variables:: | 190 | * Standard Keymaps:: List of some standard keymaps. |
| 191 | List of variables buffer-local in all buffers. | 191 | * Standard Hooks:: List of some standard hook variables. |
| 192 | * Standard Keymaps:: List of standard keymaps. | ||
| 193 | * Standard Hooks:: List of standard hook variables. | ||
| 194 | 192 | ||
| 195 | * Index:: Index including concepts, functions, variables, | 193 | * Index:: Index including concepts, functions, variables, |
| 196 | and other terms. | 194 | and other terms. |
| @@ -928,7 +926,7 @@ Buffers | |||
| 928 | is visited. | 926 | is visited. |
| 929 | * Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved. | 927 | * Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved. |
| 930 | * Modification Time:: Determining whether the visited file was changed | 928 | * Modification Time:: Determining whether the visited file was changed |
| 931 | ``behind Emacs's back''. | 929 | "behind Emacs's back". |
| 932 | * Read Only Buffers:: Modifying text is not allowed in a | 930 | * Read Only Buffers:: Modifying text is not allowed in a |
| 933 | read-only buffer. | 931 | read-only buffer. |
| 934 | * The Buffer List:: How to look at all the existing buffers. | 932 | * The Buffer List:: How to look at all the existing buffers. |
| @@ -995,7 +993,7 @@ Frames | |||
| 995 | * Window System Selections::Transferring text to and from other X clients. | 993 | * Window System Selections::Transferring text to and from other X clients. |
| 996 | * Drag and Drop:: Internals of Drag-and-Drop implementation. | 994 | * Drag and Drop:: Internals of Drag-and-Drop implementation. |
| 997 | * Color Names:: Getting the definitions of color names. | 995 | * Color Names:: Getting the definitions of color names. |
| 998 | * Text Terminal Colors:: Defining colors for text-only terminals. | 996 | * Text Terminal Colors:: Defining colors for text terminals. |
| 999 | * Resources:: Getting resource values from the server. | 997 | * Resources:: Getting resource values from the server. |
| 1000 | * Display Feature Testing:: Determining the features of a terminal. | 998 | * Display Feature Testing:: Determining the features of a terminal. |
| 1001 | 999 | ||
| @@ -1209,7 +1207,6 @@ Parsing Expressions | |||
| 1209 | 1207 | ||
| 1210 | Abbrevs and Abbrev Expansion | 1208 | Abbrevs and Abbrev Expansion |
| 1211 | 1209 | ||
| 1212 | * Abbrev Mode:: Setting up Emacs for abbreviation. | ||
| 1213 | * Abbrev Tables:: Creating and working with abbrev tables. | 1210 | * Abbrev Tables:: Creating and working with abbrev tables. |
| 1214 | * Defining Abbrevs:: Specifying abbreviations and their expansions. | 1211 | * Defining Abbrevs:: Specifying abbreviations and their expansions. |
| 1215 | * Abbrev Files:: Saving abbrevs in files. | 1212 | * Abbrev Files:: Saving abbrevs in files. |
| @@ -1286,7 +1283,7 @@ Emacs Display | |||
| 1286 | * Display Property:: Enabling special display features. | 1283 | * Display Property:: Enabling special display features. |
| 1287 | * Images:: Displaying images in Emacs buffers. | 1284 | * Images:: Displaying images in Emacs buffers. |
| 1288 | * Buttons:: Adding clickable buttons to Emacs buffers. | 1285 | * Buttons:: Adding clickable buttons to Emacs buffers. |
| 1289 | * Abstract Display:: Emacs' Widget for Object Collections. | 1286 | * Abstract Display:: Emacs's Widget for Object Collections. |
| 1290 | * Blinking:: How Emacs shows the matching open parenthesis. | 1287 | * Blinking:: How Emacs shows the matching open parenthesis. |
| 1291 | * Usual Display:: The usual conventions for displaying | 1288 | * Usual Display:: The usual conventions for displaying |
| 1292 | nonprinting chars. | 1289 | nonprinting chars. |
| @@ -1531,7 +1528,6 @@ Object Internals | |||
| 1531 | @include tips.texi | 1528 | @include tips.texi |
| 1532 | @include internals.texi | 1529 | @include internals.texi |
| 1533 | @include errors.texi | 1530 | @include errors.texi |
| 1534 | @include locals.texi | ||
| 1535 | @include maps.texi | 1531 | @include maps.texi |
| 1536 | @include hooks.texi | 1532 | @include hooks.texi |
| 1537 | 1533 | ||
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 98263f4093c..07be7fa9079 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -68,7 +68,7 @@ window, and the contents of the selected message in another window. | |||
| 68 | graphical desktop environments and window systems, such as the X | 68 | graphical desktop environments and window systems, such as the X |
| 69 | Window System. When Emacs is run on X, each of its graphical X | 69 | Window System. When Emacs is run on X, each of its graphical X |
| 70 | windows is an Emacs frame (containing one or more Emacs windows). | 70 | windows is an Emacs frame (containing one or more Emacs windows). |
| 71 | When Emacs is run on a text-only terminal, the frame fills the entire | 71 | When Emacs is run on a text terminal, the frame fills the entire |
| 72 | terminal screen. | 72 | terminal screen. |
| 73 | 73 | ||
| 74 | @cindex tiled windows | 74 | @cindex tiled windows |
| @@ -2964,8 +2964,8 @@ the bottommost row. | |||
| 2964 | 2964 | ||
| 2965 | Note that these are the actual outer edges of the window, including | 2965 | Note that these are the actual outer edges of the window, including |
| 2966 | any header line, mode line, scroll bar, fringes, and display margins. | 2966 | any header line, mode line, scroll bar, fringes, and display margins. |
| 2967 | On a text-only terminal, if the window has a neighbor on its right, | 2967 | On a text terminal, if the window has a neighbor on its right, its |
| 2968 | its right edge includes the separator line between the window and its | 2968 | right edge includes the separator line between the window and its |
| 2969 | neighbor. | 2969 | neighbor. |
| 2970 | @end defun | 2970 | @end defun |
| 2971 | 2971 | ||
| @@ -3046,8 +3046,8 @@ argument because it always uses the frame that @var{window} is on. | |||
| 3046 | 3046 | ||
| 3047 | The following functions return window positions in pixels, rather | 3047 | The following functions return window positions in pixels, rather |
| 3048 | than character units. Though mostly useful on graphical displays, | 3048 | than character units. Though mostly useful on graphical displays, |
| 3049 | they can also be called on text-only terminals, where the screen area | 3049 | they can also be called on text terminals, where the screen area of |
| 3050 | of each text character is taken to be ``one pixel''. | 3050 | each text character is taken to be ``one pixel''. |
| 3051 | 3051 | ||
| 3052 | @defun window-pixel-edges &optional window | 3052 | @defun window-pixel-edges &optional window |
| 3053 | This function returns a list of pixel coordinates for the edges of | 3053 | This function returns a list of pixel coordinates for the edges of |