aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
authorGlenn Morris2019-03-09 10:07:46 -0800
committerGlenn Morris2019-03-09 10:07:46 -0800
commit3b63afd73b541ea559aa58edc1901c8b30e2af40 (patch)
treea68afec4142bd100f3b6dfa3eb90aa2c0a71b34f /doc/lispref
parente1819a254f28a7dcba3c395c345fe237a512e92e (diff)
parent0589de55c465627c16314519568f22daa62ff654 (diff)
downloademacs-3b63afd73b541ea559aa58edc1901c8b30e2af40.tar.gz
emacs-3b63afd73b541ea559aa58edc1901c8b30e2af40.zip
Merge from origin/emacs-26
0589de5 (origin/emacs-26) Fix markup of fake keys in the ELisp manual 82d4b98 Avoid errors in Auto Revert mode a3b1935 Mention empty strings in file name expansion, emacs lisp refe... a38da0d cc-mode.texi: Work around makeinfo alignment bug. Fix proble... 464ee80 Warn against recursive invocations of 'buffer-list-update-hoo... 60b5c10 Provide more details in doc-string of 'delete-windows-on' (Bu... f0be0f1 Improve documentation of 'delete-windows-on' f1bddc7 * lisp/frame.el (make-frame-command): Doc fix. (Bug#34715) 2848623 Avoid undefined behavior in gdb-mi.el dbf1837 * lisp/window.el (fit-frame-to-buffer): Make doc-string more ... 099ef44 Minor spelling and grammar fixes (bug#34756) 52fd400 Minor improvement of documentation of '(when CONDITION . SPEC)' f872b65 Improve documentation of 'auto-coding-functions' 04cad5e Fix visiting XML files with non-Unix EOL format a89fabe Update example major mode code in Elisp manual # Conflicts: # lisp/autorevert.el # lisp/window.el
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/buffers.texi4
-rw-r--r--doc/lispref/display.texi10
-rw-r--r--doc/lispref/files.texi13
-rw-r--r--doc/lispref/keymaps.texi11
-rw-r--r--doc/lispref/modes.texi29
-rw-r--r--doc/lispref/nonascii.texi15
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
937above) and @code{select-window} (@pxref{Selecting Windows}). 937above) and @code{select-window} (@pxref{Selecting Windows}).
938
939Functions run by this hook should avoid calling @code{select-window}
940with a nil @var{norecord} argument or @code{with-temp-buffer} since
941either 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,
4894respectively. Both positions can be different when @code{object} is a 4894respectively. Both positions can be different when @code{object} is a
4895string. 4895string.
4896 4896
4897Note that @var{condition} will only be evaluated when redisplay
4898examines the text where this display spec is located, so this feature
4899is best suited for conditions that are relatively stable, i.e.@:
4900yield, for each particular buffer position, the same results on every
4901evaluation. If the results change for the same text location, e.g.,
4902if the result depends on the position of point, then the conditional
4903specification might not do what you want, because redisplay examines
4904only those parts of buffer text where it has reasons to assume that
4905something 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}.
16names. A file name is a string. Most of these functions expand file 16names. A file name is a string. Most of these functions expand file
17name arguments using the function @code{expand-file-name}, so that 17name 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.
22For example, when a remote file name is specified, Emacs accesses the 22For 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
2402superroot above the root directory @file{/}. On other filesystems, 2402superroot 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
2405Expanding @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
2405Note that @code{expand-file-name} does @emph{not} expand environment 2416Note that @code{expand-file-name} does @emph{not} expand environment
2406variables; only @code{substitute-in-file-name} does that: 2417variables; 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
2505subcommands of the fake function key @code{menu-bar}, as defined 2505subcommands of the fake function key @key{MENU-BAR}, as defined
2506in the active keymaps. 2506in 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
2557Here, @code{edit} is the fake function key used by the global map for 2557Here, @code{edit} is the symbol produced by a fake function key, it is
2558the @samp{Edit} menu bar item. The main reason to suppress a global 2558used by the global map for the @samp{Edit} menu bar item. The main
2559menu bar item is to regain space for mode-specific items. 2559reason to suppress a global menu bar item is to regain space for
2560mode-specific items.
2560 2561
2561@defvar menu-bar-final-items 2562@defvar menu-bar-final-items
2562Normally the menu bar shows global items followed by items defined by the 2563Normally 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,
2601but does not contract automatically. 2602but 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
2604fake function key called @code{tool-bar} (much like the way the menu 2605fake function key called @key{TOOL-BAR} (much like the way the menu
2605bar is controlled). So you define a tool bar item using 2606bar 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'.
1251Many other modes, such as `mail-mode', `outline-mode' and 1253Many 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@}
1377Note that `run-lisp' may be used either to start an inferior Lisp job 1378Note that `run-lisp' may be used either to start an inferior Lisp job
1378or to switch back to an existing one. 1379or to switch back to an existing one."
1379@end group 1380@end group
1380
1381@group 1381@group
1382Entry to this mode calls the value of `lisp-mode-hook'
1383if 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
1633Each function in this list should be written to look at text in the 1633Each function in this list should be written to look at text in the
1634current buffer, but should not modify it in any way. The buffer will 1634current buffer, but should not modify it in any way. The buffer will
1635contain undecoded text of parts of the file. Each function should 1635contain the text of parts of the file. Each function should take one
1636take one argument, @var{size}, which tells it how many characters to 1636argument, @var{size}, which tells it how many characters to look at,
1637look at, starting from point. If the function succeeds in determining 1637starting from point. If the function succeeds in determining a coding
1638a coding system for the file, it should return that coding system. 1638system for the file, it should return that coding system. Otherwise,
1639Otherwise, it should return @code{nil}. 1639it should return @code{nil}.
1640
1641The functions in this list could be called either when the file is
1642visited and Emacs wants to decode its contents, and/or when the file's
1643buffer is about to be saved and Emacs wants to determine how to encode
1644its contents.
1640 1645
1641If a file has a @samp{coding:} tag, that takes precedence, so these 1646If a file has a @samp{coding:} tag, that takes precedence, so these
1642functions won't be called. 1647functions won't be called.