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

3216 Commits

Author SHA1 Message Date
Michael Albinus
ce89cb760f ; Add traces to shadowfile-tests.el 2019-09-26 20:55:49 +02:00
Stefan Kangas
3cf8f9b1ec Remove support for destructive splicing in elisp
* src/lread.c (read1): Don't handle destructive splicing in
backquote expressions (e.g. ",.<identifier>").  (Bug#19790)
(syms_of_lread): Remove Qcomma_dot.
* src/print.c (print_object): Don't check for Qcomma_dot.
* test/src/eval-tests.el
(eval-tests-19790-backquote-comma-dot-substitution): New test.
* etc/NEWS: Announce it.
2019-09-26 18:37:23 +02:00
Mauro Aranda
45524b9702 Don't indent unrelated widgets following widget of type 'other
* lisp/wid-edit.el (widget 'other): Use \n instead of the %n escape in the
:format property of this widget.  If %n is used at the end of the
format string, unrelated widgets get indented.  (Bug#12533)

* test/wid-edit-tests.el (widget-test-indentation-after-%n)
(widget-test-indentation-after-newline)
(widget-test-newline-and-indent-same-widget): New tests.
2019-09-26 17:16:28 +02:00
Michael Albinus
1667bc2fa7 Avoid errors in tramp-tests with a remote ksh shell
* test/lisp/net/tramp-tests.el (tramp--test-ksh-p): New defun.
(tramp-test41-utf8, tramp-test41-utf8-with-stat)
(tramp-test41-utf8-with-perl, tramp-test41-utf8-with-ls):
Skip, when remote shell is ksh.
2019-09-26 09:33:47 +02:00
Mattias Engdegård
07367e5b95 Add rx extension mechanism
Add a built-in set of extension macros: `rx-define', `rx-let' and
`rx-let-eval'.

* lisp/emacs-lisp/rx.el (rx-constituents, rx-to-string): Doc updates.
(rx--builtin-symbols, rx--builtin-names, rx--local-definitions)
(rx--lookup-def, rx--substitute, rx--expand-template)
(rx--make-binding, rx--make-named-binding, rx--extend-local-defs)
(rx-let-eval, rx-let, rx-define): New.
(rx--translate-symbol, rx--translate-form): Use extensions if any.
(rx): Use local definitions.
* test/lisp/emacs-lisp/rx-tests.el (rx-let, rx-define)
(rx-to-string-define, rx-let-define, rx-let-eval): New.
* etc/NEWS (Changes in Specialized Modes and Packages):
* doc/lispref/searching.texi (Rx Notation, Rx Functions, Extending Rx):
Add node about rx extensions.
2019-09-25 14:29:50 -07:00
Mattias Engdegård
2ed71227c6 New rx implementation
* lisp/emacs-lisp/rx.el:
* test/lisp/emacs-lisp/rx-tests.el:
* doc/lispref/searching.texi (Rx Constructs):
Rewrite rx for correctness, clarity, and performance.  The new
implementation retains full compatibility and has more comprehensive
tests.

* lisp/emacs-lisp/re-builder.el (reb-rx-font-lock-keywords):
Adapt to changes in internal variables in rx.el.
2019-09-25 14:29:50 -07:00
Lars Ingebrigtsen
ea5c79f657 Allow controlling when to send cookies when retrieving images in shr
* lisp/net/shr.el (shr--use-cookies-p): New function.
(shr-tag-img): Use it.
(shr-cookie-policy): New variable.
(shr-save-contents): Use cookies.

* doc/misc/eww.texi (Advanced): Document it.
2019-09-24 17:48:41 +02:00
Lars Ingebrigtsen
0faf3496ab Adjust exif-tests.el to new interface 2019-09-23 22:02:58 +02:00
Michael Albinus
a877e2217a ; Enable traces for shadowfile-tests on hydra 2019-09-23 13:08:02 +02:00
Paul Eggert
946a56a10f Update some URLs
This mostly changes http: to https: in URLs.  It also updates
some URLs that have moved, removes some URLs that no longer
work, recommends against using procmail (procmail.org no
longer works), and removes some mentions of the
no-longer-existing Gmane, LPF and VTW.
It doesn't update all URLs, just the ones I had time for.
* GNUmakefile (help):
* admin/admin.el (manual-doctype-string):
* admin/charsets/Makefile.in (${charsetdir}/ALTERNATIVNYJ.map):
* admin/charsets/mapconv:
* lisp/net/soap-client.el (soap-create-envelope):
* lisp/org/org.el (org-doi-server-url):
* lisp/textmodes/bibtex.el (bibtex-generate-url-list):
Prefer https: to http: un URLs.
2019-09-23 00:12:52 -07:00
Stephen Gildea
a33cda168e Expand time-stamp unit tests to cover all formatting options
* time-stamp-tests.el: Expand unit tests to cover all formatting options.
These tests validate time-stamp-pattern formatting that has existed
since at least Emacs 22 (released in 2007).  The tests cover both
documented behavior and behavior implemented to support future migrations.

* time-stamp.el (time-stamp-string): Add a second argument (TIME) to
open a testing seam.  Have the unit tests call this public function.

* time-stamp.el (time-stamp-string, time-stamp-string-preprocess):
Remove the second pass through time-string--format.  (Previously both
functions called it.)  It was used only to handle "%", but this is now
handled by having time-stamp-string-preprocess not double it.
Not doubling the "%" in time-stamp-string-preprocess fixes the padding
of "%2%", which was discovered by the new unit tests to be wrong.
2019-09-22 20:31:59 -07:00
Jackson Ray Hamilton
9aacc443d9
Ignore comments and strings when recognizing JSX
* lisp/progmodes/js.el (js-syntax-propertize): Ignore comments and
strings.
* test/manual/indent/jsx-comment-string.jsx: New test.
2019-09-22 12:55:44 -07:00
Paul Eggert
2f600e97e7 Avoid crashes when casifying noncontiguous regions
This is a followon fix for Bug#37477.
* lisp/simple.el (region-extract-function):
Use setq here, since the var is now defined in C code.
* src/casefiddle.c (casify_pnc_region): New function.
(Fupcase_region, Fdowncase_region, Fcapitalize_region)
(Fupcase_initials_region): Use it.
(Fupcase_initials_region): Add region-noncontiguous-p flag
for consistency with the others.  All uses changed.
(syms_of_casefiddle): Define Qbounds, Vregion_extract_function.
* src/insdel.c (prepare_to_modify_buffer_1):
* src/keyboard.c (command_loop_1):
Use Vregion_extraction_function.
* src/insdel.c (syms_of_insdel): No need to define
Qregion_extract_function.
* test/src/casefiddle-tests.el (casefiddle-oldfunc): New var.
(casefiddle-loopfunc, casefiddle-badfunc): New functions.
(casefiddle-invalid-region-extract-function): New test.
2019-09-22 10:45:14 -07:00
Lars Ingebrigtsen
535b65875e Add an Exif parsing library
* lisp/image/exif.el: New file (bug#23070).

* test/lisp/image/exif-tests.el: Add some basic tests.
2019-09-21 18:13:11 +02:00
Michael Albinus
ffcec7cd4b Simplify tramp-tests.el check for owncloud/nextcloud
* test/lisp/net/tramp-tests.el (tramp-test11-copy-file):
Simplify check for owncloud/nextcloud connections.
2019-09-18 14:12:54 +02:00
Tino Calancha
57ac6523af Add backquote tests
* test/lisp/emacs-lisp/backquote-tests.el: New file (bug#37432).
2019-09-16 22:57:35 +02:00
Michael Albinus
6684db8cea ; Disable traces in shadowfile-tests 2019-09-16 15:00:37 +02:00
Glenn Morris
a625ca5c26 Merge from origin/emacs-26
30c4f35 (origin/emacs-26) query-replace-regexp undo: Update next-repl...
c596be0 Amend the menu caption for page "Display Property" in the Eli...
13b9510 Add description of chinese-sisheng
2019-09-15 16:38:23 -07:00
Michael Albinus
6d3cb263f9 Use also truname of temporary-file-directory in shadowfile-tests.el
* test/lisp/shadowfile-tests.el (top): Use truename of
`temporary-file-directory' and
`shadow-test-remote-temporary-file-directory'.  (Bug#37202)
(shadow-test08-shadow-todo, shadow-test09-shadow-copy-files):
Do not bind `shadow-test-remote-temporary-file-directory'.
2019-09-15 16:52:22 +02:00
Gemini Lasswell
3bd6ef40b5 Create common tests for print.c and cl-print.el
* test/lisp/emacs-lisp/cl-print-tests.el
(cl-print--test, cl-print-tests-1, cl-print-tests-2)
(cl-print-tests-3, cl-print-tests-4, cl-print-tests-5)
(cl-print-tests-strings, cl-print-circle, cl-print-circle-2):
Remove.
* test/src/print-tests.el (print-tests--prin1-to-string): New
alias.
(print-tests--deftest): New macro.
(print-hex-backslash, print-read-roundtrip, print-bignum): Define with
print-tests--deftest and use print-tests--prin1-to-string.
(print-tests--prints-with-charset-p): Use
print-tests--prin1-to-string.
(print-tests--print-charset-text-property-nil)
(print-tests--print-charset-text-property-t)
(print-tests--print-charset-text-property-default): Define with
print-tests--deftest.
(print-tests-print-gensym)
(print-tests-continuous-numbering, print-tests-1, print-tests-2)
(print-tests-3, print-tests-4, print-tests-5)
(print-tests-strings, print-circle, print-circle-2): New tests.
(print--test, print-tests-struct): New cl-defstructs.
2019-09-13 13:43:07 -07:00
Gemini Lasswell
2093395dbf Improve print output options commands in backtrace-mode (bug#36566)
* lisp/emacs-lisp/backtrace.el (backtrace-view): Mention
:print-gensym in docstring.
(backtrace-mode-map): Add keyboard binding for
backtrace-toggle-print-gensym.  Add menu entries for
backtrace-toggle-print-circle and backtrace-toggle-print-gensym.
(backtrace--with-output-variables): Bind print-gensym with value
of :print-gensym found in view plist.
(backtrace-toggle-print-circle): Remove description of
implementation details from docstring.
(backtrace-toggle-print-gensym): New command.
(backtrace--toggle-feature): Add echo area message describing result
of command.

* test/lisp/emacs-lisp/backtrace-tests.el
(backtrace-tests--print-circle): New test.

* doc/lispref/debugging.texi (Backtraces): Document keyboard
binding for backtrace-toggle-print-gensym.
2019-09-13 13:43:07 -07:00
Michael Albinus
8806c196ab Fix problems in tramp-test33-environment-variables
* test/lisp/net/tramp-tests.el (tramp-test33-environment-variables):
Use ${parameter:-word} construct.  Remove PS1 entry from
"printenv" output.
(tramp--test-check-files): Use "printenv".
2019-09-13 12:08:34 +02:00
Noam Postavsky
cbb8a8ad97 Fix fill-paragraph in python docstrings (Bug#36056)
* lisp/progmodes/python.el (python-do-auto-fill): New function.
(python-mode): Set it as normal-auto-fill-function, and don't set
fill-indent-according-to-mode.  Having the latter set during
fill-paragraph gives wrongs result, because python-indent-line doesn't
remove indentation added by filling.
* test/lisp/progmodes/python-tests.el (python-fill-docstring): New
test.
2019-09-12 20:25:30 -04:00
Ulf Jasper
74e9799bd8 Handle missing start-time when importing ical event (Bug#33277)
* lisp/calendar/icalendar.el (icalendar--convert-ical-to-diary): Set
start time only if it is explicitly given in ical.  Do not use
start-time as default for end-time (Bug#33277).

* test/lisp/calendar/icalendar-tests.el (icalendar-import-bug-33277):
New.  Test fix for Bug#33277.
2019-09-09 18:35:02 +02:00
Tino Calancha
30c4f35a6f query-replace-regexp undo: Update next-replacement after undo
* lisp/replace.el (perform-replace):
Rename the local binding to not shadow next-replacement.
Update next-replacement after undo (Bug#37287).

* test/lisp/replace-tests.el (query-replace-undo-bug37287): Add test.
(query-replace-undo-bug37073): Tweak this test.
2019-09-09 08:21:18 +02:00
Michael Albinus
f8143323c7 Fix Bug#37202
* test/lisp/shadowfile-tests.el (shadow-test08-shadow-todo)
(shadow-test09-shadow-copy-files): Use truename of
`shadow-test-remote-temporary-file-directory'.  (Bug#37202)
2019-09-08 10:13:13 +02:00
Michael Albinus
01a04880ca Add traces in shadowfile
* lisp/shadowfile.el (shadow-add-to-todo)
(shadow-remove-from-todo, shadow-save-todo-file):
* test/lisp/shadowfile-tests.el (shadow-test08-shadow-todo):
Add traces.
2019-09-07 12:31:31 +02:00
Michael Albinus
ed80d6d88c Further work on Bug#37202
* test/lisp/shadowfile-tests.el (shadow-debug): Set to t.
(shadow--tests-cleanup): Simplify.
(shadow-test*): Call `shadow-initialize'.
(shadow-test08-shadow-todo, shadow-test09-shadow-copy-files):
In cleanup, kill buffers used for test.
(top): Do not initialize.
2019-09-04 14:13:13 +02:00
Michael Albinus
ea5d591f29 Fix Bug#37202
* lisp/shadowfile.el (shadow-debug): New defvar.
(shadow-read-files): Suppress error if there's no TODO file.

* test/lisp/shadowfile-tests.el (shadow-debug): Set to nil.
(shadow--tests-cleanup): New defun.  Apply to all tests.  (Bug#37202)
(shadow-test06-literal-groups): Cleanup temp buffer.
(shadow-test08-shadow-todo): Add debug messages.
(top): Cleanup initially.
2019-09-03 13:55:42 +02:00
Noam Postavsky
7e527af72c Fix non-deterministic process test
* test/src/process-tests.el (set-process-filter-t): Don't assume
subprocess output will come in a single chunk, keep waiting for more
data until next "prompt" is read from subprocess.

(cherry picked from commit aa49aa8840)
2019-09-01 14:40:00 -04:00
Glenn Morris
2de46be662 * test/lisp/net/tramp-tests.el (tramp-test21-file-links): More cleanup. 2019-08-31 10:30:14 -07:00
Michael Albinus
d09a1d66c6 Extend tramp--test-check-files (Bug#37228)
* test/lisp/net/tramp-tests.el (tramp--test-check-files): Test also
`directory-files-and-attributes'.  (Bug#37228)
2019-08-30 13:54:42 +02:00
Michael Albinus
7803e65ffc Clarify meaning of <filename> in test/README 2019-08-28 20:39:33 +02:00
Michael Albinus
ba1f7797fb Deactivate part of tramp--test-check-files on macOS (Bug#36940)
* test/lisp/net/tramp-tests.el (tramp--test-check-files): Do not
search for environment variables on macOS.  (Bug#36940)
2019-08-27 18:53:26 +02:00
Michael Albinus
693e9be587 * test/Makefile.in (test_template): Declare target FOO.log. 2019-08-27 12:58:38 +02:00
Michael Albinus
f87ace2aed ; Continued attempt to fix Bug#36940
* test/lisp/net/tramp-tests.el (tramp--test-file-attributes-equal-p):
Handle link number.
(tramp--test-check-files): Encode search string on macOS.  (Bug#36940)
2019-08-26 16:14:16 +02:00
Paul Eggert
575179f74d Make (mod 1.0 0) consistent with (/ 1.0 0)
* src/data.c (Fmod): Do not signal an error for (mod 1.0 0), for
the same reason (/ 1.0 0) does not signal an error.
* test/src/data-tests.el (data-tests-mod-0): New test.
2019-08-24 15:55:08 -07:00
Noam Postavsky
aa49aa8840 Fix non-deterministic process test
* test/src/process-tests.el (set-process-filter-t): Don't assume
subprocess output will come in a single chunk, keep waiting for more
data until next "prompt" is read from subprocess.
2019-08-24 12:16:26 -04:00
Robert Pluim
649fb17443 Fix DNS tests
* test/src/process-tests.el: (lookup-family-specification,
lookup-unicode-domains, unibyte-domain-name, lookup-google,
non-existent-lookup-failure): Skip on Hydra, which doesn't have DNS.
Fix buggy test condition.  (Bug#37165)
2019-08-24 14:57:58 +02:00
Michael Albinus
42f8fa8070 Fix some problems of Bug#36940
* test/lisp/net/tramp-tests.el (tramp-test22-file-times): Do not
compare time value lists by `equal'.  (Bug#36940).
(tramp-test30-make-process): Adapt "kill" message to match on macOS.
2019-08-24 10:10:05 +02:00
Lars Ingebrigtsen
53cb3d3e0d Merge remote-tracking branch 'origin/netsec' 2019-08-23 04:49:52 +02:00
Paul Eggert
951ea375d5 Don’t hard-loop on cycles in ‘read’ etc.
Problem for ‘read’ reported by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2019-08/msg00316.html
* src/fns.c (Frequire): Protect against circular current-load-list.
* src/lread.c (Fget_load_suffixes):
Protect against circular load-suffixes or load-file-rep-suffixes.
(Fload): Protect against circular loads-in-progress.
(openp): Protect against circular PATH and SUFFIXES.
(build_load_history): Protect against circular load-history or
current-load-list.
(readevalloop_eager_expand_eval): Protect against circular SUBFORMS.
(read1): Protect against circular data.
* test/src/lread-tests.el (lread-circular-hash): New test.
2019-08-21 17:21:06 -07:00
Michael Albinus
0f801d4a5e ; Fix typo introduced by last autorevert-tests patch 2019-08-21 11:03:34 +02:00
Michael Albinus
c2abe6abba ; Add traces to auto-revert-test02-auto-revert-deleted-file 2019-08-21 09:19:28 +02:00
Paul Eggert
396ed88a50 Avoid some excess precision in time arithmetic
* doc/misc/emacs-mime.texi (time-date):
Adjust example to match new behavior.
* etc/NEWS: Mention this.
* lisp/calendar/time-date.el (decoded-time-add)
(decoded-time--alter-second):
Don’t lose underestimate precision of seconds component.
* src/bignum.c (mpz): Grow by 1.
* src/timefns.c (trillion_factor): New function.
(timeform_sub_ps_p): Remove.
(time_arith): Avoid unnecessarily-large hz, by reducing the hz
to a value no worse than the worse hz of the two arguments.
The result is always exact unless an error is signaled.
* test/src/timefns-tests.el (timefns-tests--decode-time):
New function.
(format-time-string-with-zone): Test (decode-time LOOK ZONE t)
resolution as well as its numeric value.
2019-08-20 17:36:46 -07:00
Paul Eggert
5a95521282 Support larger TIMEs in (time-convert TIME t)
Also, improve the doc to match current behavior.
* doc/lispref/os.texi (Time Conversion): Document that
time-convert signals an error for infinite or NaN args,
and that (time-convert TIME t) is exact otherwise.
Mention float-time as an alternative to time-convert.
(Time Calculations): Document that time-add and time-subtract
are exact and do not decrease HZ below the minimum of their args.
* src/timefns.c (decode_float_time): Don’t signal an error for
floating-point arguments whose base-FLT_RADIX exponent is not less
than DBL_MANT_DIG.  Instead, convert them to (TICKS . 1) values.
Use two (instead of three) integer exponent comparisons in the
typical case.
* test/src/timefns-tests.el (time-arith-tests):
Add more floating-point tests, including some tests
that the old code fails.
2019-08-20 15:45:59 -07:00
Michael Albinus
fde614f4cc Another attempt to fix bug#32645
* test/lisp/autorevert-tests.el ()
(auto-revert-test02-auto-revert-deleted-file):
* test/lisp/filenotify-tests.el (file-notify-test04-autorevert):
Check `file-notify-valid-p', not that the descriptor is nil.
2019-08-20 21:32:34 +02:00
Glenn Morris
af103ef3c9 Merge from origin/emacs-26
615cff4 (origin/emacs-26) Fix process filter documentation (Bug#13400)
beb1d22 Fix query-replace-regexp undo feature

# Conflicts:
#	test/lisp/replace-tests.el
2019-08-20 09:04:53 -07:00
Glenn Morris
8f68449c94 Merge from origin/emacs-26
0b810eb Fix a typo in char-width-table
3f00db7 Minor update in admin/notes/unicode
bcd0115 Fix lisp indent infloop on unfinished strings (Bug#37045)
5f992d1 Improve commentary in composite.el
3a04be2 ; Improve commentary in xdisp.c
15de1d1 Fix markup in dired-x.texi
bda7fc7 ; Fix typo in a doc string of speedbar.el
6f57ef9 * src/callproc.c (Fcall_process): Doc fix.

# Conflicts:
#	doc/misc/dired-x.texi
#	lisp/international/characters.el
#	src/callproc.c
2019-08-20 09:01:55 -07:00
Paul Eggert
2197ea89bf Fix time-add/time-sub validity checking
* src/timefns.c (time_arith): Check the first arg for
validity even if the second arg is not finite.
* test/src/timefns-tests.el (time-arith-tests): Test this.
2019-08-19 18:05:15 -07:00
Tino Calancha
beb1d22260 Fix query-replace-regexp undo feature
Ensure that non-regexp strings used with `looking-at' are quoted.
* lisp/replace.el (perform-replace): Quote regexp (Bug#37073).
* test/lisp/replace-tests.el (replace-tests-perform-replace-regexp-flag):
New variable.
(replace-tests-with-undo): Use it.
(query-replace-undo-bug37073): Add tests.
2019-08-19 17:32:09 +02:00
Noam Postavsky
f9464020d4 Handle more subprocess chunking in M-x man (Bug#36927)
* lisp/man.el (Man-bgproc-filter): Make sure not to chop man sections
by narrowing.
(Man-highlight-references0): Revert previous fix, as it's no longer
needed.
* test/lisp/man-tests.el (man-tests-filter-strings): New function.
(man-bgproc-filter-buttonize-includes): New test.
2019-08-18 18:19:21 -04:00
Eli Zaretskii
190565b239 Support the new Japanese era name
* admin/unidata/NormalizationTest.txt:
* admin/unidata/UnicodeData.txt: Add U+32FF SQUARE ERA NAME REIWA.
Do not merge to master.

* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--failing-lines-part1)
(ucs-normalize-tests--failing-lines-part2): Update.  Do not
merge to master.

* etc/NEWS: Mention the change.
2019-08-18 19:36:31 +03:00
Paul Eggert
643df79279 Port test harness to Solaris 10
* test/Makefile.in (ELFILES): Port to Solaris 10, where
‘find’ does not support ‘-path’.
2019-08-17 09:16:59 -07:00
Noam Postavsky
bcd0115e4d Fix lisp indent infloop on unfinished strings (Bug#37045)
* lisp/emacs-lisp/lisp-mode.el (lisp-indent-calc-next): Stop trying to
skip over strings if we've hit the end of buffer.
* test/lisp/emacs-lisp/lisp-mode-tests.el
(lisp-indent-unfinished-string): New test.
2019-08-17 09:42:34 -04:00
Paul Eggert
37257d6aca More-compatible subsecond calendrical timestamps
Instead of appending a subseconds member to the result of
‘decode-time’, this keeps the format unchanged unless you give
a new optional argument to ‘decode-time’.  Also, the augmented
format now puts the subsecond info in the SECONDS element, so
the total number of elements is unchanged; this is more
compatible with code that expects the traditional 9 elements,
such as ‘(pcase decoded-time (`(,SEC ,MIN ,HOUR ,DAY ,MON
,YEAR ,DOW ,DST ,ZONE) ...) ...)’.
* doc/lispref/os.texi, doc/misc/emacs-mime.texi, etc/NEWS:
* lisp/net/soap-client.el (soap-decode-date-time):
* lisp/simple.el (decoded-time):
Document the new behavior.
* lisp/calendar/icalendar.el (icalendar--decode-isodatetime):
* lisp/calendar/iso8601.el (iso8601-parse)
(iso8601-parse-time, iso8601-parse-duration)
(iso8601--decoded-time):
* lisp/calendar/parse-time.el (parse-time-string):
* lisp/calendar/time-date.el (decoded-time-add)
(decoded-time--alter-second):
* lisp/org/org.el (org-parse-time-string):
* lisp/simple.el (decoded-time):
* src/timefns.c (Fdecode_time, Fencode_time):
* test/lisp/calendar/icalendar-tests.el:
(icalendar--decode-isodatetime):
* test/lisp/calendar/iso8601-tests.el (test-iso8601-date-years)
(test-iso8601-date-dates, test-iso8601-date-obsolete)
(test-iso8601-date-weeks, test-iso8601-date-ordinals)
(test-iso8601-time, test-iso8601-combined)
(test-iso8601-duration, test-iso8601-intervals)
(standard-test-dates, standard-test-time-of-day-fractions)
(standard-test-time-of-day-beginning-of-day)
(standard-test-time-of-day-utc)
(standard-test-time-of-day-zone)
(standard-test-date-and-time-of-day, standard-test-interval):
* test/lisp/calendar/parse-time-tests.el (parse-time-tests):
* test/src/timefns-tests.el (format-time-string-with-zone)
(encode-time-dst-numeric-zone):
Revert recent changes that added a SUBSECS member to
calendrical timestamps, since that component is no longer
present (the info, if any, is now in the SECONDS member).
* lisp/calendar/time-date.el (decoded-time-add)
(decoded-time--alter-second):
Support fractional seconds in the new form.  Simplify.
* src/timefns.c (Fdecode_time): Support new arg FORM.
(Fencode_time): Support subsecond resolution.
* test/src/timefns-tests.el (format-time-string-with-zone)
(decode-then-encode-time): Test subsecond calendrical timestamps.
2019-08-16 23:25:07 -07:00
Paul Eggert
f6dd46cba8 Subtracting “now” from “now” should yield zero
* src/timefns.c (time_arith): Arrange for (time-subtract nil
nil) to yield 0, to be consistent with (time-equal-p nil nil).
* test/lisp/calendar/time-date-tests.el (test-time-since): New test.
2019-08-16 18:12:24 -07:00
Paul Eggert
f9fd12a30b Fix time-add rounding bug
Without this fix, time arithmetic yielded results that were not
mathematically accurate, even though the exact results were
representable; for example, (time-add 0 1e-13) yielded a timestamp
equal to 0 instead of to 1e-13.
* lisp/timezone.el (timezone-time-from-absolute):
Let time-add do its thing rather than using floating point
internally, which has rounding errors.  We now have bignums and so
don’t need floating point to avoid overflow issues.
* src/timefns.c (timeform_sub_ps_p): New function.
(time_arith): If either argument is a float, represent the
result exactly instead of discarding sub-ps info.
* test/lisp/timezone-tests.el (timezone-tests-time-from-absolute):
Don’t assume (HI LO US PS) timestamp format.
* test/src/emacs-module-tests.el (mod-test-add-nanosecond/valid):
Don’t assume that time-add discards sub-ns info.
* test/src/timefns-tests.el (time-rounding-tests):
Add regression test to detect time-add rounding bug.
2019-08-16 16:27:27 -07:00
Lars Ingebrigtsen
ab8a96977f Reimplement the `fill-flowed' function to respect space stuffing
* lisp/mail/flow-fill.el (fill-flowed): Reimplement the function
to respect space-stuffing (bug#17190).

* test/lisp/mail/flow-fill-tests.el
(fill-flow-tests-fill-flowed-stuffed): New test.
(fill-flow-tests-fill-flowed-decode): Rename the test so that it
actually runs.
2019-08-15 18:00:16 -07:00
Paul Eggert
af82a6248c Fix rounding errors with float timestamps
When converting from float to (TICKS . HZ) form, do the
conversion exactly.  When converting from (TICKS . HZ) form to
float, round to even precisely.  This way, successfully
converting a float to (TICKS . HZ) and back yields a value
numerically equal to the original.
* src/timefns.c (flt_radix_power_size): New constant.
(flt_radix_power): New static var.
(decode_float_time): Convert the exact numeric value rather
than guessing TIMESPEC_HZ resolution.
(s_ns_to_double): Remove; no longer needed.
(frac_to_double): New function.
(decode_ticks_hz): It is now the caller’s responsibility to
pass a valid TICKS and HZ.  All callers changed.
Use frac_to_double to round (TICKS . HZ) precisely.
(decode_time_components): When decoding nil, use
decode_ticks_hz since it rounds precisely.
(syms_of_timefns): Initialize flt_radix_power.
* test/src/timefns-tests.el (float-time-precision): New test.
2019-08-15 10:41:40 -07:00
Michael Albinus
f6ae51c71d Give auto-revert-test02-auto-revert-deleted-file a chance on hydra
* test/lisp/autorevert-tests.el
(auto-revert-test02-auto-revert-deleted-file): Don't skip on hydra.
2019-08-15 16:40:53 +02:00
Paul Eggert
311fcab8f8 Port mod-test-nanoseconds to 32-bit Emacs
* test/src/emacs-module-tests.el (mod-test-nanoseconds):
Don’t assume -1000000000 is a fixnum.
2019-08-15 02:06:34 -07:00
Óscar Fuentes
dbae38efc2 * lisp/password-cache.el: adapt test to change in password-in-cache-p 2019-08-12 16:22:34 +02:00
Michael Albinus
95552e08db Retrieve start time from remote machine, use compat attrib functions
* lisp/net/tramp-compat.el (tramp-compat-file-attribute-access-time)
(tramp-compat-file-attribute-status-change-time): New defaliases.

* test/lisp/net/tramp-tests.el (tramp--test-start-time): New defvar.
(tramp--test-file-attributes-equal-p)
(tramp-test19-directory-files-and-attributes): Use it.
(tramp-test18-file-attributes)
(tramp--test-file-attributes-equal-p, tramp-test20-file-modes)
(tramp-test22-file-times, tramp--test-check-files):
Use `tramp-compat-file-attribute-*' functions.
2019-08-11 12:06:57 +02:00
Michael Albinus
2c5dd68018 Use a time offset when comparing times of local and remote machines
* test/lisp/net/tramp-tests.el (tramp--test-file-attributes-equal-p):
Use a time offset in order to compensate different times on local
and remote machines.
2019-08-10 11:34:13 +02:00
Michael Albinus
78ddf6ba96 Improve time arithmetic in tramp--test-file-attributes-equal-p
* test/lisp/net/tramp-tests.el (tramp--test-file-attributes-equal-p):
Improve time arithmetic.
2019-08-08 15:42:45 +02:00
Stefan Kangas
2c0f6c3540 Suppress interactive-only warnings in undo-tests.el (Bug#36565)
* test/src/undo-tests.el (undo-test-region-deletion)
(undo-test-region-example, undo-test-marker-adjustment-nominal)
(undo-test-region-t-marker, undo-test-marker-adjustment-moved)
(undo-test-region-mark-adjustment): Suppress interactive-only warnings
by using funcall-interactively.
2019-08-08 08:26:31 -04:00
Glenn Morris
d5622eb6ff Tests need to be moved when source files are
* test/lisp/obsolete/cl-tests.el: Move from test/lisp/emacs-lisp.
2019-08-07 09:24:15 -07:00
Michael Albinus
2a82b55426 ; Still working on tramp--test-file-attributes-equal-p 2019-08-07 16:36:00 +02:00
Michael Albinus
2b6932b440 ; Instrument tramp--test-file-attributes-equal-p 2019-08-07 14:59:19 +02:00
Michael Albinus
25baa7d20c Continue to work on Bug#36940
* test/lisp/net/tramp-tests.el (tramp--test-file-attributes-equal-p):
Make the check more precise.  (Bug#36940)
2019-08-07 14:12:14 +02:00
Robert Pluim
bc1cf28da5 Change nsm-should-check to look at local subnets
* lisp/net/nsm.el (nsm-network-same-subnet): New function.  Checks
if an ip address is in the same subnet as another one.
(nsm-should-check): Use nsm-network-same-subnet to see if we're
connecting to a local subnet machine.  Remove checks for RFC1918 addresses.

* test/lisp/net/nsm-tests.el: New file.  Test nsm-should-check functionality.
2019-08-07 14:07:07 +02:00
Michael Albinus
998f3612f7 Fix Bug#36940
* test/lisp/net/tramp-tests.el (tramp--test-file-attributes-equal-p):
Make the check more precise.  (Bug#36940)
(tramp-test19-directory-files-and-attributes): Move some checks to
`tramp--test-file-attributes-equal-p'.
2019-08-06 21:47:57 +02:00
Mattias Engdegård
4ce9c6d0b5 Fix various Calc date conversions (bug#36822)
* lisp/calc/calc-forms.el (math-absolute-from-gregorian-dt):
Rewrite in a way that I understand, and that actually seems to work.
(math-absolute-from-julian-dt): Use Julian, not Gregorian, leap year
rules for counting days within a year.
(math-julian-date-beginning, math-julian-date-beginning-int):
Change constants to be consistent with their doc strings and the code:
use Rata Die epoch at Dec 31, 1 BC Gregorian proleptic, not Julian.
* doc/misc/calc.texi (Date Forms): Correct difference between Julian
Day and Rata Die.
* test/lisp/calc/calc-tests.el (calc-test-calendar): New test.
2019-08-06 13:59:28 +02:00
Mattias Engdegård
c676444a43 Add conditional operator xor to subr.el
Suggested by Oleh Krehel and implemented by Basil Contovounesios in
the following thread:
https://lists.gnu.org/archive/html/emacs-devel/2019-07/msg00547.html

* lisp/array.el (xor): Move unused function from here...
* lisp/subr.el: ...to here, and improve.
* lisp/gnus/spam.el (spam-xor):
* lisp/play/5x5.el (5x5-xor):
* lisp/proced.el (proced-xor):
* lisp/progmodes/idlwave.el (idlwave-xor):
* lisp/vc/diff-mode.el (diff-xor): Define as obsolete aliases of,
and replace all uses with, xor.
* lisp/jsonrpc.el: Remove unused dependency on array.el.
* lisp/org/org.el (org-xor): Move from here...
* lisp/org/org-compat.el (org-xor): ...to here, as a compatibility
shim for xor.
* lisp/progmodes/idlw-shell.el (idlwave-shell-enable-all-bp):
* lisp/simple.el (exchange-point-and-mark):
* lisp/windmove.el (windmove-display-in-direction): Use xor.
* lisp/strokes.el (strokes-xor): Remove commented-out xor
implementation.

* doc/lispref/control.texi (Control Structures): Extend menu entry
for new combining condition.
(Combining Conditions):
* etc/NEWS (Lisp Changes): Document xor.

* test/lisp/subr-tests.el (subr-test-xor): New test.
2019-08-06 13:38:47 +02:00
Paul Eggert
b06917a491 decode-time now returns subsec too
The list that decode-time returns now contains an extra
trailing component that counts the subseconds part of the
original timestamp (Bug#36549).
This builds on a suggestion by Lars Ingebrigtsen in:
https://lists.gnu.org/r/emacs-devel/2019-07/msg00734.html
* doc/lispref/os.texi (Time Conversion):
* doc/misc/emacs-mime.texi (time-date):
* etc/NEWS: Document this.
* lisp/calendar/icalendar.el (icalendar--decode-isodatetime):
* lisp/calendar/iso8601.el (iso8601-parse)
(iso8601-parse-time, iso8601-parse-duration)
(iso8601--decoded-time):
* lisp/calendar/parse-time.el (parse-time-string):
* lisp/calendar/time-date.el (make-decoded-time)
(decoded-time-set-defaults):
* lisp/org/org.el (org-fix-decoded-time)
(org-parse-time-string):
* src/timefns.c (Fdecode_time):
Generate subsec member for decoded time.
* lisp/calendar/time-date.el (decoded-time-add)
Add the decoded subsec too.
* lisp/simple.el (decoded-time): New subsec member.
* src/data.c (Frem): Simplify zero-check to match that of new Fmod.
(integer_mod): New function, with most of the guts of the old Fmod.
Remove redundant zero-check.
(Fmod): Use it.
* src/timefns.c (Fencode_time): Handle new subsec member
or (with the obsolescent calling convention) subsec arg.
It defaults to 0.
* test/lisp/calendar/icalendar-tests.el:
(icalendar--decode-isodatetime):
* test/lisp/calendar/iso8601-tests.el (test-iso8601-date-years)
(test-iso8601-date-dates, test-iso8601-date-obsolete)
(test-iso8601-date-weeks, test-iso8601-date-ordinals)
(test-iso8601-time, test-iso8601-combined)
(test-iso8601-duration, test-iso8601-intervals)
(standard-test-dates, standard-test-time-of-day-fractions)
(standard-test-time-of-day-beginning-of-day)
(standard-test-time-of-day-utc)
(standard-test-time-of-day-zone)
(standard-test-date-and-time-of-day, standard-test-interval):
* test/lisp/calendar/parse-time-tests.el (parse-time-tests):
* test/src/timefns-tests.el (format-time-string-with-zone)
(encode-time-dst-numeric-zone):
Adjust to match new behavior.
2019-08-05 18:37:29 -07:00
Paul Eggert
89c63b3522 New function time-convert
This replaces the awkward reuse of encode-time to both convert
calendrical timestamps to Lisp timestamps, and to convert Lisp
timestamps to other forms.  Now, encode-time does just the
former and the new function does just the latter.
The new function builds on a suggestion by Lars Ingebrigtsen in:
https://lists.gnu.org/r/emacs-devel/2019-07/msg00801.html
and refined by Stefan Monnier in:
https://lists.gnu.org/r/emacs-devel/2019-07/msg00803.html
* doc/lispref/os.texi (Time of Day, Time Conversion):
* doc/misc/emacs-mime.texi (time-date):
* etc/NEWS: Update documentation.
* lisp/calendar/cal-dst.el (calendar-next-time-zone-transition):
* lisp/calendar/time-date.el (seconds-to-time, days-to-time):
* lisp/calendar/timeclock.el (timeclock-seconds-to-time):
* lisp/cedet/ede/detect.el (ede-detect-qtest):
* lisp/completion.el (cmpl-hours-since-origin):
* lisp/ecomplete.el (ecomplete-add-item):
* lisp/emacs-lisp/cl-extra.el (cl--random-time):
* lisp/emacs-lisp/timer.el (timer--time-setter)
(timer-next-integral-multiple-of-time):
* lisp/find-lisp.el (find-lisp-format-time):
* lisp/gnus/gnus-diary.el (gnus-user-format-function-d):
* lisp/gnus/gnus-group.el (gnus-group-set-timestamp):
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-show-org-agenda):
* lisp/gnus/nnrss.el (nnrss-normalize-date):
* lisp/gnus/nnspool.el (nnspool-request-newgroups):
* lisp/net/ntlm.el (ntlm-compute-timestamp):
* lisp/net/pop3.el (pop3-uidl-dele):
* lisp/obsolete/vc-arch.el (vc-arch-add-tagline):
* lisp/org/org-clock.el (org-clock-get-clocked-time)
(org-clock-resolve, org-resolve-clocks, org-clock-in)
(org-clock-out, org-clock-sum):
* lisp/org/org-id.el (org-id-uuid, org-id-time-to-b36):
* lisp/org/ox-publish.el (org-publish-cache-ctime-of-src):
* lisp/proced.el (proced-format-time):
* lisp/progmodes/cc-cmds.el (c-progress-init)
(c-progress-update):
* lisp/progmodes/cperl-mode.el (cperl-time-fontification):
* lisp/progmodes/flymake.el (flymake--schedule-timer-maybe):
* lisp/progmodes/vhdl-mode.el (vhdl-update-progress-info)
(vhdl-fix-case-region-1):
* lisp/tar-mode.el (tar-octal-time):
* lisp/time.el (emacs-uptime):
* lisp/url/url-auth.el (url-digest-auth-make-cnonce):
* lisp/url/url-util.el (url-lazy-message):
* lisp/vc/vc-cvs.el (vc-cvs-parse-entry):
* lisp/vc/vc-hg.el (vc-hg-state-fast):
* lisp/xt-mouse.el (xterm-mouse-event):
* test/lisp/emacs-lisp/timer-tests.el:
(timer-next-integral-multiple-of-time-2):
Use time-convert, not encode-time.
* lisp/calendar/icalendar.el (icalendar--decode-isodatetime):
Don’t use now-removed FORM argument for encode-time.
It wasn’t crucial anyway.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Add time-convert.
* lisp/emacs-lisp/elint.el (elint-unknown-builtin-args):
Update encode-time signature to match current arg set.
* lisp/emacs-lisp/timer.el (timer-next-integral-multiple-of-time):
Use timer-convert with t rather than doing it by hand.
* src/timefns.c (time_hz_ticks, time_form_stamp, lisp_time_form_stamp):
Remove; no longer needed.
(decode_lisp_time): Rturn the form instead of having a *PFORM arg.
All uses changed.
(time_arith): Just return TICKS if HZ is 1.
(Fencode_time): Remove argument FORM.  All callers changed.
Do not attempt to encode time values; just encode
decoded (calendrical) times.
Unless CURRENT_TIME_LIST, just return VALUE since HZ is 1.
(Ftime_convert): New function, which does the time value
conversion that bleeding-edge encode-time formerly did.
Return TIME if it is easy to see that it is already
of the correct form.
(Fcurrent_time): Mention in doc that the form is planned to change.
* test/src/timefns-tests.el (decode-then-encode-time):
Don’t use (encode-time nil).
2019-08-05 18:37:29 -07:00
Michael Albinus
6c1d0d53b3 Improve Tramp's caching
* lisp/net/tramp.el (tramp-handle-add-name-to-file)
(tramp-handle-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-make-directory)
(tramp-adb-handle-delete-directory)
(tramp-adb-handle-delete-file, tramp-adb-handle-write-region)
(tramp-adb-handle-set-file-modes)
(tramp-adb-handle-set-file-times, tramp-adb-handle-copy-file)
(tramp-adb-handle-rename-file):
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file)
(tramp-gvfs-handle-delete-directory)
(tramp-gvfs-handle-delete-file)
(tramp-gvfs-handle-make-directory)
(tramp-gvfs-handle-set-file-modes)
(tramp-gvfs-handle-set-file-times, tramp-gvfs-set-file-uid-gid):
* lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file)
(tramp-rclone-handle-delete-directory)
(tramp-rclone-handle-delete-file):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
(tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times)
(tramp-sh-handle-add-name-to-file)
(tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file)
(tramp-sh-handle-delete-directory, tramp-sh-handle-delete-file)
(tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file)
(tramp-smb-handle-copy-directory, tramp-smb-handle-copy-file)
(tramp-smb-handle-delete-directory)
(tramp-smb-handle-delete-file)
(tramp-smb-handle-make-directory-internal)
(tramp-smb-handle-make-symbolic-link)
(tramp-smb-handle-rename-file, tramp-smb-handle-write-region):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-add-name-to-file)
(tramp-sudoedit-do-copy-or-rename-file)
(tramp-sudoedit-handle-delete-directory)
(tramp-sudoedit-handle-delete-file)
(tramp-sudoedit-handle-set-file-modes)
(tramp-sudoedit-handle-set-file-times)
(tramp-sudoedit-handle-make-symbolic-link): Do not flush all file
properties of upper directory.

* lisp/net/tramp-cache.el (tramp-flush-file-upper-properties):
New defun.
(tramp-flush-file-properties, tramp-flush-directory-properties):
Use it.

* test/lisp/net/tramp-tests.el (tramp-time-diff): Declare.
(tramp--test-file-attributes-equal-p): Handle also modification
and status change time.
2019-08-05 13:09:26 +02:00
Michael Albinus
2abcca2391 Implement set-file-* functions for tramp-gvfs.el
* lisp/net/tramp-gvfs.el (tramp-gvfs-gio-mapping):
Add "gvfs-set-attribute".
(tramp-gvfs-file-name-handler-alist):
Add `tramp-gvfs-handle-set-file-modes',
`tramp-gvfs-handle-set-file-times' and
`tramp-gvfs-handle-set-file-uid-gid'.
(tramp-gvfs-handle-set-file-modes)
(tramp-gvfs-handle-set-file-times)
(tramp-sh-handle-set-file-uid-gid): New defuns.

* lisp/net/tramp.el (tramp-handle-write-region): Set file modes.

* test/lisp/net/tramp-tests.el (tramp-test20-file-modes)
(tramp-test22-file-times): Do not skip for tramp-gvfs.el.
2019-08-04 12:47:43 +02:00
Noam Postavsky
01661f33c1 Improved ChangeLog generation for vc log (Bug#16301)
* lisp/vc/diff-mode.el (diff-find-source-location): Fix docstring.

* lisp/vc/add-log.el (change-log-unindented-file-names-re)
(change-log-read-entries, change-log-read-defuns)
(change-log-insert-entries):
* lisp/vc/diff-mode.el (diff-add-log-current-defuns):
* lisp/vc/log-edit.el (log-edit--insert-filled-defuns)
(log-edit-fill-entry): New functions.
(log-edit-mode): Set `log-edit-fill-entry' as
`fill-paragraph-function'.
(log-edit-generate-changelog-from-diff): New command.
(log-edit-mode-map): Bind it to C-c C-w.
* doc/emacs/maintaining.texi (Types of Log File, Log Buffer):
* CONTRIBUTE: Document it.
* etc/NEWS: Announce it.
* test/lisp/vc/log-edit-tests.el (log-edit-fill-entry)
(log-edit-fill-entry-joining): New tests.
2019-08-03 20:14:52 -04:00
Michael Albinus
a6a0e857d4 ; Fix typo in filenotify-tests.el 2019-08-02 20:13:44 +02:00
Basil L. Contovounesios
eddf4664d7 Make gravatar.el more configurable
For discussion, see the following thread:
https://lists.gnu.org/archive/html/emacs-devel/2019-07/msg00528.html

* etc/NEWS: Announce changes in gravatar.el user options.

* lisp/image/gravatar.el (gravatar-cache-ttl): Change :type to
number of seconds without changing the default value and while still
accepting other timestamp formats.
(gravatar-rating): Restrict :type to ratings recognized by Gravatar.
(gravatar-size): Allow nil as a value, in which case Gravatar's
default size is used.
(gravatar-default-image, gravatar-force-default): New user options
controlling the Gravatar query parameters 'default' and
'forcedefault', respectively.
(gravatar-base-url): Use HTTPS.
(gravatar--query-string): New helper function to facilitate testing.
(gravatar-build-url): Use it.

* test/lisp/image/gravatar-tests.el (gravatar-size)
(gravatar-default-image, gravatar-force-default)
(gravatar-build-url): New tests.
2019-08-02 16:33:30 +03:00
Basil L. Contovounesios
b4b1eda7fb Fix some minor gravatar.el issues
For discussion, see the following thread:
https://lists.gnu.org/archive/html/emacs-devel/2019-07/msg00528.html
* lisp/image/gravatar.el (gravatar-hash): Trim leading and trailing
whitespace in given address, as per the Gravatar docs.
(gravatar-retrieve-synchronously): Silence call to
url-retrieve-synchronously for consistency with gravatar-retrieve.
(gravatar-retrieved): Only cache buffer on successful retrieval.
* test/lisp/image/gravatar-tests.el: New file.
2019-08-02 16:33:30 +03:00
Mattias Engdegård
408e75e819 Clean up file-size-function
It is now called `byte-count-to-string-function', and used instead of
calling `file-size-human-readable' directly where appropriate.

* lisp/files.el (file-size-human-readable-iec): New.
(file-size-function): Rename to byte-count-to-string-function.  Better
default value.  Eliminate lambda.  Better default for custom choice.
Put in group `files'.  More descriptive doc string.  Move.
(out-of-memory-warning-percentage, warn-maybe-out-of-memory)
(get-free-disk-space):
* lisp/dired.el (dired-number-of-marked-files):
* lisp/url/url-http.el (url-http-simple-after-change-function)
(url-http-content-length-after-change-function):
Use byte-count-to-string-function.
* test/lisp/files-test.el (files-test-file-size-human-readable):
Test file-size-human-readable-iec.
2019-08-02 12:38:44 +02:00
Paul Eggert
24b60b75ea Port standard-test-interval to Los Angeles
* test/lisp/calendar/iso8601-tests.el (standard-test-interval):
Use UTC to avoid DST glitches in the test.
2019-08-01 15:47:15 -07:00
Basil L. Contovounesios
2267110b6f Fix usage of remove-text-properties
* lisp/allout-widgets.el (allout-decorate-item-icon):
* lisp/emacs-lisp/chart.el (chart-goto-xy):
* lisp/forms.el (forms--make-format)
(forms--make-format-elt-using-text-properties):
* lisp/htmlfontify.el (hfy-unmark-trailing-whitespace):
* lisp/net/newst-plainview.el (newsticker-hide-entry)
(newsticker-show-entry):
* lisp/nxml/nxml-mode.el (nxml-cleanup):
* lisp/obsolete/longlines.el (longlines-unshow-hard-newlines)
(longlines-encode-region):
* lisp/org/ob-exp.el (org-babel-exp-process-buffer):
* lisp/org/org-agenda.el (org-agenda-show-new-time):
* lisp/progmodes/cc-defs.el
(c-clear-char-property-with-value-function)
(c-clear-char-property-with-value-on-char-function):
* lisp/progmodes/ebrowse.el (ebrowse--hide):
* lisp/progmodes/gdb-mi.el (gdb-send):
* lisp/progmodes/idlw-shell.el
(idlwave-retrieve-expression-from-level):
* lisp/progmodes/make-mode.el (makefile-fill-paragraph):
* lisp/progmodes/prog-mode.el (prettify-symbols--post-command-hook):
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
* lisp/tmm.el (tmm-remove-inactive-mouse-face):
Always pass an explicit plist to remove-text-properties.

* lisp/dired.el (dired--unhide):
* lisp/facemenu.el (facemenu-add-face):
* lisp/htmlfontify.el (hfy-fontify-buffer):
* lisp/iimage.el (iimage-mode-buffer):
* lisp/image-file.el (image-file-yank-handler):
* lisp/progmodes/prog-mode.el (prettify-symbols--compose-symbol):
* lisp/textmodes/tex-mode.el (latex-env-before-change):
* test/src/undo-tests.el (undo-test0):
Use remove-list-of-text-properties in place of
remove-text-properties where appropriate.
2019-08-01 17:04:53 +03:00
Paul Eggert
f8f1c8c33a format-time-string subsumes time-zone-format
* lisp/calendar/time-date.el (time-zone-format):
* test/lisp/calendar/time-date-tests.el (test-time-zone-format):
Remove.
* lisp/gnus/nnrss.el (nnrss-normalize-date):
Use format-time-string instead of time-zone-format.
2019-07-31 19:24:13 -07:00
Lars Ingebrigtsen
a79e96f0f9 Add more icalendar tests (for the isodatetime parser)
* test/lisp/calendar/icalendar-tests.el
(icalendar-tests--decode-isodatetime): Test
`icalendar--decode-isodatetime'.
2019-07-31 21:47:29 +02:00
Lars Ingebrigtsen
6a87416d61 Use iso8601-parse in nnrss
* lisp/gnus/nnrss.el (nnrss-normalize-date): Use iso8601-parse
instead of hand-rolled parser.

* test/lisp/gnus/nnrss-tests.el: New file.
2019-07-31 21:47:29 +02:00
Lars Ingebrigtsen
46df7bbe12 Add new function time-zone-format
* lisp/calendar/time-date.el (time-zone-format): New function.
2019-07-31 21:47:29 +02:00
Michael Albinus
794f8f25b5 Call file notification actions properly in filenotify-tests.el
* test/lisp/filenotify-tests.el (file-notify--test-wait-for-events):
Rename from `file-notify--wait-for-events'.  Adapt all callees.
(file-notify--test-cleanup): Reset also `file-notify--test-event'
and `file-notify--test-file nil'.
(file-notify--test-event-desc, file-notify--test-event-action):
New accessor functions.
(file-notify-test02-rm-watch, file-notify--test-event-test)
(file-notify--test-with-actions-check)
(file-notify--test-with-actions-explainer): Use them.
(file-notify--test-with-actions-check)
(file-notify--test-with-actions-explainer)
(file-notify--test-with-actions): Rename them from *-events-*.
Rename also internal variables accordingly.  Adapt all callees.
2019-07-31 21:22:48 +02:00
Glenn Morris
1ac0cfa264 Merge from origin/emacs-26
8fbe462 (origin/emacs-26) ; * doc/lispref/positions.texi (List Motion...
1d9efc0 Add index for "\( in strings" (Bug#25195)
304e96f Fix doc-string of 'fit-window-to-buffer' (Bug#36848)
d4c4987 Update view-mode docstring
d6ca1fc ; * lisp/term.el: Add missing / to esc seq commentary.
b3e2073 Fix subproc listening when setting filter to non-t (Bug#36591)
f671950 * etc/NEWS.25: Belatedly announce rcirc-reconnect-delay.
7f42277 Mention term.el's \032 dir tracking in commentary (Bug#19524)
16a529e Remove upload functionality of package-x from the elisp manual
78e6c2a * etc/AUTHORS: Update.
086a56e Clarify Gravatar docs
0592467 * doc/lispref/display.texi (Defining Faces): Say a face can't...

# Conflicts:
#	doc/emacs/programs.texi
#	etc/AUTHORS
#	lisp/term.el
2019-07-30 21:42:34 -07:00
Dmitry Gutov
4fe88791df ; Re-enable all Flymake tests on Hydra
To see if the recent improvements fixed something
2019-07-30 16:59:59 +03:00
Dmitry Gutov
56db1e84a0 Guard against flymake-no-changes-timeout being nil
* test/lisp/progmodes/flymake-tests.el
(flymake-tests--wait-for-backends): Guard against
flymake-no-changes-timeout being nil (in personal configurations)
to help when running tests interactively.
2019-07-30 16:59:59 +03:00
Lars Ingebrigtsen
e18a4a08e4 Adjust time-date tests to tweaked format 2019-07-30 11:56:03 +02:00
Lars Ingebrigtsen
fa04c8b87e Add an ISO 8601 parsing library
* doc/lispref/os.texi (Time Parsing): Document it.

* lisp/calendar/iso8601.el: New file.

* test/lisp/calendar/iso8601-tests.el: Test ISO8601 parsing functions.
2019-07-29 14:22:38 +02:00
Lars Ingebrigtsen
6cfda69d72 Add support for dealing with decoded time structures
* doc/lispref/os.texi (Time Conversion): Document the new
functions that work on decoded time.
(Time Calculations): Document new date/time functions.

* lisp/simple.el (decoded-time-second, decoded-time-minute)
(decoded-time-hour, decoded-time-day, decoded-time-month)
(decoded-time-year, decoded-time-weekday, decoded-time-dst)
(decoded-time-zone): New accessor functions for decoded time values.

* lisp/calendar/time-date.el (date-days-in-month)
(date-ordinal-to-time): New functions.
(decoded-time--alter-month, decoded-time--alter-day)
(decoded-time--alter-second, make-decoded-time): New functions
added to manipulate decoded time structures.

* src/timefns.c (Fdecode_time): Mention the new accessors.

* test/lisp/calendar/time-date-tests.el: New file to test the
decoded time functions and the other new functions.
2019-07-29 14:22:38 +02:00
Juri Linkov
8f4faf7aa1 * lisp/char-fold.el: Rename char-fold-make-table to char-fold--make-table. 2019-07-29 01:55:34 +03:00
Juri Linkov
be16c204d6 Move some uncontroversial char-folding pairs from test data to default values
* lisp/char-fold.el (char-fold--default-include)
(char-fold--default-exclude): Add some default values.

* test/lisp/char-fold-tests.el (char-fold--test-without-customization)
(char-fold--test-with-customization): Move some test data to
default values.  Add more data for tests to pass.   (Bug#35689)
2019-07-29 01:45:36 +03:00
Lars Ingebrigtsen
d7665ae8df Make let-alist work with vectors
* lisp/emacs-lisp/let-alist.el (let-alist--deep-dot-search):
Descend into vectors, too, looking for dotted variables (bug#23244).

Test case:

(let-alist '((a . 1) (b . 2))
  `[,(+ .a) ,(+ .a .b .b)])
2019-07-28 23:28:24 +02:00