diff options
Diffstat (limited to 'doc/lispref')
| -rw-r--r-- | doc/lispref/buffers.texi | 4 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 10 | ||||
| -rw-r--r-- | doc/lispref/files.texi | 13 | ||||
| -rw-r--r-- | doc/lispref/keymaps.texi | 11 | ||||
| -rw-r--r-- | doc/lispref/modes.texi | 29 | ||||
| -rw-r--r-- | doc/lispref/nonascii.texi | 15 |
6 files changed, 55 insertions, 27 deletions
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index 2dbe9c27f2d..260f159851b 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi | |||
| @@ -935,6 +935,10 @@ This is a normal hook run whenever the buffer list changes. Functions | |||
| 935 | (@pxref{Creating Buffers}), @code{rename-buffer} (@pxref{Buffer Names}), | 935 | (@pxref{Creating Buffers}), @code{rename-buffer} (@pxref{Buffer Names}), |
| 936 | @code{kill-buffer} (@pxref{Killing Buffers}), @code{bury-buffer} (see | 936 | @code{kill-buffer} (@pxref{Killing Buffers}), @code{bury-buffer} (see |
| 937 | above) and @code{select-window} (@pxref{Selecting Windows}). | 937 | above) and @code{select-window} (@pxref{Selecting Windows}). |
| 938 | |||
| 939 | Functions run by this hook should avoid calling @code{select-window} | ||
| 940 | with a nil @var{norecord} argument or @code{with-temp-buffer} since | ||
| 941 | either may lead to infinite recursion. | ||
| 938 | @end defvar | 942 | @end defvar |
| 939 | 943 | ||
| 940 | @node Creating Buffers | 944 | @node Creating Buffers |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 95379b342b3..c4cb83977fc 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -4894,6 +4894,16 @@ and the buffer position where the @code{display} property was found, | |||
| 4894 | respectively. Both positions can be different when @code{object} is a | 4894 | respectively. Both positions can be different when @code{object} is a |
| 4895 | string. | 4895 | string. |
| 4896 | 4896 | ||
| 4897 | Note that @var{condition} will only be evaluated when redisplay | ||
| 4898 | examines the text where this display spec is located, so this feature | ||
| 4899 | is best suited for conditions that are relatively stable, i.e.@: | ||
| 4900 | yield, for each particular buffer position, the same results on every | ||
| 4901 | evaluation. If the results change for the same text location, e.g., | ||
| 4902 | if the result depends on the position of point, then the conditional | ||
| 4903 | specification might not do what you want, because redisplay examines | ||
| 4904 | only those parts of buffer text where it has reasons to assume that | ||
| 4905 | something changed since the last display cycle. | ||
| 4906 | |||
| 4897 | @node Display Margins | 4907 | @node Display Margins |
| 4898 | @subsection Displaying in the Margins | 4908 | @subsection Displaying in the Margins |
| 4899 | @cindex display margins | 4909 | @cindex display margins |
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 5c99ea2781c..0e57cf9666f 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi | |||
| @@ -16,7 +16,7 @@ described in @ref{Backups and Auto-Saving}. | |||
| 16 | names. A file name is a string. Most of these functions expand file | 16 | names. A file name is a string. Most of these functions expand file |
| 17 | name arguments using the function @code{expand-file-name}, so that | 17 | name arguments using the function @code{expand-file-name}, so that |
| 18 | @file{~} is handled correctly, as are relative file names (including | 18 | @file{~} is handled correctly, as are relative file names (including |
| 19 | @file{../}). @xref{File Name Expansion}. | 19 | @file{../} and the empty string). @xref{File Name Expansion}. |
| 20 | 20 | ||
| 21 | In addition, certain @dfn{magic} file names are handled specially. | 21 | In addition, certain @dfn{magic} file names are handled specially. |
| 22 | For example, when a remote file name is specified, Emacs accesses the | 22 | For example, when a remote file name is specified, Emacs accesses the |
| @@ -2402,6 +2402,17 @@ This is for the sake of filesystems that have the concept of a | |||
| 2402 | superroot above the root directory @file{/}. On other filesystems, | 2402 | superroot above the root directory @file{/}. On other filesystems, |
| 2403 | @file{/../} is interpreted exactly the same as @file{/}. | 2403 | @file{/../} is interpreted exactly the same as @file{/}. |
| 2404 | 2404 | ||
| 2405 | Expanding @file{.} or the empty string returns the default directory: | ||
| 2406 | |||
| 2407 | @example | ||
| 2408 | @group | ||
| 2409 | (expand-file-name "." "/usr/spool/") | ||
| 2410 | @result{} "/usr/spool" | ||
| 2411 | (expand-file-name "" "/usr/spool/") | ||
| 2412 | @result{} "/usr/spool" | ||
| 2413 | @end group | ||
| 2414 | @end example | ||
| 2415 | |||
| 2405 | Note that @code{expand-file-name} does @emph{not} expand environment | 2416 | Note that @code{expand-file-name} does @emph{not} expand environment |
| 2406 | variables; only @code{substitute-in-file-name} does that: | 2417 | variables; only @code{substitute-in-file-name} does that: |
| 2407 | 2418 | ||
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index cc0386c8fc7..6ad665a9502 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi | |||
| @@ -2502,7 +2502,7 @@ can do it this way: | |||
| 2502 | 2502 | ||
| 2503 | Emacs usually shows a @dfn{menu bar} at the top of each frame. | 2503 | Emacs usually shows a @dfn{menu bar} at the top of each frame. |
| 2504 | @xref{Menu Bars,,,emacs, The GNU Emacs Manual}. Menu bar items are | 2504 | @xref{Menu Bars,,,emacs, The GNU Emacs Manual}. Menu bar items are |
| 2505 | subcommands of the fake function key @code{menu-bar}, as defined | 2505 | subcommands of the fake function key @key{MENU-BAR}, as defined |
| 2506 | in the active keymaps. | 2506 | in the active keymaps. |
| 2507 | 2507 | ||
| 2508 | To add an item to the menu bar, invent a fake function key of your | 2508 | To add an item to the menu bar, invent a fake function key of your |
| @@ -2554,9 +2554,10 @@ bar item: | |||
| 2554 | @end example | 2554 | @end example |
| 2555 | 2555 | ||
| 2556 | @noindent | 2556 | @noindent |
| 2557 | Here, @code{edit} is the fake function key used by the global map for | 2557 | Here, @code{edit} is the symbol produced by a fake function key, it is |
| 2558 | the @samp{Edit} menu bar item. The main reason to suppress a global | 2558 | used by the global map for the @samp{Edit} menu bar item. The main |
| 2559 | menu bar item is to regain space for mode-specific items. | 2559 | reason to suppress a global menu bar item is to regain space for |
| 2560 | mode-specific items. | ||
| 2560 | 2561 | ||
| 2561 | @defvar menu-bar-final-items | 2562 | @defvar menu-bar-final-items |
| 2562 | Normally the menu bar shows global items followed by items defined by the | 2563 | Normally the menu bar shows global items followed by items defined by the |
| @@ -2601,7 +2602,7 @@ If the value is @code{grow-only}, the tool bar expands automatically, | |||
| 2601 | but does not contract automatically. | 2602 | but does not contract automatically. |
| 2602 | 2603 | ||
| 2603 | The tool bar contents are controlled by a menu keymap attached to a | 2604 | The tool bar contents are controlled by a menu keymap attached to a |
| 2604 | fake function key called @code{tool-bar} (much like the way the menu | 2605 | fake function key called @key{TOOL-BAR} (much like the way the menu |
| 2605 | bar is controlled). So you define a tool bar item using | 2606 | bar is controlled). So you define a tool bar item using |
| 2606 | @code{define-key}, like this: | 2607 | @code{define-key}, like this: |
| 2607 | 2608 | ||
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 22592a57b05..3f6bee9821d 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -1237,6 +1237,7 @@ the conventions listed above: | |||
| 1237 | (modify-syntax-entry ?\\ ". " st) | 1237 | (modify-syntax-entry ?\\ ". " st) |
| 1238 | ;; Add 'p' so M-c on 'hello' leads to 'Hello', not 'hello'. | 1238 | ;; Add 'p' so M-c on 'hello' leads to 'Hello', not 'hello'. |
| 1239 | (modify-syntax-entry ?' "w p" st) | 1239 | (modify-syntax-entry ?' "w p" st) |
| 1240 | @dots{} | ||
| 1240 | st) | 1241 | st) |
| 1241 | "Syntax table used while in `text-mode'.") | 1242 | "Syntax table used while in `text-mode'.") |
| 1242 | @end group | 1243 | @end group |
| @@ -1246,6 +1247,7 @@ the conventions listed above: | |||
| 1246 | (defvar text-mode-map | 1247 | (defvar text-mode-map |
| 1247 | (let ((map (make-sparse-keymap))) | 1248 | (let ((map (make-sparse-keymap))) |
| 1248 | (define-key map "\e\t" 'ispell-complete-word) | 1249 | (define-key map "\e\t" 'ispell-complete-word) |
| 1250 | @dots{} | ||
| 1249 | map) | 1251 | map) |
| 1250 | "Keymap for `text-mode'. | 1252 | "Keymap for `text-mode'. |
| 1251 | Many other modes, such as `mail-mode', `outline-mode' and | 1253 | Many other modes, such as `mail-mode', `outline-mode' and |
| @@ -1289,11 +1291,11 @@ illustrate how these modes are written. | |||
| 1289 | @smallexample | 1291 | @smallexample |
| 1290 | @group | 1292 | @group |
| 1291 | ;; @r{Create mode-specific table variables.} | 1293 | ;; @r{Create mode-specific table variables.} |
| 1292 | (defvar lisp-mode-abbrev-table nil) | 1294 | (define-abbrev-table 'lisp-mode-abbrev-table () |
| 1293 | (define-abbrev-table 'lisp-mode-abbrev-table ()) | 1295 | "Abbrev table for Lisp mode.") |
| 1294 | 1296 | ||
| 1295 | (defvar lisp-mode-syntax-table | 1297 | (defvar lisp-mode-syntax-table |
| 1296 | (let ((table (copy-syntax-table emacs-lisp-mode-syntax-table))) | 1298 | (let ((table (make-syntax-table lisp--mode-syntax-table))) |
| 1297 | (modify-syntax-entry ?\[ "_ " table) | 1299 | (modify-syntax-entry ?\[ "_ " table) |
| 1298 | (modify-syntax-entry ?\] "_ " table) | 1300 | (modify-syntax-entry ?\] "_ " table) |
| 1299 | (modify-syntax-entry ?# "' 14" table) | 1301 | (modify-syntax-entry ?# "' 14" table) |
| @@ -1308,10 +1310,9 @@ each calls the following function to set various variables: | |||
| 1308 | 1310 | ||
| 1309 | @smallexample | 1311 | @smallexample |
| 1310 | @group | 1312 | @group |
| 1311 | (defun lisp-mode-variables (&optional syntax keywords-case-insensitive) | 1313 | (defun lisp-mode-variables (&optional syntax keywords-case-insensitive elisp) |
| 1312 | (when syntax | 1314 | (when syntax |
| 1313 | (set-syntax-table lisp-mode-syntax-table)) | 1315 | (set-syntax-table lisp-mode-syntax-table)) |
| 1314 | (setq local-abbrev-table lisp-mode-abbrev-table) | ||
| 1315 | @dots{} | 1316 | @dots{} |
| 1316 | @end group | 1317 | @end group |
| 1317 | @end smallexample | 1318 | @end smallexample |
| @@ -1322,8 +1323,7 @@ variable to handle Lisp comments: | |||
| 1322 | 1323 | ||
| 1323 | @smallexample | 1324 | @smallexample |
| 1324 | @group | 1325 | @group |
| 1325 | (make-local-variable 'comment-start) | 1326 | (setq-local comment-start ";") |
| 1326 | (setq comment-start ";") | ||
| 1327 | @dots{} | 1327 | @dots{} |
| 1328 | @end group | 1328 | @end group |
| 1329 | @end smallexample | 1329 | @end smallexample |
| @@ -1337,6 +1337,7 @@ common. The following code sets up the common commands: | |||
| 1337 | @group | 1337 | @group |
| 1338 | (defvar lisp-mode-shared-map | 1338 | (defvar lisp-mode-shared-map |
| 1339 | (let ((map (make-sparse-keymap))) | 1339 | (let ((map (make-sparse-keymap))) |
| 1340 | (set-keymap-parent map prog-mode-map) | ||
| 1340 | (define-key map "\e\C-q" 'indent-sexp) | 1341 | (define-key map "\e\C-q" 'indent-sexp) |
| 1341 | (define-key map "\177" 'backward-delete-char-untabify) | 1342 | (define-key map "\177" 'backward-delete-char-untabify) |
| 1342 | map) | 1343 | map) |
| @@ -1351,7 +1352,7 @@ And here is the code to set up the keymap for Lisp mode: | |||
| 1351 | @group | 1352 | @group |
| 1352 | (defvar lisp-mode-map | 1353 | (defvar lisp-mode-map |
| 1353 | (let ((map (make-sparse-keymap)) | 1354 | (let ((map (make-sparse-keymap)) |
| 1354 | (menu-map (make-sparse-keymap "Lisp"))) | 1355 | (menu-map (make-sparse-keymap "Lisp"))) |
| 1355 | (set-keymap-parent map lisp-mode-shared-map) | 1356 | (set-keymap-parent map lisp-mode-shared-map) |
| 1356 | (define-key map "\e\C-x" 'lisp-eval-defun) | 1357 | (define-key map "\e\C-x" 'lisp-eval-defun) |
| 1357 | (define-key map "\C-c\C-z" 'run-lisp) | 1358 | (define-key map "\C-c\C-z" 'run-lisp) |
| @@ -1375,17 +1376,13 @@ Blank lines separate paragraphs. Semicolons start comments. | |||
| 1375 | 1376 | ||
| 1376 | \\@{lisp-mode-map@} | 1377 | \\@{lisp-mode-map@} |
| 1377 | Note that `run-lisp' may be used either to start an inferior Lisp job | 1378 | Note that `run-lisp' may be used either to start an inferior Lisp job |
| 1378 | or to switch back to an existing one. | 1379 | or to switch back to an existing one." |
| 1379 | @end group | 1380 | @end group |
| 1380 | |||
| 1381 | @group | 1381 | @group |
| 1382 | Entry to this mode calls the value of `lisp-mode-hook' | ||
| 1383 | if that value is non-nil." | ||
| 1384 | (lisp-mode-variables nil t) | 1382 | (lisp-mode-variables nil t) |
| 1385 | (set (make-local-variable 'find-tag-default-function) | 1383 | (setq-local find-tag-default-function 'lisp-find-tag-default) |
| 1386 | 'lisp-find-tag-default) | 1384 | (setq-local comment-start-skip |
| 1387 | (set (make-local-variable 'comment-start-skip) | 1385 | "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *") |
| 1388 | "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *") | ||
| 1389 | (setq imenu-case-fold-search t)) | 1386 | (setq imenu-case-fold-search t)) |
| 1390 | @end group | 1387 | @end group |
| 1391 | @end smallexample | 1388 | @end smallexample |
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index ae9a8ab6323..11a77bd1479 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi | |||
| @@ -1632,11 +1632,16 @@ coding system for a file based on its undecoded contents. | |||
| 1632 | 1632 | ||
| 1633 | Each function in this list should be written to look at text in the | 1633 | Each function in this list should be written to look at text in the |
| 1634 | current buffer, but should not modify it in any way. The buffer will | 1634 | current buffer, but should not modify it in any way. The buffer will |
| 1635 | contain undecoded text of parts of the file. Each function should | 1635 | contain the text of parts of the file. Each function should take one |
| 1636 | take one argument, @var{size}, which tells it how many characters to | 1636 | argument, @var{size}, which tells it how many characters to look at, |
| 1637 | look at, starting from point. If the function succeeds in determining | 1637 | starting from point. If the function succeeds in determining a coding |
| 1638 | a coding system for the file, it should return that coding system. | 1638 | system for the file, it should return that coding system. Otherwise, |
| 1639 | Otherwise, it should return @code{nil}. | 1639 | it should return @code{nil}. |
| 1640 | |||
| 1641 | The functions in this list could be called either when the file is | ||
| 1642 | visited and Emacs wants to decode its contents, and/or when the file's | ||
| 1643 | buffer is about to be saved and Emacs wants to determine how to encode | ||
| 1644 | its contents. | ||
| 1640 | 1645 | ||
| 1641 | If a file has a @samp{coding:} tag, that takes precedence, so these | 1646 | If a file has a @samp{coding:} tag, that takes precedence, so these |
| 1642 | functions won't be called. | 1647 | functions won't be called. |