1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Merge from origin/emacs-26

2c0cfa6455 * ChangeLog.3: Update
4387bb44ae Update authors
bce51bd6f7 * lisp/gnus/message.el (message-do-auto-fill): Prevent do-...
bd2a2a1e84 Improve documentation of etags
7ba75b9637 Teach etags new interpreters for some languages
1f7f03742d * lisp/emacs-lisp/generator.el (iter-defun): Add 'doc-stri...
dbb4aac212 * lisp/emacs-lisp/syntax.el (syntax-propertize): Fix bug#2...
80463a43da Improve documentation of fill-separate-heterogeneous-words...
4bd2416d55 Fix documentation of some x-* functions
9c2b11484f Inherit query-on-exit flag to stderr process (Bug#30031)
3efb1e7def Fix Bug#30057
a9b884c60f Tag some unstable tests, and skip by default (bug#24503)

# Conflicts:
#	test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
This commit is contained in:
Glenn Morris 2018-01-15 13:53:40 -08:00
commit 9bd8f01cd6
24 changed files with 18782 additions and 13530 deletions

File diff suppressed because it is too large Load diff

View file

@ -58,9 +58,11 @@
# make docs
# Make Emacs documentation files from their sources; requires makeinfo.
#
# make check or make check-expensive
# Run Emacs test suite. check-expensive runs also tests which
# take more time to perform.
# make check (or check-expensive or check-all)
# Run the Emacs test suite.
# check-expensive includes additional tests that can be slow.
# check-all runs all tests, including ones that can be slow, or
# fail unpredictably
SHELL = @SHELL@
@ -938,7 +940,8 @@ have-tests:
exit 1; \
fi
check check-maybe check-expensive: have-tests all
.PHONY: check check-maybe check-expensive check-all
check check-maybe check-expensive check-all: have-tests all
$(MAKE) -C test $@
dist:
@ -955,7 +958,7 @@ $(DOCS):
$(MAKE) -C doc/$(subst -, ,$@)
.PHONY: $(DOCS) docs pdf ps
.PHONY: info dvi dist check check-maybe check-expensive html info-real info-dir check-info
.PHONY: info dvi dist html info-real info-dir check-info
## TODO add etc/refcards.
docs: $(DOCS)

View file

@ -130,6 +130,7 @@ files.")
("Agustín Martín" "Agustin Martin" "Agustín Martín Domingo")
("Martin Lorentzon" "Martin Lorentzson")
("Matt Swift" "Matthew Swift")
(nil "Max")
("Maxime Edouard Robert Froumentin" "Max Froumentin")
("Michael R. Mauger" "Michael Mauger")
("Michael D. Ernst" "Michael Ernst")
@ -840,7 +841,8 @@ Changes to files in this list are not listed.")
"lisp/obsolete/sym-comp.el"
"library-of-babel.org"
"flymake-elisp.el"
"flymake-ui.el")
"flymake-ui.el"
"pinentry.el")
"File names which are valid, but no longer exist (or cannot be found)
in the repository.")

View file

