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

4830 Commits

Author SHA1 Message Date
Mattias Engdegård
fab1e220db Optimise member and assoc (etc) with constant empty list
* lisp/emacs-lisp/byte-opt.el
(byte-optimize-assq): New.
(byte-optimize-member, byte-optimize-assoc, byte-optimize-memq):
When the list argument is constant nil, the result is always nil.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test cases.
2021-09-06 16:47:13 +02:00
Stefan Kangas
ff7867b4e7 ; * test/lisp/newcomment-tests.el: Fix copyright year. 2021-09-06 04:26:30 +02:00
Dmitry Gutov
71f8b55f46 project--files-in-directory: Fix handling of ignores
* lisp/progmodes/project.el (project--files-in-directory):
Pass "." as the DIR argument to 'find' because otherwise the ignore
expression can match the project root directory name, which we don't
want to happen (bug#50240).  Fixup the resulting file names at the end
with concatenation.
Originally I thought it could lead to worse performance, but the
results show equal or slightly better timings.

* lisp/progmodes/xref.el (xref-matches-in-directory):
Apply a similar fix.
(xref--find-ignores-arguments): Use file-name-as-directory, so
that when passed "." replace-match still had the expected effect.

* test/lisp/progmodes/project-tests.el (project-ignores-bug-50240):
New test.

* test/lisp/progmodes/xref-tests.el
(xref-matches-in-directory-filters-with-ignores): New test.
2021-09-06 05:01:07 +03:00
Dmitry Gutov
80d318aabb Try to fix vc-test-git06-version-diff on Hydra
* test/lisp/vc/vc-tests.el (vc-test--version-diff):
Fix Git backend when running in clean environment.
(vc-test-git06-version-diff): Unskip on Hydra.
2021-09-06 02:32:46 +03:00
Glenn Morris
dd4be8ad3b * test/lisp/vc/vc-tests.el (vc-test-git06-version-diff): Skip on hydra. 2021-09-05 14:04:43 -07:00
Lars Ingebrigtsen
c5b654b3f1 Autoload cl-struct-slot-info
* lisp/emacs-lisp/cl-macs.el (cl-struct-slot-info): Autoload
(bug#50301).

* test/lisp/emacs-lisp/memory-report-tests.el: Don't require cl-macs.
2021-09-05 16:52:14 +02:00
Michael Albinus
e6f936eb4d Cleanup tramp-tests.el
* test/lisp/net/tramp-tests.el
(tramp--test--deftest-direct-async-process): Fix macro declaration.
(tramp-test29-start-file-process, tramp-test30-make-process):
Do not run connection type test for direct async processes.
2021-09-05 09:23:30 +02:00
Glenn Morris
76300b87d4 * test/lisp/vc/vc-tests.el (vc-test-sccs06-version-diff): Fix it. 2021-09-04 18:39:20 -07:00
Dmitry Gutov
1d36043809 Fix test on machines with Bzr not set up
* test/lisp/vc/vc-tests.el (vc-test--version-diff):
Add EMAIL= to the environment to avoid potential failure.
2021-09-05 02:44:08 +03:00
Matthias Meulien
ea53f0df65 Add tests for vc-version-diff
* test/lisp/vc/vc-tests.el (vc-test--version-diff):
New function.
(vc-test-%s06-version-diff): New family of tests.
2021-09-05 02:32:49 +03:00
Yuchen Pei
ca7e76c6f9 Add diary-offset to diary-lib.el
* doc/emacs/calendar.texi: Document the change.
* lisp/calendar/diary-lib.el (diary-offset):
* test/lisp/calendar/icalendar-tests.el: Add a test (bug#50195).
2021-09-04 09:12:10 +02:00
Stefan Kangas
0cabf8bc36 ; Fix typos 2021-09-03 13:05:32 +02:00
Stefan Kangas
0034067f47 Avoid cl-lib alias for cadadr and friends
* lisp/edmacro.el (edmacro-fix-menu-commands):
* lisp/frameset.el (frameset-move-onscreen):
* lisp/htmlfontify.el (hfy-face-at, hfy-merge-adjacent-spans)
(hfy-mark-tag-names):
* lisp/mail/footnote.el (footnote--make-hole)
(footnote-back-to-message):
* lisp/net/eudc.el (eudc-get-email, eudc-get-phone):
* lisp/net/rcirc.el (rcirc-make-trees, rcirc-handler-333)
(rcirc-authenticate):
* lisp/play/5x5.el (5x5-draw-grid, 5x5-solver):
* lisp/play/decipher.el (decipher-insert-frequency-counts):
* lisp/ses.el (ses-relocate-range):
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-step-into-macro-error)
(edebug-tests-error-stepping-into-subr): Avoid using cl-lib aliases
for cadadr and friends that now reside in subr.el.
2021-09-03 10:18:54 +02:00
Stefan Kangas
07e8ff7f0f Move cl-lib tests for caaXr to subr-tests.el
* test/lisp/emacs-lisp/cl-lib-tests.el (cl-test-caaar)
(cl-test-caadr): Move tests using a cl-lib alias from here...
* test/lisp/subr-tests.el (subr-test-caaar, subr-test-caadr): ...to
here.  The functions under test are in subr.el.
2021-09-03 10:18:54 +02:00
Lars Ingebrigtsen
d9dabdb381 Fix memory-report test failure
* test/lisp/emacs-lisp/memory-report-tests.el: Fix test build failure.
2021-09-03 07:46:46 +02:00
Glenn Morris
926e69b207 More fixes for recently added vc-rename test
* test/lisp/vc/vc-tests.el (vc-test-cvs05-rename-file): Skip.
(vc-test-sccs05-rename-file): Treat like RCS.
2021-09-02 17:16:53 -07:00
Yikai Zhao
d8d5dc4565 memory-report: support calculating size for structures
* lisp/emacs-lisp/memory-report.el (memory-report--object-size-1): Add
support for cl-defstruct types (bug#50301).
2021-09-02 09:37:06 +02:00
Lars Ingebrigtsen
7d7e8a9c15 Add a test for bug#50320 in sh-script 2021-09-02 08:43:48 +02:00
Lars Ingebrigtsen
f143260d04 Revert "Tweak sh-script-mode indentation further"
This reverts commit 6392bc37ab.

The changes led to errors throughout (bug#50320).
2021-09-02 08:41:30 +02:00
Lars Ingebrigtsen
6a6de68daf Add new macro `with-existing-directory'
* doc/lispref/files.texi (Testing Accessibility): Document it.
* lisp/subr.el (with-existing-directory): New macro (bug#32004).
2021-09-01 15:56:04 +02:00
Lars Ingebrigtsen
fffcc7ab25 Fix (setf (map-elt map key) (my-func))
* lisp/emacs-lisp/map.el (map-elt): Ensure that the value isn't
referenced more than once (bug#50290).
2021-09-01 10:32:49 +02:00
Harald Jörg
a1887cc5e6 ; cperl-mode.el: Fix border cases of inserting with elisp
* lisp/progmodes/cperl-mode.el (cperl-unwind-to-safe): Replace
(and extend) inline comment by a docstring.  Handle edge cases when
inserting text with elisp (related to Bug#28962).
(cperl-process-here-doc): Add syntax-type `here-doc-start'.
(cperl-find-pods-heres): Make sure that the results of this
function are immediately visible.

* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-14343):
Add test cases for "empty" here-documents and inserting at the
edges of a here-document.
2021-08-30 20:32:41 +02:00
Stefan Monnier
ebd7c52f11 (cperl-test-bug-14343): Make it work for perl-mode
* test/lisp/progmodes/cperl-mode-tests.el (cperl--tests-heredoc-face):
New const.
(cperl-test-heredocs, cperl-test-bug-14343): Use it.
(cperl-test-identify-no-heredoc): Remove left-over message.
2021-08-30 10:52:25 -04:00
Stefan Monnier
455bed3c72 * test/lisp/progmodes/cperl-mode-tests.el: Adjust here-doc tests for perl-mode
(cperl-test-identify-heredoc, cperl-test-identify-no-heredoc):
Tweak tests so they can also be used for perl-mode.
2021-08-30 10:47:16 -04:00
Lars Ingebrigtsen
7dabcb1511 Make rfc2368 obsolete and add rfc6068
* lisp/obsolete/rfc2368.el: Moved here and made obsolete.

* lisp/mail/rfc6068.el (rfc6068-unhexify-string): New file.
2021-08-30 01:56:10 +02:00
Lars Ingebrigtsen
7c7d58f454 Fix vc test for RCS
* test/lisp/vc/vc-tests.el (vc-test--rename-file): Fix test for RCS.
2021-08-29 21:56:22 +02:00
Clément Pit-Claudel
9117a76b53 Change --with-nativecomp to --with-native-compilation in messages
* configure.ac:
* test/infra/Dockerfile.emba:
* test/infra/gitlab-ci.yml: Fix mentions of --with-nativecomp
(bug#50255).
2021-08-29 21:32:01 +02:00
Kévin Le Gouguec
6392bc37ab Tweak sh-script-mode indentation further
* lisp/progmodes/sh-script.el (sh-smie--default-backward-token):
Allow more parentheses in a token (bug#44592).
2021-08-29 21:32:01 +02:00
Dmitry Gutov
8fb32387c1 ; Remove copypasta accident 2021-08-29 03:58:01 +03:00
Dmitry Gutov
6d36177589 Add tests for vc-rename-file
* test/lisp/vc/vc-tests.el (vc-test--rename-file): New function.
(vc-test-%s05-rename-file): New family of tests (bug#39452).
2021-08-29 03:17:08 +03:00
Dario Gjorgjevski
4bb70549f7 Fix shell-script-mode indentation of continuation lines
* lisp/progmodes/sh-script.el (sh-smie--default-backward-token):
Fix indentation of continuation lines (bug#44592).
2021-08-27 19:08:41 +02:00
Christophe Troestler
0d45ad99da lisp/newcomment.el: Uncommenting with whitespace `comment-continue'
* lisp/newcomment.el (uncomment-region-default-1): Make
all-whitespace `comment-continue' work (bug#50226).

Copyright-paperwork-exempt: yes
2021-08-27 17:15:17 +02:00
Lars Ingebrigtsen
fc4d3eea5a Revert "Add support for "bright" ANSI colors in ansi-color"
This reverts commit c8e3347ec0.

Jim Porter's paperwork isn't finalised yet.
2021-08-26 15:22:28 +02:00
Lars Ingebrigtsen
2e2400a13f Revert "Add support for "bright" ANSI colors in term-mode"
This reverts commit 2b2a103db0.

Jim Porter's paperwork isn't finalized yet.
2021-08-26 15:21:52 +02:00
Michael Albinus
e5f82c1305 Improve robustness of shadowfile.el
* lisp/shadowfile.el (shadow-site-help): New defconst.
(shadow-read-site): Use it.
(shadow-make-fullname, shadow-contract-file-name)
(shadow-define-literal-group): Handle errors more robust.  (Bug#49596)

* test/lisp/shadowfile-tests.el (shadow-test06-literal-groups):
Extend test.
2021-08-26 13:14:19 +02:00
Lars Ingebrigtsen
7db376e560 Make thingatpt respect fields
* lisp/thingatpt.el (thing-at-point): Make thingatpt respect
fields (bug#9454).
2021-08-25 18:04:43 +02:00
Jim Porter
2b2a103db0 Add support for "bright" ANSI colors in term-mode
* list/term.el (ansi-term-color-vector): Add new faces.
(term-color-white): Tweak colors.
(term-color-bright-black, term-color-bright-red, term-color-bright-green)
(term-color-bright-yellow, term-color-bright-blue)
(term-color-bright-magenta, term-color-bright-cyan)
(term-color-bright-white): New faces.
(term--maybe-brighten-color): New function.
(term-handle-colors-array): Handle bright colors.
* test/lisp/term-tests.el (term-colors, term-colors-bold-is-bright):
New functions.
2021-08-25 13:57:25 +02:00
Jim Porter
c8e3347ec0 Add support for "bright" ANSI colors in ansi-color
* lisp/ansi-color.el (ansi-bright-color-names-vector): New defcustom.
(ansi-color-bold-is-bright): New defcustom.
(ansi-color--find-face): Sort ANSI codes and check
'ansi-color-bold-is-bright'.
(ansi-color-apply-sequence): Support bright ANSI colors.
(ansi-color--fill-color-map): New function.
(ansi-color-make-color-map): Add bright ANSI colors.
(ansi-color-get-face-1): Add BRIGHT parameter.
* test/lisp/ansi-color-tests.el
(ansi-color-apply-on-region-bold-is-bright-test): New function.
2021-08-25 13:57:07 +02:00
Michael Albinus
efaed29f3d Some precisements in Tramp's connection type handling
* doc/misc/tramp.texi (Remote processes): Precise connection type
handling.

* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
* lisp/net/tramp.el (tramp-handle-make-process):
Fix :connection-type handling.
(tramp-action-show-and-confirm-message): Pacify byte compiler.

* lisp/net/tramp-compat.el (tramp-compat-ignore-error): New defmacro.

* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process): Extend tests.
2021-08-24 21:42:42 +02:00
Glenn Morris
c1c2266a1c Fix recently added cperl test
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-here-doc-missing-end): Fix quote regexp.
2021-08-23 10:36:57 -07:00
Harald Jörg
975939df21 ; cperl-mode: bugfix / rework fontification of here-docs
* lisp/progmodes/cperl-mode.el (cperl-mode): Use
`cperl-font-lock-syntactic-face-function'.
(cperl-commentify): Add a docstring, eliminate unused formal
parameter `noface'.
(cperl-is-here-doc-p): New function to detect whether "<<" starts
a here-document, factored out from `cperl-find-pods-heres'.
(cperl-here-doc-functions): New variable: List of functions which
allow here-documents as parameters, for use in
`cperl-is-here-doc-p'.
(cperl-process-here-doc): New function, factored out from
`cperl-find-pods-heres'.  Fixed to keep correct fontification
after non-interactive (elisp) changes (Bug#14343, Bug#28962).
(cperl-find-pods-heres): Extend the doc-string to describe all
parameters.  Don't remove text properties in recursive calls on
the same line.  Call `cperl-process-here-doc' when appropriate.
(cperl-font-lock-syntactic-face-function): New function to
highlight c-style comments as here-documents (adapted from
perl-mode.el).

* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-identify-heredoc): New test for the new function
`cperl-is-here-doc-p'.
(cperl-test-identify-no-heredoc): New test for the new function
`cperl-is-here-doc-p', testing constructs which start with "<<"
but are no here-documents.
(cperl-test-here-doc-missing-end): New test to verify correct
detection of a missing here-document delimiter.
(cperl-test-bug-14343): New test to verify that inserting text
into a here-document with elisp does not break fontification.
2021-08-23 16:40:45 +02:00
Lars Ingebrigtsen
591b8bd87a Add new variable 'kill-buffer/delete-auto-save-files'
* doc/emacs/files.texi (Auto Save Files): Document it.
* lisp/cus-start.el (standard): Add customize form.

* lisp/files.el (delete-auto-save-files): Move definition to C
(since it's used in the C layer).

* src/buffer.c (Fkill_buffer): Use the new variable (and remove
the old code that apparently didn't trigger for
kill-buffer/delete-auto-save-files.
(syms_of_buffer): Add new variable
kill-buffer-delete-auto-save-files and move definition of
delete-auto-save-files here (bug#21612).
2021-08-23 15:56:54 +02:00
Michael Albinus
f00af4be3d Complete implementation of `copy-directory-create-symlink' in Tramp
* lisp/net/tramp-sh.el (tramp-sh-handle-copy-directory): Fix the case
NEWNAME is a directory name with a trailing slash.

* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory):
Implement `copy-directory-create-symlink'.  (Bug#10897)

* test/lisp/net/tramp-tests.el
(tramp--test-ignore-make-symbolic-link-error): Move up.
(tramp-test15-copy-directory): Extend test.
2021-08-23 15:47:19 +02:00
Michael Albinus
f405756811 Implement `copy-directory-create-symlink' for remote files
* lisp/net/tramp-sh.el (tramp-sh-handle-copy-directory):
Implement `copy-directory-create-symlink'.  (Bug#10897)

* test/lisp/net/tramp-tests.el (tramp-test15-copy-directory):
Extend test.
2021-08-22 20:44:54 +02:00
Glenn Morris
8fe536f90d * test/lisp/international/ucs-normalize-tests.el: Save 30m on hydra. 2021-08-21 18:28:38 -07:00
Stephen Gildea
aa27c42cf9 mh-x-image-url-sane-p: accept "https" URLs
* lisp/mh-e/mh-xface.el (mh-x-image-url-sane-p): Accept https URLs.
* test/lisp/mh-e/mh-xface.el: New file, to test mh-x-image-url-sane-p.
2021-08-21 17:25:46 -07:00
Glenn Morris
bf61ddec3a * test/Makefile.in: Turn off hydra verbose logging for electric-tests. 2021-08-21 12:17:39 -07:00
Glenn Morris
4f1184271d * test/lisp/net/tramp-tests.el: Reduce hydra run time by 1 hour.
It's just too slow to run these after every commit.
2021-08-21 11:46:40 -07:00
Glenn Morris
9715feaed4 * test/lisp/electric-tests.el: Un-skip c-mode tests on hydra. 2021-08-21 09:41:16 -07:00
Lars Ingebrigtsen
efe30626e6 Fix failures in recent files tests
* test/lisp/files-tests.el (files-tests-buffer-offer-save)
(files-tests-save-buffers-kill-emacs--asks-to-save-buffers):
`read-event' is called with arguments.
2021-08-21 17:45:24 +02:00