1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-15 09:47:20 +00:00
Commit Graph

3750 Commits

Author SHA1 Message Date
Glenn Morris
726eb835dd Merge from origin/emacs-27
78eacf31e8 ; Fix many typos in symbols in docs and comments
d5d12707d6 * doc/misc/flymake.texi (Using Flymake): Fix a typo.  (Bug...

# Conflicts:
#	lisp/allout.el
#	lisp/progmodes/ebrowse.el
2020-10-02 09:38:24 -07:00
Stefan Kangas
78eacf31e8 ; Fix many typos in symbols in docs and comments 2020-10-02 13:29:45 +02:00
Mattias Engdegård
4cb16b6f42 Calc: fix business days calculation (bug43677)
The calculation of business days was broken in 2012 (probably
310e60d945 or thereabouts) when the date representation changed
epoch so that Jan 1, 1 AD became day number 1 instead of 0.  Repair
this, along with an unrelated bug that prevented arbitrary holiday
weekdays from working.

Reported by Aaron Zeng.

* lisp/calc/calc-forms.el (math-to-business-day)
(math-from-business-day): Correct calculation of weekdays using Calc's
current (Rata Die) chronology.  Modify loop condition to cope with odd
sets of holiday weekdays.
* test/lisp/calc/calc-tests.el (calc-business-days): New test.
2020-10-02 10:35:52 +02:00
Lars Ingebrigtsen
6f36b67e41 Stop using a dynamically bound 'generated-autoload-file' variable
* doc/lispref/loading.texi (Autoload): Document change of name
(bug#39823).

* lisp/emacs-lisp/autoload.el (autoload-find-generated-file): Pass
the file name in.
(autoload-generated-file): Ditto.
(autoload-file-load-name): Ditto.
(generate-file-autoloads): Ditto.
(autoload--setup-output): Ditto.
(autoload-generate-file-autoloads): Ditto, and alter doc string to
reflect when `generated-autoload-file' is heeded.
(update-file-autoloads): Pass outfile in to functions.
(autoload-find-destination): Ditto.
(update-directory-autoloads): Make into an obsolete shim around
`make-directory-autoloads'.
(make-directory-autoloads): Renamed from
`update-directory-autoloads' with new semantics.
(batch-update-autoloads): Adjust caller.

* lisp/emacs-lisp/package.el (package-generate-autoloads): Adjust
caller.
2020-10-02 04:34:31 +02:00
Tino Calancha
29435ecd8e Fix bug in wdired-get-filename
* lisp/wdired.el (wdired-get-filename): Acknowledge the first
argument (bug#39280).
* test/lisp/wdired-tests.el (wdired-test-bug39280): Add test.
2020-10-01 23:34:01 +02:00
Alan Mackenzie
da591df90a Enhance syntax-tests.el to test some comment character handling.
* test/src/syntax-tests: Add a new section testing some aspects of comment
  handling in syntax.c.  This needs further enhancement.  It uses ....

* test/data/syntax-comments.txt: A new test file.
2020-10-01 20:35:40 +00:00
Michael R. Mauger
e274e3f44b 2020-03-29 Michael R. Mauger <michael@mauger.com>
* lisp/progmodes/sql.el (sql-add-product): Re-correct argument
       spec.  Previous change was due to my mistake; I have
       resolved back to the prior behavior (Bug#39960).
       * test/lisp/progmodes/sql-tests.el (sql-test-add-product): Added
       test to insure I don't make the same mistake again.
2020-10-01 20:34:55 +02:00
Stefan Kangas
af72f6d510 Silence byte-compiler in two tests
* test/lisp/obsolete/cl-tests.el (require):
* test/lisp/simple-tests.el (simple-test-count-words-bug-41761):
Silence byte-compiler.
2020-10-01 15:34:46 +02:00
Lars Ingebrigtsen
648de09e71 Remove mml-sec-test that assumes the first signature
This is no longer supported; the user is asked for what signature to
use.
2020-10-01 05:19:49 +02:00
Alex Bochannek
d11627a7ca Make gnus-base64-repad a bit stricter again
* lisp/gnus/gnus-util.el (gnus-base64-repad): Make the code a bit
stricter again.
2020-10-01 02:44:58 +02:00
Robert Pluim
7518596857 Query for the signer when sending signed mail (with unknown signer)
* lisp/gnus/mml-sec.el (mml-secure-sender-sign-query): New
function (bug#40118).
(mml-secure-epg-sign): Use it to determine the signer (bug#40118).

* lisp/gnus/mml-sec.el
(mml-secure-allow-signing-with-unknown-recipient): Remove.
2020-10-01 02:14:17 +02:00
Eli Zaretskii
a190a446ee Fix 'move-to-column' when invisible text follows a TAB
* src/indent.c (scan_for_column): Accept 2 more arguments, and
report through them the position corresponding to PREVCOL.  All
callers changed.
(Fmove_to_column): Use the prev_col's position to test for a TAB
instead of assuming that the TAB is just before point (which is
false when there's invisible text around).  (Bug#43587)

* test/src/indent-tests.el: New file.
2020-09-30 17:33:58 +03:00
Michael Albinus
b7224f9629 Stricter checks for D-Bus compound types.
* src/dbusbind.c (XD_DBUS_TYPE_P, Fdbus__init_bus)
(xd_read_queued_messages): Use Fkeywordp instead of SYMBOLP.
(xd_signature): Stricter checks for compound types.

* test/lisp/net/dbus-tests.el (dbus-test01-compound-types): Extend test.
2020-09-30 15:28:53 +02:00
Michael Albinus
17ecfa8698 Minor code cleanup in dbus-tests.el
* test/lisp/net/dbus-tests.el (dbus--tests-dir): Make it a defconst.
(dbus--test-method-reentry-handler): Mark args as unused.
(dbus-test04-method-reentry): Tag it :expensive-test.  Fix typo.
(dbus-test06-property-types): Remove duplicate test.
(dbus--test-introspect): Use `insert-file-contents-literally'.
(dbus--test-validate-property): Mark expected-annotations as unused.
(dbus--test-validate-m-or-s): Remove superfluous le-clause.
2020-09-30 12:40:08 +02:00
Hugh Daschbach
d5f9a07862 Add D-Bus method-call reentrant test
* test/lisp/net/dbus-tests.el (dbus--tests-method-reentry-handler):
New defun.
(dbus-test04-method-reentry): New test.  (Bug#43251)
2020-09-30 11:27:22 +02:00
Hugh Daschbach
2018090987 * test/lisp/net/dbus-tests.el: Add timeout tests.
(dbus-test04-call-method-timeout, dbus-test07-introspection-timeout):
New tests.
2020-09-30 11:23:24 +02:00
Hugh Daschbach
0bc19c17fd Add D-Bus introspection tests
* lisp/net/dbus.el (dbus-annotation-deprecated): New defconst.

* test/lisp/net/dbus-tests.el  (dbus--tests-dir): New defvar.
(dbus--test-introspect, dbus--test-validate-interface)
(dbus--test-validate-annotations, dbus--test-validate-property)
(dbus--test-validate-m-or-s, dbus--test-validate-signal)
(dbus--test-validate-method): New defuns.
(dbus-test07-introspection): New test.

* test/lisp/net/dbus-resources/org.gnu.Emacs.TestDBus.xml:
New test data.
2020-09-30 11:19:41 +02:00
Hugh Daschbach
7e581607e7 * test/lisp/net/dbus-tests.el: Add property tests. (Bug#43252)
(dbus--test-run-property-test, dbus--test-property): New defuns.
(dbus-test06-property-types): New test for property registration,
set, get.
2020-09-30 11:09:17 +02:00
Lars Ingebrigtsen
1993c4e300 Fix gnus-base64-repad test failures 2020-09-30 05:05:09 +02:00
Michael Albinus
7e45ed3a96 More strict D-Bus type checking
* lisp/net/dbus.el (dbus-register-monitor): Register proper key.
(dbus-monitor-handler): Adapt docstring.  Use grave text-quoting-style.

* src/dbusbind.c (xd_signature, xd_append_arg): More strict tests.
(syms_of_dbusbind): Adapt docstring.

* test/lisp/net/dbus-tests.el (dbus-test01-basic-types): Extend test.
2020-09-29 19:43:02 +02:00
Alex Bochannek
eaf224f88d Repad the Face header in Gnus
* lisp/gnus/gnus-fun.el (gnus-convert-face-to-png): Use it.

* lisp/gnus/gnus-util.el (gnus-base64-repad): New function (bug#43441).
2020-09-28 14:09:07 +02:00
Jan Tatarik
232382415d Fix Gnus parsing of weekly recurring icalendar events
* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-event:recurring-interval): Fix parsing of weekly
recurring events (bug#43669).

Example: in the absence of explicit INTERVAL value in the calendar
event, a weekly event with occurrences scheduled for Mondays and
Wednesdays should receive the default recurring interval of "1" and the
org mode timestamp repeater should be "+1w".

Due to a bug in the current code we receive "WEEKLY" and "+WEEKLYw"
instead. The patch fixes the issue.
2020-09-28 13:08:37 +02:00
Michael Albinus
4155ca273a Document D-Bus monitoring
* doc/misc/dbus.texi: Replace "symbol" by "keyword" where appropriate.
(Alternative Buses): Adapt dbus-init-bus description.
(Errors and Events): Adapt dbus-event structure.  New defuns
dbus-event-destination-name, dbus-event-handler and dbus-event-arguments.
(Monitoring Events): New node.

* lisp/net/dbus.el: Replace "symbol" by "keyword" where appropriate.
(cl-lib): Require.
(dbus-register-monitor): Adapt the argument list.
(dbus-monitor-handler): Extend.
(dbus-init-bus): Adapt docstring.

* test/lisp/net/dbus-tests.el (dbus-test01-compound-types):
Skip if needed.  Extend test.
2020-09-27 18:59:04 +02:00
Mattias Engdegård
8bd233a7eb Minor string-search optimisations (bug#43598)
* src/fns.c (Fstring_search): Perform cheap all-ASCII checks before more
expensive ones.  Use a faster loop when searching for non-ASCII
non-raw bytes.
* test/src/fns-tests.el (string-search): Add more test cases.
2020-09-27 14:28:07 +02:00
Mattias Engdegård
72e9ec96d0 ; * test/lisp/subr-tests.el (string-replace): Add more test cases 2020-09-27 13:32:27 +02:00
Lars Ingebrigtsen
8c569683f2 Fix searching for multibyte needles in unibyte haystacks
* src/fns.c (Fstring_search): Make this work better when searching
unibyte haystacks for multibyte needles (bug#43598).
2020-09-27 02:01:03 +02:00
Lars Ingebrigtsen
104688feb4 Add tiny optimization for string-search
* src/fns.c (Fstring_search): Add tiny optimization for needles
that are longer than the haystack (bug#43598).
2020-09-27 00:35:11 +02:00
Lars Ingebrigtsen
baf331e40c Rename replace-in-string to string-replace
* doc/lispref/searching.texi (Search and Replace): Update.
* lisp/bindings.el (mode-line-position): Update callers.

* lisp/subr.el (string-replace): Rename from replace-in-string
since that clashes with XEmacs' replace-in-string which is
equivalent to the Emacs replace-regexp-in-string (bug#43598).
2020-09-27 00:24:50 +02:00
Stefan Kangas
e00936bf9f Silence some byte-compiler warnings
* test/lisp/arc-mode-tests.el (arc-mode-test-archive-int-to-mode):
* test/lisp/custom-tests.el (cus-test-opts):
* test/lisp/help-fns-tests.el (foo-test-map)
(help-fns-test--describe-keymap-foo):
* test/src/fns-tests.el (w32-collate-ignore-punctuation)
(fns-tests-func-arity): Silence byte-compiler warnings.
2020-09-26 12:03:07 +02:00
Stefan Kangas
2dff3ea073 Repurpose libxml test for obsolete argument
* test/src/xml-tests.el (libxml-tests): Move half this test for the
recently obsoleted fourth argument to libxml-parse-xml-region...
* test/lisp/xml-tests.el (xml-tests--remove-comments): ...to a new
test here for xml-remove-comments.

* test/src/xml-tests.el (libxml-tests--data-comments-discarded):
Move test data from here...
* test/lisp/xml-tests.el (xml-tests--data-with-comments): ...to here.
2020-09-26 11:48:09 +02:00
Glenn Morris
d58e3b3997 Fix out-of-tree make check
* test/lisp/custom-tests.el (custom-test-admin-cus-test): New const.
(check-for-wrong-custom-types): Use it.
2020-09-25 11:01:14 -07:00
Paul Eggert
cc7f971485 Fix out-of-source ‘make check’ emacs-module-tests
Problem reported by Koki Fukuda in:
https://lists.gnu.org/r/emacs-devel/2020-07/msg00169.html
* test/Makefile.in (MODULE_CFLAGS):
Include from the same directories included from in ../src.
* test/src/emacs-module-tests.el (module/describe-function-1):
Strip path to source directory.

(cherry picked from commit c86f3fe0d0)
2020-09-25 10:33:27 -07:00
Mattias Engdegård
497a1ed8bb string-search robustness and documentation improvement (bug#43598)
* src/fns.c (Fstring_search): Check START-POS argument range.
Simplify logic.  Improve doc string.
* test/src/fns-tests.el (string-search): Add test cases.
* doc/lispref/strings.texi (Text Comparison): Elaborate.
* lisp/emacs-lisp/byte-opt.el (pure-fns): Mark string-search as pure.
2020-09-25 17:08:00 +02:00
Lars Ingebrigtsen
664927b525 Add an expensive test for defcustom types
* admin/cus-test.el (cus-test-opts): Return the tests.

* test/lisp/custom-tests.el (check-for-wrong-custom-types): Test
custom types (bug#30990).
2020-09-25 14:46:36 +02:00
Mattias Engdegård
8a253a96a0 Fix replace-in-string infloop with empty pattern string (bug#43598)
* lisp/subr.el (replace-in-string): Raise an error if FROMSTRING is
empty.
* test/lisp/subr-tests.el (replace-in-string): Add test case.
2020-09-25 13:15:42 +02:00
Lars Ingebrigtsen
09adf92644 Fix previous replace-in-string rewrite
* lisp/subr.el (replace-in-string): Fix logic errors in previous
patch.
2020-09-25 02:07:05 +02:00
Lars Ingebrigtsen
7f9ad5980c Fix replace-in-string multibyteness problems with string-search
* lisp/subr.el (replace-in-string): Simplify by using the new
string-search function (bug#43598).
2020-09-25 01:53:16 +02:00
Lars Ingebrigtsen
e51a98b0c2 Add a new function 'string-search'
* doc/lispref/strings.texi (Text Comparison): Document it.
* src/fns.c (Fstring_search): New function.
2020-09-25 01:53:16 +02:00
Glenn Morris
976b8464fb Update a failing lisp test
* test/lisp/emacs-lisp/lisp-tests.el (up-list-no-cross-string):
Update for recent "Don't signal scan-error" change.
2020-09-24 12:46:19 -07:00
Glenn Morris
9bf9f699b1 Add skip condition for some dbus tests
* test/lisp/net/dbus-tests.el (dbus-test01-type-conversion)
(dbus-test01-basic-types): Add skip for hydra.nixos.org failures.
; Standardize license notice
2020-09-24 11:47:11 -07:00
Stefan Kangas
ad285e0eb8 Remove TODO to convert files to unit tests
* test/lisp/textmodes/css-mode-tests.el:
* test/lisp/progmodes/ruby-mode-tests.el: Remove TODO to convert test
files into unit tests.  The files are still useful for debugging.
Ref: https://lists.gnu.org/r/emacs-devel/2020-09/msg01906.html
2020-09-23 20:53:06 +02:00
Stefan Kangas
37a2a427e4 Convert some completion.el tests to ERT
* test/lisp/completion-tests.el: New file.
* lisp/completion.el: Move commented out tests to completion-tests.el.
2020-09-23 20:03:19 +02:00
Stefan Kangas
610b771d4a Convert allout unit tests to ERT
* test/lisp/allout-tests.el: New file.
* lisp/allout.el (allout-run-unit-tests-on-load)
(allout-run-unit-tests): Remove.
(allout-tests-obliterate-variable)
(allout-tests-globally-unbound, allout-tests-globally-true)
(allout-tests-locally-true, allout-test-resumptions): Move to
allout-tests.el

* test/lisp/allout-widgets-tests.el: New file.
* lisp/allout-widgets.el (allout-widgets-run-unit-tests-on-load)
(allout-widgets-run-unit-tests): Remove.
(allout-test-range-overlaps): Move to allout-widgets-tests.el.
2020-09-23 20:03:19 +02:00
Michael Albinus
441e875019 * test/lisp/net/dbus-tests.el (dbus-test01-basic-types): Adapt test. 2020-09-23 19:57:03 +02:00
Mauro Aranda
b252e09ae4 Allow the newline character in the character widget (Bug#15925)
* lisp/wid-edit.el (widget-specify-field): Extend check for adding the
boundary overlay.  Plus, a minor comment indentation fix.
(character widget): Tweak the valid-regexp to allow the newline
character.

* test/lisp/wid-edit-tests.el (widget-test-character-widget-value)
(widget-test-editable-field-widget-value): New tests (bug#15925).
2020-09-23 15:45:36 +02:00
Stefan Monnier
83a4e4c2a9 test/src/xdisp-tests.el: New file 2020-09-22 23:55:45 -04:00
martin rudalics
10696d0ac5 Make delete-pair only delete pairs that are part of insert-pair-alist
* lisp/emacs-lisp/lisp.el (delete-pair): Only delete pairs that
are part of `insert-pair-alist' (bug#4136).
2020-09-22 16:44:15 +02:00
Mattias Engdegård
3376b08c2e ; * test/lisp/progmodes/ps-mode-tests.el: Add missing backslash 2020-09-22 12:32:12 +02:00
Stefan Kangas
2788557000 Support shellcheck in compilation-mode
* lisp/progmodes/compile.el
(compilation-error-regexp-alist-alist): Add shellcheck regexp.
* test/lisp/progmodes/compile-tests.el
(compile-tests--test-regexps-data):
(compile-test-error-regexps): Add test for shellcheck.
* etc/compilation.txt: Add shellcheck example.
* etc/NEWS: Announce the change.

foo
2020-09-22 02:44:47 +02:00
Stefan Kangas
9a3a2a00da Remove some unnecessary compat code
* test/lisp/emacs-lisp/ert-x-tests.el (ert-test-describe-test):
* test/lisp/wdired-tests.el (wdired-test-unfinished-edit-01):
Remove unnecessary compat code; these tests should never need to run
on older versions of Emacs.
2020-09-22 01:00:06 +02:00