summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--admin/make-tarball.txt2
-rw-r--r--doc/emacs/msdos.texi2
-rw-r--r--doc/emacs/programs.texi4
-rw-r--r--doc/emacs/search.texi8
-rw-r--r--doc/lispref/commands.texi10
-rw-r--r--doc/lispref/display.texi21
-rw-r--r--doc/lispref/files.texi4
-rw-r--r--doc/lispref/frames.texi11
-rw-r--r--doc/lispref/functions.texi6
-rw-r--r--doc/lispref/minibuf.texi78
-rw-r--r--doc/lispref/os.texi2
-rw-r--r--doc/misc/ede.texi2
-rw-r--r--doc/misc/ert.texi113
-rw-r--r--doc/misc/flymake.texi2
-rw-r--r--doc/misc/gnus.texi2
-rw-r--r--doc/misc/sem-user.texi2
-rw-r--r--doc/misc/srecode.texi2
-rw-r--r--etc/NEWS.182
-rw-r--r--lisp/button.el2
-rw-r--r--lisp/calendar/todo-mode.el8
-rw-r--r--lisp/cedet/ede.el2
-rw-r--r--lisp/cedet/semantic/imenu.el2
-rw-r--r--lisp/desktop.el12
-rw-r--r--lisp/dired.el5
-rw-r--r--lisp/doc-view.el2
-rw-r--r--lisp/emacs-lisp/derived.el8
-rw-r--r--lisp/emacs-lisp/easy-mmode.el8
-rw-r--r--lisp/emacs-lisp/inline.el2
-rw-r--r--lisp/erc/erc.el6
-rw-r--r--lisp/follow.el2
-rw-r--r--lisp/gnus/gnus-notifications.el2
-rw-r--r--lisp/gnus/message.el2
-rw-r--r--lisp/gnus/nnir.el2
-rw-r--r--lisp/international/mule.el2
-rw-r--r--lisp/net/shr.el12
-rw-r--r--lisp/pixel-scroll.el188
-rw-r--r--lisp/progmodes/cc-engine.el31
-rw-r--r--lisp/progmodes/compile.el2
-rw-r--r--lisp/progmodes/ebrowse.el2
-rw-r--r--lisp/progmodes/flymake-proc.el8
-rw-r--r--lisp/progmodes/gdb-mi.el2
-rw-r--r--lisp/progmodes/gud.el2
-rw-r--r--lisp/progmodes/hideif.el4
-rw-r--r--lisp/progmodes/perl-mode.el4
-rw-r--r--lisp/progmodes/xref.el5
-rw-r--r--lisp/progmodes/xscheme.el25
-rw-r--r--lisp/select.el2
-rw-r--r--lisp/simple.el4
-rw-r--r--lisp/sort.el2
-rw-r--r--lisp/subr.el2
-rw-r--r--lisp/textmodes/dns-mode.el3
-rw-r--r--lisp/textmodes/mhtml-mode.el15
-rw-r--r--lisp/textmodes/tex-mode.el63
-rw-r--r--lisp/textmodes/texinfmt.el2
-rw-r--r--lisp/url/url-queue.el2
-rw-r--r--lisp/vc/ediff-wind.el2
-rw-r--r--lisp/vc/vc.el1
-rw-r--r--lisp/whitespace.el3
-rw-r--r--lisp/window.el6
-rw-r--r--src/alloc.c10
-rw-r--r--src/buffer.c2
-rw-r--r--src/dispnew.c23
-rw-r--r--src/editfns.c2
-rw-r--r--src/fileio.c10
-rw-r--r--src/frame.c15
-rw-r--r--src/lisp.h6
-rw-r--r--src/thread.c4
-rw-r--r--src/window.c4
-rw-r--r--src/xterm.c16
-rw-r--r--test/lisp/calendar/todo-mode-tests.el2
70 files changed, 584 insertions, 242 deletions
diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt
index 690125ad572..3b811fb208c 100644
--- a/admin/make-tarball.txt
+++ b/admin/make-tarball.txt
@@ -207,7 +207,7 @@ longer present.
Tar up the generated html_node/emacs/ and elisp/ directories and update
the files manual/elisp.html_node.tar.gz and emacs.html_node.tar.gz.
-Use M-x make-manuals-dist from from admin/admin.el to update the
+Use M-x make-manuals-dist from admin/admin.el to update the
manual/texi/ tarfiles.
Add compressed copies of the main info pages from the tarfile to manual/info/.
diff --git a/doc/emacs/msdos.texi b/doc/emacs/msdos.texi
index 356936504ec..dd2004fbb00 100644
--- a/doc/emacs/msdos.texi
+++ b/doc/emacs/msdos.texi
@@ -580,7 +580,7 @@ pressed the @key{Shift} key while typing the non-character key.
@vindex w32-enable-caps-lock
If the variable @code{w32-enable-caps-lock} is set to a @code{nil}
value, the @key{CapsLock} key produces the symbol @code{capslock}
-instead of the shifted version of they keys. The default value is
+instead of the shifted version of typed keys. The default value is
@code{t}.
@vindex w32-enable-num-lock
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 2b0649cd924..811dab5cfa0 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -1319,16 +1319,20 @@ count as blocks.
@kindex S-mouse-2
@table @kbd
@item C-c @@ C-h
+@itemx C-c @@ C-d
Hide the current block (@code{hs-hide-block}).
@item C-c @@ C-s
Show the current block (@code{hs-show-block}).
@item C-c @@ C-c
+@itemx C-x @@ C-e
Either hide or show the current block (@code{hs-toggle-hiding}).
@item S-mouse-2
Toggle hiding for the block you click on (@code{hs-mouse-toggle-hiding}).
@item C-c @@ C-M-h
+@itemx C-c @@ C-t
Hide all top-level blocks (@code{hs-hide-all}).
@item C-c @@ C-M-s
+@itemx C-c @@ C-a
Show all blocks in the buffer (@code{hs-show-all}).
@item C-c @@ C-l
Hide all blocks @var{n} levels below this block
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index 63cc1c24374..7b334733d67 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -1614,6 +1614,14 @@ to go back to the position of the previous occurrence (or what used to
be an occurrence), in case you changed it by mistake or want to
reexamine it.
+@item u
+to undo the last replacement and go back to where that replacement was
+made.
+
+@item U
+to undo all the replacements and go back to where the first
+replacement was made.
+
@item C-r
to enter a recursive editing level, in case the occurrence needs to be
edited rather than just replaced with @var{newstring}. When you are
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index ff790e6304f..16b58d3d3c8 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -1005,11 +1005,11 @@ If the last event came from a keyboard macro, the value is @code{macro}.
@cindex @code{display} property, and point display
@cindex @code{composition} property, and point display
- It is not easy to display a value of point in the middle of a
-sequence of text that has the @code{display}, @code{composition} or
-is invisible. Therefore, after a command finishes and returns to the
-command loop, if point is within such a sequence, the command loop
-normally moves point to the edge of the sequence.
+ Emacs cannot display the cursor when point is in the middle of a
+sequence of text that has the @code{display} or @code{composition}
+property, or is invisible. Therefore, after a command finishes and
+returns to the command loop, if point is within such a sequence, the
+command loop normally moves point to the edge of the sequence.
A command can inhibit this feature by setting the variable
@code{disable-point-adjustment}:
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 17126ce72b9..a505639f514 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -807,7 +807,7 @@ mechanism can change the variable @code{delayed-warnings-hook}:
@defvar delayed-warnings-hook
This is a normal hook which is run by the Emacs command loop, after
-@code{post-command-hook}, in order to to process and display delayed
+@code{post-command-hook}, in order to process and display delayed
warnings.
Its default value is a list of two functions:
@@ -2887,6 +2887,16 @@ non-selected window, Emacs applies the @code{mode-line-inactive} face.
For a header line, Emacs applies the @code{header-line} face.
@item
+If the text comes from an overlay string via @code{before-string} or
+@code{after-string} properties (@pxref{Overlay Properties}), or from a
+display string (@pxref{Other Display Specs}), and the string doesn't
+contain a @code{face} or @code{mouse-face} property, but the buffer
+text affected by the overlay/display property does define a face,
+Emacs applies the face attributes of the ``underlying'' buffer text.
+Note that this is so even if the overlay or display string is
+displayed in the display margins (@pxref{Display Margins}).
+
+@item
If any given attribute has not been specified during the preceding
steps, Emacs applies the attribute of the @code{default} face.
@end itemize
@@ -4853,6 +4863,13 @@ certain buffer text, without altering or preventing the display of
that text, put a @code{before-string} property on the text and put the
margin display specification on the contents of the before-string.
+ Note that if the string to be displayed in the margin doesn't
+specify a face, its face is determined using the same rules and
+priorities as it is for strings displayed in the text area
+(@pxref{Displaying Faces}). If this results in undesirable
+``leaking'' of faces into the margin, make sure the string has an
+explicit face specified for it.
+
Before the display margins can display anything, you must give
them a nonzero width. The usual way to do that is to set these
variables:
@@ -7488,7 +7505,7 @@ and are continued or truncated at the left margin.
@cindex paragraph-separate, and bidirectional display
Where exactly paragraphs start and end, for the purpose of the Emacs
@acronym{UBA} implementation, is determined by the following two
-buffer-local variables (note that that @code{paragraph-start} and
+buffer-local variables (note that @code{paragraph-start} and
@code{paragraph-separate} have no influence on this). By default both
of these variables are @code{nil}, and paragraphs are bounded by empty
lines, i.e., lines that consist entirely of zero or more whitespace
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 0f0ce157cad..b257c328f4d 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -1821,7 +1821,9 @@ has these permissions, or a subset of them (@code{write-region} will
not grant execute permissions even if the default file permissions
allow execution). On GNU and other POSIX-like systems, the default
permissions are given by the bitwise complement of the @samp{umask}
-value.
+value, i.e.@: each bit that is set in the argument @var{mode} will be
+@emph{reset} in the default permissions with which Emacs creates
+files.
The argument @var{mode} should be an integer which specifies the
permissions, similar to @code{set-file-modes} above. Only the lowest
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index ad853418ac4..5ea7125882f 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -1850,8 +1850,14 @@ yes, @code{nil} means no, @code{only} means this frame is just a
minibuffer. If the value is a minibuffer window (in some other
frame), the frame uses that minibuffer.
-This frame parameter takes effect when the frame is created, and can
-not be changed afterwards.
+This parameter takes effect when the frame is created. If specified as
+@code{nil}, Emacs will try to set it to the minibuffer window of
+@code{default-minibuffer-frame} (@pxref{Minibuffers and Frames}). For
+an existing frame, this parameter can be used exclusively to specify
+another minibuffer window. It is not allowed to change it from a
+minibuffer window to @code{t} and vice-versa, or from @code{t} to
+@code{nil}. If the parameter specifies a minibuffer window already,
+setting it to @code{nil} has no effect.
@vindex buffer-predicate, a frame parameter
@item buffer-predicate
@@ -1872,6 +1878,7 @@ most-recently-selected first.
If non-@code{nil}, this frame's window is never split automatically.
@end table
+
@node Frame Interaction Parameters
@subsubsection Frame Interaction Parameters
@cindex frame interaction parameters
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 116c2990ba2..466a12f7a48 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -712,7 +712,7 @@ the backquote (@pxref{Backquote}), but quotes code and accepts only
@end defmac
@defmac inline-letevals (bindings@dots{}) body@dots{}
-This is is similar to @code{let} (@pxref{Local Variables}): it sets up
+This is similar to @code{let} (@pxref{Local Variables}): it sets up
local variables as specified by @var{bindings}, and then evaluates
@var{body} with those bindings in effect. Each element of
@var{bindings} should be either a symbol or a list of the form
@@ -2029,8 +2029,8 @@ It is equivalent to the following:
@end example
@end defmac
-In addition, you can mark a certain a particular calling convention
-for a function as obsolete:
+In addition, you can mark a particular calling convention for a
+function as obsolete:
@defun set-advertised-calling-convention function signature when
This function specifies the argument list @var{signature} as the
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index 1ece8996008..75dec13ab7c 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -59,15 +59,16 @@ boundary between the prompt and the actual text.
@c See https://debbugs.gnu.org/11276
The minibuffer's window is normally a single line; it grows
-automatically if the contents require more space. Whilst it is
-active, you can explicitly resize it temporarily with the window
-sizing commands; it reverts to its normal size when the minibuffer is
-exited. When the minibuffer is not active, you can resize it
-permanently by using the window sizing commands in the frame's other
-window, or dragging the mode line with the mouse. (Due to details of
-the current implementation, for this to work @code{resize-mini-windows}
-must be @code{nil}.) If the frame contains just a minibuffer, you can
-change the minibuffer's size by changing the frame's size.
+automatically if the contents require more space. Whilst the minibuffer
+is active, you can explicitly resize its window temporarily with the
+window sizing commands; the window reverts to its normal size when the
+minibuffer is exited. When the minibuffer is not active, you can resize
+its window permanently by using the window sizing commands in the
+frame's other window, or dragging the mode line with the mouse. (Due to
+details of the current implementation, for this to work
+@code{resize-mini-windows} must be @code{nil}.) If the frame contains
+just a minibuffer window, you can change its size by changing the
+frame's size.
Use of the minibuffer reads input events, and that alters the values
of variables such as @code{this-command} and @code{last-command}
@@ -2256,43 +2257,48 @@ contents of the minibuffer before the point.
These functions access and select minibuffer windows, test whether they
are active and control how they get resized.
-@defun active-minibuffer-window
-This function returns the currently active minibuffer window, or
-@code{nil} if there is none.
-@end defun
-
@defun minibuffer-window &optional frame
@anchor{Definition of minibuffer-window}
This function returns the minibuffer window used for frame @var{frame}.
-If @var{frame} is @code{nil}, that stands for the current frame. Note
-that the minibuffer window used by a frame need not be part of that
+If @var{frame} is @code{nil}, that stands for the selected frame.
+
+Note that the minibuffer window used by a frame need not be part of that
frame---a frame that has no minibuffer of its own necessarily uses some
-other frame's minibuffer window.
+other frame's minibuffer window. The minibuffer window of a
+minibuffer-less frame can be changed by setting that frame's
+@code{minibuffer} frame parameter (@pxref{Buffer Parameters}).
@end defun
@defun set-minibuffer-window window
This function specifies @var{window} as the minibuffer window to use.
This affects where the minibuffer is displayed if you put text in it
-without invoking the usual minibuffer commands. It has no effect on
-the usual minibuffer input functions because they all start by
-choosing the minibuffer window according to the current frame.
+without invoking the usual minibuffer commands. It has no effect on the
+usual minibuffer input functions because they all start by choosing the
+minibuffer window according to the selected frame.
@end defun
@c Emacs 19 feature
@defun window-minibuffer-p &optional window
This function returns non-@code{nil} if @var{window} is a minibuffer
-window.
-@var{window} defaults to the selected window.
+window. @var{window} defaults to the selected window.
+@end defun
+
+The following function returns the window showing the currently active
+minibuffer.
+
+@defun active-minibuffer-window
+This function returns the window of the currently active minibuffer, or
+@code{nil} if there is no active minibuffer.
@end defun
-It is not correct to determine whether a given window is a minibuffer by
-comparing it with the result of @code{(minibuffer-window)}, because
-there can be more than one minibuffer window if there is more than one
-frame.
+It is not sufficient to determine whether a given window shows the
+currently active minibuffer by comparing it with the result of
+@code{(minibuffer-window)}, because there can be more than one
+minibuffer window if there is more than one frame.
@defun minibuffer-window-active-p window
-This function returns non-@code{nil} if @var{window} is the currently
-active minibuffer window.
+This function returns non-@code{nil} if @var{window} shows the currently
+active minibuffer.
@end defun
The following two options control whether minibuffer windows are resized
@@ -2374,14 +2380,14 @@ returns zero.
@defopt enable-recursive-minibuffers
If this variable is non-@code{nil}, you can invoke commands (such as
-@code{find-file}) that use minibuffers even while the minibuffer window
-is active. Such invocation produces a recursive editing level for a new
+@code{find-file}) that use minibuffers even while the minibuffer is
+active. Such invocation produces a recursive editing level for a new
minibuffer. The outer-level minibuffer is invisible while you are
editing the inner one.
-If this variable is @code{nil}, you cannot invoke minibuffer
-commands when the minibuffer window is active, not even if you switch to
-another window to do it.
+If this variable is @code{nil}, you cannot invoke minibuffer commands
+when the minibuffer is active, not even if you switch to another window
+to do it.
@end defopt
@c Emacs 19 feature
@@ -2439,9 +2445,9 @@ minibuffer, it scrolls this window.
@end defvar
@defun minibuffer-selected-window
-This function returns the window that was selected when the
-minibuffer was entered. If selected window is not a minibuffer
-window, it returns @code{nil}.
+This function returns the window that was selected just before the
+minibuffer window was selected. If the selected window is not a
+minibuffer window, it returns @code{nil}.
@end defun
@defopt max-mini-window-height
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 0cb9de9f9a8..501960bdc3f 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -514,7 +514,7 @@ On MS-DOS, Emacs sets the @env{TERM} environment variable to @samp{internal}.
@end defopt
@defopt term-file-aliases
-This variable is an an association list mapping terminal types to
+This variable is an association list mapping terminal types to
their aliases. For example, an element of the form @code{("vt102"
. "vt100")} means to treat a terminal of type @samp{vt102} like one of
type @samp{vt100}.
diff --git a/doc/misc/ede.texi b/doc/misc/ede.texi
index a79170179bc..4bf0e8dbb2c 100644
--- a/doc/misc/ede.texi
+++ b/doc/misc/ede.texi
@@ -2555,7 +2555,7 @@ Return non-@code{nil} if @var{THIS} target wants @var{FILE}.
@end deffn
@deffn Method project-add-file :AFTER ot file
-Add the current buffer into project project target @var{OT}.
+Add the current buffer into project target @var{OT}.
Argument @var{FILE} is the file to add.
@end deffn
diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi
index 2a17a211665..de71aca8aea 100644
--- a/doc/misc/ert.texi
+++ b/doc/misc/ert.texi
@@ -3,6 +3,10 @@
@setfilename ../../info/ert.info
@settitle Emacs Lisp Regression Testing
@include docstyle.texi
+@syncodeindex fn cp
+@syncodeindex vr cp
+@syncodeindex pg cp
+@syncodeindex ky cp
@c %**end of header
@dircategory Emacs misc features
@@ -59,6 +63,7 @@ traditional software development methods.
* How to Debug Tests:: What to do if a test fails.
* Extending ERT:: ERT is extensible in several ways.
* Other Testing Concepts:: Features not in ERT.
+* Index:: Concept, Function and Variable Index
* GNU Free Documentation License:: The license for this documentation.
@detailmenu
@@ -92,6 +97,10 @@ Other Testing Concepts
* Mocks and Stubs:: Stubbing out code that is irrelevant to the test.
* Fixtures and Test Suites:: How ERT differs from tools for other languages.
+Index
+
+* Index:: Concept, Function and Variable Index
+
Appendix
* GNU Free Documentation License:: The license for this documentation.
@@ -102,6 +111,7 @@ Appendix
@node Introduction
@chapter Introduction
+@cindex introduction to ERT
ERT allows you to define @emph{tests} in addition to functions,
macros, variables, and the other usual Lisp constructs. Tests are
@@ -169,6 +179,7 @@ Environment}.
@node How to Run Tests
@chapter How to Run Tests
+@cindex how to run ert tests
You can run tests either in the Emacs you are working in, or on the
command line in a separate Emacs process in batch mode (i.e., with no
@@ -187,7 +198,10 @@ different Emacs versions.
@node Running Tests Interactively
@section Running Tests Interactively
+@cindex running tests interactively
+@cindex interactive testing
+@findex ert
You can run the tests that are currently defined in your Emacs with
the command @kbd{@kbd{M-x} ert @kbd{RET} t @kbd{RET}}. (For an
explanation of the @code{t} argument, @pxref{Test Selectors}.) ERT will pop
@@ -232,6 +246,7 @@ F list-test
(different-atoms c d))))
@end example
+@cindex test results buffer
At the top, there is a summary of the results: we ran all tests defined
in the current Emacs (@code{Selector: t}), 31 of them passed, and 2
failed unexpectedly. @xref{Expected Failures}, for an explanation of
@@ -245,20 +260,29 @@ unexpected result. In the example above, there are two failures, both
due to failed @code{should} forms. @xref{Understanding Explanations},
for more details.
+@kindex TAB@r{, in ert results buffer}
+@kindex S-TAB@r{, in ert results buffer}
In the ERT results buffer, @kbd{TAB} and @kbd{S-TAB} cycle between
buttons. Each name of a function or macro in this buffer is a button;
moving point to it and typing @kbd{RET} jumps to its definition.
+@kindex r@r{, in ert results buffer}
+@kindex d@r{, in ert results buffer}
+@kindex .@r{, in ert results buffer}
+@kindex b@r{, in ert results buffer}
+@cindex backtrace of a failed test
Pressing @kbd{r} re-runs the test near point on its own. Pressing
@kbd{d} re-runs it with the debugger enabled. @kbd{.} jumps to the
definition of the test near point (@kbd{RET} has the same effect if
point is on the name of the test). On a failed test, @kbd{b} shows
the backtrace of the failure.
+@kindex l@r{, in ert results buffer}
@kbd{l} shows the list of @code{should} forms executed in the test.
If any messages were generated (with the Lisp function @code{message})
in a test or any of the code that it invoked, @kbd{m} will show them.
+@kindex L@r{, in ert results buffer}
By default, long expressions in the failure details are abbreviated
using @code{print-length} and @code{print-level}. Pressing @kbd{L}
while point is on a test failure will increase the limits to show more
@@ -267,7 +291,11 @@ of the expression.
@node Running Tests in Batch Mode
@section Running Tests in Batch Mode
+@cindex running tests in batch mode
+@cindex batch-mode testing
+@findex ert-run-tests-batch
+@findex ert-run-tests-batch-and-exit
ERT supports automated invocations from the command line or from
scripts or makefiles. There are two functions for this purpose,
@code{ert-run-tests-batch} and @code{ert-run-tests-batch-and-exit}.
@@ -283,6 +311,7 @@ with a zero exit status if all tests passed, or nonzero if any tests
failed or if anything else went wrong. It will also print progress
messages and error diagnostics to standard output.
+@findex ert-summarize-tests-batch-and-exit
You can also redirect the above output to a log file, say
@file{output.log}, and use the
@code{ert-summarize-tests-batch-and-exit} function to produce a neat
@@ -314,6 +343,8 @@ files that it requires are on your @code{load-path}.
@node Test Selectors
@section Test Selectors
+@cindex test selector
+@cindex selecting tests
Functions like @code{ert} accept a @emph{test selector}, a Lisp
expression specifying a set of tests. Test selector syntax is similar
@@ -328,17 +359,22 @@ to Common Lisp's type specifier syntax:
@item A string is a regular expression that selects all tests with matching names.
@item A test (i.e., an object of @code{ert-test} data type) selects that test.
@item A symbol selects the test that the symbol names.
-@item @code{(member TESTS...)} selects the elements of TESTS, a list of
-tests or symbols naming tests.
-@item @code{(eql TEST)} selects TEST, a test or a symbol naming a test.
-@item @code{(and SELECTORS...)} selects the tests that match all SELECTORS.
-@item @code{(or SELECTORS...)} selects the tests that match any SELECTOR.
-@item @code{(not SELECTOR)} selects all tests that do not match SELECTOR.
-@item @code{(tag TAG)} selects all tests that have TAG on their tags list.
+@item @code{(member @var{tests}...)} selects the elements of
+@var{tests}, a list of tests or symbols naming tests.
+@item @code{(eql @var{test})} selects @var{test}, a test or a symbol
+naming a test.
+@item @code{(and @var{selectors}@dots{})} selects the tests that match
+all @var{selectors}.
+@item @code{(or @var{selectors}@dots{})} selects the tests that match
+any of the @var{selectors}.
+@item @code{(not @var{selector})} selects all tests that do not match
+@var{selector}.
+@item @code{(tag @var{tag})} selects all tests that have @var{tag} on
+their tags list.
(Tags are optional labels you can apply to tests when you define them.)
-@item @code{(satisfies PREDICATE)} selects all tests that satisfy PREDICATE,
-a function that takes a test as argument and returns non-@code{nil} if
-it is selected.
+@item @code{(satisfies @var{predicate})} selects all tests that
+satisfy @var{predicate}, a function that takes a test as argument and
+returns non-@code{nil} if it is selected.
@end itemize
Selectors that are frequently useful when selecting tests to run
@@ -354,7 +390,9 @@ result in the last run, and tag-based selectors such as @code{(not
@node How to Write Tests
@chapter How to Write Tests
+@cindex how to write tests
+@findex ert-deftest
ERT lets you define tests in the same way you define functions. You
can type @code{ert-deftest} forms in a buffer and evaluate them there
with @code{eval-defun} or @code{compile-defun}, or you can save the
@@ -375,6 +413,7 @@ to find where a test was defined if the test was loaded from a file.
@node The @code{should} Macro
@section The @code{should} Macro
+@findex should@r{, ert macro}
Test bodies can include arbitrary code; but to be useful, they need to
check whether the code being tested (or @emph{code under test})
does what it is supposed to do. The macro @code{should} is similar to
@@ -410,6 +449,8 @@ test failed, it helps to know that the function @code{+} returned 3
here. ERT records the return value for any predicate called directly
within @code{should}.
+@findex should-not@r{, ert macro}
+@findex should-error@r{, ert macro}
In addition to @code{should}, ERT provides @code{should-not}, which
checks that the predicate returns @code{nil}, and @code{should-error}, which
checks that the form called within it signals an error. An example
@@ -438,7 +479,10 @@ default.
@node Expected Failures
@section Expected Failures
+@cindex expected failures
+@cindex known bugs
+@vindex :expected-result
Some bugs are complicated to fix, or not very important, and are left as
@emph{known bugs}. If there is a test case that triggers the bug and
fails, ERT will alert you of this failure every time you run all
@@ -492,6 +536,9 @@ versions, specific architectures, etc.:
@node Tests and Their Environment
@section Tests and Their Environment
+@cindex skipping tests
+@cindex test preconditions
+@cindex preconditions of a test
Sometimes, it doesn't make sense to run a test due to missing
preconditions. A required Emacs feature might not be compiled in, the
function to be tested could call an external binary which might not be
@@ -505,6 +552,7 @@ available on the test machine, you name it. In this case, the macro
...)
@end lisp
+@cindex tests and their environment
The outcome of running a test should not depend on the current state
of the environment, and each test should leave its environment in the
same state it found it in. In particular, a test should not depend on
@@ -559,6 +607,8 @@ hook variables to @code{nil}. This avoids the above problems.
@node Useful Techniques
@section Useful Techniques when Writing Tests
+@cindex useful techniques
+@cindex tips and tricks
Testing simple functions that have no side effects and no dependencies
on their environment is easy. Such tests often look like this:
@@ -596,6 +646,8 @@ Here's a more complicated test:
" signal(ert-test-failed (\"foo\"))")))))))
@end lisp
+@findex make-ert-test
+@findex ert-equal-including-properties
This test creates a test object using @code{make-ert-test} whose body
will immediately signal failure. It then runs that test and asserts
that it fails. Then, it creates a temporary buffer and invokes
@@ -653,6 +705,8 @@ a test failed.
@node Understanding Explanations
@section Understanding Explanations
+@cindex understanding explanations
+@cindex explanations, understanding
Failed @code{should} forms are reported like this:
@@ -720,41 +774,55 @@ function registered. @xref{Defining Explanation Functions}.
@node Interactive Debugging
@section Interactive Debugging
+@cindex interactive debugging
+@cindex debugging failed tests
Debugging failed tests essentially works the same way as debugging any
other problems with Lisp code. Here are a few tricks specific to
tests:
@itemize
-@item Re-run the failed test a few times to see if it fails in the same way
+@cindex re-running a failed test
+@item
+Re-run the failed test a few times to see if it fails in the same way
each time. It's good to find out whether the behavior is
deterministic before spending any time looking for a cause. In the
ERT results buffer, @kbd{r} re-runs the selected test.
-@item Use @kbd{.} to jump to the source code of the test to find out exactly
+@cindex jump to the test source code
+@item
+Use @kbd{.} to jump to the source code of the test to find out exactly
what it does. Perhaps the test is broken rather than the code
under test.
-@item If the test contains a series of @code{should} forms and you can't
+@item
+If the test contains a series of @code{should} forms and you can't
tell which one failed, use @kbd{l}, which shows you the list of all
@code{should} forms executed during the test before it failed.
-@item Use @kbd{b} to view the backtrace. You can also use @kbd{d} to re-run
+@cindex show backtrace of failed test
+@item
+Use @kbd{b} to view the backtrace. You can also use @kbd{d} to re-run
the test with debugging enabled, this will enter the debugger and show
the backtrace as well; but the top few frames shown there will not be
relevant to you since they are ERT's own debugger hook. @kbd{b}
strips them out, so it is more convenient.
-@item If the test or the code under testing prints messages using
+@item
+If the test or the code under testing prints messages using
@code{message}, use @kbd{m} to see what messages it printed before it
failed. This can be useful to figure out how far it got.
-@item You can instrument tests for debugging the same way you instrument
+@cindex instrumenting test for Edebug
+@item
+You can instrument tests for debugging the same way you instrument
@code{defun}s for debugging: go to the source code of the test and
type @kbd{@kbd{C-u} @kbd{C-M-x}}. Then, go back to the ERT buffer and
re-run the test with @kbd{r} or @kbd{d}.
-@item If you have been editing and rearranging tests, it is possible that
+@cindex discard obsolete test results
+@item
+If you have been editing and rearranging tests, it is possible that
ERT remembers an old test that you have since renamed or removed:
renamings or removals of definitions in the source code leave around a
stray definition under the old name in the running process (this is a
@@ -765,6 +833,7 @@ forget about the obsolete test.
@node Extending ERT
@chapter Extending ERT
+@cindex extending ert
There are several ways to add functionality to ERT.
@@ -776,6 +845,7 @@ There are several ways to add functionality to ERT.
@node Defining Explanation Functions
@section Defining Explanation Functions
+@cindex defining explanation functions
The explanation function for a predicate is a function that takes the
same arguments as the predicate and returns an @emph{explanation}.
@@ -786,6 +856,7 @@ comprehensible printed representation. If the return value of the
predicate needs no explanation for a given list of arguments, the
explanation function should return @code{nil}.
+@vindex ert-explainer@r{, property}
To associate an explanation function with a predicate, add the
property @code{ert-explainer} to the symbol that names the predicate.
The value of the property should be the symbol that names the
@@ -794,6 +865,7 @@ explanation function.
@node Low-Level Functions for Working with Tests
@section Low-Level Functions for Working with Tests
+@cindex low-level functions
Both @code{ert-run-tests-interactively} and @code{ert-run-tests-batch}
are implemented on top of the lower-level test handling code in the
@@ -821,6 +893,7 @@ For information on mocks, stubs, fixtures, or test suites, see below.
@node Mocks and Stubs
@section Other Tools for Emacs Lisp
+@cindex mocks and stubs
Stubbing out functions or using so-called @emph{mocks} can make it
easier to write tests. See
@@ -834,6 +907,7 @@ offers mocks for Emacs Lisp and can be used in conjunction with ERT.
@node Fixtures and Test Suites
@section Fixtures and Test Suites
+@cindex fixtures
In many ways, ERT is similar to frameworks for other languages like
SUnit or JUnit. However, two features commonly found in such
@@ -891,6 +965,11 @@ e.g., to run quick tests during interactive development and slow tests less
often. This can be achieved with the @code{:tag} argument to
@code{ert-deftest} and @code{tag} test selectors.
+@node Index
+@unnumbered Index
+
+@printindex cp
+
@node GNU Free Documentation License
@appendix GNU Free Documentation License
@include doclicense.texi
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
index b0a56492bcd..e2a80bb5f11 100644
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -65,7 +65,7 @@ modify this GNU manual.''
@cindex using flymake
Flymake is a universal on-the-fly buffer checker implemented as an
-Emacs minor minor. To use Flymake, you must first activate
+Emacs minor mode. To use Flymake, you must first activate
@code{flymake-mode} by using the command @kbd{flymake-mode}.
When enabled, Flymake collects information about problems in the
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 33078d711a2..169509bae9e 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -21391,7 +21391,7 @@ correct group name @samp{mail.misc}.
Extra switches may be passed to the namazu search command by setting the
variable @code{nnir-namazu-additional-switches}. It is particularly
-important not to pass any any switches to namazu that will change the
+important not to pass any switches to namazu that will change the
output format. Good switches to use include @option{--sort},
@option{--ascending}, @option{--early} and @option{--late}.
Refer to the Namazu documentation for further
diff --git a/doc/misc/sem-user.texi b/doc/misc/sem-user.texi
index 4e395f7a112..374c72402a5 100644
--- a/doc/misc/sem-user.texi
+++ b/doc/misc/sem-user.texi
@@ -953,7 +953,7 @@ list, you can use @kbd{M-x semanticdb-find-test-translate-path}.
@xref{Semanticdb search debugging commands}.
If items should be loaded but aren't, or if you see some tables that
-have no tags in them, then you you may have an incorrectly-set search
+have no tags in them, then you may have an incorrectly-set search
throttle (@pxref{Search Throttle}). For example,
@example
diff --git a/doc/misc/srecode.texi b/doc/misc/srecode.texi
index 74904f37e1e..80bf85c3a71 100644
--- a/doc/misc/srecode.texi
+++ b/doc/misc/srecode.texi
@@ -511,7 +511,7 @@ to insert it anywhere in the template search list.
If there are multiple templates with the same context and name, the
template with the highest priority number will be used.
-If multiple files have the same priority, then then sort order is
+If multiple files have the same priority, then the sort order is
unpredictable. If no template names match, then it doesn't matter.
Example:
diff --git a/etc/NEWS.18 b/etc/NEWS.18
index b26e132b0df..87dac546375 100644
--- a/etc/NEWS.18
+++ b/etc/NEWS.18
@@ -1120,7 +1120,7 @@ used as mode elements, and what they do in the display:
the symbol's value is processed as a mode element.
list (whose first element is a string or list or cons cell)
- the elements of the list are treated as as mode elements,
+ the elements of the list are treated as mode elements,
so that the output they generate is concatenated,
list (whose car is a symbol)
diff --git a/lisp/button.el b/lisp/button.el
index a6090477c55..32cd995f5e4 100644
--- a/lisp/button.el
+++ b/lisp/button.el
@@ -232,7 +232,7 @@ property instead of `action'; if the button has no `mouse-action',
the value of `action' is used instead.
The action can either be a marker or a function. If it's a
-marker then goto it. Otherwise it it is a function then it is
+marker then goto it. Otherwise if it is a function then it is
called with BUTTON as only argument. BUTTON is either an
overlay, a buffer position, or (for buttons in the mode-line or
header-line) a string."
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 79fda462847..3e568213a63 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -956,7 +956,7 @@ called with a prefix argument only moves point to a lower item,
e.g., with point on the last todo item and called with prefix 1,
it moves point to the first done item; but if called with point
on the last todo item without a prefix argument, it moves point
-the the empty line above the done items separator."
+to the empty line above the done items separator."
(interactive "p")
;; It's not worth the trouble to allow prefix arg value < 1, since
;; we have the corresponding command.
@@ -976,7 +976,7 @@ If the category's done items are visible, this command called
with a prefix argument only moves point to a higher item, e.g.,
with point on the first done item and called with prefix 1, it
moves to the last todo item; but if called with point on the
-first done item without a prefix argument, it moves point the the
+first done item without a prefix argument, it moves point to the
empty line above the done items separator."
(interactive "p")
;; Avoid moving to bob if on the first item but not at bob.
@@ -1052,7 +1052,7 @@ empty line above the done items separator."
(defun todo-toggle-item-header ()
"Hide or show item date-time headers in the current file.
With done items, this hides only the done date-time string, not
-the the original date-time string."
+the original date-time string."
(interactive)
(unless (catch 'nonempty
(dolist (type '(todo done))
@@ -1756,7 +1756,7 @@ means prompt user and omit comment only on confirmation."
With positive numerical prefix argument N, change the marking of
the next N items in the current category. If both the todo and
done items sections are visible, the sequence of N items can
-consist of the the last todo items and the first done items."
+consist of the last todo items and the first done items."
(interactive "p")
(when (todo-item-string)
(let ((cat (todo-current-category)))
diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el
index a78af1b264a..1dcafc453f4 100644
--- a/lisp/cedet/ede.el
+++ b/lisp/cedet/ede.el
@@ -998,7 +998,7 @@ Argument PROMPT is the prompt to use when querying the user for a target."
(project-add-file this file))
(cl-defmethod project-add-file ((ot ede-target) _file)
- "Add the current buffer into project project target OT.
+ "Add the current buffer into project target OT.
Argument FILE is the file to add."
(error "add-file not supported by %s" (eieio-object-name ot)))
diff --git a/lisp/cedet/semantic/imenu.el b/lisp/cedet/semantic/imenu.el
index 28d624908e2..5018e039d03 100644
--- a/lisp/cedet/semantic/imenu.el
+++ b/lisp/cedet/semantic/imenu.el
@@ -488,7 +488,7 @@ Clears all imenu menus that may be depending on the database."
;;; Which function support
;;
;; The which-function library will display the current function in the
-;; mode line. It tries do do this through imenu. With a semantic parsed
+;; mode line. It tries to do this through imenu. With a semantic parsed
;; buffer, there is a much more efficient way of doing this.
;; Advise `which-function' so that we optionally use semantic tags
;; instead, and get better stuff.
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 0aa5dcfe8a3..2a5ec612ddf 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -216,8 +216,9 @@ determine where the desktop is saved."
:version "22.1")
(defcustom desktop-auto-save-timeout auto-save-timeout
- "Number of seconds idle time before auto-save of the desktop.
-The idle timer activates auto-saving only when window configuration changes.
+ "Number of seconds of idle time before auto-saving the desktop.
+The desktop will be auto-saved when this amount of idle time have
+passed after some change in the window configuration.
This applies to an existing desktop file when `desktop-save-mode' is enabled.
Zero or nil means disable auto-saving due to idleness."
:type '(choice (const :tag "Off" nil)
@@ -1362,10 +1363,11 @@ Called by the timer created in `desktop-auto-save-set-timer'."
(desktop-save desktop-dirname nil t)))
(defun desktop-auto-save-set-timer ()
- "Set the auto-save timer.
+ "Set the desktop auto-save timer.
Cancel any previous timer. When `desktop-auto-save-timeout' is a positive
-integer, start a new idle timer to call `desktop-auto-save' repeatedly
-after that many seconds of idle time."
+integer, start a new idle timer to call `desktop-auto-save' after that many
+seconds of idle time.
+This function is called from `window-configuration-change-hook'."
(desktop-auto-save-cancel-timer)
(when (and (integerp desktop-auto-save-timeout)
(> desktop-auto-save-timeout 0))
diff --git a/lisp/dired.el b/lisp/dired.el
index 1ec3ac4f99c..46918180f12 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1048,7 +1048,7 @@ wildcards, erases the buffer, and builds the subdir-alist anew
;; default-directory and dired-actual-switches must be buffer-local
;; and initialized by now.
(let (dirname
- ;; This makes readin much much faster.
+ ;; This makes read-in much faster.
;; In particular, it prevents the font lock hook from running
;; until the directory is all read in.
(inhibit-modification-hooks t))
@@ -2228,7 +2228,8 @@ directory in another window."
(find-file (dired-get-file-for-visit))))
(defun dired-find-alternate-file ()
- "In Dired, visit this file or directory instead of the Dired buffer."
+ "In Dired, visit file or directory on current line via `find-alternate-file'.
+This kills the Dired buffer, then visits the current line's file or directory."
(interactive)
(set-buffer-modified-p nil)
(find-alternate-file (dired-get-file-for-visit)))
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index a222076edb8..7213ea2ff6b 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -451,7 +451,7 @@ Typically \"page-%s.png\".")
(if (and (eq 'pdf doc-view-doc-type)
(executable-find "pdfinfo"))
;; We don't want to revert if the PDF file is corrupted which
- ;; might happen when it it currently recompiled from a tex
+ ;; might happen when it is currently recompiled from a tex
;; file. (TODO: We'd like to have something like that also
;; for other types, at least PS, but I don't know a good way
;; to test if a PS file is complete.)
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el
index 3fa3818526c..751291afa88 100644
--- a/lisp/emacs-lisp/derived.el
+++ b/lisp/emacs-lisp/derived.el
@@ -203,11 +203,13 @@ See Info node `(elisp)Derived Modes' for more details."
parent child docstring syntax abbrev))
`(progn
- (defvar ,hook nil
- ,(format "Hook run after entering %s mode.
+ (defvar ,hook nil)
+ (unless (get ',hook 'variable-documentation)
+ (put ',hook 'variable-documentation
+ ,(format "Hook run after entering %s mode.
No problems result if this variable is not bound.
`add-hook' automatically binds it. (This is true for all hook variables.)"
- name))
+ name)))
(unless (boundp ',map)
(put ',map 'definition-name ',child))
(with-no-warnings (defvar ,map (make-sparse-keymap)))
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 643a65f48d9..6293d71470d 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -309,11 +309,13 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.
;; up-to-here.
:autoload-end
- (defvar ,hook nil
- ,(format "Hook run after entering or leaving `%s'.
+ (defvar ,hook nil)
+ (unless (get ',hook 'variable-documentation)
+ (put ',hook 'variable-documentation
+ ,(format "Hook run after entering or leaving `%s'.
No problems result if this variable is not bound.
`add-hook' automatically binds it. (This is true for all hook variables.)"
- modefun))
+ modefun)))
;; Define the minor-mode keymap.
,(unless (symbolp keymap) ;nil is also a symbol.
diff --git a/lisp/emacs-lisp/inline.el b/lisp/emacs-lisp/inline.el
index 00e5e6eb48d..ff27158f836 100644
--- a/lisp/emacs-lisp/inline.el
+++ b/lisp/emacs-lisp/inline.el
@@ -59,7 +59,7 @@
;; and then M-: (macroexpand-all '(my-test1 y)) RET)
;; There is still one downside shared with the defmacro and cl-defsubst
;; approach: when the function is inlined, the scoping rules (dynamic or
-;; lexical) will be inherited from the the call site.
+;; lexical) will be inherited from the call site.
;; Of course, since define-inline defines a compiler macro, you can also do
;; call-site optimizations, just like you can with `defmacro', but not with
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index fdc4a647777..76f4c8b35ab 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -2648,9 +2648,9 @@ otherwise `erc-server-announced-name'. SERVER is matched against
"Predicate indicating whether the parsed ERC response PARSED should be hidden.
Messages are always hidden if the message type of PARSED appears in
-`erc-hide-list'. Message types that appear in `erc-network-hide-list'
-or `erc-channel-hide-list' are are only hidden if the target matches
-the network or channel in the list. In addition, messages whose type
+`erc-hide-list'. Message types that appear in `erc-network-hide-list'
+or `erc-channel-hide-list' are only hidden if the target matches
+the network or channel in the list. In addition, messages whose type
is a member of `erc-lurker-hide-list' are hidden if `erc-lurker-p'
returns non-nil."
(let* ((command (erc-response.command parsed))
diff --git a/lisp/follow.el b/lisp/follow.el
index 761513bae36..4893cad3fdc 100644
--- a/lisp/follow.el
+++ b/lisp/follow.el
@@ -1117,7 +1117,7 @@ Otherwise, return nil."
;;; Redisplay
;; Redraw all the windows on the screen, starting with the top window.
-;; The window used as as marker is WIN, or the selected window if WIN
+;; The window used as marker is WIN, or the selected window if WIN
;; is nil. Start every window directly after the end of the previous
;; window, to make sure long lines are displayed correctly.
diff --git a/lisp/gnus/gnus-notifications.el b/lisp/gnus/gnus-notifications.el
index e97e6a64334..6e8dbb5c35e 100644
--- a/lisp/gnus/gnus-notifications.el
+++ b/lisp/gnus/gnus-notifications.el
@@ -154,7 +154,7 @@ This is typically a function to add in
(dolist (entry gnus-newsrc-alist)
(let ((group (car entry)))
;; Check that the group level is less than
- ;; `gnus-notifications-minimum-level' and the the group has unread
+ ;; `gnus-notifications-minimum-level' and the group has unread
;; messages.
(when (and (<= (gnus-group-level group) gnus-notifications-minimum-level)
(let ((unread (gnus-group-unread group)))
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index acb55463f7f..f6777c5e884 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -4346,7 +4346,7 @@ conformance."
RECIPIENTS is a mail header. Return a list of potentially bogus
addresses. If none is found, return nil.
-An address might be bogus if if there's a matching entry in
+An address might be bogus if there's a matching entry in
`message-bogus-addresses'."
;; FIXME: How about "foo@subdomain", when the MTA adds ".domain.tld"?
(let (found)
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el
index 51147ed4330..be42ab74e4a 100644
--- a/lisp/gnus/nnir.el
+++ b/lisp/gnus/nnir.el
@@ -64,7 +64,7 @@
;; also be correct, see the documentation for `nnir-namazu-remove-prefix'
;; above.
;;
-;; It is particularly important not to pass any any switches to namazu
+;; It is particularly important not to pass any switches to namazu
;; that will change the output format. Good switches to use include
;; `--sort', `--ascending', `--early' and `--late'. Refer to the Namazu
;; documentation for further information on valid switches.
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 5f1ef5e7d02..857fa800eb4 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -773,7 +773,7 @@ never used by the other charsets.
If it is a list, the elements must be charsets, nil, 94, or 96. GN
can be used by all the listed charsets. If the list contains 94, any
iso-2022 charset whose code-space ranges are 94 long can be designated
-to GN. If the list contains 96, any charsets whose whose ranges are
+to GN. If the list contains 96, any charsets whose ranges are
96 long can be designated to GN. If the first element is a charset,
that charset is initially designated to GN.
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 260ada54222..4ba452e4b94 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -635,7 +635,7 @@ size, and full-buffer size."
(replace-match " " t t))
(shr--translate-insertion-chars)
(goto-char (point-max)))
- ;; We may have removed everything we inserted if if was just
+ ;; We may have removed everything we inserted if it was just
;; spaces.
(unless (= font-start (point))
;; Mark all lines that should possibly be folded afterwards.
@@ -700,12 +700,16 @@ size, and full-buffer size."
;; Success; continue.
(when (= (preceding-char) ?\s)
(delete-char -1))
- (let ((props (text-properties-at (point)))
+ (let ((props `(face ,(get-text-property (point) 'face)
+ ;; Don't break the image-displayer property
+ ;; as it will cause `gnus-article-show-images'
+ ;; to show the two or more same images.
+ image-displayer
+ ,(get-text-property (point) 'image-displayer)))
(gap-start (point)))
(insert "\n")
(shr-indent)
- (when props
- (add-text-properties gap-start (point) props)))
+ (add-text-properties gap-start (point) props))
(setq start (point))
(shr-vertical-motion shr-internal-width)
(when (looking-at " $")
diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
index 4f183addaa0..2213a0239db 100644
--- a/lisp/pixel-scroll.el
+++ b/lisp/pixel-scroll.el
@@ -74,10 +74,13 @@
More wait will result in slow and gentle scroll.")
(defvar pixel-resolution-fine-flag nil
- "Set scrolling resolution to a pixel instead of a line.
-After a pixel scroll, typing C-n or C-p scrolls the window to
-make it fully visible, and undoes the effect of the pixel-level
-scroll.")
+ "Set scrolling resolution to pixels instead of a line.
+When it is t, scrolling resolution is number of pixels obtained
+by `frame-char-height' instead of a line. When it is number,
+scrolling resolution is set to number of pixels specified. In
+case you need scrolling resolution of a pixel, set to 1. After a
+pixel scroll, typing \\[next-line] or \\[previous-line] scrolls the window to make it
+fully visible, and undoes the effect of the pixel-level scroll.")
;;;###autoload
(define-minor-mode pixel-scroll-mode
@@ -102,13 +105,16 @@ This is an alternative of `scroll-up'. Scope moves downward."
(interactive)
(or arg (setq arg 1))
(dotimes (ii arg) ; move scope downward
- (if (pixel-eob-at-top-p) ; when end-of-the-buffer is close
- (scroll-up 1) ; relay on robust method
- (when (pixel-point-at-top-p) ; prevent too late
- (vertical-motion 1)) ; move point downward
- (pixel-scroll-pixel-up (if pixel-resolution-fine-flag
- 1
- (pixel-line-height)))))) ; move scope downward
+ (let ((amt (if pixel-resolution-fine-flag
+ (if (integerp pixel-resolution-fine-flag)
+ pixel-resolution-fine-flag
+ (frame-char-height))
+ (pixel-line-height))))
+ (if (pixel-eob-at-top-p) ; when end-of-the-buffer is close
+ (scroll-up 1) ; relay on robust method
+ (while (pixel-point-at-top-p amt) ; prevent too late (multi tries)
+ (vertical-motion 1)) ; move point downward
+ (pixel-scroll-pixel-up amt))))) ; move scope downward
(defun pixel-scroll-down (&optional arg)
"Scroll text of selected window down ARG lines.
@@ -116,48 +122,63 @@ This is and alternative of `scroll-down'. Scope moves upward."
(interactive)
(or arg (setq arg 1))
(dotimes (ii arg)
- (if (or (pixel-bob-at-top-p) ; when beginning-of-the-buffer is seen
- (pixel-eob-at-top-p)) ; for file with a long line
- (scroll-down 1) ; relay on robust method
- (while (pixel-point-at-bottom-p) ; prevent too late (multi tries)
- (vertical-motion -1))
- (pixel-scroll-pixel-down (if pixel-resolution-fine-flag
- 1
- (pixel-line-height -1))))))
-
-(defun pixel-bob-at-top-p ()
- "Return non-nil if beginning of buffer is at top of window."
- (equal (window-start) (point-min)))
+ (let ((amt (if pixel-resolution-fine-flag
+ (if (integerp pixel-resolution-fine-flag)
+ pixel-resolution-fine-flag
+ (frame-char-height))
+ (pixel-line-height -1))))
+ (if (or (pixel-bob-at-top-p amt) ; when beginning-of-the-buffer is seen
+ (pixel-eob-at-top-p)) ; for file with a long line
+ (scroll-down 1) ; relay on robust method
+ (while (pixel-point-at-bottom-p amt) ; prevent too late (multi tries)
+ (vertical-motion -1))
+ (pixel-scroll-pixel-down amt)))))
+
+(defun pixel-bob-at-top-p (amt)
+ "Return non-nil if window-start is at beginning of the current buffer.
+Window must be vertically scrolled by not more than AMT pixels."
+ (and (equal (window-start) (point-min))
+ (< (window-vscroll nil t) amt)))
(defun pixel-eob-at-top-p ()
"Return non-nil if end of buffer is at top of window."
(<= (count-lines (window-start) (window-end)) 2)) ; count-screen-lines
(defun pixel-posn-y-at-point ()
- "Return y coordinates of point in pixels of current window."
- (let ((hscroll0 (window-hscroll))
- (y (cdr (posn-x-y (posn-at-point)))))
- ;; when point is out of scope by hscroll
- (unless y
- (save-excursion
- (set-window-hscroll nil (current-column))
- (setq y (cdr (posn-x-y (posn-at-point))))
- (set-window-hscroll nil hscroll0)))
- y))
-
-(defun pixel-point-at-top-p ()
- "Return if point is located at top of a window."
- (let* ((y (pixel-posn-y-at-point))
- (top-margin y))
- (< top-margin (pixel-line-height))))
-
-(defun pixel-point-at-bottom-p ()
- "Return if point is located at bottom of a window."
- (let* ((y (pixel-posn-y-at-point))
- (edges (window-inside-pixel-edges))
+ "Return y coordinates of point in pixels of current window.
+This returns nil when horizontally scrolled."
+ (when (equal (window-hscroll) 0)
+ (save-excursion
+ ;; When there's an overlay string on a line, move
+ ;; point by (beginning-of-visual-line).
+ (beginning-of-visual-line)
+ ;; (- (cadr (pos-visible-in-window-p (point) nil t))
+ ;; (line-pixel-height))
+ (cdr (posn-x-y (posn-at-point))))))
+
+(defun pixel-point-at-top-p (amt)
+ "Return if point is located at top of a window on coming scroll of AMT pixels.
+When location of point was not obtained, this returns if point is at top
+of window."
+ (let ((y (pixel-posn-y-at-point))
+ top-margin)
+ (cond
+ (y
+ (setq top-margin y)
+ (< top-margin amt))
+ (t
+ (<= (count-lines (window-start) (point)) 1)))))
+
+(defun pixel-point-at-bottom-p (amt)
+ "Return if point is located at bottom of window on coming scroll of AMT pixels.
+When location of point was not obtained, this returns nil."
+ (let* ((edges (window-inside-pixel-edges))
(height (- (nth 3 edges) (nth 1 edges))) ; (- bottom top)
- (bottom-margin (- height (+ y (line-pixel-height))))) ; bottom margin
- (< bottom-margin (pixel-line-height -1)))) ; coming unseen line
+ (y (pixel-posn-y-at-point))
+ bottom-margin)
+ (when y
+ (setq bottom-margin (- height (+ y (pixel-visual-line-height))))
+ (< bottom-margin amt)))) ; coming unseen line
(defun pixel-scroll-pixel-up (amt)
"Scroll text of selected windows up AMT pixels.
@@ -173,8 +194,12 @@ Scope moves upward."
(while (> amt 0)
(let ((vs (window-vscroll nil t)))
(if (equal vs 0)
- (pixel-scroll-down-and-set-window-vscroll
- (1- (pixel-line-height -1)))
+ (progn
+ ;; On horizontal scrolling, move cursor.
+ (when (> (window-hscroll) 0)
+ (vertical-motion -1))
+ (pixel-scroll-down-and-set-window-vscroll
+ (1- (pixel-line-height -1))))
(set-window-vscroll nil (1- vs) t))
(setq amt (1- amt))
(sit-for pixel-wait))))
@@ -189,11 +214,16 @@ Scope moves downward. This function returns number of pixels
that was scrolled."
(let* ((src (window-vscroll nil t)) ; EXAMPLE (initial) @0 @8 @88
(height (pixel-line-height)) ; 25 25 23
- (line (1+ (/ src height))) ; catch up + one line Ä1 Ä1 Ä4
+ (line (1+ (/ src height))) ; catch up + one line 1 1 4
(dst (* line height)) ; goal @25 @25 @92
(delta (- dst src))) ; pixels to be scrolled 25 17 4
(pixel--whistlestop-pixel-up (1- delta)) ; until one less @24 @24 @91
- (scroll-up line) (sit-for pixel-wait) ; scroll 1 pixel @0 @0 @0
+ (dotimes (ii line)
+ ;; On horizontal scrolling, move cursor.
+ (when (> (window-hscroll) 0)
+ (vertical-motion 1))
+ (scroll-up 1))
+ (sit-for pixel-wait) ; scroll 1 pixel @0 @0 @0
delta))
(defun pixel--whistlestop-pixel-up (n)
@@ -211,9 +241,61 @@ unseen line above the first line, respectively, is provided."
(or pos (setq pos (window-start)))
(when (< pos 0)
(setq pos (pixel-point-at-unseen-line)))
- (save-excursion
- (goto-char pos)
- (line-pixel-height))) ; frame-char-height
+ (let ((vs1 (window-vscroll nil t))
+ height)
+ (set-window-vscroll nil 0 t)
+ (save-excursion
+ (goto-char pos)
+ (setq height (pixel-visual-line-height))) ; line-pixel-height, frame-char-height
+ (set-window-vscroll nil vs1 t)
+ height))
+
+(defun pixel-visual-line-height ()
+ "Return height in pixels of text line where cursor is in the selected window."
+ (let ((pos (pixel-visible-pos-in-window)))
+ (cond
+ ;; When a char of line is shown, obtain height by
+ ;; (line-pixel-height).
+ (pos (save-excursion (goto-char pos) (line-pixel-height)))
+ ;; When no char of line is shown but the line is at the top,
+ ;; obtain height by (line-pixel-height). This is based on
+ ;; expected response from display engine. See following
+ ;; discussion.
+ ;; https://lists.gnu.org/archive/html/emacs-devel/2017-10/msg00621.html
+ ((equal (count-lines (window-start) (point)) 1)
+ (line-pixel-height))
+ ;; No char of line is shown and the line is not at the top,
+ ;; obtain height by (frame-char-height).
+ (t (frame-char-height)))))
+
+(defun pixel-visible-pos-in-window ()
+ "Return position shown on text line where cursor is in the selected window.
+This will look for positions of point and end-of-visual-line,
+then positions from beginning-of-visual-line to
+end-of-visual-line. When no char in a line is shown, this
+returns nil."
+ (let* ((beginning-of-visual-line-pos (save-excursion (beginning-of-visual-line) (point)))
+ (end-of-visual-line-pos (save-excursion (end-of-visual-line) (point)))
+ (pos-list (number-sequence beginning-of-visual-line-pos end-of-visual-line-pos))
+ (edges (window-inside-pixel-edges))
+ (width (- (nth 2 edges) (nth 0 edges)))
+ posn-x
+ visible-pos)
+ ;; Optimize list of position to be surveyed.
+ (push end-of-visual-line-pos pos-list)
+ (push (point) pos-list)
+ (delete-dups pos-list)
+ ;; Find out a char with position X that is more than zero and less
+ ;; than width of screen.
+ (while (and (not visible-pos)
+ pos-list)
+ (setq posn-x (car (pos-visible-in-window-p (car pos-list) nil t)))
+ (if (and posn-x
+ (<= 0 posn-x)
+ (< posn-x width))
+ (setq visible-pos (car pos-list))
+ (setq pos-list (cdr pos-list))))
+ visible-pos))
(defun pixel-point-at-unseen-line ()
"Return the character position of line above the selected window.
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 457f95f2ca3..6f39cc64338 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -1720,7 +1720,7 @@ comment at the start of cc-engine.el for more info."
`((c-debug-remove-face beg end 'c-debug-is-sws-face)
(c-debug-remove-face beg end 'c-debug-in-sws-face)))))
-;; The type of literal position `end' is in in a `before-change-functions'
+;; The type of literal position `end' is in a `before-change-functions'
;; function - one of `c', `c++', `pound', or nil (but NOT `string').
(defvar c-sws-lit-type nil)
;; A cons (START . STOP) of the bounds of the comment or CPP construct
@@ -2784,7 +2784,7 @@ comment at the start of cc-engine.el for more info."
(setq pos npos)
(setq c-state-nonlit-pos-cache (cons pos c-state-nonlit-pos-cache)))
- ;; Add one extra element above HERE so as to to avoid the previous
+ ;; Add one extra element above HERE so as to avoid the previous
;; expensive calculation when the next call is close to the current
;; one. This is especially useful when inside a large macro.
(when npos
@@ -5189,16 +5189,25 @@ comment at the start of cc-engine.el for more info."
;; Get a "safe place" approximately TRY-SIZE characters before START.
;; This defsubst doesn't preserve point.
(let* ((pos (max (- start try-size) (point-min)))
- (s (c-state-semi-pp-to-literal pos)))
- (or (car (cddr s)) pos)))
+ (s (c-state-semi-pp-to-literal pos))
+ (cand (or (car (cddr s)) pos)))
+ (if (>= cand (point-min))
+ cand
+ (parse-partial-sexp pos start nil nil (car s) 'syntax-table)
+ (point))))
(defun c-determine-limit (how-far-back &optional start try-size)
- ;; Return a buffer position HOW-FAR-BACK non-literal characters from START
- ;; (default point). This is done by going back further in the buffer then
- ;; searching forward for literals. The position found won't be in a
- ;; literal. We start searching for the sought position TRY-SIZE (default
- ;; twice HOW-FAR-BACK) bytes back from START. This function must be fast.
- ;; :-)
+ ;; Return a buffer position HOW-FAR-BACK non-literal characters from
+ ;; START (default point). The starting position, either point or
+ ;; START may not be in a comment or string.
+ ;;
+ ;; The position found will not be before POINT-MIN and won't be in a
+ ;; literal.
+ ;;
+ ;; We start searching for the sought position TRY-SIZE (default
+ ;; twice HOW-FAR-BACK) bytes back from START.
+ ;;
+ ;; This function must be fast. :-)
(save-excursion
(let* ((start (or start (point)))
(try-size (or try-size (* 2 how-far-back)))
@@ -5254,6 +5263,8 @@ comment at the start of cc-engine.el for more info."
(+ (car elt) (- count how-far-back)))
((eq base (point-min))
(point-min))
+ ((> base (- start try-size)) ; Can only happen if we hit point-min.
+ (car elt))
(t
(c-determine-limit (- how-far-back count) base try-size))))))
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index e4b77ab0504..0794830fcb8 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -2328,7 +2328,7 @@ and runs `compilation-filter-hook'."
(while (,< n 0)
(setq opt pt)
(or (setq pt (,property-change pt 'compilation-message))
- ;; Handle the case where where the first error message is
+ ;; Handle the case where the first error message is
;; at the start of the buffer, and n < 0.
(if (or (eq (get-text-property ,limit 'compilation-message)
(get-text-property opt 'compilation-message))
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el
index 661c55dc184..6ea939de661 100644
--- a/lisp/progmodes/ebrowse.el
+++ b/lisp/progmodes/ebrowse.el
@@ -3034,7 +3034,7 @@ the first derived class."
:help "Show the base class of this class"
:active t]
["Down" ebrowse-switch-member-buffer-to-derived-class
- :help "Show a derived class class of this class"
+ :help "Show a derived class of this class"
:active t]
["Next Sibling" ebrowse-switch-member-buffer-to-next-sibling-class
:help "Show the next sibling class"
diff --git a/lisp/progmodes/flymake-proc.el b/lisp/progmodes/flymake-proc.el
index 359cffd797e..f504a1c21a8 100644
--- a/lisp/progmodes/flymake-proc.el
+++ b/lisp/progmodes/flymake-proc.el
@@ -179,13 +179,13 @@ from compile.el")
"Predicate matching against diagnostic text to detect its type.
Takes a single argument, the diagnostic's text and should return
a value suitable for indexing
-`flymake-diagnostic-types-alist' (which see). If the returned
-value is nil, a type of `:error' is assumed. For some backward
-compatibility, if a non-nil value is returned that that doesn't
+`flymake-diagnostic-types-alist' (which see). If the returned
+value is nil, a type of `:error' is assumed. For some backward
+compatibility, if a non-nil value is returned that doesn't
index that alist, a type of `:warning' is assumed.
Instead of a function, it can also be a string, a regular
-expression. A match indicates `:warning' type, otherwise
+expression. A match indicates `:warning' type, otherwise
`:error'")
(defun flymake-proc-default-guess (text)
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 7723f700925..28d1974893d 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -2374,7 +2374,7 @@ file names include non-ASCII characters."
;; sequences are not split between chunks of output of the GDB process
;; due to buffering, and arrive together. Finally, if some string
;; included literal \nnn strings (as opposed to non-ASCII characters
-;; converted by by GDB/MI to octal escapes), this decoding will mangle
+;; converted by GDB/MI to octal escapes), this decoding will mangle
;; those strings. When/if GDB acquires the ability to not
;; escape-protect non-ASCII characters in its MI output, this kludge
;; should be removed.
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 3ef1d90ab58..7d044b294da 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -1830,7 +1830,7 @@ and source-file directory for your debugger."
;;
;; Type M-n to step over the current line and M-s to step into it. That,
;; along with the JDB 'help' command should get you started. The 'quit'
-;; JDB command will get out out of the debugger. There is some truly
+;; JDB command will get out of the debugger. There is some truly
;; pathetic JDB documentation available at:
;;
;; http://java.sun.com/products/jdk/1.1/debugging/
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el
index 39744833255..b1a2a35d55f 100644
--- a/lisp/progmodes/hideif.el
+++ b/lisp/progmodes/hideif.el
@@ -1657,8 +1657,8 @@ first arg will be `hif-etc'."
;; The original version of hideif evaluates the macro early and store the
;; final values for the defined macro into the symbol database (aka
-;; `hide-ifdef-env'). The evaluation process is "strings -> tokens -> parsed
-;; tree -> [value]". (The square bracket refers to what's stored in in our
+;; `hide-ifdef-env'). The evaluation process is "strings -> tokens -> parsed
+;; tree -> [value]". (The square bracket refers to what's stored in our
;; `hide-ifdef-env'.)
;;
;; This forbids the evaluation of an argumented macro since the parameters
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index 2f9a4c3db55..24b934ce6c2 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -678,7 +678,9 @@ Turning on Perl mode runs the normal hook `perl-mode-hook'."
(define-obsolete-function-alias 'electric-perl-terminator
'perl-electric-terminator "22.1")
(defun perl-electric-noindent-p (_char)
- (unless (eolp) 'no-indent))
+ ;; To reproduce the old behavior, ;, {, }, and : are made electric, but
+ ;; we only want them to be electric at EOL.
+ (unless (or (bolp) (eolp)) 'no-indent))
(defun perl-electric-terminator (arg)
"Insert character and maybe adjust indentation.
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 80cdcb3f18b..3dbf65ef6f5 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -102,7 +102,7 @@ This is typically the filename.")
;;;; Commonly needed location classes are defined here:
;; FIXME: might be useful to have an optional "hint" i.e. a string to
-;; search for in case the line number is sightly out of date.
+;; search for in case the line number is slightly out of date.
(defclass xref-file-location (xref-location)
((file :type string :initarg :file)
(line :type fixnum :initarg :line :reader xref-location-line)
@@ -254,8 +254,7 @@ find a search tool; by default, this uses \"find | grep\" in the
(project-external-roots pr)))))
(cl-defgeneric xref-backend-apropos (backend pattern)
- "Find all symbols that match PATTERN.
-PATTERN is a regexp")
+ "Find all symbols that match regexp PATTERN.")
(cl-defgeneric xref-backend-identifier-at-point (_backend)
"Return the relevant identifier at point.
diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el
index 4939649b999..16bf01eeaa8 100644
--- a/lisp/progmodes/xscheme.el
+++ b/lisp/progmodes/xscheme.el
@@ -85,8 +85,7 @@ reading-type received an altmode but nothing else
reading-string reading prompt string")
(defvar-local xscheme-allow-output-p t
- "This variable, if nil, prevents output from the scheme process
-from being inserted into the process-buffer.")
+ "Non-nil stops scheme process output being inserted in the process buffer.")
(defvar-local xscheme-prompt ""
"The current scheme prompt string.")
@@ -300,7 +299,7 @@ With argument, asks for a command line."
(defun scheme-interaction-mode (&optional preserve)
"Major mode for interacting with an inferior MIT Scheme process.
-Like scheme-mode except that:
+Like `scheme-mode' except that:
\\[xscheme-send-previous-expression] sends the expression before point to the Scheme process as input
\\[xscheme-yank-pop] yanks an expression previously sent to Scheme
@@ -315,7 +314,7 @@ in the minibuffer. If an error occurs, the process buffer will
automatically pop up to show you the error message.
While the Scheme process is running, the mode lines of all buffers in
-scheme-mode are modified to show the state of the process. The
+`scheme-mode' are modified to show the state of the process. The
possible states and their meanings are:
input waiting for input
@@ -353,13 +352,13 @@ Some possible command interpreter types and their meanings are:
Starting with release 6.2 of Scheme, the latter two types of command
interpreters will change the major mode of the Scheme process buffer
-to scheme-debugger-mode , in which the evaluation commands are
+to `scheme-debugger-mode', in which the evaluation commands are
disabled, and the keys which normally self insert instead send
themselves to the Scheme process. The command character ? will list
the available commands.
-For older releases of Scheme, the major mode will be be
-scheme-interaction-mode , and the command characters must be sent as
+For older releases of Scheme, the major mode will be
+`scheme-interaction-mode', and the command characters must be sent as
if they were expressions.
Commands:
@@ -367,10 +366,8 @@ Delete converts tabs to spaces as it moves back.
Blank lines separate paragraphs. Semicolons start comments.
\\{scheme-interaction-mode-map}
-Entry to this mode calls the value of scheme-interaction-mode-hook
-with no args, if that value is non-nil.
- Likewise with the value of scheme-mode-hook.
- scheme-interaction-mode-hook is called after scheme-mode-hook."
+Entry to this mode runs `scheme-mode-hook' and then
+`scheme-interaction-mode-hook'."
;; FIXME: Use define-derived-mode.
(interactive "P")
(if (not preserve)
@@ -456,7 +453,7 @@ with no args, if that value is non-nil.
(defun scheme-debugger-mode ()
"Major mode for executing the Scheme debugger.
-Like scheme-mode except that the evaluation commands
+Like `scheme-mode' except that the evaluation commands
are disabled, and characters that would normally be self inserting are
sent to the Scheme process instead. Typing ? will show you which
characters perform useful functions.
@@ -593,7 +590,7 @@ See also the commands \\[xscheme-yank-pop] and \\[xscheme-yank-push]."
"Insert or replace a just-yanked expression with an older expression.
If the previous command was not a yank, it yanks.
Otherwise, the region contains a stretch of reinserted
-expression. yank-pop deletes that text and inserts in its
+expression. `yank-pop' deletes that text and inserts in its
place a different expression.
With no argument, the next older expression is inserted.
@@ -620,7 +617,7 @@ comes the newest one."
"Insert or replace a just-yanked expression with a more recent expression.
If the previous command was not a yank, it yanks.
Otherwise, the region contains a stretch of reinserted
-expression. yank-pop deletes that text and inserts in its
+expression. `yank-pop' deletes that text and inserts in its
place a different expression.
With no argument, the next more recent expression is inserted.
diff --git a/lisp/select.el b/lisp/select.el
index d950d705934..54acb5292e6 100644
--- a/lisp/select.el
+++ b/lisp/select.el
@@ -98,7 +98,7 @@ if applicable (i.e. under X11)."
'select-enable-clipboard "25.1")
(defcustom select-enable-primary nil
- "Non-nil means cutting and pasting uses the primary selection
+ "Non-nil means cutting and pasting uses the primary selection.
The existence of a primary selection depends on the underlying GUI you use.
E.g. it doesn't exist under MS-Windows."
:type 'boolean
diff --git a/lisp/simple.el b/lisp/simple.el
index 12d65e50c34..372e153d626 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -5965,7 +5965,7 @@ Used internally by `line-move-visual'.")
"Non-nil means commands that move by lines ignore invisible newlines.
When this option is non-nil, \\[next-line], \\[previous-line], \\[move-end-of-line], and \\[move-beginning-of-line] behave
as if newlines that are invisible didn't exist, and count
-only visible newlines. Thus, moving across across 2 newlines
+only visible newlines. Thus, moving across 2 newlines
one of which is invisible will be counted as a one-line move.
Also, a non-nil value causes invisible text to be ignored when
counting columns for the purposes of keeping point in the same
@@ -6125,7 +6125,7 @@ The value is a floating-point number."
(or (null rbot) (= rbot 0)))
nil)
;; If cursor is not in the bottom scroll margin, and the
- ;; current line is is not too tall, move forward.
+ ;; current line is not too tall, move forward.
((and (or (null this-height) (<= this-height winh))
vpos
(> vpos 0)
diff --git a/lisp/sort.el b/lisp/sort.el
index 17f2cb0167e..1dee6ef6c56 100644
--- a/lisp/sort.el
+++ b/lisp/sort.el
@@ -406,7 +406,7 @@ the sort order."
;;;###autoload
(defun sort-regexp-fields (reverse record-regexp key-regexp beg end)
- "Sort the text in the region region lexicographically.
+ "Sort the text in the region lexicographically.
If called interactively, prompt for two regular expressions,
RECORD-REGEXP and KEY-REGEXP.
diff --git a/lisp/subr.el b/lisp/subr.el
index b6b55b53def..1f68c25c888 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2445,7 +2445,7 @@ floating point support."
nil)
((or (<= seconds 0)
;; We are going to call read-event below, which will record
- ;; the the next key as part of the macro, even if that key
+ ;; the next key as part of the macro, even if that key
;; invokes kmacro-end-macro, so if we are recording a macro,
;; the macro will recursively call itself. In addition, when
;; that key is removed from unread-command-events, it will be
diff --git a/lisp/textmodes/dns-mode.el b/lisp/textmodes/dns-mode.el
index df03beaa9a3..6b668a62674 100644
--- a/lisp/textmodes/dns-mode.el
+++ b/lisp/textmodes/dns-mode.el
@@ -35,6 +35,7 @@
;; RFC 5155, "DNS Security (DNSSEC) Hashed Authenticated Denial of Existence"
;; RFC 6698, "The DNS-Based Authentication of Named Entities (DANE)
;; Transport Layer Security (TLS) Protocol: TLSA"
+;; RFC 6844, "DNS Certification Authority Authorization (CAA) Resource Record"
;;; Release history:
@@ -62,7 +63,7 @@
"A6" "DNAME" "SINK" "OPT" "APL" "DS" "SSHFP"
"RRSIG" "NSEC" "DNSKEY" "UINFO" "UID" "GID"
"UNSPEC" "TKEY" "TSIG" "IXFR" "AXFR" "MAILB"
- "MAILA" "TLSA" "NSEC3")
+ "MAILA" "TLSA" "NSEC3" "CAA")
"List of strings with known DNS types.")
(defface dns-mode-control-entity '((t :inherit font-lock-keyword-face))
diff --git a/lisp/textmodes/mhtml-mode.el b/lisp/textmodes/mhtml-mode.el
index b6cd1572fb7..58541677509 100644
--- a/lisp/textmodes/mhtml-mode.el
+++ b/lisp/textmodes/mhtml-mode.el
@@ -75,11 +75,11 @@ code();
(defconst mhtml--crucial-variable-prefix
(regexp-opt '("comment-" "uncomment-" "electric-indent-"
- "smie-" "forward-sexp-function"))
+ "smie-" "forward-sexp-function" "completion-" "major-mode"))
"Regexp matching the prefix of \"crucial\" buffer-locals we want to capture.")
(defconst mhtml--variable-prefix
- (regexp-opt '("font-lock-" "indent-line-function" "major-mode"))
+ (regexp-opt '("font-lock-" "indent-line-function"))
"Regexp matching the prefix of buffer-locals we want to capture.")
(defun mhtml--construct-submode (mode &rest args)
@@ -149,7 +149,12 @@ code();
(defun mhtml--submode-lighter ()
"Mode-line lighter indicating the current submode."
- (let ((submode (get-text-property (point) 'mhtml-submode)))
+ ;; The end of the buffer has no text properties, so in this case
+ ;; back up one character, if possible.
+ (let* ((where (if (and (eobp) (not (bobp)))
+ (1- (point))
+ (point)))
+ (submode (get-text-property where 'mhtml-submode)))
(if submode
(mhtml--submode-name submode)
"")))
@@ -288,9 +293,7 @@ can function properly.")
(unless (bobp)
(let ((submode (get-text-property (1- (point)) 'mhtml-submode)))
(if submode
- ;; Don't search in a comment or string
- (unless (syntax-ppss-context (syntax-ppss))
- (mhtml--syntax-propertize-submode submode end))
+ (mhtml--syntax-propertize-submode submode end)
;; No submode, so do what sgml-mode does.
(sgml-syntax-propertize-inside end))))
(funcall
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 948743e8e5b..3da6e4e1124 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -55,6 +55,11 @@
:prefix "tex-"
:group 'tex)
+(defgroup tex-flymake nil
+ "Flymake backend for linting TeX files."
+ :prefix "tex-"
+ :group 'tex)
+
;;;###autoload
(defcustom tex-shell-file-name nil
"If non-nil, the shell file name to run in the subshell used to run TeX."
@@ -259,6 +264,17 @@ measured relative to that of the normal text."
(float :tag "Superscript"))
:version "23.1")
+(defcustom tex-chktex-program "chktex"
+ "ChkTeX executable to use for linting TeX files."
+ :type 'string
+ :link '(url-link "man:chktex(1)")
+ :group 'tex-flymake)
+
+(defcustom tex-chktex-extra-flags nil
+ "Extra command line flags for `tex-chktex-program'."
+ :type '(repeat string)
+ :group 'tex-flymake)
+
(defvar tex-last-temp-file nil
"Latest temporary file generated by \\[tex-region] and \\[tex-buffer].
Deleted when the \\[tex-region] or \\[tex-buffer] is next run, or when the
@@ -1154,6 +1170,7 @@ subshell is initiated, `tex-shell-hook' is run."
(setq-local fill-indent-according-to-mode t)
(add-hook 'completion-at-point-functions
#'latex-complete-data nil 'local)
+ (add-hook 'flymake-diagnostic-functions 'tex-chktex nil t)
(setq-local outline-regexp latex-outline-regexp)
(setq-local outline-level #'latex-outline-level)
(setq-local forward-sexp-function #'latex-forward-sexp)
@@ -3465,6 +3482,52 @@ There might be text before point."
;; Don't compose inside verbatim blocks.
(eq 2 (nth 7 (syntax-ppss))))))))
+
+;;; Flymake support
+
+(defvar-local tex-chktex--process nil)
+
+(defun tex-chktex-command ()
+ "Return a list of command arguments for invoking ChkTeX."
+ `(,tex-chktex-program ,@tex-chktex-extra-flags
+ "--quiet" "--verbosity=0" "--inputfiles"))
+
+(defun tex-chktex (report-fn &rest _args)
+ "Flymake backend for linting TeX buffers with ChkTeX."
+ (unless (executable-find tex-chktex-program)
+ (error "Cannot find a suitable TeX checker"))
+ (when (process-live-p tex-chktex--process)
+ (kill-process tex-chktex--process))
+ (let ((source (current-buffer))
+ (re "^stdin:\\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\):\\(.*\\)$"))
+ (save-restriction
+ (widen)
+ (setq tex-chktex--process
+ (make-process
+ :name "tex-chktex"
+ :buffer (generate-new-buffer "*tex-chktex*")
+ :command (tex-chktex-command)
+ :noquery t :connection-type 'pipe
+ :sentinel
+ (lambda (process _event)
+ (when (eq (process-status process) 'exit)
+ (unwind-protect
+ (when (eq process tex-chktex--process)
+ (with-current-buffer (process-buffer process)
+ (goto-char (point-min))
+ (cl-loop
+ while (search-forward-regexp re nil t)
+ for msg = (match-string 4)
+ for line = (string-to-number (match-string 1))
+ for col = (string-to-number (match-string 2))
+ for (beg . end) = (flymake-diag-region source line col)
+ collect (flymake-make-diagnostic source beg end :warning msg)
+ into diags
+ finally (funcall report-fn diags))))
+ (kill-buffer (process-buffer process)))))))
+ (process-send-region tex-chktex--process (point-min) (point-max))
+ (process-send-eof tex-chktex--process))))
+
(run-hooks 'tex-mode-load-hook)
(provide 'tex-mode)
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el
index 647ae1b4300..51f0659bf31 100644
--- a/lisp/textmodes/texinfmt.el
+++ b/lisp/textmodes/texinfmt.el
@@ -2022,7 +2022,7 @@ commands that are defined in texinfo.tex for printed output.
(push (- end-of-template start-of-template)
texinfo-multitable-width-list)
;; Remove carriage return from within a template, if any.
- ;; This helps those those who want to use more than
+ ;; This helps those who want to use more than
;; one line's worth of words in @multitable line.
(narrow-to-region start-of-template end-of-template)
(goto-char (point-min))
diff --git a/lisp/url/url-queue.el b/lisp/url/url-queue.el
index 06a77404b58..84da6f60260 100644
--- a/lisp/url/url-queue.el
+++ b/lisp/url/url-queue.el
@@ -177,7 +177,7 @@ The variable `url-queue-timeout' sets a timeout."
(with-current-buffer
(if (and (bufferp (url-queue-buffer job))
(buffer-live-p (url-queue-buffer job)))
- ;; Use the (partially filled) process buffer it it exists.
+ ;; Use the (partially filled) process buffer if it exists.
(url-queue-buffer job)
;; If not, just create a new buffer, which will probably be
;; killed again by the caller.
diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el
index 45497688487..79ccc6d32db 100644
--- a/lisp/vc/ediff-wind.el
+++ b/lisp/vc/ediff-wind.el
@@ -181,6 +181,8 @@ In this case, Ediff will use those frames to display these buffers."
'(visibility . nil)
;; make initial frame small to avoid distraction
'(width . 1) '(height . 1)
+ ;; Fullscreen control frames don't make sense (Bug#29026).
+ '(fullscreen . nil)
;; this blocks queries from window manager as to where to put
;; ediff's control frame. we put the frame outside the display,
;; so the initial frame won't jump all over the screen
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index b80f0e69491..211feddc55d 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2377,6 +2377,7 @@ When called interactively with a prefix argument, prompt for LIMIT."
;;;###autoload
(defun vc-print-branch-log (branch)
+ "Show the change log for BRANCH in a window."
(interactive
(list
(vc-read-revision "Branch to log: ")))
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index 629c1063d0b..32a90ba485b 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -495,7 +495,8 @@ Used when `whitespace-style' includes the value `spaces'.")
(defvar whitespace-tab 'whitespace-tab
"Symbol face used to visualize TAB.
Used when `whitespace-style' includes the value `tabs'.")
-(make-obsolete-variable 'whitespace-tab "use the face instead." "24.4")
+(make-obsolete-variable 'whitespace-tab
+ "customize the face `whitespace-tab' instead." "24.4")
(defface whitespace-tab
'((((class color) (background dark))
diff --git a/lisp/window.el b/lisp/window.el
index c0a9ecd093c..f87294ceb15 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -2583,7 +2583,7 @@ and no others."
(defun minibuffer-window-active-p (window)
"Return t if WINDOW is the currently active minibuffer window."
- (eq window (active-minibuffer-window)))
+ (and (window-live-p window) (eq window (active-minibuffer-window))))
(defun count-windows (&optional minibuf)
"Return the number of live windows on the selected frame.
@@ -8021,7 +8021,7 @@ parameters of FRAME."
(- (nth 3 outer-edges) (nth 1 outer-edges))
;; Another poor guess.
(frame-pixel-height frame)))
- ;; The text size of of FRAME. Needed to specify FRAME's
+ ;; The text size of FRAME. Needed to specify FRAME's
;; text size after the root window's body's new sizes have
;; been calculated.
(text-width (frame-text-width frame))
@@ -8678,7 +8678,7 @@ result is a list containing only the selected window."
(make-variable-buffer-local 'move-to-window-group-line-function)
(put 'move-to-window-group-line-function 'permanent-local t)
(defun move-to-window-group-line (arg)
- "Position point relative to the the current group of windows.
+ "Position point relative to the current group of windows.
When a grouping mode (such as Follow Mode) is not active, this
function is identical to `move-to-window-line'.
diff --git a/src/alloc.c b/src/alloc.c
index da0c3ad4b3e..11afdfd7cc0 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -621,12 +621,6 @@ buffer_memory_full (ptrdiff_t nbytes)
#endif
}
-/* A common multiple of the positive integers A and B. Ideally this
- would be the least common multiple, but there's no way to do that
- as a constant expression in C, so do the best that we can easily do. */
-#define COMMON_MULTIPLE(a, b) \
- ((a) % (b) == 0 ? (a) : (b) % (a) == 0 ? (b) : (a) * (b))
-
#ifndef XMALLOC_OVERRUN_CHECK
#define XMALLOC_OVERRUN_CHECK_OVERHEAD 0
#else
@@ -7030,7 +7024,9 @@ sweep_symbols (void)
{
if (!sym->s.gcmarkbit)
{
- if (sym->s.redirect == SYMBOL_LOCALIZED)
+ if (sym->s.redirect == SYMBOL_LOCALIZED
+ /* Already freed? */
+ && !EQ (sym->s.function, Vdead))
xfree (SYMBOL_BLV (&sym->s));
sym->s.next = symbol_free_list;
symbol_free_list = &sym->s;
diff --git a/src/buffer.c b/src/buffer.c
index 1c8b4635086..9635733fcff 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5716,7 +5716,7 @@ word-wrapping, you might want to reduce the value of
in narrower windows.
Instead of setting this variable directly, most users should use
-Visual Line mode . Visual Line mode, when enabled, sets `word-wrap'
+Visual Line mode. Visual Line mode, when enabled, sets `word-wrap'
to t, and additionally redefines simple editing commands to act on
visual lines rather than logical lines. See the documentation of
`visual-line-mode'. */);
diff --git a/src/dispnew.c b/src/dispnew.c
index cb32f09b7c6..065d06813b8 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -5149,6 +5149,29 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p
include the hscroll. */
to_x += it.first_visible_x;
+ /* If we are hscrolling only the current line, and Y is at the line
+ containing point, augment TO_X with the hscroll amount of the
+ current line. */
+ if (it.line_wrap == TRUNCATE
+ && EQ (automatic_hscrolling, Qcurrent_line) && IT_CHARPOS (it) < PT)
+ {
+ struct it it2 = it;
+ void *it2data = bidi_shelve_cache ();
+ it2.last_visible_x = 1000000;
+ /* If the line at Y shows point, the call below to
+ move_it_in_display_line will succeed in reaching point. */
+ move_it_in_display_line (&it2, PT, -1, MOVE_TO_POS);
+ if (IT_CHARPOS (it2) >= PT)
+ {
+ to_x += (w->hscroll - w->min_hscroll) * FRAME_COLUMN_WIDTH (it.f);
+ /* We need to pretend the window is hscrolled, so that
+ move_it_in_display_line below will DTRT with TO_X. */
+ it.first_visible_x += w->hscroll * FRAME_COLUMN_WIDTH (it.f);
+ it.last_visible_x += w->hscroll * FRAME_COLUMN_WIDTH (it.f);
+ }
+ bidi_unshelve_cache (it2data, 0);
+ }
+
/* Now move horizontally in the row to the glyph under *X. Second
argument is ZV to prevent move_it_in_display_line from matching
based on buffer positions. */
diff --git a/src/editfns.c b/src/editfns.c
index 47ff2a5cbfd..e250c91ecbc 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -4119,7 +4119,7 @@ The # flag means to use an alternate display form for %o, %x, %X, %e,
\"0\"; for %x and %X, it prefixes the result with \"0x\" or \"0X\";
for %e and %f, it causes a decimal point to be included even if the
the precision is zero; for %g, it causes a decimal point to be
-included even if the the precision is zero, and also forces trailing
+included even if the precision is zero, and also forces trailing
zeros after the decimal point to be left in place.
The width specifier supplies a lower limit for the length of the
diff --git a/src/fileio.c b/src/fileio.c
index ac520c2328e..fb66118905f 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3126,7 +3126,15 @@ symbolic notation, like the `chmod' command from GNU Coreutils. */)
DEFUN ("set-default-file-modes", Fset_default_file_modes, Sset_default_file_modes, 1, 1, 0,
doc: /* Set the file permission bits for newly created files.
The argument MODE should be an integer; only the low 9 bits are used.
-This setting is inherited by subprocesses. */)
+On Posix hosts, this setting is inherited by subprocesses.
+
+This function works by setting the Emacs's file mode creation mask.
+Each bit that is set in the mask means that the corresponding bit
+in the permissions of newly created files will be disabled.
+
+Note that when `write-region' creates a file, it resets the
+execute bit, even if the mask set by this function allows that bit
+by having the corresponding bit in the mask reset. */)
(Lisp_Object mode)
{
mode_t oldrealmask, oldumask, newumask;
diff --git a/src/frame.c b/src/frame.c
index ab801eec9c7..fe1709e6ede 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -5895,16 +5895,11 @@ or call the function `tool-bar-mode'. */);
#endif
DEFVAR_KBOARD ("default-minibuffer-frame", Vdefault_minibuffer_frame,
- doc: /* Minibufferless frames use this frame's minibuffer.
-Emacs cannot create minibufferless frames unless this is set to an
-appropriate surrogate.
-
-Emacs consults this variable only when creating minibufferless
-frames; once the frame is created, it sticks with its assigned
-minibuffer, no matter what this variable is set to. This means that
-this variable doesn't necessarily say anything meaningful about the
-current set of frames, or where the minibuffer is currently being
-displayed.
+ doc: /* Minibuffer-less frames by default use this frame's minibuffer.
+Emacs consults this variable only when creating a minibuffer-less frame
+and no explicit minibuffer window has been specified for that frame via
+the `minibuffer' frame parameter. Once such a frame has been created,
+setting this variable does not change that frame's previous association.
This variable is local to the current terminal and cannot be buffer-local. */);
diff --git a/src/lisp.h b/src/lisp.h
index 266370333f5..43b3ec618f0 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -283,6 +283,12 @@ error !;
# define GCALIGNED /* empty */
#endif
+/* A common multiple of the positive integers A and B. Ideally this
+ would be the least common multiple, but there's no way to do that
+ as a constant expression in C, so do the best that we can easily do. */
+#define COMMON_MULTIPLE(a, b) \
+ ((a) % (b) == 0 ? (a) : (b) % (a) == 0 ? (b) : (a) * (b))
+
/* Some operations are so commonly executed that they are implemented
as macros, not functions, because otherwise runtime performance would
suffer too much when compiling with GCC without optimization.
diff --git a/src/thread.c b/src/thread.c
index 6f12d796ff9..7a670ba410b 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -26,7 +26,9 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include "coding.h"
#include "syssignal.h"
-static struct thread_state alignas (GCALIGNMENT) main_thread;
+#define THREAD_ALIGNMENT COMMON_MULTIPLE (alignof (max_align_t), GCALIGNMENT)
+
+static struct thread_state alignas (THREAD_ALIGNMENT) main_thread;
struct thread_state *current_thread = &main_thread;
diff --git a/src/window.c b/src/window.c
index ba86d73911f..9bb2c43a698 100644
--- a/src/window.c
+++ b/src/window.c
@@ -5832,8 +5832,8 @@ by this function. This happens in an interactive call. */)
}
DEFUN ("minibuffer-selected-window", Fminibuffer_selected_window, Sminibuffer_selected_window, 0, 0, 0,
- doc: /* Return the window which was selected when entering the minibuffer.
-Returns nil, if selected window is not a minibuffer window. */)
+ doc: /* Return window selected just before minibuffer window was selected.
+Return nil if the selected window is not a minibuffer window. */)
(void)
{
if (minibuf_level > 0
diff --git a/src/xterm.c b/src/xterm.c
index d90654b101d..dbb8349452d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -11504,6 +11504,22 @@ x_make_frame_visible (struct frame *f)
/* Try to wait for a MapNotify event (that is what tells us when a
frame becomes visible). */
+
+#ifdef CYGWIN
+ /* On Cygwin, which uses input polling, we need to force input to
+ be read. See
+ http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html
+ and https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24091#131.
+ Fake an alarm signal to let the handler know that there's
+ something to be read.
+
+ It could be confusing if a real alarm arrives while processing
+ the fake one. Turn it off and let the handler reset it. */
+ int old_poll_suppress_count = poll_suppress_count;
+ poll_suppress_count = 1;
+ poll_for_input_1 ();
+ poll_suppress_count = old_poll_suppress_count;
+#endif
x_wait_for_event (f, MapNotify);
}
}
diff --git a/test/lisp/calendar/todo-mode-tests.el b/test/lisp/calendar/todo-mode-tests.el
index 66ddbbcc964..43187d4ab95 100644
--- a/test/lisp/calendar/todo-mode-tests.el
+++ b/test/lisp/calendar/todo-mode-tests.el
@@ -384,7 +384,7 @@ priority and the done item should be the first done item."
(ert-deftest todo-test-move-item05 () ; bug#27609
"Test moving multiple todo and done items to another category.
Both types of item should be moved en bloc to the new category,
-and the the top todo item should have the provided priority and
+and the top todo item should have the provided priority and
the top done item should be the first done item."
(with-todo-test
(todo-test--show 1)