@ -2142,10 +2142,13 @@ to function definitions by giving the @samp{--declarations} option to
@item
In C++ code, in addition to all the tag constructs of C code, member
functions are also recognized; member variables are also recognized,
unless you use the @samp{--no-members} option. Tags for variables and
functions in classes are named @samp{@var{class}::@var{variable}} and
@samp{@var{class}::@var{function}}. @code{operator} definitions have
tag names like @samp{operator+}.
unless you use the @samp{--no-members} option. @code{operator}
definitions have tag names like @samp{operator+}. If you specify the
@samp{--class-qualify} option, tags for variables and functions in
classes are named @samp{@var{class}::@var{variable}} and
@samp{@var{class}::@var{function}}. By default, class methods and
members are not class-qualified, which allows to identify their names in
the sources more accurately.
@item
In Java code, tags include all the constructs recognized in C++, plus
@ -2324,7 +2327,9 @@ The @command{etags} program reads the specified files, and writes a tags
table named @file{TAGS} in the current working directory. You can
optionally specify a different file name for the tags table by using the
@samp{--output=@var{file}} option; specifying @file{-} as a file name
prints the tags table to standard output.
prints the tags table to standard output. You can also append the
newly created tags table to an existing file by using the @samp{--append}
option.
If the specified files don't exist, @command{etags} looks for
compressed versions of them and uncompresses them to read them. Under
@ -2381,15 +2386,25 @@ input, by typing a dash in place of the file names, like this:
find . -name "*.[chCH]" -print | etags -
@end smallexample
@command{etags} recognizes the language used in an input file based
on its file name and contents. You can specify the language
explicitly with the @samp{--language=@var{name}} option. You can
intermix these options with file names; each one applies to the file
names that follow it. Specify @samp{--language=auto} to tell
@command{etags} to resume guessing the language from the file names
and file contents. Specify @samp{--language=none} to turn off
language-specific processing entirely; then @command{etags} recognizes
tags by regexp matching alone (@pxref{Etags Regexps}).
@command{etags} recognizes the language used in an input file based on
its file name and contents. It first tries to match the file's name and
extension to the ones commonly used with certain languages. Some
languages have interpreters with known names (e.g., @command{perl} for
Perl or @command{pl} for Prolog), so @command{etags} next looks for an
interpreter specification of the form @samp{#!@var{interp}} on the first
line of an input file, and matches that against known interpreters. If
none of that works, or if you want to override the automatic detection of
the language, you can specify the language explicitly with the
@samp{--language=@var{name}} option. You can intermix these options with
file names; each one applies to the file names that follow it. Specify
@samp{--language=auto} to tell @command{etags} to resume guessing the
language from the file names and file contents. Specify
@samp{--language=none} to turn off language-specific processing entirely;
then @command{etags} recognizes tags by regexp matching alone
(@pxref{Etags Regexps}). This comes in handy when an input file uses a
language not yet supported by @command{etags}, and you want to avoid
having @command{etags} fall back on Fortran and C as the default
languages.
The option @samp{--parse-stdin=@var{file}} is mostly useful when
calling @command{etags} from programs. It can be used (only once) in

File diff suppressed because it is too large Load diff

View file

@ -630,6 +630,8 @@ static const char *Erlang_suffixes [] =
static const char Erlang_help [] =
"In Erlang code, the tags are the functions, records and macros\n\
defined in the file.";
static const char *Erlang_interpreters [] =
{ "escript", NULL };
const char *Forth_suffixes [] =
{ "fth", "tok", NULL };
@ -666,6 +668,8 @@ static const char *Lua_suffixes [] =
{ "lua", "LUA", NULL };
static const char Lua_help [] =
"In Lua scripts, all functions are tags.";
static const char *Lua_interpreters [] =
{ "lua", NULL };
static const char *Makefile_filenames [] =
{ "Makefile", "makefile", "GNUMakefile", "Makefile.in", "Makefile.am", NULL};
@ -721,12 +725,16 @@ static const char *Prolog_suffixes [] =
static const char Prolog_help [] =
"In Prolog code, tags are predicates and rules at the beginning of\n\
line.";
static const char *Prolog_interpreters [] =
{ "gprolog", "pl", "yap", "swipl", "prolog", NULL };
static const char *Python_suffixes [] =
{ "py", NULL };
static const char Python_help [] =
"In Python code, 'def' or 'class' at the beginning of a line\n\
generate a tag.";
static const char *Python_interpreters [] =
{ "python", NULL };
static const char *Ruby_suffixes [] =
{ "rb", "ru", "rbw", NULL };
@ -735,6 +743,8 @@ static const char *Ruby_filenames [] =
static const char Ruby_help [] =
"In Ruby code, 'def' or 'class' or 'module' at the beginning of\n\
a line generate a tag. Constants also generate a tag.";
static const char *Ruby_interpreters [] =
{ "ruby", NULL };
/* Can't do the `SCM' or `scm' prefix with a version number. */
static const char *Scheme_suffixes [] =
@ -798,14 +808,15 @@ static language lang_names [] =
{ "c++", Cplusplus_help, Cplusplus_entries, Cplusplus_suffixes },
{ "c*", no_lang_help, Cstar_entries, Cstar_suffixes },
{ "cobol", Cobol_help, Cobol_paragraphs, Cobol_suffixes },
{ "erlang", Erlang_help, Erlang_functions, Erlang_suffixes },
{ "erlang", Erlang_help, Erlang_functions, Erlang_suffixes,
NULL, Erlang_interpreters },
{ "forth", Forth_help, Forth_words, Forth_suffixes },
{ "fortran", Fortran_help, Fortran_functions, Fortran_suffixes },
{ "go", Go_help, Go_functions, Go_suffixes },
{ "html", HTML_help, HTML_labels, HTML_suffixes },
{ "java", Cjava_help, Cjava_entries, Cjava_suffixes },
{ "lisp", Lisp_help, Lisp_functions, Lisp_suffixes },
{ "lua", Lua_help, Lua_functions, Lua_suffixes },
{ "lua", Lua_help,Lua_functions,Lua_suffixes,NULL,Lua_interpreters},
{ "makefile", Makefile_help,Makefile_targets,NULL,Makefile_filenames},
{ "objc", Objc_help, plain_C_entries, Objc_suffixes },
{ "pascal", Pascal_help, Pascal_functions, Pascal_suffixes },
@ -813,9 +824,12 @@ static language lang_names [] =
{ "php", PHP_help, PHP_functions, PHP_suffixes },
{ "postscript",PS_help, PS_functions, PS_suffixes },
{ "proc", no_lang_help, plain_C_entries, plain_C_suffixes },
{ "prolog", Prolog_help, Prolog_functions, Prolog_suffixes },
{ "python", Python_help, Python_functions, Python_suffixes },
{ "ruby", Ruby_help,Ruby_functions,Ruby_suffixes,Ruby_filenames },
{ "prolog", Prolog_help, Prolog_functions, Prolog_suffixes,
NULL, Prolog_interpreters },
{ "python", Python_help, Python_functions, Python_suffixes,
NULL, Python_interpreters },
{ "ruby", Ruby_help, Ruby_functions, Ruby_suffixes,
Ruby_filenames, Ruby_interpreters },
{ "scheme", Scheme_help, Scheme_functions, Scheme_suffixes },
{ "tex", TeX_help, TeX_commands, TeX_suffixes },
{ "texinfo", Texinfo_help, Texinfo_nodes, Texinfo_suffixes },
@ -1796,6 +1810,13 @@ find_entries (FILE *inf)
else
lp = skip_spaces (lb.buffer + 2);
cp = skip_non_spaces (lp);
/* If the "interpreter" turns out to be "env", the real interpreter is
the next word. */
if (cp > lp && strneq (lp, "env", cp - lp))
{
lp = skip_spaces (cp);
cp = skip_non_spaces (lp);
}
*cp = '\0';
if (strlen (lp) > 0)

View file

@ -681,7 +681,8 @@ When called as a function, NAME returns an iterator value that
encapsulates the state of a computation that produces a sequence
of values. Callers can retrieve each value using `iter-next'."
(declare (indent defun)
(debug (&define name lambda-list lambda-doc def-body)))
(debug (&define name lambda-list lambda-doc def-body))
(doc-string 3))
(cl-assert lexical-binding)
(let* ((parsed-body (macroexp-parse-body body))
(declarations (car parsed-body))

View file

@ -291,6 +291,14 @@ END) suitable for `syntax-propertize-function'."
;; (message "Needs to syntax-propertize from %s to %s"
;; syntax-propertize--done pos)
(set (make-local-variable 'parse-sexp-lookup-properties) t)
(when (< syntax-propertize--done (point-min))
;; *Usually* syntax-propertize is called via syntax-ppss which
;; takes care of adding syntax-ppss-flush-cache to b-c-f, but this
;; is not *always* the case, so since we share a single "flush" function
;; between syntax-ppss and syntax-propertize, we also have to make
;; sure the flush function is installed here (bug#29767).
(add-hook 'before-change-functions
#'syntax-ppss-flush-cache t t))
(save-excursion
(with-silent-modifications
(make-local-variable 'syntax-propertize--done) ;Just in case!

View file

@ -3420,7 +3420,8 @@ Message buffers and is not meant to be called directly."
(defun message-do-auto-fill ()
"Like `do-auto-fill', but don't fill in message header."
(unless (message-point-in-header-p)
(do-auto-fill)))
(let ((paragraph-separate (default-value 'paragraph-separate)))
(do-auto-fill))))
(defun message-insert-signature (&optional force)
"Insert a signature. See documentation for variable `message-signature'."

View file

@ -189,18 +189,115 @@ the WIDTH times as wide as FACE on FRAME."
(if (or (null width) (and (numberp width) (= width 1)))
(list "ms-dos")
(list "no-such-font")))
(defun x-display-pixel-width (&optional frame) (frame-width frame))
(defun x-display-pixel-height (&optional frame) (frame-height frame))
(defun x-display-planes (&optional _frame) 4) ;bg switched to 16 colors as well
(defun x-display-color-cells (&optional _frame) 16)
(defun x-server-max-request-size (&optional _frame) 1000000) ; ???
(defun x-server-vendor (&optional _frame) t "GNU")
(defun x-server-version (&optional _frame) '(1 0 0))
(defun x-display-screens (&optional _frame) 1)
(defun x-display-mm-height (&optional _frame) 245) ; Guess the size of my
(defun x-display-mm-width (&optional _frame) 322) ; monitor, EZ...
(defun x-display-backing-store (&optional _frame) 'not-useful)
(defun x-display-visual-class (&optional _frame) 'static-color)
(defun x-display-pixel-width (&optional frame)
"Return the width in pixels of DISPLAY.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display.
On \"multi-monitor\" setups this refers to the pixel width for all
physical monitors associated with DISPLAY. To get information for
each physical monitor, use `display-monitor-attributes-list'."
(frame-width frame))
(defun x-display-pixel-height (&optional frame)
"Return the height in pixels of DISPLAY.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display.
On \"multi-monitor\" setups this refers to the pixel height for all
physical monitors associated with DISPLAY. To get information for
each physical monitor, use `display-monitor-attributes-list'."
(frame-height frame))
(defun x-display-planes (&optional _frame)
"Return the number of bitplanes of DISPLAY.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display."
4) ;bg switched to 16 colors as well
(defun x-display-color-cells (&optional _frame)
"Return the number of color cells of DISPLAY.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display."
16)
(defun x-server-max-request-size (&optional _frame)
"Return the maximum request size of the server of DISPLAY.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display."
1000000) ; ???
(defun x-server-vendor (&optional _frame)
"Return the \"vendor ID\" string of the GUI software on TERMINAL.
\(Labeling every distributor as a \"vendor\" embodies the false assumption
that operating systems cannot be developed and distributed noncommercially.)
For GNU and Unix systems, this queries the X server software; for
MS-Windows, this queries the OS.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display."
"GNU")
(defun x-server-version (&optional _frame)
"Return the version numbers of the GUI software on TERMINAL.
The value is a list of three integers specifying the version of the GUI
software in use.
For GNU and Unix system, the first 2 numbers are the version of the X
Protocol used on TERMINAL and the 3rd number is the distributor-specific
release number. For MS-Windows, the 3 numbers report the version and
the build number of the OS.
See also the function `x-server-vendor'.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display."
'(1 0 0))
(defun x-display-screens (&optional _frame)
"Return the number of screens on the server of DISPLAY.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display."
1)
(defun x-display-mm-height (&optional _frame)
"Return the height in millimeters of DISPLAY.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display.
On \"multi-monitor\" setups this refers to the height in millimeters for
all physical monitors associated with DISPLAY. To get information
for each physical monitor, use `display-monitor-attributes-list'."
245) ; Guess the size of my...
(defun x-display-mm-width (&optional _frame)
"Return the width in millimeters of DISPLAY.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display.
On \"multi-monitor\" setups this refers to the width in millimeters for
all physical monitors associated with TERMINAL. To get information
for each physical monitor, use `display-monitor-attributes-list'."
322) ; ...monitor, EZ...
(defun x-display-backing-store (&optional _frame)
"Return an indication of whether DISPLAY does backing store.
The value may be `always', `when-mapped', or `not-useful'.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display."
'not-useful)
(defun x-display-visual-class (&optional _frame)
"Return the visual class of DISPLAY.
The value is one of the symbols `static-gray', `gray-scale',
`static-color', `pseudo-color', `true-color', or `direct-color'.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display."
'static-color)
(fset 'x-display-save-under 'ignore)
(fset 'x-get-resource 'ignore)

View file

@ -50,10 +50,11 @@ A value of nil means that any change in indentation starts a new paragraph."
(put 'colon-double-space 'safe-local-variable 'booleanp)
(defcustom fill-separate-heterogeneous-words-with-space nil
"Non-nil means that use a space to separate words of different kind.
This will be done with a word in the end of a line and a word in the
beginning of the next line when concatenating them for filling those
lines. Whether to use a space is up to how the words are categorized."
"Non-nil means to use a space to separate words of a different kind.
This will be done with a word in the end of a line and a word in
the beginning of the next line when concatenating them for
filling those lines. Whether to use a space depends on how the
words are categorized."
:type 'boolean
:group 'fill
:version "26.1")

View file

@ -1686,6 +1686,8 @@ usage: (make-process &rest ARGS) */)
if (!NILP (program))
CHECK_STRING (program);
bool query_on_exit = NILP (Fplist_get (contact, QCnoquery));
stderrproc = Qnil;
xstderr = Fplist_get (contact, QCstderr);
if (PROCESSP (xstderr))
@ -1701,7 +1703,9 @@ usage: (make-process &rest ARGS) */)
QCname,
concat2 (name, build_string (" stderr")),
QCbuffer,
Fget_buffer_create (xstderr));
Fget_buffer_create (xstderr),
QCnoquery,
query_on_exit ? Qnil : Qt);
}
proc = make_process (name);
@ -1715,7 +1719,7 @@ usage: (make-process &rest ARGS) */)
pset_filter (XPROCESS (proc), Fplist_get (contact, QCfilter));
pset_command (XPROCESS (proc), Fcopy_sequence (command));
if (tem = Fplist_get (contact, QCnoquery), !NILP (tem))
if (!query_on_exit)
XPROCESS (proc)->kill_without_query = 1;
if (tem = Fplist_get (contact, QCstop), !NILP (tem))
pset_command (XPROCESS (proc), Qt);

View file

@ -125,8 +125,9 @@ test_module_dir := $(srcdir)/data/emacs-module
all: check
SELECTOR_DEFAULT = (quote (not (tag :expensive-test)))
SELECTOR_EXPENSIVE = nil
SELECTOR_DEFAULT = (quote (not (or (tag :expensive-test) (tag :unstable))))
SELECTOR_EXPENSIVE = (quote (not (tag :unstable)))
SELECTOR_ALL = nil
ifdef SELECTOR
SELECTOR_ACTUAL=$(SELECTOR)
else ifndef MAKECMDGOALS
@ -247,6 +248,11 @@ check: mostlyclean check-no-automated-subdir
check-expensive: mostlyclean check-no-automated-subdir
@${MAKE} check-doit SELECTOR="${SELECTOR_EXPENSIVE}"
## Run all tests, regardless of tag.
.PHONY: check-all
check-all: mostlyclean check-no-automated-subdir
@${MAKE} check-doit SELECTOR="${SELECTOR_ALL}"
## Re-run all tests which are outdated. A test is outdated if its
## logfile is out-of-date with either the test file, or the source
## files that the tests depend on. See test_template.

View file

@ -192,7 +192,7 @@
(ert-deftest eieio-test-method-order-list-6 ()
;; FIXME repeated intermittent failures on hydra (bug#24503)
;; ((:STATIC C) (:STATIC C-base1) (:STATIC C-base2)) != ((:STATIC C))")
(skip-unless (not (getenv "EMACS_HYDRA_CI")))
:tags '(:unstable)
(let ((eieio-test-method-order-list nil)
(ans '(
(:STATIC C)

View file

@ -908,7 +908,8 @@ Subclasses to override slot attributes.")
(eieio-test-dump-trace)
(ert-deftest eieio-test-37-obsolete-name-in-constructor ()
;; FIXME repeated intermittent failures on hydra (bug#24503)
;; FIXME repeated intermittent failures on hydra and elsewhere (bug#24503).
:tags '(:unstable)
(with-current-buffer "*trace-output*"
(erase-buffer))
(unwind-protect

View file

@ -63,6 +63,7 @@
(format "/mock::%s" temporary-file-directory)))
"Temporary directory for Tramp tests.")
(defvar file-notify--test-tmpdir nil)
(defvar file-notify--test-tmpfile nil)
(defvar file-notify--test-tmpfile1 nil)
(defvar file-notify--test-desc nil)
@ -152,6 +153,8 @@ Return nil when any other file notification watch is still active."
(if (file-directory-p file-notify--test-tmpfile1)
(delete-directory file-notify--test-tmpfile1 'recursive)
(delete-file file-notify--test-tmpfile1)))
(ignore-errors
(delete-directory file-notify--test-tmpdir 'recursive))
(ignore-errors
(when (file-remote-p temporary-file-directory)
(tramp-cleanup-connection
@ -160,7 +163,8 @@ Return nil when any other file notification watch is still active."
(when (hash-table-p file-notify-descriptors)
(clrhash file-notify-descriptors))
(setq file-notify--test-tmpfile nil
(setq file-notify--test-tmpdir nil
file-notify--test-tmpfile nil
file-notify--test-tmpfile1 nil
file-notify--test-desc nil
file-notify--test-desc1 nil
@ -274,6 +278,17 @@ This returns only for the local case and gfilenotify; otherwise it is nil.
(file-notify--deftest-remote file-notify-test00-availability
"Test availability of `file-notify' for remote files.")
(defun file-notify--test-make-temp-name ()
"Create a temporary file name for test."
(unless (stringp file-notify--test-tmpdir)
(setq file-notify--test-tmpdir
(expand-file-name
(make-temp-name "file-notify-test") temporary-file-directory)))
(unless (file-directory-p file-notify--test-tmpdir)
(make-directory file-notify--test-tmpdir))
(expand-file-name
(make-temp-name "file-notify-test") file-notify--test-tmpdir))
(ert-deftest file-notify-test01-add-watch ()
"Check `file-notify-add-watch'."
(skip-unless (file-notify--test-local-enabled))
@ -289,17 +304,17 @@ This returns only for the local case and gfilenotify; otherwise it is nil.
(should
(setq file-notify--test-desc
(file-notify-add-watch
temporary-file-directory '(change) #'ignore)))
file-notify--test-tmpdir '(change) #'ignore)))
(file-notify-rm-watch file-notify--test-desc)
(should
(setq file-notify--test-desc
(file-notify-add-watch
temporary-file-directory '(attribute-change) #'ignore)))
file-notify--test-tmpdir '(attribute-change) #'ignore)))
(file-notify-rm-watch file-notify--test-desc)
(should
(setq file-notify--test-desc
(file-notify-add-watch
temporary-file-directory '(change attribute-change) #'ignore)))
file-notify--test-tmpdir '(change attribute-change) #'ignore)))
(file-notify-rm-watch file-notify--test-desc)
;; File monitors like kqueue insist, that the watched file
@ -325,11 +340,11 @@ This returns only for the local case and gfilenotify; otherwise it is nil.
'(wrong-type-argument 1)))
(should
(equal (should-error
(file-notify-add-watch temporary-file-directory 2 3))
(file-notify-add-watch file-notify--test-tmpdir 2 3))
'(wrong-type-argument 2)))
(should
(equal (should-error
(file-notify-add-watch temporary-file-directory '(change) 3))
(file-notify-add-watch file-notify--test-tmpdir '(change) 3))
'(wrong-type-argument 3)))
;; The upper directory of a file must exist.
(should
@ -349,11 +364,6 @@ This returns only for the local case and gfilenotify; otherwise it is nil.
(file-notify--deftest-remote file-notify-test01-add-watch
"Check `file-notify-add-watch' for remote files.")
(defun file-notify--test-make-temp-name ()
"Create a temporary file name for test."
(expand-file-name
(make-temp-name "file-notify-test") temporary-file-directory))
;; This test is inspired by Bug#26126 and Bug#26127.
(ert-deftest file-notify-test02-rm-watch ()
"Check `file-notify-rm-watch'."
@ -612,13 +622,13 @@ delivered."
;; Check file creation, change and deletion when watching a
;; directory. There must be a `stopped' event when deleting
;; the directory.
(let ((temporary-file-directory
(let ((file-notify--test-tmpdir
(make-temp-file "file-notify-test-parent" t)))
(should
(setq file-notify--test-tmpfile (file-notify--test-make-temp-name)
file-notify--test-desc
(file-notify-add-watch
temporary-file-directory
file-notify--test-tmpdir
'(change) #'file-notify--test-event-handler)))
(file-notify--test-with-events
(cond
@ -643,18 +653,18 @@ delivered."
(write-region
"any text" nil file-notify--test-tmpfile nil 'no-message)
(file-notify--test-read-event)
(delete-directory temporary-file-directory 'recursive))
(delete-directory file-notify--test-tmpdir 'recursive))
(file-notify-rm-watch file-notify--test-desc))
;; Check copy of files inside a directory.
(let ((temporary-file-directory
(let ((file-notify--test-tmpdir
(make-temp-file "file-notify-test-parent" t)))
(should
(setq file-notify--test-tmpfile (file-notify--test-make-temp-name)
file-notify--test-tmpfile1 (file-notify--test-make-temp-name)
file-notify--test-desc
(file-notify-add-watch
temporary-file-directory
file-notify--test-tmpdir
'(change) #'file-notify--test-event-handler)))
(file-notify--test-with-events
(cond
@ -689,18 +699,18 @@ delivered."
(file-notify--test-read-event)
(set-file-times file-notify--test-tmpfile '(0 0))
(file-notify--test-read-event)
(delete-directory temporary-file-directory 'recursive))
(delete-directory file-notify--test-tmpdir 'recursive))
(file-notify-rm-watch file-notify--test-desc))
;; Check rename of files inside a directory.
(let ((temporary-file-directory
(let ((file-notify--test-tmpdir
(make-temp-file "file-notify-test-parent" t)))
(should
(setq file-notify--test-tmpfile (file-notify--test-make-temp-name)
file-notify--test-tmpfile1 (file-notify--test-make-temp-name)
file-notify--test-desc
(file-notify-add-watch
temporary-file-directory
file-notify--test-tmpdir
'(change) #'file-notify--test-event-handler)))
(file-notify--test-with-events
(cond
@ -729,7 +739,7 @@ delivered."
(rename-file file-notify--test-tmpfile file-notify--test-tmpfile1)
;; After the rename, we won't get events anymore.
(file-notify--test-read-event)
(delete-directory temporary-file-directory 'recursive))
(delete-directory file-notify--test-tmpdir 'recursive))
(file-notify-rm-watch file-notify--test-desc))
;; Check attribute change. Does not work for cygwin.
@ -930,13 +940,13 @@ delivered."
(file-notify--test-cleanup))
(unwind-protect
(let ((temporary-file-directory
(let ((file-notify--test-tmpdir
(make-temp-file "file-notify-test-parent" t)))
(should
(setq file-notify--test-tmpfile (file-notify--test-make-temp-name)
file-notify--test-desc
(file-notify-add-watch
temporary-file-directory
file-notify--test-tmpdir
'(change) #'file-notify--test-event-handler)))
(should (file-notify-valid-p file-notify--test-desc))
(file-notify--test-with-events
@ -961,7 +971,7 @@ delivered."
(write-region
"any text" nil file-notify--test-tmpfile nil 'no-message)
(file-notify--test-read-event)
(delete-directory temporary-file-directory t))
(delete-directory file-notify--test-tmpdir 'recursive))
;; After deleting the parent directory, the descriptor must
;; not be valid anymore.
(should-not (file-notify-valid-p file-notify--test-desc))
@ -1207,7 +1217,7 @@ the file watch."
;; A file to be watched.
(should
(setq file-notify--test-tmpfile1
(let ((temporary-file-directory file-notify--test-tmpfile))
(let ((file-notify--test-tmpdir file-notify--test-tmpfile))
(file-notify--test-make-temp-name))))
(write-region "any text" nil file-notify--test-tmpfile1 nil 'no-message)
(unwind-protect
@ -1268,7 +1278,7 @@ the file watch."
(if (zerop (mod i 2))
(write-region
"any text" nil file-notify--test-tmpfile1 t 'no-message)
(let ((temporary-file-directory file-notify--test-tmpfile))
(let ((file-notify--test-tmpdir file-notify--test-tmpfile))
(write-region
"any text" nil
(file-notify--test-make-temp-name) nil 'no-message))))))
@ -1334,7 +1344,7 @@ the file watch."
(setq file-notify--test-tmpfile
(make-temp-file "file-notify-test-parent" t)))
(unwind-protect
(let ((temporary-file-directory file-notify--test-tmpfile)
(let ((file-notify--test-tmpdir file-notify--test-tmpfile)
descs)
(should-error
(while t

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
#! /uns/bin/perl -w
#! /un/bin/env perl
# htmlify-cystic-l-faq: turn text version of cystic-l faq into html
# run like this: htmlify-cystic-l-faq < cystic-l-faq-all

View file

@ -162,5 +162,24 @@
(error nil))))
(should (equal path samepath))))
(ert-deftest make-process/noquery-stderr ()
"Checks that Bug#30031 is fixed."
(skip-unless (executable-find "sleep"))
(with-temp-buffer
(let* ((previous-processes (process-list))
(process (make-process :name "sleep"
:command '("sleep" "1h")
:noquery t
:connection-type 'pipe
:stderr (current-buffer))))
(unwind-protect
(let ((new-processes (cl-set-difference (process-list)
previous-processes
:test #'eq)))
(should new-processes)
(dolist (process new-processes)
(should-not (process-query-on-exit-flag process))))
(kill-process process)))))
(provide 'process-tests)
;; process-tests.el ends here.