1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-17 10:06:13 +00:00
Commit Graph

1450 Commits

Author SHA1 Message Date
Phil Sainty
c1b4368809 Add tests for so-long.el 2019-07-13 18:51:55 +12:00
Lars Ingebrigtsen
936d074d7c Document format-spec and expand the modifiers it supports
* doc/lispref/text.texi (Interpolated Strings): New section.
* lisp/format-spec.el (format-spec--parse-modifiers)
(format-spec--pad): New functions.
(format-spec): Support more format modifiers (bug#32931).
2019-07-13 03:50:50 +02:00
Juri Linkov
38e420af45 * test/lisp/replace-tests.el (replace-tests-with-undo): Override
replace-highlight to emulate clobbering match-data (bug#36328).
2019-07-12 22:00:56 +03:00
Juri Linkov
391e8e530a * lisp/progmodes/compile.el (compilation-filter): `compilation--ensure-parse'
is used instead of `font-lock-ensure' (bug#36564).

* test/lisp/progmodes/compile-tests.el (compile-test-error-regexps)
(compile-test-grep-regexps): Check the number of errors.
2019-07-12 21:57:18 +03:00
Lars Ingebrigtsen
4c4ff9d90a Fix breaking of rfc2047 headers with long words
* lisp/mail/rfc2047.el (rfc2047-fold-region): Don't break lines
right after the Header: field, but wait until the next
whitespace.  (This only makes a difference for words that are very
long (i.e., longer than, say, 60 characters, depending on the
header name length.)
2019-07-12 15:59:27 +02:00
Lars Ingebrigtsen
4438459eaa Refactor rfc2047-fold-region slightly and add a couple of tests
* lisp/mail/rfc2047.el (rfc2047--break-line): Refactor out to
avoid code repetition...
(rfc2047-fold-region): ... from this function.
2019-07-12 15:48:34 +02:00
Michael Albinus
955db22005 Check directory in Tramp's {copy,rename}-file
* lisp/net/tramp-adb.el (tramp-adb-handle-copy-file)
(tramp-adb-handle-rename-file):
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
* lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-file)
(tramp-smb-handle-rename-file):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Check, that NEWNAME is not a directory given as file name.

* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file): Extend tests.
2019-07-12 15:10:57 +02:00
Michael Albinus
37cb129979 * test/lisp/format-spec-tests.el (test-format-unknown): Use `should-error'. 2019-07-11 20:01:57 +02:00
Lars Ingebrigtsen
b44f0c4579 Allow passing unknown specs to format-spec
* lisp/format-spec.el (format-spec): Allow passing through format
strings that have no specs (to be able to act as a filter).  Also
add an example.
* test/lisp/format-spec-tests.el (test-format-spec): Add tests for
the new functionality.
2019-07-11 18:44:30 +02:00
Lars Ingebrigtsen
b41ddb7a8b Add tests for format-spec 2019-07-11 18:37:55 +02:00
Lars Ingebrigtsen
50e7e8101a Add test to time-stamp.el 2019-07-11 18:27:12 +02:00
Mattias Engdegård
83ed722c8d Fix trig simplification crash (bug#33052)
* lisp/calc/calc-alg.el (calcFunc-sec, calcFunc-csc, calcFunc-cot):
Check that `math-known-sin' and `math-known-tan' succeeded before
using their value in arithmetic.
* test/lisp/calc/calc-tests.el (calc-test-trig): Add regression tests.
2019-07-10 19:28:35 +02:00
Stefan Kangas
c198ecda9f Fix warnings in todo-mode-tests.el (Bug#36569)
* test/lisp/calendar/todo-mode-tests.el (todo-test--insert-item):
Fix "Unused lexical argument" warnings.
2019-07-10 11:26:18 +01:00
Stefan Kangas
faedbe4665 Fix warning in electric-tests.el (Bug#36570)
* test/lisp/electric-tests.el (plainer-c-mode): Remove duplicate
definition.
2019-07-10 11:11:39 +01:00
Paul Eggert
ce59b41a28 Port image-type-from-file-header-test to non-SVG Emacs
Problem reported privately by Michael Albinus.
* test/lisp/image-tests.el (image-type-from-file-header-test):
Don’t assume svg is a supported image type.
2019-07-09 13:03:07 -07:00
Glenn Morris
95dce77c5e Conditionalize result of a bytecomp test
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test--switch-duplicates):
Apparently the result depends on byte-compile-cond-use-jump-table.
2019-07-09 03:27:26 -07:00
Glenn Morris
bb856d12dc Merge from origin/emacs-26
e97c043 Fix python.el docstring (Bug#36458)
e660801 ; Add thing-at-point-looking-at test (Bug#35708)
f5b4846 ; Fix typo, insure -> ensure in ChangeLogs
cb8fb59 * lisp/hi-lock.el (hi-lock-line-face-buffer): Doc fix.  (Bug3...
2019-07-06 12:51:30 -07:00
Glenn Morris
16a8a7695f Merge from origin/emacs-26
316f5a3 Fix typo in doc string of file-exists-p (bug#36408)
bfc7c6e * test/lisp/url/url-file-tests.el (url-file): Fix for POSIX f...
13b95e1 Fix typo in windows.texi
8b775c3 Clarify & update (elisp) Writing Emacs Primitives
7648c12 Clarify a subtle issue in the Internals chapter of lispref
2019-07-06 12:51:30 -07:00
Stefan Kangas
cfcaf06fe5 Add tests for text-property-search to check prop-match-value
* test/lisp/emacs-lisp/text-property-search-tests.el
(with-match-test): New macro.
(text-property-search-forward-prop-match-match-face-nil-nil)
(text-property-search-forward-prop-match-match-face-bold-t)
(text-property-search-forward-prop-match-match-face-bold-nil)
(text-property-search-backward-prop-match-match-face-nil-nil)
(text-property-search-backward-prop-match-match-face-italic-t)
(text-property-search-backward-prop-match-match-face-italic-nil):
Add test cases to also verify the value of prop-match-value
(bug#36486).
2019-07-06 16:27:05 +02:00
Noam Postavsky
e6608010d7 ; Add thing-at-point-looking-at test (Bug#35708)
* test/lisp/thingatpt-tests.el (thing-at-point-looking-at): New test.
2019-07-05 21:50:37 -04:00
Juri Linkov
19b1cefa3b * lisp/char-fold.el (char-fold-to-regexp): Implement arg LAX (bug#36398).
* test/lisp/char-fold-tests.el (char-fold--test-multi-lax): New test.
2019-07-04 23:49:33 +03:00
Mattias Engdegård
3fd7491512 Optimise more inputs to `regexp-opt' (bug#36444)
Use a more precise test to determine whether the input to `regexp-opt'
is safe to optimise when KEEP-ORDER is non-nil, permitting more inputs
to be optimised than before.  For example, ("good" "goal" "go") is now
accepted.

* lisp/emacs-lisp/regexp-opt.el (regexp-opt):
More precise test for whether the list is safe w.r.t. KEEP-ORDER.
(regexp-opt--contains-prefix): Remove.

* test/lisp/emacs-lisp/regexp-opt-tests.el: Use lexical-binding.
(regexp-opt-test--permutation, regexp-opt-test--factorial)
(regexp-opt-test--permutations, regexp-opt-test--match-all)
(regexp-opt-test--check-perm, regexp-opt-test--explain-perm)
(regexp-opt-keep-order): Test KEEP-ORDER.
2019-07-04 17:18:15 +02:00
Stefan Kangas
22760ab357 Add tests for bookmark.el (Bug#36452)
* test/lisp/bookmark-resources/example.txt:
* test/lisp/bookmark-resources/test.bmk:
* test/lisp/bookmark-tests.el: New files.
* lisp/bookmark.el: Minor cleanups.
(bookmark-insert-annotation): Signal error on invalid bookmark.
(bookmark-write-file): Add newline at end of file.
2019-07-03 14:49:38 +03:00
Michael Albinus
14563dc10a Change expected result of a flymake test on emba
* test/lisp/progmodes/flymake-tests.el (different-diagnostic-types):
Test is now passing on emba.gnu.org, too.
2019-07-03 09:00:26 +02:00
Glenn Morris
20c1406cd0 Change expected result of a flymake test on hydra
* test/lisp/progmodes/flymake-tests.el (different-diagnostic-types):
Test is now passing on hydra.nixos.org, since today.
2019-07-02 16:46:25 -07:00
João Távora
5e88b50d54 Correctly reindent previous line in electric-indent-mode
Fixes: bug#35254

Do this even when electric-indent-inhibit is t, except when the
newline insertion is being performed by electric-layout-mode.

* lisp/electric.el (electric-indent-post-self-insert-function):
Reindent previous line unless operating under
electric-layout-mode.
(electric-layout-post-self-insert-function-1): Bind
electric-indent-inhibit to 'electric-layout-mode.

* test/lisp/electric-tests.el
(electric-layout-control-reindentation): New test.
2019-07-02 16:10:45 +01:00
Michael Albinus
10af8c5863 Release Tramp 2.4.2
* lisp/net/tramp.el: Bump version.

* test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case):
Add `add-name-to-file' error message.
(tramp--test-ignore-add-name-to-file-error): Make error handler
more explicit about the error.
2019-06-30 11:23:06 +02:00
Mattias Engdegård
f1d414b98f Allow empty argument to `regexp-opt-charset'
* test/lisp/emacs-lisp/regexp-opt-tests.el (regexp-opt-charset):
Handle nil argument, and use regexp-quote for singletons.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt-charset): Expand tests.
2019-06-29 11:12:27 +02:00
Michael Albinus
aae5bf4438 Tramp requires Emacs 24.4
* doc/misc/tramp.texi (Frequently Asked Questions):
Use `with-eval-after-load'. in example.

* doc/misc/trampver.texi: Set variable emacsver.

* lisp/net/tramp.el (tramp-send-string, tramp-call-process)
(tramp-call-process-region, tramp-process-lines):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-truename)
(tramp-adb-sh-fix-ls-output, tramp-adb-maybe-open-connection):
* lisp/net/tramp-gvfs.el (tramp-gvfs-get-directory-attributes)
(tramp-gvfs-handle-file-notify-add-watch)
* lisp/net/tramp-sh.el (tramp-sh-handle-file-truename)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-sh-handle-file-notify-add-watch, tramp-find-executable)
(tramp-set-remote-path)
(tramp-open-connection-setup-interactive-shell)
(tramp-maybe-open-connection, tramp-send-command):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-file-acl, tramp-smb-handle-process-file)
(tramp-smb-handle-set-file-acl)
(tramp-smb-handle-start-file-process)
(tramp-smb-maybe-open-connection):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-acl):
(tramp-sudoedit-send-command): Use `string-join' and `string-empty-p'.

* lisp/net/tramp-adb.el:
* lisp/net/tramp-archive.el:
* lisp/net/tramp-integration.el:
* lisp/net/tramp-ftp.el: Use `with-eval-after-load'.

* lisp/net/tramp-cmds.el (tramp-cleanup-connection)
(tramp-cleanup-all-connections): Cancel timer.

* lisp/net/tramp-compat.el (subr-x): Require.
(default-toplevel-value): Don't make it a defalias.

* lisp/net/tramp-gvfs.el: Use `dbus-event-error-functions'.  Do
not special handle `split-string'.

* lisp/net/tramp.el: Require Emacs 24.4.
(tramp-password-prompt-regexp): Use `password-word-equivalents'.
(tramp-user-error): Use `user-error'.
(tramp-replace-environment-variables): Use `substitute-env-vars'.
(tramp-wait-for-regexp): Rearrange `with-current-buffer' call.
(tramp-get-local-gid): Use `group-gid'.

* lisp/net/trampver.el: Check for Emacs 24.4.

* test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect)
(tramp-test02-file-name-dissect-simplified)
(tramp-test02-file-name-dissect-separate)
(tramp-test03-file-name-host-rules)
(tramp-test03-file-name-method-rules): Don't check for `user-error'.
2019-06-28 16:32:12 +02:00
Juanma Barranquero
bfc7c6e0d3 * test/lisp/url/url-file-tests.el (url-file): Fix for POSIX filenames. 2019-06-28 15:22:00 +02:00
Stefan Monnier
0b4e003766 Revert "* lisp/calc/calc-ext.el (math-scalarp): Fix typo"
This reverts commit 698ff554ac.
2019-06-26 10:24:59 -04:00
Stefan Monnier
4e302630ae * test/lisp/calc/calc-tests.el (test-math-bignum, test-calc-23889): Disable
Not applicable any more with native bignums.
2019-06-26 10:04:52 -04:00
Stefan Monnier
698ff554ac * lisp/calc/calc-ext.el (math-scalarp): Fix typo 2019-06-26 10:03:48 -04:00
Noam Postavsky
9233865b70 Fix (rx-to-string (and (literal STR) (regexp STR)) regression
* lisp/emacs-lisp/rx.el (rx-regexp, rx-literal): Check the cadr of the
form for stringness, not the form itself.
* test/lisp/emacs-lisp/rx-tests.el (rx-to-string-lisp-forms): New test.
2019-06-26 08:50:27 -04:00
Noam Postavsky
9552ee4df7 Merge from emacs-26
e62ad04963 Fix sgml-mode handling of quotes within parens (Bug#36347)
06b35b2f92 ; * lisp/frame.el: Enhance add-variable-watcher commentary.
572e34bb6f Rename 'make-symbolic-link' argument NEWNAME to LINKNAME
04477adedc Check that length of data returned by sysctl is non-zero
81535eeadb * test/lisp/progmodes/python-tests.el (python-virt-bin): D...
9d48979ca8 Fix Python tests depending on system-type
fcf6cc3177 Fix problem with wdired test when symlinks cannot be created.
4701e0663e Improve wording of documentation of click events

# Conflicts:
#	lisp/textmodes/sgml-mode.el
#	test/lisp/textmodes/sgml-mode-tests.el
2019-06-25 22:04:13 -04:00
Noam Postavsky
648fdbbcec Don't bind search-spaces-regexp around possible autoload (Bug#35802)
* lisp/isearch.el (isearch-search-fun-default): Move possible autoload
trigger outside let-binding of search-spaces-regexp.
* lisp/char-fold.el (char-fold-make-table): Remove no longer needed
workaround.

* lisp/info.el (Info-search-whitespace-regexp):
* lisp/isearch.el (search-whitespace-regexp):
* src/search.c (syms_of_search) <search-spaces-regexp>: Add warning
about adding capturing groups to the value.

* test/lisp/char-fold-tests.el: Remove, binding search-spaces-regexp
to a different should be considered a bug.
2019-06-25 22:00:03 -04:00
Noam Postavsky
b59ffd2290 Support (rx (and (regexp EXPR) (literal EXPR))) (Bug#36237)
* lisp/emacs-lisp/rx.el (rx-regexp): Allow non-string forms.
(rx-constituents): Add literal constituent, which is like a plain
STRING form, but allows arbitrary lisp expressions.
(rx-literal): New function.
(rx-compile-to-lisp): New variable.
(rx--subforms): New helper function for handling subforms, including
non-constant case.
(rx-group-if, rx-and, rx-or, rx-=, rx->=, rx-repeat, rx-submatch)
(rx-submatch-n, rx-kleene, rx-atomic-p): Use it to handle non-constant
subforms.
(rx): Document new form, wrap non-constant forms with concat call.
* test/lisp/emacs-lisp/rx-tests.el (rx-tests--match): New macro.
(rx-nonstring-expr, rx-nonstring-expr-non-greedy): New tests.
* etc/NEWS: Announce changes.
2019-06-25 22:00:03 -04:00
Noam Postavsky
e62ad04963 Fix sgml-mode handling of quotes within parens (Bug#36347)
* lisp/textmodes/sgml-mode.el (sgml-syntax-propertize): Use
syntax-ppss-table if set.  This is only needed on the release branch,
on master the caller (syntax-propertize) already does this.
(sgml-mode): Set syntax-ppss-table to sgml-tag-syntax-table.  This
correctly classifies parens as punctuation, so they won't confuse the
parser.
* test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax):
New test copied from master, with two cases added for this bug.
2019-06-25 18:58:23 -04:00
Glenn Morris
bc780a4691 * test/lisp/progmodes/flymake-tests.el (ruby-backend): Skip on hydra.
Another unstable test.
2019-06-25 13:23:15 -07:00
Michael Albinus
18a7e5414c Improve error handling in Tramp
* lisp/net/tramp-compat.el (ls-lisp): Require.

* lisp/net/tramp.el (ls-lisp-use-insert-directory-program):
Don't declare.
(tramp-current-connection): Adapt docstring.
(tramp-debug-message): Adapt function names.
(tramp-error, tramp-run-real-handler): Let-bind `signal-hook-function'.
(tramp-signal-hook-function): New defun.
(tramp-debug-on-error, tramp-condition-case-unless-debug): Remove.
(tramp-file-name-handler): Handle `tramp-current-connection'.
Let-bind `signal-hook-function'.  Use `unwind-protect' instead of
`tramp-condition-case-unless-debug'.
(tramp-handle-insert-directory): Don't require ls-lisp.
(tramp-process-actions): Check, that
`tramp-password-save-function' is non-nil.
(tramp-equal-remote): Handle the case both files are local.

* test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case):
Do not bind `tramp-debug-on-error'.
(tramp--test-ignore-make-symbolic-link-error): Make error handler
more explicit about the error.
2019-06-24 17:36:00 +02:00
Damien Cassou
7022e3fde6
Refactoring of auth-source-pass
* lisp/auth-source-pass.el (auth-source-pass--find-match): Refactor by
moving some code to auth-source-pass--disambiguate.
(auth-source-pass--disambiguate)
(auth-source-pass--entries-matching-suffix): New function.
(auth-source-pass--find-match-unambiguous)
(auth-source-pass--select-from-entries)
(auth-source-pass--entry-reducer): Refactor to simplify and improve
logging.
(auth-source-pass--matching-entries)
(auth-source-pass--accumulate-matches): Remove.
* test/lisp/auth-source-pass-tests.el: Complete rewrite to facilitate
maintenance.
(auth-source-pass--have-message-containing): Remove.
(auth-source-pass--have-message-matching)
(auth-source-pass--explain--have-message-matching)
(auth-source-pass--explain-match-entry-p)
(auth-source-pass--includes-sorted-entries)
(auth-source-pass--explain-includes-sorted-entries)
(auth-source-pass--explain-match-any-entry-p)
(auth-source-pass--matching-entries)
(auth-source-pass-match-entry-p)
(auth-source-pass-match-any-entry-p): New function.
2019-06-24 09:15:41 +02:00
Keith Amidon
0a580c187d
Minimize entry parsing in auth-source-pass
Prior to this commit, while searching for the most applicable entry
password-store entries were decrypted and parsed to ensure they were
valid.  The entries were parsed in the order they were found on the
filesystem and all applicable entries would be decrypted and parsed,
which varied based on the contents of the password-store and the entry
to be found.

This is fine when the GPG key is cached and each entry can be
decrypted without user interaction.  However, for security some people
have their GPG on a hardware token like a Yubikey setup so that they
have to touch a sensor on the toke for every cryptographic operation,
in which case it becomes inconvenient as each attempt to find an entry
requires a variable number of touches of the hardware token.

The implementation already assumes that names which contain more of
the information in the search key should be preferred so there is an
ordering of preference of applicable entries.  If the decrypt and
parsing is removed from the initial identification of applicable
entries in the store then in most cases a single decrypt and parse of
the most preferred entry will suffice, improving the experience for
hardware token users that require interaction with the token.

This commit implements that strategy.  It is in spirit a refactor of
the existing code.

* lisp/auth-source-pass.el (auth-source-pass--matching-entries): New
function, generate an ordered list of regular expression matchers for
all possible names that could be in the password-store for the entry
to be found and then makes a pass over the password-store entry names
accumulating the matching entries in a list after the regexp that
matched.  This implementation ensures the password-store entry list
still only has to be scanned once.
(auth-source-pass--find-match-unambiguous): Use it to obtain candidate
entries and then parse them one by one until an entry containing the
desired information is located.  When complete, return the parsed data
of the entry instead of the entry name so that the information can be
used directly to construct the auth-source response.
(auth-source-pass--build-result): Update accordingly.
(auth-source-pass--find-match): Update docstring accordingly.
(auth-source-pass--select-one-entry)
(auth-source-pass--entry-valid-p)
(auth-source-pass--find-all-by-entry-name)
(auth-source-pass--find-one-by-entry-name): Remove.
(auth-source-pass--select-from-entries)
(auth-source-pass--accumulate-matches)
(auth-source-pass--entry-reducer)
(auth-source-pass--generate-entry-suffixes)
(auth-source-pass--domains)
(auth-source-pass--name-port-user-suffixes): New functions.

* test/lisp/auth-source-pass-tests.el: One test case was added to the
test suite to verify that only the minimal number of entries are
parsed in common cases.  The
auth-source-pass-only-return-entries-that-can-be-open test case had to
be re-implemented because the function it was used eliminated as the
functionality is provided elsewhere.  All the other fairly substantial
changes to the test suite are the result of mechanical changes that
were required to adapt to auth-source-pass--find-match returning the
data from a parsed password-store entry instead of the entry name.
2019-06-24 09:15:40 +02:00
Keith Amidon
94c9eb81b8
Fix auth-source-pass to search for hostname:port/username
auth-source-pass supports entries with username either prefixed to the
hostname with an @ as separator or in a subdirectory under the
hostname.  This was true when there was no port or service included in
the name, but got broken with the introduction of
auth-source-pass-port-separator.

* lisp/auth-source-pass.el (auth-source-pass--find-match-unambiguous): Fix
to match hostname:port/username.
* test/lisp/auth-source-pass-tests.el: Add corresponding tests.
2019-06-24 09:15:40 +02:00
Iku Iwasa
2a0a05789d
Add auth-source-pass-port-separator option
* lisp/auth-source-pass.el (auth-source-pass-port-separator): New
option to specify separator between host and port, default to
colon (":").
(auth-source-pass--find-match-unambiguous): Adapt to make use of the
new variable.
* test/lisp/auth-source-pass-tests.el: Add corresponding tests.
2019-06-24 09:15:40 +02:00
Magnus Henoch
527efaf798
Fix auth-source-pass to return nil if no entry found
* lisp/auth-source-pass.el (auth-source-pass-search): If there is no
matching entry, auth-source-pass-search should return nil, not (nil).
This lets auth-source fall back to other backends in the auth-sources
list.
* test/lisp/auth-source-pass-tests.el: Add corresponding test.

Copyright-paperwork-exempt: yes
2019-06-24 09:15:39 +02:00
Mattias Engdegård
866f527ddf Optional space and unit in `file-size-human-readable' (bug#35756)
To improve readability of strings produced by
`file-size-human-readable', add two optional arguments:

- SPACE, to provide a string (typically a space or non-breaking space)
to put between the number and unit.  For compatibility, the default is
an empty string.

- UNIT, a string to use as unit.  For compatibility, the default is
"B" in `iec' mode and the empty string otherwise.

Also fix a glitch with small numbers in `iec' mode which caused a
stray "i" in the result.

* lisp/files.el (file-size-human-readable):
Add optional SPACE and UNIT arguments and handle small numbers correctly.
(files--ask-user-about-large-file, warn-maybe-out-of-memory):
Call with `iec' and space.
* test/lisp/files-tests.el (files-test-file-size-human-readable): New test.
* lisp/url/url-http.el (url-http-simple-after-change-function)
(url-http-content-length-after-change-function): Call with `iec' and space.
* etc/NEWS (Lisp Changes): Mention the change.
2019-06-23 20:30:50 +02:00
Simen Heggestøyl
abf7d0d802 Split up and add tests for two page.el functions
* lisp/textmodes/page.el (page--count-lines-page): New function
extracted from `count-lines-page'.
(count-lines-page): Extract main logic into `page--count-lines-page'.
(page--what-page); New function extracted from `what-page'.
(what-page): Extract main logic into `page--what-page'.

* test/lisp/textmodes/page-tests.el (page-tests-count-lines-page)
(page-tests-what-page): New tests for `page--count-lines-page' and
`page--what-page'.  (Bug#36009)
2019-06-23 07:27:19 +02:00
Allen Li
2db75262c7 Fix defining inverse abbrevs on previous words (Bug#36243)
* lisp/abbrev.el (inverse-add-abbrev): Skip trailing nonword
characters when defining abbrev.

* test/lisp/abbrev-tests.el (abbrev-edit-save-to-file-test): Add
regression tests.
2019-06-22 19:25:44 -04:00
Noam Postavsky
0f01a58c39 Fix python docstring auto-fill (Bug#36056)
* lisp/progmodes/python.el (python-mode): Set
fill-indent-according-to-mode locally to t.  This lets auto-fill do
the right thing when auto-filling inside a docstring.  The default was
to nil on 2001-11-25 "(fill-indent-according-to-mode): Default to nil"
with the comment that it "screws up CC-mode's filling tricks".  But
presumably it shouldn't be a problem for python-mode.
* test/lisp/progmodes/python-tests.el (python-auto-fill-docstring):
New test.
2019-06-22 19:25:44 -04:00
Noam Postavsky
f46b16b9fb Make rcirc parsing more RFC2812 compliant (Bug#36233)
Do continue to allow multiple spaces between arguments, even though
that is technically not allowed by the RFC.
* lisp/net/rcirc.el (rcirc-process-server-response-1): Fix parsing of
arguments which contain colons.
* test/lisp/net/rcirc-tests.el: New test.
2019-06-22 19:25:44 -04:00
Stefan Kangas
5a96936520 Add tests for mail/flow-fill.el
* test/lisp/mail/flow-fill-tests.el: New file.
* lisp/mail/flow-fill.el (fill-flowed-encode-tests)
(fill-flowed-test): Make obsolete.  (Bug#36174)
2019-06-22 12:15:40 +03:00
Mattias Engdegård
d3a7f3e6cd Compile any subsequence of `cond' clauses to switch (bug#36139)
A single `cond' form can how be compiled to any number of switch ops,
optionally interspersed with non-switch conditions.
Previously, switch ops would only be used for whole `cond' forms
containing no other tests.

* lisp/emacs-lisp/bytecomp.el (byte-compile--cond-vars):
Rename from `byte-compile-cond-vars'.
(byte-compile--default-val): Remove.
(byte-compile--cond-switch-prefix):
Replace `byte-compile-cond-jump-table-info'; now also returns
trailing non-switch clauses.
(byte-compile-cond-jump-table): New arguments; no longer compiles
the default case.
(byte-compile-cond): Look for and compile switches at any place in the
list of clauses.
* test/lisp/emacs-lisp/bytecomp-tests.el (byte-opt-testsuite-arith-data):
Add test expression.
2019-06-19 11:22:21 +02:00
Mattias Engdegård
14a81524c2 Compile cond with heterogeneous tests into switch (bug#36139)
Allow any mixture of `eq', `eql' and `equal', `memq', `memql' and
`member' in a switch-like `cond' to be compiled into a single switch.

* lisp/emacs-lisp/bytecomp.el (byte-compile--common-test): New.
(byte-compile-cond-jump-table-info): Use most specific common test.
* test/lisp/emacs-lisp/bytecomp-tests.el (byte-opt-testsuite-arith-data):
Add test cases for multi-value clause cond forms.
2019-06-19 11:20:59 +02:00
Mattias Engdegård
b8c74742c0 Tighter pcase or-pattern member function selection (bug#36139)
* lisp/emacs-lisp/pcase.el (pcase--u1):
Use the most specific of `memq', `memql' and `member' in or-patterns
with constant cases.  This improves performance and may help the byte-code
compiler generate a switch.
* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-member):
Add mixed-type or-pattern test cases.
2019-06-19 11:20:58 +02:00
Juanma Barranquero
81535eeadb * test/lisp/progmodes/python-tests.el (python-virt-bin): Doc fix. 2019-06-17 03:12:45 +02:00
Juanma Barranquero
9d48979ca8 Fix Python tests depending on system-type
* test/lisp/progmodes/python-tests.el (python-virt-bin): New function.
(python-shell-calculate-exec-path-2)
(python-shell-calculate-exec-path-3)
(python-shell-calculate-exec-path-4)
(python-shell-with-environment-1, python-shell-with-environment-2):
Use it.
2019-06-17 02:48:21 +02:00
Glenn Morris
78a609d454 Disable filling of warnings in a bytecomp test
* test/lisp/emacs-lisp/bytecomp-tests.el (test-suppression):
Disable filling rather than working around it.
2019-06-16 17:37:21 -07:00
Juanma Barranquero
fcf6cc3177 Fix problem with wdired test when symlinks cannot be created.
* test/lisp/wdired-tests.el (wdired-test-symlink-name):
Skip test if 'make-symbolic-link' fails for whatever reason;
that's not what's being tested.
2019-06-16 21:57:44 +02:00
Michael Albinus
f87a9e359e Fix accidential change in tramp-tests; do not merge with master
* lisp/net/trampver.el: Change version to "2.3.5.26.3".
(customize-package-emacs-version-alist): Add Tramp version
integrated in Emacs 26.3.

* test/lisp/net/tramp-tests.el (tramp-test42-auto-load):
Add skip for w32.
2019-06-15 21:38:11 +02:00
Glenn Morris
30e3e58c1b Merge from origin/emacs-26
7a8f22b * test/lisp/url/url-file-tests.el (url-file): Use file:///, n...
0c5f6c6 Fix doc of srecompile-compile-split-code (Bug#36200)
2019-06-15 09:50:33 -07:00
Lars Ingebrigtsen
fcb3821ad5 Also test unpacking 2019-06-15 16:10:28 +02:00
Lars Ingebrigtsen
f03343747e Refactor for reuse 2019-06-15 16:06:38 +02:00
Lars Ingebrigtsen
60a6992ae3 New file to test bindat functions 2019-06-15 15:57:01 +02:00
Michael Albinus
38a86a4c49 Some changes in process output read of Tramp
* lisp/net/tramp.el (tramp-handle-file-notify-rm-watch):
Read pending output.

* test/lisp/net/tramp-tests.el (tramp-test31-interrupt-process):
Use a timeout when reading process output.
2019-06-15 11:33:16 +02:00
Michael Albinus
7d71d0b13d Tag remote autorevert tests as unstable
* test/lisp/autorevert-tests.el (auto-revert--timeout):
Derive value from `auto-revert-interval'.
(auto-revert--deftest-remote): Tag it as `:unstable'.
(auto-revert-test05-global-notify, auto-revert-test06-write-file):
Suppress final newline.  Use `auto-revert--timeout'.
2019-06-15 11:08:05 +02:00
Juanma Barranquero
200f63cfa5 tramp-test42-auto-load: Add expected-result.
* test/lisp/net/tramp-tests.el (tramp-test42-auto-load):
Expect a failed result if remote file access is not enabled,
as it happens while doing the test on Windows.
2019-06-15 07:23:25 +02:00
Juanma Barranquero
7a8f22b004 * test/lisp/url/url-file-tests.el (url-file): Use file:///, not file://. 2019-06-15 05:29:03 +02:00
Michael Albinus
0518e3ca98 Fix problem in remote file notification
* lisp/net/tramp-sh.el (tramp-sh-gio-monitor-process-filter)
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-sh-inotifywait-process-filter): Do not kill the process.
Let `file-notify-rm-watch' do the job.

* test/lisp/filenotify-tests.el (file-notify-test03-events)
(file-notify-test05-file-validity)
(file-notify-test09-watched-file-in-watched-dir): Do not
special-case remote files.
2019-06-14 19:45:00 +02:00
Glenn Morris
5e09ace074 Stop a tramp test leaving a file behind
* test/lisp/net/tramp-tests.el
(tramp-test10-write-region-file-precious-flag):
Avoid leaving a backup file after we are done.
2019-06-13 20:24:41 -04:00
Glenn Morris
4c3e78a9f4 Allow for line breaks in a bytecomp test
* test/lisp/emacs-lisp/bytecomp-tests.el (test-suppression):
Warnings from the byte compiler may be filled.
2019-06-12 19:31:00 -07:00
Lars Ingebrigtsen
c25e3754ed Add more ps-mode octal tests
* test/lisp/progmodes/ps-mode-tests.el
(ps-mode-test-octal-region-multibyte): New test.
2019-06-13 03:03:26 +02:00
Lars Ingebrigtsen
5b7ec43c61 Add ps-mode-tests.el and remove a compilation warning
* lisp/progmodes/ps-mode.el (ps-mode-octal-region): Remove a
string-make-unibyte that apparently had no effect here.
* test/lisp/progmodes/ps-mode-tests.el: New file.
2019-06-13 02:48:41 +02:00
Lars Ingebrigtsen
73ab8f4b8c New file rfc2104-tests.el
* test/lisp/net/rfc2104-tests.el: New file to test rfc2104 hashes.
2019-06-13 01:53:58 +02:00
Glenn Morris
e2e63dc3f0 Give more information in a bytecomp test failure
* test/lisp/emacs-lisp/bytecomp-tests.el (test-suppression):
More informative failure messages.
2019-06-12 16:49:06 -07:00
Lars Ingebrigtsen
f2071b6de4 Add the new macro with-suppressed-warnings
* lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): New macro.

* doc/lispref/compile.texi (Compiler Errors): Document
with-suppressed-warnings and deemphasise with-no-warnings
slightly.

* lisp/emacs-lisp/bytecomp.el (byte-compile--suppressed-warnings):
New internal variable.
(byte-compile-warning-enabled-p): Heed
byte-compile--suppressed-warnings, bound via with-suppressed-warnings.
(byte-compile-initial-macro-environment): Provide a macro
expansion of with-suppressed-warnings.
(byte-compile-file-form-with-suppressed-warnings): New byte hunk
handler for the suppressed symbol machinery.
(byte-compile-suppressed-warnings): Ditto for the byteop.
(byte-compile-file-form-defmumble): Ditto.
(byte-compile-form, byte-compile-normal-call)
(byte-compile-normal-call, byte-compile-variable-ref)
(byte-compile-set-default, byte-compile-variable-set)
(byte-compile-function-form, byte-compile-set-default)
(byte-compile-warn-obsolete, byte-compile--declare-var): Pass the
symbol being warned in to byte-compile-warning-enabled-p.

* test/lisp/emacs-lisp/bytecomp-tests.el (test-suppression): New
function.
(bytecomp-test--with-suppressed-warnings): Tests.
2019-06-12 15:59:19 +02:00
Mattias Engdegård
e92dac3434 Keep auto-revert-mode working when changing buffer file name (bug#36159)
* lisp/autorevert.el (after-set-visited-file-name-hook):
Add unconditionally.
(global-auto-revert-mode): Don't use
`after-set-visited-file-name-hook' here.
(auto-revert-set-visited-file-name): Rename from
`auto-revert--global-set-visited-file-name' and generalise.
* test/lisp/autorevert-tests.el (auto-revert-test06-write-file): New.
2019-06-11 22:15:38 +02:00
Michael Albinus
2b8f9ded06 Minor fixes on tramp-tests.el for w32
* test/lisp/net/tramp-tests.el (tramp-test32-shell-command):
Ignore absence of tput.
(tramp-test43-asynchronous-requests): Don't start watchdog on w32.
2019-06-11 20:28:31 +02:00
Noam Postavsky
0026d0bf9f Don't keep warning about unescaped literals (Bug#36068)
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Restore lost
let-binding of lread--unescaped-character-literals, so that unescaped
literals warning will only apply to the form just read.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--unescaped-char-literals): Expand test to check that
we don't keep warning about old unescaped literals.
2019-06-10 18:27:22 -04:00
Michael Albinus
03b66d23a8 Make tramp-test43-asynchronous-requests working, again
* test/lisp/net/tramp-tests.el (tramp-list-tramp-buffers):
Declare `tramp-list-tramp-buffers'.
(tramp--test-ignore-make-symbolic-link-error)
(tramp--test-ignore-add-name-to-file-error): Improve declaration.
(tramp--test-with-proper-process-name-and-buffer): New macro.
(tramp-test43-asynchronous-requests): Use the macro for timer,
process filter and process sentinel.  Comment the remote file
operation in the timer.  Remove further async events.  Accept
output from all processes.
2019-06-10 17:53:15 +02:00
Mattias Engdegård
f2e4c34de6 Fix copy-paste error in autorevert-test
* test/lisp/autorevert-tests.el: Use correct name to define a remote test.
2019-06-10 12:44:26 +02:00
Stefan Kangas
4503310cac Add tests for mail/uudecode.el
* lisp/mail/uudecode.el: Remove redundant :group usage.
* test/lisp/mail/uudecode-resources/uudecoded.txt,
test/lisp/mail/uudecode-resources/uuencoded.txt,
test/lisp/mail/uudecode-tests.el: New files.
2019-06-09 17:07:09 -07:00
Stefan Kangas
1af27a1784 Use lexical-binding in password-cache.el and add tests
* lisp/password-cache.el: Use lexical-binding.
* test/lisp/password-cache-tests.el: New file.
2019-06-09 10:08:36 -07:00
Stefan Kangas
e40f1c68b5 Use lexical-binding in underline.el and add tests
* lisp/textmodes/underline.el: Use lexical-binding.
* test/lisp/textmodes/underline-tests.el: New file.
(Bug#36063)
2019-06-09 09:56:03 +03:00
Eli Zaretskii
e5bc9a32b6 Fix failures of term-tests on MS-Widows
* test/lisp/term-tests.el (term-simple-lines)
(term-carriage-return, term-line-wrap, term-cursor-movement)
(term-scrolling-region, term-set-directory)
(term-line-wrapping-then-motion, term-to-margin): Skip tests
on MS-Windows and MS-DOS.
2019-06-07 12:01:11 +03:00
Noam Postavsky
a14eb43215 Add "pin" to password-word-equivalents (Bug#35523)
* lisp/international/mule-conf.el (password-word-equivalents): Add "pin".
* test/lisp/comint-tests.el (comint-testsuite-password-strings): Add
test case.
2019-06-06 19:29:42 -04:00
Noam Postavsky
da118e6a7c Keep nxml prolog updated via syntax-propertize
Instead of using after-change-functions.  Also, stop consulting
nxml-prolog-regions during syntax-propertize.  It turns out the
problems fixed by using prolog information are actually due to using
the wrong syntax table during propertizing.  This was fixed in
2019-06-04 "* lisp/emacs-lisp/syntax.el: Use syntax-ppss-table for
syntax-propertize." so consulting the prolog data is no longer needed.
* lisp/nxml/nxml-rap.el (nxml-maybe-rescan-prolog): Remove.
* lisp/nxml/nxml-mode.el (nxml-mode): Stop using it.
(nxml-syntax-propertize): Don't use nxml-prolog-regions, just call
nxml-scan-prolog if needed before delegating to
sgml-syntax-propertize.
* test/lisp/nxml/nxml-mode-tests.el (nxml-mode-edit-prolog): New test.
2019-06-05 20:30:23 -04:00
Noam Postavsky
7ad5e3915f ; Add test for Bug#36092
* test/lisp/nxml/nxml-mode-tests.el (nxml-mode->-after-quote): New
test.
2019-06-05 09:10:23 -04:00
Noam Postavsky
d414c93b06 Don't sgml-syntax-propertize-inside XML prolog (Bug#32823)
* lisp/nxml/nxml-mode.el (nxml-syntax-propertize): New function.
(nxml-mode): Use it as the syntax-propertize-function.
* test/lisp/nxml/nxml-mode-tests.el (nxml-mode-doctype-and-quote-syntax)
(nxml-mode-prolog-comment): New tests.
2019-06-04 08:42:50 -04:00
Noam Postavsky
438e4804d1 Fix some SGML syntax edge cases (Bug#33887)
* lisp/textmodes/sgml-mode.el (sgml-syntax-propertize-rules): Handle
single and double quotes symmetrically.  Don't skip quoted comment
enders.
* test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax):
Add more test cases.
(sgml-mode-quote-in-long-text): New test.
2019-06-04 08:42:50 -04:00
Michael Albinus
7aaf500701 Stronger check for Tramp method
* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-maybe-open-connection):
Use `tramp-get-connection-name'.

* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link):
* lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-make-symbolic-link):
Don't check remote TARGET.

* lisp/net/tramp.el (tramp-dissect-file-name): Check for proper method.
(tramp-file-name-for-operation): Take only 2nd argument into
account for file name handler.
(tramp-file-name-handler): Suppress checks for `file-remote-p'.

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test02-file-name-dissect): Suppress check for wrong
method.

* test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case):
Dump *all* Tramp buffers.
(tramp-test02-file-name-dissect)
(tramp-test02-file-name-dissect-simplified)
(tramp-test02-file-name-dissect-separate): Check also wrong method.
(tramp-test03-file-name-defaults): Check, that the respective
Tramp package is loaded.
(tramp-test04-substitute-in-file-name)
(tramp-test05-expand-file-name)
(tramp-test06-directory-file-name, tramp-test44-auto-load):
Suppress check for wrong method.
(tramp-test30-make-process): Remove instrumentation code.
(tramp-test31-interrupt-process, tramp-test36-vc-registered):
Guarantee that connection is established prior starting process.
2019-06-04 12:51:45 +02:00
Juri Linkov
9d72d6a3a2 * lisp/char-fold.el (char-fold-make-table): New function
with body extracted from INITVALUE of defconst (bug#35689).
Bind search-spaces-regexp to nil (bug#35802).

* test/lisp/char-fold-tests.el: Relocate helpers to file beginning.
(char-fold--test-bug-35802): New test.
2019-06-03 23:18:31 +03:00
Glenn Morris
d920ec617b Skip some flymake tests on hydra.nixos.org
* test/lisp/progmodes/flymake-tests.el (perl-backend)
(included-c-header-files, recurrent-backend):
Skip on hydra.nixos due to frequent intermittent failures.  (Bug#32764)
2019-06-01 19:37:35 -07:00
Stefan Kangas
4c549ab5d0 Use lexical-binding in morse.el and studly.el and add tests
* lisp/play/morse.el: Use lexical-binding.
* lisp/play/studly.el: Use lexical-binding.
* test/lisp/play/morse-tests.el: New file.
* test/lisp/play/studly-tests.el: New file.
2019-06-01 18:52:22 -07:00
Stefan Kangas
227b3c89f0 Use lexical-binding in paragraphs.el and add tests
* lisp/textmodes/paragraphs.el: Use lexical-binding.
(repunctuate-sentences): Make it work non-interactively.
* test/lisp/textmodes/paragraphs-tests.el: New file.
2019-06-01 18:52:22 -07:00
Mattias Engdegård
b5e41e8ba3 Fix cl-member' and cl-assoc' for bignums
* lisp/emacs-lisp/cl-seq.el (cl-member, cl-assoc): Work with bignums.
* test/lisp/emacs-lisp/cl-seq-tests.el (cl-seq-bignum-eql): New.
2019-06-01 18:13:00 -07:00
Glenn Morris
7e911d007d Merge from origin/emacs-26
134edc1 Warn about wrong number of args for subrs (Bug#35767)
5f01af6 Use plain symbols for eieio type descriptors (Bug#29220)
4b24b01 Pacify GCC 9 -Wredundant-decls
2019-06-01 12:04:42 -07:00
Simen Heggestøyl
f2a7acdde7 Use lexical-binding in page.el and add tests
* lisp/textmodes/page.el: Use lexical-binding.
(forward-page): Replace `(if x nil y)' with `(unless x y)'.

* test/lisp/textmodes/page-tests.el: New file with tests for page.el.
2019-06-01 15:33:37 +02:00
Stefan Kangas
b6c628a16b Use lexical-binding in timezone.el and add tests
* lisp/timezone.el: Use lexical-binding.
* test/lisp/timezone-tests.el: New file.
2019-06-01 01:44:31 -07:00
Simen Heggestøyl
12f530a735 Use lexical-binding in autoinsert.el and add tests
* lisp/autoinsert.el: Use lexical-binding.
Remove redundant :group args.
(auto-insert): Simplify.

* test/lisp/autoinsert-tests.el: New file with tests for
autoinsert.el.
2019-05-31 19:07:48 +02:00
Noam Postavsky
134edc1036 Warn about wrong number of args for subrs (Bug#35767)
* lisp/emacs-lisp/bytecomp.el (byte-compile-callargs-warn): Don't
assume byte-compile-fdefinition will return non-nil.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-warn-wrong-args)
(bytecomp-warn-wrong-args-subr): New tests.
2019-05-30 18:46:07 -04:00
Noam Postavsky
5f01af6c8e Use plain symbols for eieio type descriptors (Bug#29220)
Since Emacs 26, eieio objects use a class record (with circular
references) as the type descriptor of the object record.  This causes
problems when reading back an object from a string, because the class
record is not `eq' to the canonical one (which means that read objects
don't satisfy the foo-p predicate).
* lisp/emacs-lisp/eieio.el (make-instance): As a (partial) fix, set
the record's type descriptor to a plain symbol for the type descriptor
when eieio-backward-compatibility is non-nil (the default).
* lisp/emacs-lisp/eieio-core.el (eieio--object-class): Call
eieio--class-object on the type tag when eieio-backward-compatibility
is non-nil.
(eieio-object-p): Use eieio--object-class instead of
eieio--object-class-tag.
* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el
(eieio-test-persist-hash-and-vector)
(eieio-test-persist-interior-lists): Make into functions.
(eieio-persist-hash-and-vector-backward-compatibility)
(eieio-persist-hash-and-vector-no-backward-compatibility)
(eieio-test-persist-interior-lists-backward-compatibility)
(eieio-test-persist-interior-lists-no-backward-compatibility): New
tests which call them, eieio-backward-compatibility let-bound.
2019-05-30 18:46:07 -04:00
Stefan Monnier
fe0cb43fb8 * lisp/subr.el (add-hook): Turn append into depth (bug#35508)
Make it possible to control the relative ordering of functions on hooks by
specifying `depth` in the same was as was possible with `add-function`.

* lisp/electric.el (electric--sort-post-self-insertion-hook):
Delete function.
(electric-indent-mode, electric-layout-mode, electric-quote-mode):
* lisp/elec-pair.el (electric-pair-mode): Use new `depth` arg instead of
electric--sort-post-self-insertion-hook.

* lisp/emacs-lisp/syntax.el (syntax-propertize, syntax-ppss):
Use new `depth` arg to make sure noone accidentally gets added
after syntax-ppss-flush-cache.

* doc/lispref/modes.texi (Setting Hooks): Document new `depth` arg.

* test/lisp/subr-tests.el (subr-tests-add-hook-depth): New test.
2019-05-29 15:56:14 -04:00
Simen Heggestøyl
49cdbb4a35 Use lexical-binding in makesum.el and add tests
* lisp/makesum.el: Use lexical-binding.
(make-command-summary): Replace `if..progn' with `when'.
(double-column): Add docstring and apply trivial simplifications.

* test/lisp/makesum-tests.el: New file with tests for makesum.el.
2019-05-29 20:47:16 +02:00
Stefan Monnier
96a0d4fe41 * lisp/international/mule-cmds.el (encode-coding-char): Fix ASCII case
Don't bother with string-as-multibyte since `string` already returns
multibyte when needed.  Don't forget to encode when the string is
ASCII, e.g. for ebcdic case and to make sure we always return
a unibyte string.

* test/lisp/international/mule-tests.el (mule-cmds-tests--encode-ebcdic):
New test.
2019-05-28 19:33:20 -04:00
Glenn Morris
f113512ffc * test/lisp/autorevert-tests.el: Give on on remote hydra.nixos tests.
(auto-revert--test-enabled-remote): Disable on hydra.nixos.
2019-05-27 17:20:12 -07:00
Glenn Morris
8f3bd2600a * test/lisp/autorevert-tests.el: Try to fix remote hydra.nixos tests. 2019-05-27 14:08:07 -07:00
Mattias Engdegård
68b374a62d Correctly eliminate duplicate cases in switch compilation
Fix code mistakes that prevented the correct elimination of duplicated
cases when compiling a `cond' form to a switch bytecode, as in

  (cond ((eq x 'a) 1)
        ((eq x 'b) 2)
        ((eq x 'a) 3)   ; should be elided
        ((eq x 'c) 4))

Sometimes, this caused the bytecode to use the wrong branch (bug#35770).

* lisp/emacs-lisp/bytecomp.el (byte-compile-cond-vars): Return obj2 eval'ed.
(byte-compile-cond-jump-table-info):
Discard redundant condition.  Use `obj2' as evaluated.
Discard duplicated cases instead of failing the table generation.
* test/lisp/emacs-lisp/bytecomp-tests.el (toplevel): Require subr-x.
(byte-opt-testsuite-arith-data, bytecomp-test--switch-duplicates): Test.
2019-05-27 13:25:27 +02:00
Noam Postavsky
dc9f8c1c63 ; Fix read-multiple-choice test
* test/lisp/emacs-lisp/rmc-tests.el (test-read-multiple-choice):
Rebind read-event, read-multiple-choice uses that since 2019-05-26
"Avoid infloop in read-multiple-choice (Bug#32257)".
2019-05-26 21:55:00 -04:00
Basil L. Contovounesios
9fe3bdf25d Tweak recent additions in tabify-tests.el
* test/lisp/tabify-tests.el (tabify-tests--test-changes): Rename
third argument to avoid "lexical argument shadows dynamic variable"
warnings.  Use mapconcat in place of mapcar+concat.
(tabify-tests-untabify, tabify-tests-tabify): Quote function symbols
as such.
2019-05-26 11:56:57 +01:00
Simen Heggestøyl
a51ab2f357 Use lexical-binding in paren.el and add tests
* lisp/paren.el: Use lexical-binding.
(show-paren--default): Use imperative form in doc-string.

* test/lisp/paren-tests.el: New file with tests for paren.el.
2019-05-26 11:22:27 +02:00
Paul Eggert
852d281769 Update author/maintainer info
Update email addresses and fix spellings of some author and
maintainer names.
2019-05-26 01:00:16 -07:00
Paul Eggert
797ee5871e Remove Maintainer: when it duplicates Author:
The convention is that a file with Author: but not Maintainer:
means the author is a maintainer, which makes it confusing
when a file lists the same person as author and maintainer.
Avoid the confusion by removing the duplicate Maintainer: line.
2019-05-26 01:00:15 -07:00
Stefan Kangas
5e47312c1f Use lexical-binding in tabify.el and add tests
* lisp/tabify.el: Use lexical-binding.
* test/lisp/tabify-tests.el: New file.
2019-05-25 18:37:33 -07:00
Paul Eggert
f744797af1 Go back to "Maintainer: emacs-devel@gnu.org"
Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is
no special maintainer for a file.  Although this wasn't documented
it was common practice and removing the lines didn't have consensus.
2019-05-25 14:25:18 -07:00
Matthew Bauer
f6d3005069 Add "Enter Auth" prompt handling for OpenVPN (Bug#35724)
* lisp/comint.el (comint-password-prompt-regexp): Allow "Enter Auth"
at the beginning.
2019-05-24 07:33:01 -04:00
Stefan Monnier
7083974021 * lisp/textmodes/sgml-mode.el: Fix lone > in sgml text
(sgml--syntax-propertize-ppss):New variable and function.
(sgml-syntax-propertize-rules): Use it.
Don't ignore quotes not followed by a matching quote or a '>' or '<'.
(sgml-syntax-propertize): Set up sgml--syntax-propertize-ppss.

* test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax):
Add test for lone '>'.
2019-05-22 18:36:37 -04:00
Federico Tedin
eb2e9a2ca2 Use lexical-binding in tempo.el and add tests
For discussion, see the following thread:
https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00395.html
* lisp/tempo.el: Use lexical-binding.
(tempo-define-template): Expand documentation to mention
`tempo-user-elements'.
(tempo-local-tags, tempo-collection, tempo-dirty-collection)
(tempo-marks, tempo-match-finder): Define with defvar-local.
(tempo-named-insertions, tempo-region-start, tempo-region-stop): Make
them automatically buffer-local.
* test/lisp/tempo-tests.el: Add tests for tempo.el.
2019-05-21 15:23:23 +01:00
Mattias Engdegård
afdc20d73c Allow zero-argument rx or' and seq' forms
Make the rx `or' and `seq' forms accept zero arguments to produce a
never-matching regexp and an empty string, respectively.

* lisp/emacs-lisp/rx.el: Require cl-extra.
(rx-constituents, rx-or): Permit zero args.
(rx): Amend doc string for `or' and `seq'.
* test/lisp/emacs-lisp/rx-tests.el (rx-or, rx-seq): Test the change.
* etc/NEWS (Changes in Specialized Modes and Packages): Mention the change.
2019-05-20 17:56:40 +02:00
Mattias Engdegård
c2cda3ff40 Revert "Allow zero-argument rx or' and seq' forms"
This reverts commit b552fc05c2.
It caused a bootstrapping failure which I have yet to resolve - sorry.
2019-05-20 17:38:03 +02:00
Stefan Kangas
4498e5a13a Use lexical-binding in delim-col.el and add tests
Thanks to Basil L. Contovounesios for additional cleanups.
For discussion, see the following thread:
https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00177.html

* lisp/delim-col.el: Use lexical-binding.

* test/lisp/delim-col-tests.el: New file.
(delim-col-tests-delimit-colummns-before-after)
(delim-col-tests-delimit-columns)
(delim-col-tests-delimit-columns-format/nil)
(delim-col-tests-delimit-columns-format/padding)
(delim-col-tests-delimit-columns-format/separator)
(delim-col-tests-delimit-columns-separator)
(delim-col-tests-delimit-columns-str-before-after)
(delim-col-tests-delimit-columns-str-separator)
(delim-col-tests-delimit-rectangle): New unit tests.
2019-05-20 15:29:26 +01:00
Mattias Engdegård
b552fc05c2 Allow zero-argument rx or' and seq' forms
Make the rx `or' and `seq' forms accept zero arguments to produce a
never-matching regexp and an empty string, respectively.

* lisp/emacs-lisp/rx.el (rx-constituents, rx-or): Permit zero args.
(rx): Amend doc string for `or' and `seq'.
* test/lisp/emacs-lisp/rx-tests.el (rx-or, rx-seq): Test the change.
* etc/NEWS (Changes in Specialized Modes and Packages): Mention the change.
2019-05-20 11:39:46 +02:00
Mattias Engdegård
e9f9827eb0 Avoid polling in global-auto-revert-mode (bug#35418)
Make `auto-revert-avoid-polling' have effect in global-auto-revert-mode.
Buffers actually handled by that mode are marked with a non-nil value
of `auto-revert--global-mode'.  When global-auto-revert-mode is
entered, eligible buffers are marked in that way, and hooks are set up
to mark new buffers and take care of buffers whose file names change.
This way the existing poll-avoidance logic can be used, since the
entire set of buffers in auto-revert is known.

A new hook, `after-set-visited-file-name-hook', was added to handle
the case when the file name of a tracked buffer changes.

* lisp/autorevert.el (auto-revert-avoid-polling): Amend doc string.
(auto-revert--global-mode): New buffer-local variable.
(global-auto-revert-mode): Mark existing buffers and set up hooks when
mode is entered; do the opposite when exited.
(auto-revert--global-add-current-buffer)
(auto-revert--global-adopt-current-buffer)
(auto-revert--set-visited-file-name-advice): New functions.
(auto-revert--polled-buffers, auto-revert--need-polling-p)
(auto-revert-notify-handler)
(auto-revert-active-p): Modify logic to cover global-auto-revert-mode.
* lisp/files.el (after-set-visited-file-name-hook): New hook.
(set-visited-file-name-hook): Call new hook.
* test/lisp/autorevert-tests.el (top):  Use lexical-binding.
(auto-revert-test--write-file, auto-revert-test--buffer-string)
(auto-revert-test--wait-for, auto-revert-test--wait-for-buffer-text)
(auto-revert-test05-global-notify): New test.
* doc/lispref/hooks.texi (Standard Hooks):
Mention new hook (in a comment, since it's unclear whether it should
actually be documented here)
* etc/NEWS (Changes in Specialized Modes and Packages): Update entry.
2019-05-20 11:26:51 +02:00
Michael Albinus
2bf0b3bf61 Fix problems in autorevert-tests
* test/lisp/autorevert-tests.el (auto-revert--deftest-remote):
Fix typo.
(auto-revert-test02-auto-revert-deleted-file): On emba, there are
no stopped events.
2019-05-20 10:14:13 +02:00
Paul Eggert
bef1be8730 Fixes for "Maintainer:" and related lines
Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines,
which are not that useful.  It also cleans up and regularizes a
few similar lines.
2019-05-19 21:34:27 -07:00
Michael Albinus
2b313d1739 ; Instrument autorevert-tests 2019-05-19 19:52:46 +02:00
Michael Albinus
9199643ab2 * test/lisp/autorevert-tests.el (auto-revert--deftest-remote):
Do not handle errors.
2019-05-19 11:34:01 +00:00
Paul Eggert
db9af10394 For SVG, 8192 is the new 256
Prefer librsvg for display of splash.svg
When both librsvg and Imagemagick are available, Emacs should
prefer librsvg to render SVG images.  However, Emacs was using
Imagemagick to render its own splash.svg file because
image-type-from-file-header returned nil for that file.
* lisp/image.el (image-type-from-buffer)
(image-type-from-file-header): Look at the first 8192 bytes of
the image, not just the first 256.  For Emacs’s own splash.svg
file, image-type-header-regexps needs to look at 939 bytes.
8192 bytes is a reasonable number nowadays given typical file
system design.
* test/lisp/image-tests.el (image-tests--emacs-images-directory):
New contant.
(image-type-from-file-header-test): New test.
2019-05-18 10:01:10 -07:00
Michael Albinus
b0a0705a4e Suppress compiler warnings for older Emacsen in tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory):
Add error name to test.
(tramp-test30-make-process, tramp-test45-unload):
Suppress compiler warnings from older Emacsen.
2019-05-18 16:04:58 +02:00
Stefan Monnier
9ed0b55848 * cl-macs-tests.el (cl-macs-test--symbol-macrolet): New test 2019-05-16 17:16:36 -04:00
Stefan Monnier
9a74e5666b * lisp/textmodes/sgml-mode.el (sgml-syntax-propertize-rules): Fix typo
* test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax):
New corresponding test.
2019-05-15 22:21:36 -04:00
Glenn Morris
5fe9375a51 Merge from origin/emacs-26
02bee78 Let dir locals for more specific modes override those from less
b1235f9 Improve documentation of Hexl mode
32d1813 Fix description of (move-to-column <n> t) when column <n> is ...
0397b7c ; Fix smtpmail-stream-type docstring
7dab3ee Recognize single quote attribute values in nxml and sgml (Bug...
e4cde42 Disable extra display of &#10; in nxml-mode (Bug#32897)
ca14dd1 Fix nxml-get-inside (Bug#32003)
e7ab351 Fix positioning client buffer as instructed by emacsclient

# Conflicts:
#	lisp/files.el
#	lisp/textmodes/sgml-mode.el
2019-05-14 17:18:18 -07:00
Kévin Le Gouguec
59ad303e8f Stop splicing anonymous faces in font-lock-append-text-property
This is the same fix as 2019-04-29 "Refrain from splicing anonymous
faces in text properties", which was only applied to
font-lock-prepend-text-property.

* lisp/font-lock.el (font-lock-append-text-property): Distinguish list
of faces from property list.
* test/lisp/font-lock-tests.el: New test suite.

(Bug#35476)
2019-05-13 20:41:02 -04:00
Michael Albinus
4255f0fcae * test/lisp/net/tramp-tests.el (cl-lib): Require instead of cl-seq. 2019-05-09 14:23:07 +02:00
Noam Postavsky
7dab3ee7ab Recognize single quote attribute values in nxml and sgml (Bug#35381)
* lisp/textmodes/sgml-mode.el (sgml-specials): Add single quote.
(sgml-syntax-propertize-rules): Handle single quote.
* test/lisp/nxml/nxml-mode-tests.el (nxml-mode-font-lock-quotes): New
test.
* test/lisp/textmodes/sgml-mode-tests.el
(sgml-delete-tag-bug-8203-should-not-delete-apostrophe): Now passes.
2019-05-09 06:42:40 -04:00
Noam Postavsky
ca14dd1d46 Fix nxml-get-inside (Bug#32003)
The change from 2016-01-16 "lisp/nxml: Use syntax-tables for comments"
made nxml-get-inside return non-nil for any string or comment,
including attribute strings.  This caused incorrect and therefore
indentation.
* lisp/nxml/nxml-rap.el: Update commentary to reflect changes to
nxml-mode parsing.
(nxml-get-inside): Only return non-nil when inside comments and
generic strings, not normal quote-delimited strings.
* test/lisp/nxml/nxml-mode-tests.el: New tests.
2019-05-09 06:42:40 -04:00
Glenn Morris
8b789755b4 Merge from origin/emacs-26
1c6484e (origin/emacs-26) Fix incorrect cloning of eieio-instance-inh...
37436fe Fix cloning of eieio-named objects (Bug#22840)
fb65a36 Fix ibuffer-unmark-backward synopsis (bug#35572)
f77bd2b ; * src/lisp.h (DEFSYM): Fix inaccurate comment.
3b86e0b Clarify handling of long options (Bug#24949)
04340a8 Improve documentation of the daemon and emacsclient
3e29de2 * etc/NEWS.24: Belatedly announce delete-consecutive-dups.
2019-05-08 07:51:48 -07:00
Vitalie Spinu
1c6484e975 Fix incorrect cloning of eieio-instance-inheritor objects (Bug#34840)
* lisp/emacs-lisp/eieio-base.el (clone): Unbound slots of
  eieio-instance-inheritor objects as documented in the docs string
  and implemented in the original eieio implementation.
2019-05-08 11:12:29 +02:00
Michael Albinus
0728b40cc7 ; Instrument auto-revert--deftest-remote 2019-05-08 10:49:31 +02:00
Michael Albinus
173fd94c11 Skip tramp-test10-write-region-file-precious-flag for Emacs < 27
* test/lisp/net/tramp-tests.el
(tramp-test10-write-region-file-precious-flag): Skip for Emacs < 27.
2019-05-08 09:44:22 +02:00
Jonathan Tomer
21888a9464 Don't rewrite buffer contents after saving by rename (Bug#35497)
* lisp/files.el (basic-save-buffer-2): Don't rewrite file contents
after saving-by-renaming.  (Bug#35497)

* test/lisp/files-tests.el (files-tests-dont-rewrite-precious-files):
* test/lisp/net/tramp-tests.el
(tramp-test10-write-region-file-precious-flag): Regression tests
for this change.
2019-05-08 09:13:58 +02:00
John Shahid
e44b56d16a Fix setting and resetting of scroll-with-delete
The start and end lines of the scroll region must to be in the range
[0,term-height).  There are few placees that incorrectly set the end
line of the scroll region to term-height which is outside the valid
range.  Combined with another off-by-one error in
term-set-scroll-region's clamping logic, this would cause
term-scroll-with-delete to be unnecessarily turned on.

* lisp/term.el (term-scroll-start,term-scroll-end): Use defvar-local
to define the variables and document the valid range of values that
the variables can take.
(term--last-line): New function to calculate the 0-based index of the
last line.
(term--reset-scroll-region): New function to reset the scroll region
to the full height of the terminal.
(term-mode,term-reset-size,term-reset-terminal): Call
term--reset-scroll-region to reset the scroll region.
(term-set-scroll-region): Fix the off-by-one error in the clamping
logic which allowed term-scroll-end to have values outside the valid
range [0,term-height).
2019-05-07 14:51:42 -04:00
Vitalie Spinu
37436fe6d3 Fix cloning of eieio-named objects (Bug#22840)
* lisp/emacs-lisp/eieio-base.el (clone): Correctly set the name of the
  cloned objects from eieio-named instances.
2019-05-07 13:45:00 +02:00
Juri Linkov
df9b56ecff Rename shell-command-width to async-shell-command-width (bug#35055)
* lisp/simple.el (async-shell-command-width):
* lisp/net/tramp.el (tramp-handle-shell-command):
* test/lisp/net/tramp-tests.el (tramp-test32-shell-command):
* doc/misc/tramp.texi (Remote processes): Rename this variable.

* doc/emacs/misc.texi (Single Shell): Add async-shell-command-width.
2019-05-05 22:27:33 +03:00
Michael Albinus
10aa44a1dd ; SOme changes in filenotify-tests.el for EMBA
* test/lisp/filenotify-tests.el (file-notify-test03-events)
(file-notify-test05-file-validity)
(file-notify-test09-watched-file-in-watched-dir): Adapt for EMBA.
2019-05-05 13:34:26 +02:00
Michael Albinus
f82e0e5b76 Adapt tests for recent file-notification changes in Tramp
* lisp/net/tramp.el (tramp-file-notify-process-sentinel):
Pacify byte compiler.

* test/lisp/autorevert-tests.el
(auto-revert-test02-auto-revert-deleted-file):
* test/lisp/filenotify-tests.el (file-notify-test03-events)
(file-notify-test05-file-validity)
(file-notify-test09-watched-file-in-watched-dir): Adapt for remote
files.
2019-05-05 12:20:44 +02:00
Michael Albinus
d0fe28cb1d Add tests for remote files in auto-revert-tests
* lisp/autorevert.el (auto-revert-debug): New defvar.
(auto-revert-notify-handler): Write traces.

* lisp/filenotify.el (file-notify-debug): New defvar.
(file-notify-handle-event, file-notify-callback): Write traces.

* lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered):
Handle nil `vc-handled-backends'.

* test/lisp/autorevert-tests.el
(auto-revert-test-remote-temporary-file-directory): New defconst.
Handle also $REMOTE_FILE_NOTIFY_LIBRARY.
(auto-revert--test-enabled-remote-checked): New defvar.
(auto-revert--test-enabled-remote): New defun.
(auto-revert--wait-for-revert): Rewrite without timeout.
(auto-revert--deftest-remote): New defmacro.
(auto-revert-test01-auto-revert-several-files):
(auto-revert-test02-auto-revert-deleted-file): Adapt for remote files.
(auto-revert-test02-auto-revert-deleted-file):
Use `auto-revert-debug' for debug messages.
(auto-revert-test00-auto-revert-mode-remote)
(auto-revert-test01-auto-revert-several-files-mode-remote)
(auto-revert-test02-auto-revert-deleted-file-mode-remote)
(auto-revert-test03-auto-revert-tail-mode-mode-remote)
(auto-revert-test04-auto-revert-mode-dired-mode-remote): New tests.

* test/lisp/filenotify-tests.el (file-notify--test-event-handler):
Use `file-notify-debug' for debug messages.
2019-05-03 17:18:13 +02:00
Stefan Monnier
3fa9c9f774 * lisp/mail/footnote.el: Tweak markers convention
Instead of using markers that are sometimes before and sometimes after
the [...] and using `insert-before-markers` to make sure those that are
are before stay before, always place them before, and make them
"move after"so they stay with their [...] without the need for
insert-before-markers.

(footnote--current-regexp): Add arg to match previous style.
Include the start/end "tags" in the regexp.  Adjust all callers.
(footnote--markers-alist): Change position of POINTERS.
(footnote--refresh-footnotes, footnote--renumber)
(footnote--make-hole, footnote-delete-footnote)
(footnote-back-to-message): Adjust accordingly, mostly by using
`looking-at` instead of `looking-back`.
(footnote--make-hole): Always return footnote nb to use.
(footnote-add-footnote): Simplify call accordingly.

* test/lisp/mail/footnote-tests.el: New file.
2019-05-02 10:27:42 -04:00
Glenn Morris
6662938619 Merge from origin/emacs-26
0e8d452 ; * doc/lispref/nonascii.texi (Coding System Basics): Fix gra...
25a2ff7 ; Add missing space in custom.texi
9ec18fb * admin/admin.el (set-version): Check for increase in version...
93912ba Be more careful about indent-sexp going over eol (Bug#35286)
2019-04-29 09:08:19 -07:00
Michael Albinus
295c797503 * test/lisp/net/tramp-tests.el (tramp--test-timeout-handler): Instrument. 2019-04-29 17:24:53 +02:00
Noam Postavsky
74712470fc Replace use of obsolete string-make-unibyte
* lisp/image-file.el (insert-image-file): Use encode-coding-region
instead of string-make-unibyte.
* test/lisp/image-file-tests.el: New test.
2019-04-28 16:45:13 -04:00
Noam Postavsky
caadbd9492 ; Add test for previous change
* test/lisp/progmodes/python-tests.el (python-indent-hanging-close-paren):
New test.
2019-04-28 16:45:13 -04:00
Glenn Morris
a241e45b5a * test/lisp/progmodes/sql-tests.el (sql-tests-buffer-naming-harness):
Fix previous for TEST_LOAD_EL=no.
2019-04-25 22:06:34 -04:00
Glenn Morris
8082291773 * test/lisp/progmodes/sql-tests.el (sql-tests-buffer-naming-harness):
Skip if no sqlite program.
2019-04-25 19:53:02 -04:00
Stephen Berman
6d8e0fc5aa Make wdired-mode ignore ls file indicators
* lisp/wdired.el (wdired--restore-dired-filename-prop): When
dired-listing-switches includes "F" or "classify", don't treat
appended indicator characters as part of the file name (bug#34915).

* test/lisp/wdired-tests.el (wdired-test-bug34915): New test.
2019-04-25 19:17:23 +02:00
Michael R. Mauger
a1386fa6a7 * lisp/progmodes/sql.el
(sql-is-sqli-buffer-p): New function.
(sql-generate-unique-sqli-buffer-name): Refactor and use it.
(sql-product-interactive): Simplify name logic.
* test/lisp/progmodes/sql-tests.el
(sql-tests-placeholder-filter-harness): New macro.
(sql-tests-placeholder-filter-simple)
(sql-tests-placeholder-filter-ampersand)
(sql-tests-placeholder-filter-period): Refactored tests and use macro.
(sql-tests-buffer-naming-harness): New macro.
(sql-tests-buffer-naming-default)
(sql-tests-buffer-naming-multiple)
(sql-tests-buffer-naming-explicit)
(sql-tests-buffer-naming-universal-argument)
(sql-tests-buffer-naming-existing): New tests.
2019-04-24 20:59:25 -04:00
Noam Postavsky
93912baefd Be more careful about indent-sexp going over eol (Bug#35286)
* lisp/emacs-lisp/lisp-mode.el (indent-sexp): Only go over multiple
sexps if the end of line is within a sexp.
* test/lisp/emacs-lisp/lisp-mode-tests.el
(indent-sexp-stop-before-eol-comment)
(indent-sexp-stop-before-eol-non-lisp): New tests.
2019-04-22 12:49:36 -04:00
Michael Albinus
0289498211 Some changes in tramp-tests
* test/lisp/net/tramp-tests.el (tramp-test32-shell-command):
Check for backward compatibility.
(tramp-test33-environment-variables): Apply a better check for
unset variable.
2019-04-22 09:58:37 +02:00
Glenn Morris
50d00e7153 Merge from origin/emacs-26
037970f Document insert-image-file's return value (Bug#32978)
598b45a Autoload cua-toggle-rectangle-mark (Bug#34947)
95bd56d Tell xclip not to expect job-control under eshell (Bug#35257)
9997bbb ; * src/emacs.c: Fix typo in comment (Bug#35320).
a4ad7be Fix off-by-one-link error in image--set-property
2019-04-21 07:51:36 -07:00
Michael R. Mauger
23d8cfb9ce * lisp/progmodes.sql.el
(sql-product-alist): Corrected :terminator defns.
(sql-debug-send): New variable.
(sql-send-string): Use it and correct buffer context.
(sql-send-magic-terminator): Use `sql-input-sender'.
(sql-placeholders-filter): Bug#11481 Don't recursively replace placeholders
* test/lisp/progmodes/sql-tests.el
(sql-test-placeholder-filter): Test placeholder functionality.
2019-04-21 00:05:42 -04:00
Michael Albinus
6d1025f944 Mark different-diagnostic-types as failed on emba.
* test/lisp/progmodes/flymake-tests.el (different-diagnostic-types):
Expect also failure on emba.gnu.org.
2019-04-20 21:16:05 +02:00
Philipp Stephani
0b4b380ce4 Make warning about unescaped character literals more helpful.
See Bug#31676.

* lisp/emacs-lisp/byte-run.el
(byte-run--unescaped-character-literals-warning): New defun.

* src/lread.c (load_warn_unescaped_character_literals): Use new defun.
(syms_of_lread): Define symbol for new defun.

* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Use new
defun.

* test/src/lread-tests.el (lread-tests--unescaped-char-literals):
test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--unescaped-char-literals): Adapt unit tests.
2019-04-19 19:19:35 +02:00
Michael Albinus
0eb47c2537 ; Remove instrumentation in tramp-tests 2019-04-19 14:18:59 +02:00
Michael Albinus
3ff7d7321a Adapt tramp-test32-shell-command
* test/lisp/net/tramp-tests.el (tramp-test32-shell-command):
Check "tput" before running `shell-command-width' test.
2019-04-19 11:30:22 +02:00
Philipp Stephani
f5e3c2cc98 Add a new user option 'ido-big-directories'.
This provides an alternative to 'ido-max-directory-size', for
directories that are statically known to be too big for Ido
completion.

* lisp/ido.el (ido-big-directories): New user option.
(ido-directory-too-big-p): Use it.

* test/lisp/ido-tests.el (ido-directory-too-big-p): New unit test.
2019-04-19 10:31:02 +02:00
Michael Albinus
a99a3542f3 ; Instrument `tramp--test-shell-command-to-string-asynchronously' 2019-04-18 21:47:21 +02:00
Basil L. Contovounesios
a4ad7bed18 Fix off-by-one-link error in image--set-property
* lisp/image.el (image--set-property): Ensure new value is set even
in the unlikely case that the plist is empty.  Fix off-by-one-link
error when deleting a property. (bug#35285)
* test/lisp/image-tests.el: New file.
(image--set-property): New test.
2019-04-18 16:07:55 +01:00
Philipp Stephani
774da19789 Add ERT explainer for 'tramp--test-file-attributes-equal-p'
* test/lisp/net/tramp-tests.el (tramp--test-file-attributes-equal-p):
Use ERT explainer for 'equal' to improve failure messages.
2019-04-17 21:28:21 +02:00
Michael Albinus
2116dfffce Fix tramp-test32-shell-command
* test/lisp/net/tramp-tests.el (tramp-test32-shell-command):
Run only if "tput" exist.
2019-04-17 21:23:41 +02:00
Noam Postavsky
63a190a640 ; Fix files-tests-executable-find on w32 (Bug#35241)
* test/lisp/files-tests.el (files-tests-executable-find): Make the
tmpfile end with one of exec-suffixes, so that it will be executable
on w32.
2019-04-17 10:27:02 -04:00
Michael Albinus
314c2aa7c4 ; Instrument tramp-test32-shell-command for EMBA 2019-04-17 14:19:42 +02:00
Michael Albinus
2c06731dca Fix Bug#35241
* lisp/files.el (executable-find): Quote default-directory.  (Bug#35241)

* test/lisp/files-tests.el (files-tests-executable-find): New test.
2019-04-17 14:04:37 +02:00
Michael Albinus
48a6a3ac02 * test/lisp/files-tests.el: Unify test names
* test/lisp/files-tests.el (files-tests-local-variables)
(files-tests-bug-18141, files-tests-make-temp-file-empty-prefix)
(files-tests-bug-21454)
(files-tests-save-buffers-kill-emacs--confirm-kill-processes)
(files-tests-read-file-in-~)
(files-tests-file-name-non-special--subprocess)
(files-tests-file-name-non-special--buffers)
(files-tests-insert-directory-wildcard-in-dir-p)
(files-tests-make-directory, files-tests-no-file-write-contents)
(files-tests-copy-directory, files-tests-abbreviated-home-dir):
Unify test names.
2019-04-17 11:54:17 +02:00
Michael Albinus
7e07bb2d29 Test `shell-command-width' in Tramp
* test/lisp/net/tramp-tests.el
(tramp--test-shell-command-to-string-asynchronously): Move up.
(tramp-test32-shell-command): Test `shell-command-width'.
2019-04-17 11:42:06 +02:00
Michael Albinus
05d53d8886 Some rearragements for remote tests in filenotify-tests.el
* test/lisp/filenotify-tests.el (file-notify--deftest-remote):
Change argument list, EXPECTED is not needed.
(file-notify-test07-many-events-remote)
(file-notify-test09-watched-file-in-watched-dir-remote):
Adapt declaration accordingly.
2019-04-14 19:53:38 +02:00
Michael Albinus
bfa9e7452c Fix last patch 2019-04-13 11:12:16 +02:00
Michael Albinus
ae21fb3dbc Replace (skip-unless nil) by tag :unstable in test packages
* test/lisp/filenotify-tests.el (file-notify--deftest-remote):
Use tag :unstable if SKIP is non-nil.

* test/lisp/net/tramp-tests.el (tramp-test36-vc-registered):
Use ert-skip instead of (skip-unless nil).

* test/lisp/progmodes/python-tests.el
(python-tests--python-nav-end-of-statement--infloop): Use tag
:unstable instead of (skip-unless nil).
2019-04-13 10:58:17 +02:00
Basil L. Contovounesios
0c4c96d7dc Move proper-list-p tests to fns-tests.el
This follows the move of proper-list-p from lisp/subr.el to
src/fns.c in 2018-07-24T15:58:46-07:00!eggert@cs.ucla.edu.
* test/lisp/subr-tests.el (subr-tests--proper-list-p): Move from
here...
* test/src/fns-tests.el (test-proper-list-p): ...to here.
2019-04-12 14:25:36 +01:00
Stefan Monnier
0cef057b02 * test/lisp/progmodes/python-tests.el: "Fix" failing test
(python-tests--python-nav-end-of-statement--infloop): Disable.
2019-04-10 10:39:50 -04:00
Basil L. Contovounesios
08235af38c Distinguish buttons from widgets (bug#34506)
* lisp/button.el (button-at):
* lisp/wid-edit.el (widget-at): Avoid returning a false positive
when looking for a button and finding a widget, or vice versa.
* test/lisp/button-tests.el:
* test/lisp/wid-edit-tests.el: New files.
2019-04-07 03:56:27 +01:00
Michael Albinus
f2d2227359 Adapt tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp-test30-make-process):
Instrument test.  Adapt check string.
(tramp-test34-explicit-shell-file-name)
(tramp-test43-asynchronous-requests): Skip tests for tramp-adb
with older Emacsen.
2019-04-05 13:27:06 +02:00
Michael Albinus
18c02f7e07 * test/lisp/net/tramp-tests.el (tramp-test43-asynchronous-requests):
Make it fit for tramp-adb.  Apply better check in process filter.
2019-04-04 13:41:53 +02:00
Michael Albinus
8147d3c27c Work on asynchronous processes for tramp-adb.el
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
Simplify.  Remove echoed first line.
(tramp-adb-send-command): Add NEVEROPEN and NOOUTPUT.

* lisp/net/tramp-sh.el (tramp-process-sentinel): Remove.
(tramp-sh-handle-make-process): Simplify.

* lisp/net/tramp.el (tramp-process-sentinel): New defun, taken from
tramp-sh.el.  Delete trailing shell prompt.

* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process): Run also for tramp-adb.
(tramp-test32-shell-command): Remove tramp-adb restrictions.
(tramp-test34-explicit-shell-file-name): Rework.  Remove :unstable tag.
2019-04-03 21:36:40 +02:00
Glenn Morris
ce9490cb31 * test/lisp/progmodes/flymake-tests.el (different-diagnostic-types):
Expect failure on hydra.nixos.
2019-04-03 15:20:50 -04:00
Glenn Morris
39c0795ef2 ; Copyright years and license copyedits 2019-04-02 21:40:56 -07:00
Basil L. Contovounesios
0cd250e958 Fix recently extended delete-indentation behavior
* doc/lispref/text.texi (User-Level Deletion): Document new optional
arguments of delete-indentation.

* lisp/simple.el (delete-indentation): Do not barf if called
interactively when region is inactive. (bug#35021)
Do not skip blank lines. (bug#35036)
Consistently deactivate mark even when no text was changed.
Handle active region spanning a single line.

* test/lisp/simple-tests.el (simple-test--buffer-substrings):
New convenience function.
(simple-test--dummy-buffer, simple-test--transpositions): Use it.
(simple-delete-indentation-no-region)
(simple-delete-indentation-inactive-region): Update commentary.
Call delete-indentation interactively when testing for behavior with
inactive region and region is not explicitly defined.
(simple-delete-indentation-blank-line)
(simple-delete-indentation-boundaries)
(simple-delete-indentation-region)
(simple-delete-indentation-prefix): New tests.
2019-03-31 17:08:21 +01:00
Michael Albinus
273d7b3ee0 Extend comment about scope of tramp-test05-expand-file-name-relative 2019-03-29 17:22:25 +01:00
Mattias Engdegård
eb6bbd9fb1 Use memql instead of memq in pcase
* lisp/emacs-lisp/pcase.el (pcase--u1):
Use memql instead of memq to work with bignums (Bug#34781).
* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-member): Test the above.
2019-03-28 23:57:34 +01:00
Charles A. Roelli
538c66c306 * test/lisp/mail/rmail-tests.el (rmail-autoload): Fix its doc. 2019-03-27 20:48:16 +01:00
Michael Albinus
a3194e7b76 Fix Bug#34943
* lisp/files-x.el (cl-lib): Require when compiling.
(hack-connection-local-variables): Regard connection-local
variables as safe.  (Bug#34943)

* lisp/shell.el (shell): Use `with-connection-local-variables' for
the whole code block.  (Bug#34943)

* lisp/net/tramp-adb.el (tramp-connection-local-safe-shell-file-names):
Do not set values.

* lisp/net/tramp-integration.el
(tramp-connection-local-safe-shell-file-names): Remove.
(shell-file-name, shell-command-switch): Do not add safe-local-variable
property.

* lisp/net/tramp.el (tramp-handle-shell-command): Use proper
buffer name.

* test/lisp/net/tramp-tests.el (tramp-test34-explicit-shell-file-name):
Tag it :unstable.
2019-03-23 09:55:04 +01:00
Stephen Leake
b515edb985 Fix bug in delete-indentation when region is inactive
* test/lisp/simple-tests.el: Add tests for delete-indentation.
(simple-delete-indentation-no-region): Works with no region.
(simple-delete-indentation-inactive-region): Was broken with inactive
region; now fixed.

* lisp/simple.el (delete-indentation): Check (use-region-p) before using BEG.
2019-03-22 16:14:50 -07:00
Eric Abrahamsen
c1b63af445 Change Gnus hash tables into real hash tables
Gnus has used obarrays as makeshift hash tables for groups: group
names are coerced to unibyte and interned in custom obarrays, and
their symbol-value set to whatever value needs to be stored. This
patch replaces those obarrays with actual hash tables.

* lisp/gnus/gnus-util.el (gnus-intern-safe, gnus-create-hash-size):
  Remove functions.
  (gnus-make-hashtable): Change to return a real hash table.
  (gnus-text-property-search): Utility similar to `text-property-any',
  but compares on `equal'. Needed because the 'gnus-group text
  property is now a string.
* lisp/gnus/gnus.el (gnus-gethash, gnus-gethash-safe, gnus-sethash):
  Remove macros.
  (gnus-group-list): New variable holding all group names as an
  ordered list. Used because `gnus-newsrc-hashtb' used to preserve
  `gnus-newsrc-alist' ordering, but now doesn't.
* lisp/gnus/nnmaildir.el (nnmaildir--servers): Change from obarray to
  alist.
  (nnmaildir--up2-1): Remove function.
* lisp/thingatpt.el (thing-at-point-newsgroup-p): This was making use
  of Gnus obarrays, replace with a cond that can handle many different
  possibilities.
* lisp/gnus/gnus-bcklg.el (gnus-backlog-articles): Remove
  gnus-backlog-hashtb, which wasn't doing anything. Just keep a list
  of ident strings in gnus-backlog-articles.
  (gnus-backlog-setup): Delete unnecessary function.
  (gnus-backlog-enter-article, gnus-backlog-remove-oldest-article,
  gnus-backlog-remove-article, gnus-backlog-request-article): Alter
  calls accordingly.
* lisp/gnus/gnus-dup.el (gnus-duplicate-list-max-length): Rename from
  `gnus-duplicate-list-length', for accuracy.
* lisp/gnus/gnus-start.el (gnus-active-to-gnus-format,
  gnus-groups-to-gnus-format, gnus-newsrc-to-gnus-format): Read group
  names as strings.
  (gnus-gnus-to-quick-newsrc-format): Write `gnus-newsrc-alist' using
  the ordering in `gnus-group-list'.
* lisp/gnus/gnus-agent.el:
* lisp/gnus/gnus-async.el:
* lisp/gnus/gnus-cache.el:
* lisp/gnus/gnus-group.el:
* lisp/gnus/gnus-score.el:
* lisp/gnus/gnus-sum.el:
* lisp/gnus/gnus-topic.el:
* lisp/gnus/message.el:
* lisp/gnus/mml.el:
* lisp/gnus/nnagent.el:
* lisp/gnus/nnbabyl.el:
* lisp/gnus/nnvirtual.el:
* lisp/gnus/nnweb.el: In all files, change obarrays to hash-tables,
  and swap `gnus-sethash' for `puthash', `gnus-gethash' for `gethash',
  `mapatoms' for `maphash', etc.
* test/lisp/gnus/gnus-test-headers.el (gnus-headers-make-dependency-table,
  gnus-headers-loop-dependencies): New tests to make sure we're
  building `gnus-newsgroup-dependencies' correctly.
2019-03-22 10:23:30 -07:00
Michael Albinus
3375d08299 Fix Bug#24394, Bug#34172
* lisp/subr.el (process-file-shell-command):
Use `with-connection-local-variables'.  Do not set "/bin/sh" for
remote buffers, trust settings of `shell-file-name'.

* lisp/net/tramp-adb.el (tramp-methods) <adb>:
* lisp/net/tramp-smb.el (tramp-methods) <smb>:
Remove `tramp-remote-shell' and `tramp-remote-shell-args'.

* lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch)
(tramp-maybe-open-connection): Use proper read syntax for function
names.

* lisp/net/tramp.el (tramp-handle-shell-command): Do not use shell
file names from `tramp-methods'.
Respect `async-shell-command-buffer'.  (Bug#24394, Bug#34172)
Use `start-file-process-shell-command' and `process-file-shell-command'.

* test/lisp/net/tramp-tests.el (tramp-test32-shell-command):
Let it run partly for tramp-adb.
2019-03-22 14:38:06 +01:00
Nicolas Petton
287cc58f39
New seq-contains-p predicate (Bug#34852)
* lisp/emacs-lisp/seq.el (seq-contains-p): New predicate function.  It
is a replacement for seq-contains which cannot be used as a predicate
when a sequence contains nil values as it returns the element found.
(seq-contains): Make obsolete.

* test/lisp/emacs-lisp/seq-tests.el (test-seq-contains-p):
(test-seq-intersection-with-nil, test-seq-set-equal-p-with-nil,
test-difference-with-nil): Add regression tests.

* doc/lispref/sequences.texi (Sequence Functions): Document
seq-contains-p.
2019-03-21 21:08:28 +01:00
Stefan Monnier
18fc4ac529 * test/lisp/minibuffer-tests.el (completion-table-subvert-test): New test 2019-03-20 10:52:30 -04:00
Mattias Engdegård
3ed1621d84 Disallow reversed char ranges in `rx'
(any "a-Z0-9") generated "[0-9]", and (any (?9 . ?0)) generated "[9-0]".
Reversed ranges are either mistakes or abuse.  Neither should be allowed.

etc/NEWS: Explain the change.
lisp/emacs-lisp/rx.el (rx): Document.
(rx-check-any-string, rx-check-any): Add error checks for reversed ranges.
test/lisp/emacs-lisp/rx-tests.el (rx-char-any-range-bad): New test.
2019-03-19 20:30:15 +01:00
Paul Eggert
bc2a93d5b7 Fix more regular expression typos
Problem reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-03/msg00548.html
except that I didn’t address the issues involving Hebrew,
or involving comint-prompt-regexp.
* lisp/align.el (align-rules-list, align-exclude-rules-list):
* lisp/auth-source-pass.el (auth-source-pass--parse-secret)
(auth-source-pass--parse-data):
* lisp/cedet/data-debug.el (data-debug-next)
(data-debug-prev, data-debug-expand-or-contract):
* lisp/comint.el (comint-within-quotes):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
* lisp/emulation/viper-ex.el (ex-cmd-complete):
* lisp/gnus/gnus-cite.el (gnus-message-search-citation-line):
* lisp/gnus/nnir.el (nnir-imap-end-of-input):
* lisp/mail/mail-extr.el (mail-extr-all-letters):
* lisp/minibuffer.el (minibuffer-maybe-quote-filename):
* lisp/nxml/rng-nxml.el (rng-complete-tag)
(rng-complete-end-tag, rng-complete-attribute-name):
* lisp/obsolete/vip.el (vip-get-ex-token, vip-get-ex-pat):
* lisp/org/org-pcomplete.el (org-thing-at-point):
* lisp/org/org.el (org-set-tags)
(org-increase-number-at-point)
(org-fill-line-break-nobreak-p):
* lisp/pcomplete.el (pcomplete-parse-comint-arguments):
* lisp/progmodes/ada-mode.el (ada-compile-goto-error):
* lisp/progmodes/cperl-mode.el (cperl-highlight-charclass)
(cperl-find-pods-heres, cperl-not-bad-style-regexp)
(cperl-regext-to-level-start):
* lisp/progmodes/ebnf-yac.el (ebnf-yac-skip-spaces):
* lisp/progmodes/flymake-proc.el (flymake-proc-master-tex-init):
* lisp/progmodes/flymake.el (flymake-diag-region):
* lisp/progmodes/fortran.el (fortran-current-line-indentation):
* lisp/progmodes/idlw-complete-structtag.el:
(idlwave-complete-structure-tag):
* lisp/progmodes/idlwave.el (idlwave-complete-sysvar-or-tag):
* lisp/progmodes/prolog.el (prolog-pred-end)
(prolog-clause-info):
* lisp/progmodes/ruby-mode.el (ruby-forward-sexp)
(ruby-backward-sexp):
* lisp/progmodes/verilog-mode.el (verilog-repair-open-comma):
* lisp/term.el (term-within-quotes):
* lisp/textmodes/bib-mode.el (bib-capitalize-title-stop-words):
* lisp/textmodes/refbib.el (r2b-capitalize-title-stop-words):
* lisp/textmodes/reftex-parse.el (reftex-nth-arg):
* lisp/textmodes/rst.el (rst-svn-rev):
* lisp/url/url-http.el (url-http-parse-response):
* test/lisp/progmodes/f90-tests.el (f90-test-bug3730):
Fix regular expression typos.
2019-03-18 17:02:29 -07:00
Mattias Engdegård
8832cc5f91 Fix some ineffective backslashes in string literals
Deal with lone backslashes that have no effect in string literals,
but indicate that something is amiss.

* lisp/auth-source-pass.el (auth-source-pass-entries):
* lisp/textmodes/artist.el (artist-figlet-get-font-list-windows):
* lisp/org/ob-abc.el (org-babel-expand-body:abc, org-babel-execute:abc):
* lisp/org/ob-forth.el (org-babel-forth-session-execute):
* lisp/vc/vc-git.el (vc-git--program-version):
Add backslash in regexp for correctness.

* lisp/gnus/nnmail.el (nnmail-split-abbrev-alist):
Replace `\||' with `\\|' to follow the obvious regexp intent.

* lisp/org/org-list.el (org-plain-list-ordered-item-terminator):
Add backslash in doc comment so that it appears as intended.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1, c-end-of-decl-1):
* lisp/progmodes/f90.el (f90-font-lock-keywords-2):
* lisp/progmodes/etags.el (etags-tags-completion-table):
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
* test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-1):
Remove superfluous backslashes from regexp.

* test/lisp/emacs-lisp/rx-tests.el (rx-char-any):
Remove superfluous backslash from doc comment.
2019-03-16 11:38:58 -07:00
Glenn Morris
3bd7ba1bdf * test/lisp/progmodes/python-tests.el
(python-syntax-after-python-backspace): Expect failure again.

; since 5feaf90
2019-03-13 17:33:25 -04:00
Michael Albinus
21f54feee8 Do not hardcode "/bin/sh" in compile. Bug#24338, Bug#29723
* doc/emacs/custom.texi (Connection Variables): New node.

* doc/emacs/emacs.texi (Top): Add entry for Connection Variables.

* doc/emacs/misc.texi (Single Shell): Mention default value for
remote buffers.

* doc/lispref/variables.texi (Connection Local Variables):
Describe `with-connection-local-variables' instead of
`with-connection-local-profiles'.

* doc/misc/tramp.texi (Remote processes): Refer to Emacs manual.
Mention default connection-local settings for `shell-file-name'
and `shell-command-switch'.

* etc/NEWS: Mention connection-local variables changes.

* lisp/files-x.el (hack-connection-local-variables):
Push connection-local variables to `file-local-variables-alist'.
(connection-local-criteria-for-default-directory): New defsubst.
(with-connection-local-variables): Rename from
`with-connection-local-profiles'.  Adapt implementation.

* lisp/files.el (hack-local-variables):
Call `hack-connection-local-variables'.

* lisp/shell.el (shell): Use `with-connection-local-variables'.

* lisp/subr.el (start-file-process-shell-command):
* lisp/progmodes/compile.el (compilation-start):
Use `with-connection-local-variables'.  Do not set "/bin/sh" for
remote buffers, trust settings of `shell-file-name'.  (Bug#24338),
(Bug#29723)

* lisp/net/ange-ftp.el (ange-ftp-compress, ange-ftp-uncompress):
Use `shell-command-switch'.

* lisp/net/tramp-adb.el (tramp-adb-connection-local-default-profile):
New defvar.  Add it to connection-local profiles after loading "shell".

* lisp/net/tramp-integration.el (tramp-compat): Require tramp-compat.
(tramp-compat-exec-path): Do not declare anymore.
(tramp-connection-local-safe-shell-file-names): New defvar.
(tramp-connection-local-default-profile): New defconst.  Activate
it after loading "shell".
(shell-file-name, shell-command-switch): Add safe-local-variable
property.

* lisp/net/tramp-sh.el (tramp-display-escape-sequence-regexp):
Add tramp-autoload cookie.

* test/lisp/files-x-tests.el (remote-shell-file-name):
Add safe-local-variable property to remote-* variables.
(tramp-connection-local-default-profile): Declare.
(files-x-test-with-connection-local-variables):
Rename from `files-x-test-with-connection-local-profiles'.  Adapt
implementation.

* test/lisp/net/tramp-tests.el
(tramp-test34-connection-local-variables): New test.
(tramp-test34-explicit-shell-file-name): Run it also for tramp-adb.
Bind connection-local-{profile,criteria}-alist.  Use tramp-adb
specific `shell-file-name'.  Add safe-local-variable property to
`explicit-shell-file-name' and `explicit-sh-args'.
2019-03-09 16:44:24 +01:00
Eli Zaretskii
fddb915d23 Import Unicode 12.0 data files
* admin/unidata/copyright.html:
* admin/unidata/UnicodeData.txt:
* admin/unidata/SpecialCasing.txt:
* admin/unidata/NormalizationTest.txt:
* admin/unidata/Blocks.txt:
* admin/unidata/BidiMirroring.txt:
* admin/unidata/BidiBrackets.txt: New versions from Unicode 12.0.
* admin/unidata/unidata-gen.el (unidata-gen-file):
* admin/unidata/blocks.awk (name2alias): Adapt to changes in
new data files.
* admin/notes/unicode: Update and improve instructions for
importing a new Unicode Standard.

* lisp/international/characters.el (char-width-table): Update
lists of characters according to Unicode 12.0.
* lisp/international/fontset.el (script-representative-chars):
Add characters from new scripts to 'script-representative-chars'.
(otf-script-alist): Update according to data on the MS site.
* lisp/international/mule-cmds.el (ucs-names): Update unused
ranges of codepoints according to Unicode 12.0.

* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--failing-lines-part1)
(ucs-normalize-tests--failing-lines-part2): Update for the new
NormalizationTest.txt file.
* test/manual/BidiCharacterTest.txt: Update with the new
version from Unicode 12.0.
2019-03-09 12:41:48 +02:00