aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2018-11-12 09:38:27 -0800
committerGlenn Morris2018-11-12 09:38:27 -0800
commit23209e2c194f20deba26d8894a25f0ac4a607fe3 (patch)
tree028930ef8214a18e9d1346afcfd8acc1ee21c1ed
parentdb711687c3983eda60275dadcc4dc75119e6c0ae (diff)
parent913c001f43350a70c8fc9d3eb846242eb63c9ae8 (diff)
downloademacs-23209e2c194f20deba26d8894a25f0ac4a607fe3.tar.gz
emacs-23209e2c194f20deba26d8894a25f0ac4a607fe3.zip
Merge from origin/emacs-26
913c001 * lisp/files.el (write-file): Clarify the doc string. (Bug#3... d614b84 Fix typos in midnight.el 8c2778a Improve documentation of 'move-file-to-trash' c7b8a51 ; * doc/lispref/functions.texi (Anonymous Functions): Fix typo. 92296de * src/data.c (Ftype_of): xwidget objects are possible! (bug#3... a3242cc Improve documentation of Diff mode 39e85a0 Note that lex bound lambda forms are not self-quoting (Bug#33... fa605f2 Rewrite buffer display related doc-strings and doc aa55659 Fix call to GlobalMemoryStatusEx in w32.c # Conflicts: # doc/emacs/files.texi # src/data.c
-rw-r--r--doc/emacs/files.texi97
-rw-r--r--doc/lispref/functions.texi9
-rw-r--r--doc/lispref/windows.texi58
-rw-r--r--lisp/files.el15
-rw-r--r--lisp/midnight.el6
-rw-r--r--lisp/subr.el13
-rw-r--r--lisp/window.el286
-rw-r--r--src/data.c10
-rw-r--r--src/w32.c1
-rw-r--r--src/xwidget.c2
10 files changed, 292 insertions, 205 deletions
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 6c68075ae4a..649fa8bcb4d 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1427,23 +1427,30 @@ manually, type @kbd{M-x diff-mode}.
1427@cindex hunk, diff 1427@cindex hunk, diff
1428 The changes specified in a patch are grouped into @dfn{hunks}, which 1428 The changes specified in a patch are grouped into @dfn{hunks}, which
1429are contiguous chunks of text that contain one or more changed lines. 1429are contiguous chunks of text that contain one or more changed lines.
1430Hunks can also include unchanged lines to provide context for the 1430Hunks usually also include unchanged lines to provide context for the
1431changes. Each hunk is preceded by a @dfn{hunk header}, which 1431changes. Each hunk is preceded by a @dfn{hunk header}, which
1432specifies the old and new line numbers at which the hunk occurs. Diff 1432specifies the old and new line numbers where the hunk's changes occur.
1433mode highlights each hunk header, to distinguish it from the actual 1433Diff mode highlights each hunk header, to distinguish it from the
1434contents of the hunk. 1434actual contents of the hunk.
1435
1436 The first hunk in a patch is preceded by a file header, which shows
1437the names of the new and the old versions of the file, and their time
1438stamps. If a patch shows changes for more than one file, each file
1439has such a header before the first hunk of that file's changes.
1435 1440
1436@vindex diff-update-on-the-fly 1441@vindex diff-update-on-the-fly
1437 You can edit a Diff mode buffer like any other buffer. (If it is 1442 You can edit a Diff mode buffer like any other buffer. (If it is
1438read-only, you need to make it writable first. @xref{Misc Buffer}.) 1443read-only, you need to make it writable first; see @ref{Misc Buffer}.)
1439Whenever you change a hunk, Diff mode attempts to automatically 1444Whenever you edit a hunk, Diff mode attempts to automatically correct
1440correct the line numbers in the hunk headers, to ensure that the patch 1445the line numbers in the hunk headers, to ensure that the patch remains
1441remains correct. To disable automatic line number correction, 1446correct, and could still be applied by @command{patch}. To disable
1442change the variable @code{diff-update-on-the-fly} to @code{nil}. 1447automatic line number correction, change the variable
1443 1448@code{diff-update-on-the-fly} to @code{nil}.
1444 Diff mode treats each hunk as an error message, similar to 1449
1445Compilation mode. Thus, you can use commands such as @kbd{M-g M-n} to 1450 Diff mode arranges for hunks to be treated as compiler error
1446visit the corresponding source locations. @xref{Compilation Mode}. 1451messages by @kbd{M-g M-n} and other commands that handle error messages
1452(@pxref{Compilation Mode}). Thus, you can use the compilation-mode
1453commands to visit the corresponding source locations.
1447 1454
1448 In addition, Diff mode provides the following commands to navigate, 1455 In addition, Diff mode provides the following commands to navigate,
1449manipulate and apply parts of patches: 1456manipulate and apply parts of patches:
@@ -1451,7 +1458,8 @@ manipulate and apply parts of patches:
1451@table @kbd 1458@table @kbd
1452@item M-n 1459@item M-n
1453@findex diff-hunk-next 1460@findex diff-hunk-next
1454Move to the next hunk-start (@code{diff-hunk-next}). 1461Move to the next hunk-start (@code{diff-hunk-next}). With prefix
1462argument @var{n}, move forward to the @var{n}th next hunk.
1455 1463
1456@findex diff-auto-refine-mode 1464@findex diff-auto-refine-mode
1457@cindex mode, Diff Auto-Refine 1465@cindex mode, Diff Auto-Refine
@@ -1469,19 +1477,22 @@ default, add this to your init file (@pxref{Hooks}):
1469 1477
1470@item M-p 1478@item M-p
1471@findex diff-hunk-prev 1479@findex diff-hunk-prev
1472Move to the previous hunk-start (@code{diff-hunk-prev}). Like 1480Move to the previous hunk-start (@code{diff-hunk-prev}). With prefix
1481argument @var{n}, move back to the @var{n}th previous hunk. Like
1473@kbd{M-n}, this has the side-effect of refining the hunk you move to, 1482@kbd{M-n}, this has the side-effect of refining the hunk you move to,
1474unless you disable Diff Auto-Refine mode. 1483unless you disable Diff Auto-Refine mode.
1475 1484
1476@item M-@} 1485@item M-@}
1477@findex diff-file-next 1486@findex diff-file-next
1478Move to the next file-start, in a multi-file patch 1487Move to the next file-start, in a multi-file patch
1479(@code{diff-file-next}). 1488(@code{diff-file-next}). With prefix argument @var{n}, move forward
1489to the start of the @var{n}th next file.
1480 1490
1481@item M-@{ 1491@item M-@{
1482@findex diff-file-prev 1492@findex diff-file-prev
1483Move to the previous file-start, in a multi-file patch 1493Move to the previous file-start, in a multi-file patch
1484(@code{diff-file-prev}). 1494(@code{diff-file-prev}). With prefix argument @var{n}, move back to
1495the start of the @var{n}th previous file.
1485 1496
1486@item M-k 1497@item M-k
1487@findex diff-hunk-kill 1498@findex diff-hunk-kill
@@ -1496,7 +1507,10 @@ In a multi-file patch, kill the current file part.
1496@findex diff-apply-hunk 1507@findex diff-apply-hunk
1497@cindex patches, applying 1508@cindex patches, applying
1498Apply this hunk to its target file (@code{diff-apply-hunk}). With a 1509Apply this hunk to its target file (@code{diff-apply-hunk}). With a
1499prefix argument of @kbd{C-u}, revert this hunk. 1510prefix argument of @kbd{C-u}, revert this hunk, i.e.@: apply the
1511reverse of the hunk, which changes the ``new'' version into the ``old''
1512version. If @code{diff-jump-to-old-file} is non-@code{nil}, apply the
1513hunk to the ``old'' version of the file instead.
1500 1514
1501@item C-c C-b 1515@item C-c C-b
1502@findex diff-refine-hunk 1516@findex diff-refine-hunk
@@ -1506,8 +1520,16 @@ of each changed line were actually changed.
1506 1520
1507@item C-c C-c 1521@item C-c C-c
1508@findex diff-goto-source 1522@findex diff-goto-source
1523@vindex diff-jump-to-old-file
1509Go to the source file and line corresponding to this hunk 1524Go to the source file and line corresponding to this hunk
1510(@code{diff-goto-source}). 1525(@code{diff-goto-source}). By default, this jumps to the ``new''
1526version of the file, the one shown first on the file header.
1527With a prefix argument, jump to the ``old'' version instead. If
1528@code{diff-jump-to-old-file} is non-@code{nil}, this command by
1529default jumps to the ``old'' file, and the meaning of the prefix
1530argument is reversed. If the prefix argument is a number greater than
15318 (e.g., if you type @kbd{C-u C-u C-c C-c}), then this command also
1532sets @code{diff-jump-to-old-file} for the next invocation.
1511 1533
1512@item C-c C-e 1534@item C-c C-e
1513@findex diff-ediff-patch 1535@findex diff-ediff-patch
@@ -1517,41 +1539,47 @@ Start an Ediff session with the patch (@code{diff-ediff-patch}).
1517@item C-c C-n 1539@item C-c C-n
1518@findex diff-restrict-view 1540@findex diff-restrict-view
1519Restrict the view to the current hunk (@code{diff-restrict-view}). 1541Restrict the view to the current hunk (@code{diff-restrict-view}).
1520@xref{Narrowing}. With a prefix argument of @kbd{C-u}, restrict the 1542@xref{Narrowing}. With a prefix argument, restrict the
1521view to the current file of a multiple-file patch. To widen again, 1543view to the current file of a multiple-file patch. To widen again,
1522use @kbd{C-x n w} (@code{widen}). 1544use @kbd{C-x n w} (@code{widen}).
1523 1545
1524@item C-c C-r 1546@item C-c C-r
1525@findex diff-reverse-direction 1547@findex diff-reverse-direction
1526Reverse the direction of comparison for the entire buffer 1548Reverse the direction of comparison for the entire buffer
1527(@code{diff-reverse-direction}). 1549(@code{diff-reverse-direction}). With a prefix argument, reverse the
1550direction only inside the current region (@pxref{Mark}). Reversing
1551the direction means changing the hunks and the file-start headers to
1552produce a patch that would change the ``new'' version into the ``old''
1553one.
1528 1554
1529@item C-c C-s 1555@item C-c C-s
1530@findex diff-split-hunk 1556@findex diff-split-hunk
1531Split the hunk at point (@code{diff-split-hunk}). This is for 1557Split the hunk at point (@code{diff-split-hunk}) into two separate
1532manually editing patches, and only works with the @dfn{unified diff 1558hunks. This inserts a hunk header and modifies the header of the
1533format} produced by the @option{-u} or @option{--unified} options to 1559current hunk. This command is useful for manually editing patches,
1534the @command{diff} program. If you need to split a hunk in the 1560and only works with the @dfn{unified diff format} produced by the
1535@dfn{context diff format} produced by the @option{-c} or 1561@option{-u} or @option{--unified} options to the @command{diff}
1536@option{--context} options to @command{diff}, first convert the buffer 1562program. If you need to split a hunk in the @dfn{context diff format}
1537to the unified diff format with @kbd{C-c C-u}. 1563produced by the @option{-c} or @option{--context} options to
1564@command{diff}, first convert the buffer to the unified diff format
1565with @kbd{C-c C-u}.
1538 1566
1539@item C-c C-d 1567@item C-c C-d
1540@findex diff-unified->context 1568@findex diff-unified->context
1541Convert the entire buffer to the @dfn{context diff format} 1569Convert the entire buffer to the @dfn{context diff format}
1542(@code{diff-unified->context}). With a prefix argument, convert only 1570(@code{diff-unified->context}). With a prefix argument, convert only
1543the text within the region. 1571the hunks within the region.
1544 1572
1545@item C-c C-u 1573@item C-c C-u
1546@findex diff-context->unified 1574@findex diff-context->unified
1547Convert the entire buffer to unified diff format 1575Convert the entire buffer to unified diff format
1548(@code{diff-context->unified}). With a prefix argument, convert 1576(@code{diff-context->unified}). With a prefix argument, convert
1549unified format to context format. When the mark is active, convert 1577unified format to context format. When the mark is active, convert
1550only the text within the region. 1578only the hunks within the region.
1551 1579
1552@item C-c C-w 1580@item C-c C-w
1553@findex diff-ignore-whitespace-hunk 1581@findex diff-ignore-whitespace-hunk
1554Re-diff the current hunk, disregarding changes in whitespace 1582Re-generate the current hunk, disregarding changes in whitespace
1555(@code{diff-ignore-whitespace-hunk}). 1583(@code{diff-ignore-whitespace-hunk}).
1556 1584
1557@item C-x 4 A 1585@item C-x 4 A
@@ -1582,7 +1610,8 @@ that whitespace in both the patch and the patched source file(s).
1582This command does not save the modifications that it makes, so you can 1610This command does not save the modifications that it makes, so you can
1583decide whether to save the changes (the list of modified files is 1611decide whether to save the changes (the list of modified files is
1584displayed in the echo area). With a prefix argument, it tries to 1612displayed in the echo area). With a prefix argument, it tries to
1585modify the original source files rather than the patched source files. 1613modify the original (``old'') source files rather than the patched
1614(``new'') source files.
1586 1615
1587@node Copying and Naming 1616@node Copying and Naming
1588@section Copying, Naming and Renaming Files 1617@section Copying, Naming and Renaming Files
@@ -1668,10 +1697,12 @@ Dired rather than @code{delete-file}. @xref{Dired Deletion}.
1668 1697
1669@cindex trash 1698@cindex trash
1670@cindex recycle bin 1699@cindex recycle bin
1700@findex move-file-to-trash
1671 @kbd{M-x move-file-to-trash} moves a file into the system 1701 @kbd{M-x move-file-to-trash} moves a file into the system
1672@dfn{Trash} (or @dfn{Recycle Bin}). This is a facility available on 1702@dfn{Trash} (or @dfn{Recycle Bin}). This is a facility available on
1673most operating systems; files that are moved into the Trash can be 1703most operating systems; files that are moved into the Trash can be
1674brought back later if you change your mind. 1704brought back later if you change your mind. (The way to restore
1705trashed files is system-dependent.)
1675 1706
1676@vindex delete-by-moving-to-trash 1707@vindex delete-by-moving-to-trash
1677 By default, Emacs deletion commands do @emph{not} use the Trash. To 1708 By default, Emacs deletion commands do @emph{not} use the Trash. To
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 69e9919f708..bf0354c90da 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -1082,15 +1082,18 @@ This macro returns an anonymous function with argument list
1082@var{args}, documentation string @var{doc} (if any), interactive spec 1082@var{args}, documentation string @var{doc} (if any), interactive spec
1083@var{interactive} (if any), and body forms given by @var{body}. 1083@var{interactive} (if any), and body forms given by @var{body}.
1084 1084
1085In effect, this macro makes @code{lambda} forms self-quoting: 1085Under dynamic binding, this macro effectively makes @code{lambda}
1086evaluating a form whose @sc{car} is @code{lambda} yields the form 1086forms self-quoting: evaluating a form whose @sc{car} is @code{lambda}
1087itself: 1087yields the form itself:
1088 1088
1089@example 1089@example
1090(lambda (x) (* x x)) 1090(lambda (x) (* x x))
1091 @result{} (lambda (x) (* x x)) 1091 @result{} (lambda (x) (* x x))
1092@end example 1092@end example
1093 1093
1094Note that when evaluating under lexical binding the result is a
1095closure object (@pxref{Closures}).
1096
1094The @code{lambda} form has one other effect: it tells the Emacs 1097The @code{lambda} form has one other effect: it tells the Emacs
1095evaluator and byte-compiler that its argument is a function, by using 1098evaluator and byte-compiler that its argument is a function, by using
1096@code{function} as a subroutine (see below). 1099@code{function} as a subroutine (see below).
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 9301fdfa9d6..bce2459a2f5 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -2747,8 +2747,8 @@ the buffer. This entry is used by
2747 2747
2748@vindex reusable-frames@r{, a buffer display action alist entry} 2748@vindex reusable-frames@r{, a buffer display action alist entry}
2749@item reusable-frames 2749@item reusable-frames
2750The value specifies the frame(s) to search for a window that can be 2750The value specifies the set of frames to search for a window that can
2751reused because it already displays the buffer. It can be set as 2751be reused because it already displays the buffer. It can be set as
2752follows: 2752follows:
2753 2753
2754@itemize @bullet 2754@itemize @bullet
@@ -2792,17 +2792,20 @@ entry.
2792@vindex window-height@r{, a buffer display action alist entry} 2792@vindex window-height@r{, a buffer display action alist entry}
2793@item window-height 2793@item window-height
2794The value specifies whether and how to adjust the height of the chosen 2794The value specifies whether and how to adjust the height of the chosen
2795window, and can have the following values: 2795window and can be one of the following:
2796 2796
2797@itemize @bullet 2797@itemize @bullet
2798@item 2798@item
2799@code{nil} means to leave the height of the chosen window alone. 2799@code{nil} means to leave the height of the chosen window alone.
2800 2800
2801@item 2801@item
2802A number specifies the desired height of the chosen window. An 2802An integer number specifies the desired total height of the chosen
2803integer specifies the number of lines of the window. A floating-point 2803window in lines.
2804number gives the fraction of the window's height with respect to the 2804
2805height of the frame's root window. 2805@item
2806A floating-point number specifies the fraction of the chosen window's
2807desired total height with respect to the total height of its frame's
2808root window.
2806 2809
2807@item 2810@item
2808If the value specifies a function, that function is called with one 2811If the value specifies a function, that function is called with one
@@ -2812,7 +2815,11 @@ are @code{shrink-window-if-larger-than-buffer} and
2812@code{fit-window-to-buffer}, see @ref{Resizing Windows}. 2815@code{fit-window-to-buffer}, see @ref{Resizing Windows}.
2813@end itemize 2816@end itemize
2814 2817
2815All action functions that choose a window should process this entry. 2818By convention, the height of the chosen window is adjusted only if the
2819window is part of a vertical combination (@pxref{Windows and Frames})
2820to avoid changing the height of other, unrelated windows. Also, this
2821entry should be processed only under certain conditions which are
2822specified right below this list.
2816 2823
2817@vindex window-width@r{, a buffer display action alist entry} 2824@vindex window-width@r{, a buffer display action alist entry}
2818@item window-width 2825@item window-width
@@ -2825,10 +2832,13 @@ value can be one of the following:
2825@code{nil} means to leave the width of the chosen window alone. 2832@code{nil} means to leave the width of the chosen window alone.
2826 2833
2827@item 2834@item
2828A number specifies the desired width of the chosen window. An integer 2835An integer specifies the desired total width of the chosen window in
2829specifies the number of columns of the window. A floating-point 2836columns.
2830number gives the fraction of the window's width with respect to the 2837
2831width of the frame's root window. 2838@item
2839A floating-point number specifies the fraction of the chosen window's
2840desired total width with respect to the total width of the frame's
2841root window.
2832 2842
2833@item 2843@item
2834If the value specifies a function, that function is called with one 2844If the value specifies a function, that function is called with one
@@ -2836,16 +2846,21 @@ argument---the chosen window. The function is supposed to adjust the
2836width of the window; its return value is ignored. 2846width of the window; its return value is ignored.
2837@end itemize 2847@end itemize
2838 2848
2839All action functions that choose a window should process this entry. 2849By convention, the width of the chosen window is adjusted only if the
2850window is part of a horizontal combination (@pxref{Windows and
2851Frames}) to avoid changing the width of other, unrelated windows.
2852Also, this entry should be processed under only certain conditions
2853which are specified right below this list.
2840 2854
2841@vindex preserve-size@r{, a buffer display action alist entry} 2855@vindex preserve-size@r{, a buffer display action alist entry}
2842@item preserve-size 2856@item preserve-size
2843If non-@code{nil} such an entry tells Emacs to preserve the size of 2857If non-@code{nil} such an entry tells Emacs to preserve the size of
2844the window chosen (@pxref{Preserving Window Sizes}). The value should 2858the window chosen (@pxref{Preserving Window Sizes}). The value should
2845be either @code{(t . nil)} to preserve the width of the window, 2859be either @w{@code{(t . nil)}} to preserve the width of the window,
2846@code{(nil . t)} to preserve its height or @code{(t . t)} to preserve 2860@w{@code{(nil . t)}} to preserve its height or @w{@code{(t . t)}} to
2847both its width and its height. All action functions that choose a 2861preserve both, its width and its height. This entry should be
2848window should process this entry. 2862processed only under certain conditions which are specified right
2863after this list.
2849 2864
2850@vindex pop-up-frame-parameters@r{, a buffer display action alist entry} 2865@vindex pop-up-frame-parameters@r{, a buffer display action alist entry}
2851@item pop-up-frame-parameters 2866@item pop-up-frame-parameters
@@ -2900,6 +2915,15 @@ will display the buffer. @code{display-buffer-no-window} is the only
2900action function that cares about this entry. 2915action function that cares about this entry.
2901@end table 2916@end table
2902 2917
2918By convention, the entries @code{window-height}, @code{window-width}
2919and @code{preserve-size} are applied after the chosen window's buffer
2920has been set up and if and only if that window never showed another
2921buffer before. More precisely, the latter means that the window must
2922have been either created by the current @code{display-buffer} call or
2923the window was created earlier by @code{display-buffer} to show the
2924buffer and never was used to show another buffer until it was reused
2925by the current invocation of @code{display-buffer}.
2926
2903 2927
2904@node Choosing Window Options 2928@node Choosing Window Options
2905@subsection Additional Options for Displaying Buffers 2929@subsection Additional Options for Displaying Buffers
diff --git a/lisp/files.el b/lisp/files.el
index 0f0c7d1559a..47f7acf92cc 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4324,12 +4324,15 @@ the old visited file has been renamed to the new name FILENAME."
4324 "Write current buffer into file FILENAME. 4324 "Write current buffer into file FILENAME.
4325This makes the buffer visit that file, and marks it as not modified. 4325This makes the buffer visit that file, and marks it as not modified.
4326 4326
4327If you specify just a directory name as FILENAME, that means to use 4327Interactively, prompt for FILENAME.
4328the default file name but in that directory. You can also yank 4328If you specify just a directory name as FILENAME, that means to write
4329the default file name into the minibuffer to edit it, using \\<minibuffer-local-map>\\[next-history-element]. 4329to a file in that directory. In this case, the base name of the file
4330 4330is the same as that of the file visited in the buffer, or the buffer
4331If the buffer is not already visiting a file, the default file name 4331name sans leading directories, if any, if the buffer is not already
4332for the output file is the buffer name. 4332visiting a file.
4333
4334You can also yank the file name into the minibuffer to edit it,
4335using \\<minibuffer-local-map>\\[next-history-element].
4333 4336
4334If optional second arg CONFIRM is non-nil, this function 4337If optional second arg CONFIRM is non-nil, this function
4335asks for confirmation before overwriting an existing file. 4338asks for confirmation before overwriting an existing file.
diff --git a/lisp/midnight.el b/lisp/midnight.el
index 82994c579f7..7c4096c326f 100644
--- a/lisp/midnight.el
+++ b/lisp/midnight.el
@@ -64,7 +64,7 @@ the time when it is run.")
64 64
65(defcustom clean-buffer-list-delay-general 3 65(defcustom clean-buffer-list-delay-general 3
66 "The number of days before any buffer becomes eligible for autokilling. 66 "The number of days before any buffer becomes eligible for autokilling.
67The autokilling is done by `clean-buffer-list' when is it in `midnight-hook'. 67The autokilling is done by `clean-buffer-list' when it is in `midnight-hook'.
68Currently displayed and/or modified (unsaved) buffers, as well as buffers 68Currently displayed and/or modified (unsaved) buffers, as well as buffers
69matching `clean-buffer-list-kill-never-buffer-names' and 69matching `clean-buffer-list-kill-never-buffer-names' and
70`clean-buffer-list-kill-never-regexps' are excluded." 70`clean-buffer-list-kill-never-regexps' are excluded."
@@ -81,7 +81,7 @@ displayed more than this many seconds ago."
81 "List of regexps saying which buffers will be killed at midnight. 81 "List of regexps saying which buffers will be killed at midnight.
82If buffer name matches a regexp in the list and the buffer was not displayed 82If buffer name matches a regexp in the list and the buffer was not displayed
83in the last `clean-buffer-list-delay-special' seconds, it is killed by 83in the last `clean-buffer-list-delay-special' seconds, it is killed by
84`clean-buffer-list' when is it in `midnight-hook'. 84`clean-buffer-list' when it is in `midnight-hook'.
85If a member of the list is a cons, its `car' is the regexp and its `cdr' is 85If a member of the list is a cons, its `car' is the regexp and its `cdr' is
86the number of seconds to use instead of `clean-buffer-list-delay-special'. 86the number of seconds to use instead of `clean-buffer-list-delay-special'.
87See also `clean-buffer-list-kill-buffer-names', 87See also `clean-buffer-list-kill-buffer-names',
@@ -101,7 +101,7 @@ if the buffer should be killed by `clean-buffer-list'."
101 "List of strings saying which buffers will be killed at midnight. 101 "List of strings saying which buffers will be killed at midnight.
102Buffers with names in this list, which were not displayed in the last 102Buffers with names in this list, which were not displayed in the last
103`clean-buffer-list-delay-special' seconds, are killed by `clean-buffer-list' 103`clean-buffer-list-delay-special' seconds, are killed by `clean-buffer-list'
104when is it in `midnight-hook'. 104when it is in `midnight-hook'.
105If a member of the list is a cons, its `car' is the name and its `cdr' is 105If a member of the list is a cons, its `car' is the name and its `cdr' is
106the number of seconds to use instead of `clean-buffer-list-delay-special'. 106the number of seconds to use instead of `clean-buffer-list-delay-special'.
107See also `clean-buffer-list-kill-regexps', 107See also `clean-buffer-list-kill-regexps',
diff --git a/lisp/subr.el b/lisp/subr.el
index aaf8909e0c1..1fd86fd7495 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -93,12 +93,13 @@ Info node `(elisp)Specification List' for details."
93 `(put (quote ,symbol) 'edebug-form-spec (quote ,spec))) 93 `(put (quote ,symbol) 'edebug-form-spec (quote ,spec)))
94 94
95(defmacro lambda (&rest cdr) 95(defmacro lambda (&rest cdr)
96 "Return a lambda expression. 96 "Return an anonymous function.
97A call of the form (lambda ARGS DOCSTRING INTERACTIVE BODY) is 97Under dynamic binding, a call of the form (lambda ARGS DOCSTRING
98self-quoting; the result of evaluating the lambda expression is the 98INTERACTIVE BODY) is self-quoting; the result of evaluating the
99expression itself. The lambda expression may then be treated as a 99lambda expression is the expression itself. Under lexical
100function, i.e., stored as the function value of a symbol, passed to 100binding, the result is a closure. Regardless, the result is a
101`funcall' or `mapcar', etc. 101function, i.e., it may be stored as the function value of a
102symbol, passed to `funcall' or `mapcar', etc.
102 103
103ARGS should take the same form as an argument list for a `defun'. 104ARGS should take the same form as an argument list for a `defun'.
104DOCSTRING is an optional documentation string. 105DOCSTRING is an optional documentation string.
diff --git a/lisp/window.el b/lisp/window.el
index c0eeba7261d..172ee729978 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -6772,7 +6772,11 @@ live."
6772 ((or (eq type 'frame) 6772 ((or (eq type 'frame)
6773 (and (eq (car quit-restore) 'same) 6773 (and (eq (car quit-restore) 'same)
6774 (eq (nth 1 quit-restore) 'frame))) 6774 (eq (nth 1 quit-restore) 'frame)))
6775 ;; Adjust size of frame if asked for. 6775 ;; A window that never showed another buffer but BUFFER ever
6776 ;; since it was created on a new frame.
6777 ;;
6778 ;; Adjust size of frame if asked for. We probably should do
6779 ;; that only for a single window frame.
6776 (cond 6780 (cond
6777 ((not size)) 6781 ((not size))
6778 ((consp size) 6782 ((consp size)
@@ -6791,7 +6795,10 @@ live."
6791 ((or (eq type 'window) 6795 ((or (eq type 'window)
6792 (and (eq (car quit-restore) 'same) 6796 (and (eq (car quit-restore) 'same)
6793 (eq (nth 1 quit-restore) 'window))) 6797 (eq (nth 1 quit-restore) 'window)))
6794 ;; Adjust height of window if asked for. 6798 ;; A window that never showed another buffer but BUFFER ever
6799 ;; since it was created on an existing frame.
6800 ;;
6801 ;; Adjust width and/or height of window if asked for.
6795 (cond 6802 (cond
6796 ((not height)) 6803 ((not height))
6797 ((numberp height) 6804 ((numberp height)
@@ -6887,31 +6894,41 @@ The actual non-nil value of this variable will be copied to the
6887 "Custom type for `display-buffer' actions.") 6894 "Custom type for `display-buffer' actions.")
6888 6895
6889(defvar display-buffer-overriding-action '(nil . nil) 6896(defvar display-buffer-overriding-action '(nil . nil)
6890 "User-defined overriding action to perform to display a buffer. 6897 "Overriding action for buffer display.
6891This action overrides all the other actions in the action variables 6898This action overrides all the other actions in the action
6892and arguments passed to `display-buffer'. 6899variables and arguments passed to `display-buffer'. The value
6893Value should be a cons cell (FUNCTION . ALIST), where FUNCTION is 6900should be a cons cell (FUNCTIONS . ALIST), where FUNCTIONS is a
6894a function or a list of functions. Each function should accept 6901function or a list of functions. Each function should accept two
6895two arguments: a buffer to display and an alist similar to ALIST. 6902arguments: a buffer to display and an alist similar to ALIST.
6896The default value is empty. 6903See `display-buffer' for details.
6897See `display-buffer' for details.") 6904
6905This variable is not intended for user customization. Lisp
6906programs should never set this variable permanently but may bind
6907it around calls of buffer display functions like `display-buffer'
6908or `pop-to-buffer'. Since such a binding will affect any nested
6909buffer display requests, this variable should be used with utmost
6910care.")
6898(put 'display-buffer-overriding-action 'risky-local-variable t) 6911(put 'display-buffer-overriding-action 'risky-local-variable t)
6899 6912
6900(defcustom display-buffer-alist nil 6913(defcustom display-buffer-alist nil
6901 "Alist of user-defined conditional actions for `display-buffer'. 6914 "Alist of user-defined conditional actions for `display-buffer'.
6902Its value takes effect before `display-buffer-base-action' 6915Its value takes effect before processing the ACTION argument of
6903and `display-buffer-fallback-action', but after 6916`display-buffer' and before `display-buffer-base-action' and
6917`display-buffer-fallback-action', but after
6904`display-buffer-overriding-action', which see. 6918`display-buffer-overriding-action', which see.
6905If non-nil, this is a list of elements (CONDITION . ACTION), where: 6919
6920If non-nil, this is an alist of elements (CONDITION . ACTION),
6921where:
6906 6922
6907 CONDITION is either a regexp matching buffer names, or a 6923 CONDITION is either a regexp matching buffer names, or a
6908 function that takes two arguments - a buffer name and the 6924 function that takes two arguments - a buffer name and the
6909 ACTION argument of `display-buffer' - and returns a boolean. 6925 ACTION argument of `display-buffer' - and returns a boolean.
6910 6926
6911 ACTION is a cons cell (FUNCTION . ALIST), where FUNCTION is a 6927 ACTION is a cons cell (FUNCTIONS . ALIST), where FUNCTIONS is an
6912 function or a list of functions. Each such function should 6928 action function or a list of action functions and ALIST is an
6913 accept two arguments: a buffer to display and an alist of the 6929 action alist. Each such action function should accept two
6914 same form as ALIST. See `display-buffer' for details. 6930 arguments: a buffer to display and an alist of the same form as
6931 ALIST. See `display-buffer' for details.
6915 6932
6916`display-buffer' scans this alist until it either finds a 6933`display-buffer' scans this alist until it either finds a
6917matching regular expression or the function specified by a 6934matching regular expression or the function specified by a
@@ -6931,11 +6948,12 @@ associated action to the list of actions it will try."
6931This is the default action used by `display-buffer' if no other 6948This is the default action used by `display-buffer' if no other
6932actions are specified or all fail, before falling back on 6949actions are specified or all fail, before falling back on
6933`display-buffer-fallback-action'. 6950`display-buffer-fallback-action'.
6934It should be a cons cell (FUNCTION . ALIST), where FUNCTION is a 6951
6935function or a list of functions. Each function should accept two 6952It should be a cons cell (FUNCTIONS . ALIST), where FUNCTIONS is
6936arguments: a buffer to display and an alist similar to ALIST. 6953an action function or a list of action functions and ALIST is an
6937The default value is empty. 6954action alist. Each such action function should accept two
6938See `display-buffer' for details." 6955arguments: a buffer to display and an alist of the same form as
6956ALIST. See `display-buffer' for details."
6939 :type display-buffer--action-custom-type 6957 :type display-buffer--action-custom-type
6940 :risky t 6958 :risky t
6941 :version "24.1" 6959 :version "24.1"
@@ -6951,17 +6969,20 @@ See `display-buffer' for details."
6951 display-buffer-pop-up-frame)) 6969 display-buffer-pop-up-frame))
6952 "Default fallback action for `display-buffer'. 6970 "Default fallback action for `display-buffer'.
6953This is the action used by `display-buffer' if no other actions 6971This is the action used by `display-buffer' if no other actions
6954specified, e.g. by the user options `display-buffer-alist' or 6972have been specified, for example, by the user options
6955`display-buffer-base-action', or they all fail. See `display-buffer'.") 6973`display-buffer-alist' or `display-buffer-base-action', or they
6974all fail. It should never be set by programs or users. See
6975`display-buffer'.")
6956(put 'display-buffer-fallback-action 'risky-local-variable t) 6976(put 'display-buffer-fallback-action 'risky-local-variable t)
6957 6977
6958(defun display-buffer-assq-regexp (buffer-name alist action) 6978(defun display-buffer-assq-regexp (buffer-name alist action)
6959 "Retrieve ALIST entry corresponding to BUFFER-NAME. 6979 "Retrieve ALIST entry corresponding to BUFFER-NAME.
6960This returns the cdr of the ALIST entry if either its key is a 6980This returns the cdr of the alist entry ALIST if either its key
6961string that matches BUFFER-NAME, as reported by `string-match-p'; 6981is a string that matches BUFFER-NAME, as reported by
6962or if the key is a function that returns a non-nil when called 6982`string-match-p'; or if the key is a function that returns
6963with 3 arguments: the ALIST key, BUFFER-NAME, and ACTION. 6983non-nil when called with three arguments: the ALIST key,
6964ACTION should have the form of the action argument passed to `display-buffer'." 6984BUFFER-NAME and ACTION. ACTION should have the form of the
6985action argument passed to `display-buffer'."
6965 (catch 'match 6986 (catch 'match
6966 (dolist (entry alist) 6987 (dolist (entry alist)
6967 (let ((key (car entry))) 6988 (let ((key (car entry)))
@@ -6990,100 +7011,99 @@ fails, call `display-buffer-pop-up-frame'.")
6990 7011
6991(defun display-buffer (buffer-or-name &optional action frame) 7012(defun display-buffer (buffer-or-name &optional action frame)
6992 "Display BUFFER-OR-NAME in some window, without selecting it. 7013 "Display BUFFER-OR-NAME in some window, without selecting it.
6993BUFFER-OR-NAME must be a buffer or the name of an existing 7014BUFFER-OR-NAME must be a buffer or a string naming a live buffer.
6994buffer. Return the window chosen for displaying BUFFER-OR-NAME, 7015Return the window chosen for displaying that buffer, or nil if no
6995or nil if no such window is found. 7016such window is found.
6996 7017
6997Optional argument ACTION, if non-nil, should specify a display 7018Optional argument ACTION, if non-nil, should specify a buffer
6998action. Its form is described below. 7019display action of the form (FUNCTIONS . ALIST). FUNCTIONS is
6999 7020either an \"action function\" or a possibly empty list of action
7000Optional argument FRAME, if non-nil, acts like an additional 7021functions. ALIST is a possibly empty \"action alist\".
7001ALIST entry (reusable-frames . FRAME) to the action list of ACTION, 7022
7002specifying the frame(s) to search for a window that is already 7023An action function is a function that accepts two arguments: the
7003displaying the buffer. See `display-buffer-reuse-window'. 7024buffer to display and an action alist. Based on those arguments,
7004 7025it should try to display the buffer in a window and return that
7005If ACTION is non-nil, it should have the form (FUNCTION . ALIST), 7026window. An action alist is an association list mapping symbols
7006where FUNCTION is either a function or a list of functions, and 7027to values. Action functions use the action alist passed to them
7007ALIST is an arbitrary association list (alist). 7028to fine-tune their behaviors.
7008 7029
7009Each such function should accept two arguments: the buffer to 7030`display-buffer' builds a list of action functions and an action
7010display and an alist. Based on those arguments, it should 7031alist by combining any action functions and alists specified by
7011display the buffer and return the window. If the caller is
7012prepared to handle the case of not displaying the buffer
7013and returning nil from `display-buffer' it should pass
7014\(allow-no-window . t) as an element of the ALIST.
7015
7016The `display-buffer' function builds a function list and an alist
7017by combining the functions and alists specified in
7018`display-buffer-overriding-action', `display-buffer-alist', the 7032`display-buffer-overriding-action', `display-buffer-alist', the
7019ACTION argument, `display-buffer-base-action', and 7033ACTION argument, `display-buffer-base-action', and
7020`display-buffer-fallback-action' (in order). Then it calls each 7034`display-buffer-fallback-action' (in order). Then it calls each
7021function in the combined function list in turn, passing the 7035function in the combined function list in turn, passing the
7022buffer as the first argument and the combined alist as the second 7036buffer as the first argument and the combined action alist as the
7023argument, until one of the functions returns non-nil. 7037second argument, until one of the functions returns non-nil.
7024 7038
7025If ACTION is nil, the function list and the alist are built using 7039Action functions and the action they try to perform are:
7026only the other variables mentioned above. 7040 `display-buffer-same-window' -- Use the selected window.
7027 7041 `display-buffer-reuse-window' -- Use a window already showing
7028Available action functions include: 7042 the buffer.
7029 `display-buffer-same-window' 7043 `display-buffer-in-previous-window' -- Use a window that did
7030 `display-buffer-reuse-window' 7044 show the buffer before.
7031 `display-buffer-pop-up-frame' 7045 `display-buffer-use-some-window' -- Use some existing window.
7032 `display-buffer-in-child-frame' 7046 `display-buffer-pop-up-window' -- Pop up a new window.
7033 `display-buffer-pop-up-window' 7047 `display-buffer-below-selected' -- Use or pop up a window below
7034 `display-buffer-in-previous-window' 7048 the selected one.
7035 `display-buffer-use-some-window' 7049 `display-buffer-at-bottom' -- Use or pop up a window at the
7036 `display-buffer-use-some-frame' 7050 bottom of the selected frame.
7037 7051 `display-buffer-pop-up-frame' -- Show the buffer on a new frame.
7038Recognized alist entries include: 7052 `display-buffer-in-child-frame' -- Show the buffer in a
7039 7053 child frame.
7040 `inhibit-same-window' -- A non-nil value prevents the same 7054 `display-buffer-no-window' -- Do not display the buffer and
7041 window from being used for display. 7055 have `display-buffer' return nil immediately.
7042 7056
7043 `inhibit-switch-frame' -- A non-nil value prevents any other 7057Action alist entries are:
7044 frame from being raised or selected, 7058 'inhibit-same-window' -- A non-nil value prevents the same
7045 even if the window is displayed there. 7059 window from being used for display.
7046 7060 'inhibit-switch-frame' -- A non-nil value prevents any frame
7047 `reusable-frames' -- Value specifies frame(s) to search for a 7061 used for showing the buffer from being raised or selected.
7048 window that already displays the buffer. 7062 'reusable-frames' -- The value specifies the set of frames to
7049 See `display-buffer-reuse-window'. 7063 search for a window that already displays the buffer.
7050 7064 Possible values are nil (the selected frame), t (any live
7051 `pop-up-frame-parameters' -- Value specifies an alist of frame 7065 frame), visible (any visible frame), 0 (any visible or
7052 parameters to give a new frame, if 7066 iconified frame) or an existing live frame.
7053 one is created. 7067 'pop-up-frame-parameters' -- The value specifies an alist of
7054 7068 frame parameters to give a new frame, if one is created.
7055 `window-height' -- Value specifies either an integer (the number 7069 'window-height' -- The value specifies the desired height of the
7056 of lines of a new window), a floating point number (the 7070 window chosen and is either an integer (the total height of
7057 fraction of a new window with respect to the height of the 7071 the window), a floating point number (the fraction of its
7058 frame's root window) or a function to be called with one 7072 total height with respect to the total height of the frame's
7059 argument - a new window. The function is supposed to adjust 7073 root window) or a function to be called with one argument -
7060 the height of the window; its return value is ignored. 7074 the chosen window. The function is supposed to adjust the
7061 Suitable functions are `shrink-window-if-larger-than-buffer' 7075 height of the window; its return value is ignored. Suitable
7062 and `fit-window-to-buffer'. 7076 functions are `shrink-window-if-larger-than-buffer' and
7063 7077 `fit-window-to-buffer'.
7064 `window-width' -- Value specifies either an integer (the number 7078 'window-width' -- The value specifies the desired width of the
7065 of columns of a new window), a floating point number (the 7079 window chosen and is either an integer (the total width of
7066 fraction of a new window with respect to the width of the 7080 the window), a floating point number (the fraction of its
7067 frame's root window) or a function to be called with one 7081 total width with respect to the width of the frame's root
7068 argument - a new window. The function is supposed to adjust 7082 window) or a function to be called with one argument - the
7069 the width of the window; its return value is ignored. 7083 chosen window. The function is supposed to adjust the width
7070 7084 of the window; its return value is ignored.
7071 `allow-no-window' -- A non-nil value indicates readiness for the case 7085 'preserve-size' -- The value should be either (t . nil) to
7072 of not displaying the buffer and FUNCTION can safely return 7086 preserve the width of the chosen window, (nil . t) to
7073 a non-window value to suppress displaying. 7087 preserve its height or (t . t) to preserve its height and
7074 7088 width in future changes of the window configuration.
7075 `preserve-size' -- Value should be either (t . nil) to 7089 'window-parameters' -- The value specifies an alist of window
7076 preserve the width of the window, (nil . t) to preserve its 7090 parameters to give the chosen window.
7077 height or (t . t) to preserve both. 7091 'allow-no-window' -- A non-nil value means that `display-buffer'
7078 7092 may not display the buffer and return nil immediately.
7079 `window-parameters' -- Value specifies an alist of window 7093
7080 parameters to give the chosen window. 7094The entries 'window-height', 'window-width' and 'preserve-size'
7081 7095are applied only when the window used for displaying the buffer
7082The ACTION argument to `display-buffer' can also have a non-nil 7096never showed another buffer before.
7083and non-list value. This means to display the buffer in a window 7097
7084other than the selected one, even if it is already displayed in 7098The ACTION argument can also have a non-nil and non-list value.
7085the selected window. If called interactively with a prefix 7099This means to display the buffer in a window other than the
7086argument, ACTION is t." 7100selected one, even if it is already displayed in the selected
7101window. If called interactively with a prefix argument, ACTION
7102is t. Non-interactive calls should always supply a list or nil.
7103
7104The optional third argument FRAME, if non-nil, acts like a
7105\(reusable-frames . FRAME) entry appended to the action alist
7106specified by the ACTION argument."
7087 (interactive (list (read-buffer "Display buffer: " (other-buffer)) 7107 (interactive (list (read-buffer "Display buffer: " (other-buffer))
7088 (if current-prefix-arg t))) 7108 (if current-prefix-arg t)))
7089 (let ((buffer (if (bufferp buffer-or-name) 7109 (let ((buffer (if (bufferp buffer-or-name)
@@ -7141,9 +7161,10 @@ its documentation for additional customization information."
7141;;; `display-buffer' action functions: 7161;;; `display-buffer' action functions:
7142 7162
7143(defun display-buffer-use-some-frame (buffer alist) 7163(defun display-buffer-use-some-frame (buffer alist)
7144 "Display BUFFER in an existing frame that meets a predicate 7164 "Display BUFFER in an existing frame that meets a predicate.
7145\(by default any frame other than the current frame). If 7165The default predicate is to use any frame other than the selected
7146successful, return the window used; otherwise return nil. 7166frame. If successful, return the window used; otherwise return
7167nil.
7147 7168
7148If ALIST has a non-nil `inhibit-switch-frame' entry, avoid 7169If ALIST has a non-nil `inhibit-switch-frame' entry, avoid
7149raising the frame. 7170raising the frame.
@@ -7156,17 +7177,18 @@ predicate.
7156If ALIST has a non-nil `inhibit-same-window' entry, avoid using 7177If ALIST has a non-nil `inhibit-same-window' entry, avoid using
7157the currently selected window (only useful with a frame-predicate 7178the currently selected window (only useful with a frame-predicate
7158that allows the selected frame)." 7179that allows the selected frame)."
7159 (let* ((predicate (or (cdr (assq 'frame-predicate alist)) 7180 (let* ((predicate
7160 (lambda (frame) 7181 (or (cdr (assq 'frame-predicate alist))
7161 (and 7182 (lambda (frame)
7162 (not (eq frame (selected-frame))) 7183 (and (not (eq frame (selected-frame)))
7163 (not (window-dedicated-p 7184 (not (window-dedicated-p
7164 (or 7185 (or (get-lru-window frame)
7165 (get-lru-window frame) 7186 (frame-first-window frame))))))))
7166 (frame-first-window frame)))))
7167 )))
7168 (frame (car (filtered-frame-list predicate))) 7187 (frame (car (filtered-frame-list predicate)))
7169 (window (and frame (get-lru-window frame nil (cdr (assq 'inhibit-same-window alist)))))) 7188 (window
7189 (and frame
7190 (get-lru-window
7191 frame nil (cdr (assq 'inhibit-same-window alist))))))
7170 (when window 7192 (when window
7171 (prog1 7193 (prog1
7172 (window--display-buffer 7194 (window--display-buffer
diff --git a/src/data.c b/src/data.c
index f8b991e8981..0980cf99886 100644
--- a/src/data.c
+++ b/src/data.c
@@ -267,11 +267,13 @@ for example, (type-of 1) returns `integer'. */)
267 } 267 }
268 case PVEC_MODULE_FUNCTION: 268 case PVEC_MODULE_FUNCTION:
269 return Qmodule_function; 269 return Qmodule_function;
270 case PVEC_XWIDGET:
271 return Qxwidget;
272 case PVEC_XWIDGET_VIEW:
273 return Qxwidget_view;
270 /* "Impossible" cases. */ 274 /* "Impossible" cases. */
271 case PVEC_MISC_PTR: 275 case PVEC_MISC_PTR:
272 case PVEC_XWIDGET:
273 case PVEC_OTHER: 276 case PVEC_OTHER:
274 case PVEC_XWIDGET_VIEW:
275 case PVEC_SUB_CHAR_TABLE: 277 case PVEC_SUB_CHAR_TABLE:
276 case PVEC_FREE: ; 278 case PVEC_FREE: ;
277 } 279 }
@@ -3930,8 +3932,8 @@ syms_of_data (void)
3930 DEFSYM (Qmarker, "marker"); 3932 DEFSYM (Qmarker, "marker");
3931 DEFSYM (Qoverlay, "overlay"); 3933 DEFSYM (Qoverlay, "overlay");
3932 DEFSYM (Qfinalizer, "finalizer"); 3934 DEFSYM (Qfinalizer, "finalizer");
3933#ifdef HAVE_MODULES
3934 DEFSYM (Qmodule_function, "module-function"); 3935 DEFSYM (Qmodule_function, "module-function");
3936#ifdef HAVE_MODULES
3935 DEFSYM (Quser_ptr, "user-ptr"); 3937 DEFSYM (Quser_ptr, "user-ptr");
3936#endif 3938#endif
3937 DEFSYM (Qfloat, "float"); 3939 DEFSYM (Qfloat, "float");
@@ -3954,6 +3956,8 @@ syms_of_data (void)
3954 DEFSYM (Qfont_entity, "font-entity"); 3956 DEFSYM (Qfont_entity, "font-entity");
3955 DEFSYM (Qfont_object, "font-object"); 3957 DEFSYM (Qfont_object, "font-object");
3956 DEFSYM (Qterminal, "terminal"); 3958 DEFSYM (Qterminal, "terminal");
3959 DEFSYM (Qxwidget, "xwidget");
3960 DEFSYM (Qxwidget_view, "xwidget-view");
3957 3961
3958 DEFSYM (Qdefun, "defun"); 3962 DEFSYM (Qdefun, "defun");
3959 3963
diff --git a/src/w32.c b/src/w32.c
index 3eaa1279dd6..26cfae7a6af 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -7225,6 +7225,7 @@ system_process_attributes (Lisp_Object pid)
7225 code_convert_string_norecord (tem, Vlocale_coding_system, 0)), 7225 code_convert_string_norecord (tem, Vlocale_coding_system, 0)),
7226 attrs); 7226 attrs);
7227 7227
7228 memstex.dwLength = sizeof (memstex);
7228 if (global_memory_status_ex (&memstex)) 7229 if (global_memory_status_ex (&memstex))
7229#if __GNUC__ || (defined (_MSC_VER) && _MSC_VER >= 1300) 7230#if __GNUC__ || (defined (_MSC_VER) && _MSC_VER >= 1300)
7230 totphys = memstex.ullTotalPhys / 1024.0; 7231 totphys = memstex.ullTotalPhys / 1024.0;
diff --git a/src/xwidget.c b/src/xwidget.c
index 4739993e729..6faac107518 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -1014,8 +1014,6 @@ syms_of_xwidget (void)
1014 defsubr (&Sxwidget_buffer); 1014 defsubr (&Sxwidget_buffer);
1015 defsubr (&Sset_xwidget_plist); 1015 defsubr (&Sset_xwidget_plist);
1016 1016
1017 DEFSYM (Qxwidget, "xwidget");
1018
1019 DEFSYM (QCxwidget, ":xwidget"); 1017 DEFSYM (QCxwidget, ":xwidget");
1020 DEFSYM (QCtitle, ":title"); 1018 DEFSYM (QCtitle, ":title");
1021 1019