1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-16 09:50:25 +00:00
Commit Graph

3379 Commits

Author SHA1 Message Date
Filipp Gunbin
319a2a7427 javac support in compilation-parse-errors rules
* etc/compilation.txt: Add doc and example.
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Add javac rule.
(compilation-parse-errors): Fix file/line/col test, so that
lambda/closure (which are valid values) don't match.
* test/lisp/progmodes/compile-tests.el
(compile-tests--test-regexps-data, compile-test-error-regexps): Add
test.
2020-04-01 03:04:31 +03:00
Glenn Morris
9f6d3a84d8 Mark recently failing Tramp tests on hydra
* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process, tramp-test33-environment-variables):
Expect failure on hydra.nixos.org, since March 29 Tramp cache changes.
2020-03-30 17:17:01 -07:00
Glenn Morris
fa4eec5cfa Merge from origin/emacs-27
c6e0981b96 (origin/emacs-27) * lisp/image/image-converter.el: Fix cus...
461bd9cc20 Fix url-cookie.el for lexical binding
f3ccfb1926 ; * src/decompress.c: Fix comment style.
1af03e7e92 ; * src/xfaces.c (syms_of_xfaces): Fix wording and typo.
93945fcd19 ; * test/lisp/calc/calc-tests.el: Fix mistake in last commit
ee47e00f4e Don't suggest setting face-remapping-alist to a literal (B...
c2b8ce4439 Calc: don't treat nil as an integer (bug#40155)
e1f0e08922 * lisp/files.el (directory-files-recursively): Doc fix.  (...
02b3820315 Document how to disable Tramp file archives
2020-03-30 07:50:37 -07:00
Mattias Engdegård
93945fcd19 ; * test/lisp/calc/calc-tests.el: Fix mistake in last commit 2020-03-29 11:14:03 +02:00
Mattias Engdegård
c2b8ce4439 Calc: don't treat nil as an integer (bug#40155)
Make Math-num-integerp return false for nil, following Math-integerp
which was changed in the bignum reform.  This fixes a crash in
calc-graph-fast.

Reported by Narendra Joshi.

* lisp/calc/calc-macs.el (Math-num-integerp): Not true for nil.
* test/lisp/calc/calc-tests.el (calc-Math-integerp): New tests.
2020-03-27 18:11:18 +01:00
Eli Zaretskii
f98ee21c0e Port the 'module/async-pipe' test to MS-Windows
These changes let the code compile and produce a valid DLL, but the
test hangs.  It looks like the hang is in Fdelete_process, when it
closes one of the descriptors of the pipe process.
In addition, this use of the pipe process cannot currently work
on MS-Windows, since make-pipe-process doesn't set up the reader
thread to read from the Emacs's side of the pipe, so the select
emulation doesn't know there's stuff to read from that pipe.
* test/data/emacs-module/mod-test.c [WINDOWSNT]: Include
windows.h.
(ALIGN_STACK) [!__x86_64__]: Define for 32-bit builds.
(sleep_for_half_second): New function.
(write_to_pipe): Declare return type differently for WINDOWSNT.
Call sleep_for_half_second.
(Fmod_test_async_pipe) [WINDOWSNT]: Use _beginthread as substitute
for pthread_create.
(invalid_finalizer): Replace non_ASCII character in a comment.

* test/src/emacs-module-tests.el (module/async-pipe): Skip on
MS-Windows, as the test fails and then hangs.
2020-03-27 16:19:20 +03:00
Philipp Stephani
d28b004768 Add a module function to open a file descriptor connected to a pipe.
A common complaint about the module API is that modules can't
communicate asynchronously with Emacs.  While it isn't possible to
call arbitrary Emacs functions asynchronously, writing to a pipe
should always be fine and is a pretty low-hanging fruit.

This patch implements a function that adapts an existing pipe
process.  That way, users can use familiar tools like process filters
or 'accept-process-output'.

* src/module-env-28.h: Add 'open_channel' module function.

* src/emacs-module.c (module_open_channel): Provide definition for
'open_channel'.
(initialize_environment): Use it.

* src/process.c (open_channel_for_module): New helper function.
(syms_of_process): Define necessary symbol.

* test/src/emacs-module-tests.el (module/async-pipe): New unit test.

* test/data/emacs-module/mod-test.c (signal_system_error): New helper
function.
(signal_errno): Use it.
(write_to_pipe): New function running in the background.
(Fmod_test_async_pipe): New test module function.
(emacs_module_init): Export it.

* doc/lispref/internals.texi (Module Misc): Document new module
function.

* doc/lispref/processes.texi (Asynchronous Processes): New anchor
for pipe processes.

* etc/NEWS: Document 'open_channel' function.
2020-03-26 21:47:25 +01:00
Robert Pluim
e906cd0d58 Fix gravatar tests
* lisp/image/gravatar.el (gravatar--service-libravatar): Don't error
when failing to parse email address, just return the default URL.

* test/lisp/image/gravatar-tests.el (gravatar-build-url): Adjust
for new default gravatar url.
2020-03-24 22:21:26 +01:00
Glenn Morris
5d5d5d492c Merge from origin/emacs-27
d66331aea4 (origin/emacs-27) Don't build the Gnulib 'utimens' module ...
f2351a689b Add Harfbuzz dependency
8944310d7c Don't signal during backtrace unrewind (Bug#40088)
8709aaddd8 Fix a couple of problems in changelog generating functions
9ab85f087f Fix cl-concatenate (Bug#40180)
561e9fb91b Improve documentation of project.el commands
b28a9a6cc3 Make svg images with links valid
7515252cce * lisp/tab-line.el (tab-line-new-button-show): New defcustom.

# Conflicts:
#	etc/NEWS
#	nt/gnulib-cfg.mk
2020-03-23 09:48:15 -07:00
Noam Postavsky
9ab85f087f Fix cl-concatenate (Bug#40180)
* lisp/emacs-lisp/cl-extra.el (cl-concatenate): Use apply, to avoid
adding extra nesting of args.
* test/lisp/emacs-lisp/cl-extra-tests.el (cl-concatenate): New test.
2020-03-22 23:06:31 -04:00
Michael Albinus
8158337cc2 Fix Bug#40156 in Tramp
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region): Copy to temp file
only if FILENAME exists.  (Bug#40156)

* test/lisp/net/tramp-tests.el (tramp-test10-write-region): Extend test.
2020-03-21 10:30:26 +01:00
Lars Ingebrigtsen
d801d1d8cc Don't have exif bugging out on short strings
* lisp/image/exif.el (exif--direct-ascii-value): New function
(bug#40127).
(exif--parse-directory): Use it to get the correct values for
in-directory (i.e., shorter than 4 octets) strings.
2020-03-19 16:17:48 +01:00
Lars Ingebrigtsen
0128375a50 Don't have exif bugging out on short strings
* lisp/image/exif.el (exif--direct-ascii-value): New function
(bug#40127).
(exif--parse-directory): Use it to get the correct values for
in-directory (i.e., shorter than 4 octets) strings.
2020-03-19 16:15:24 +01:00
Glenn Morris
64d9b4cd76 Merge from origin/emacs-27
e92b8e535a (origin/emacs-27) Remove raw carriage return characters fr...
5747a59a88 Recalculate default font when switching font backend
a2dd8c4234 * lisp/tab-line.el: Fix tab-line-format and tab-line-forma...
a7b8291b6c * etc/NEWS: Make the `--eval` example slightly more precise
f8254aad14 * lisp/image/image-converter.el: Support more ImageMagick ...
5beb269505 Support Unicode 13.0
3a671ad7ed Fix regression in wisent-total-conflicts

# Conflicts:
#	etc/NEWS
2020-03-18 07:50:37 -07:00
Philipp Stephani
e92b8e535a Remove raw carriage return characters from test file.
This protects against tools that mangle newline characters in text
files.

* test/lisp/electric-tests.el (electric-pair-mode-newline-between-parens)
(electric-layout-mode-newline-between-parens-without-e-p-m)
(electric-layout-mode-newline-between-parens-without-e-p-m-2): Escape
carriage return characters.
2020-03-18 12:37:47 +01:00
Eli Zaretskii
5beb269505 Support Unicode 13.0
* admin/unidata/BidiBrackets.txt:
* admin/unidata/BidiMirroring.txt:
* admin/unidata/Blocks.txt:
* admin/unidata/NormalizationTest.txt:
* admin/unidata/SpecialCasing.txt:
* admin/unidata/UnicodeData.txt:
* admin/unidata/copyright.html:
* test/manual/BidiCharacterTest.txt: Updated files imported from
Unicode v13.0.

* admin/unidata/blocks.awk: Add "Symbols for Legacy Computing" to
known aliases.

* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Add new scripts.
* lisp/international/characters.el: Set syntax for Symbols for
Legacy Computing characters.  Update setting of char-width-table.
* lisp/international/mule-cmds.el (ucs-names): Update ranges of
characters for which we want names in 'ucs-names'.

* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--failing-lines-part1)
(ucs-normalize-tests--failing-lines-part2): Update according to
'ucs-normalize-check-failing-lines'.
2020-03-14 14:54:59 +02:00
Michael Albinus
a1e2a68470 Finish implementation of set-file-times FLAG arg in Tramp
* lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times):
Implement FLAG.
(tramp-adb-handle-copy-file): Adapt `set-file-times' call.

* lisp/net/tramp-compat.el (tramp-compat-set-file-times): New defalias.

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes)
(tramp-gvfs-handle-set-file-times, tramp-gvfs-set-file-uid-gid):
Simplify `tramp-gvfs-url-file-name' call.

* lisp/net/tramp-sh.el (tramp-sh-handle-set-file-times): Implement FLAG.
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-out-of-band): Add optional argument
OK-IF-ALREADY-EXISTS.  Adapt callees.
(tramp-do-copy-or-rename-file-via-buffer)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band): Adapt `set-file-times' call.

* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-copy-file): Adapt `set-file-times' call.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Adapt `set-file-times' call.
(tramp-sudoedit-handle-set-file-times): Implement FLAG.

* test/lisp/net/tramp-tests.el (tramp-test22-file-times): Extend test.
2020-03-09 16:05:21 +01:00
Glenn Morris
6ce2052558 Skip filenotify tests on hydra.nixos.org
They frequently hang for hours.
* test/lisp/filenotify-tests.el
(file-notify--test-remote-enabled-checked): Default to off on hydra.
2020-03-07 12:17:01 -08:00
Paul Eggert
5d4cf1fef8 Add ‘nofollow’ flag to set-file-times
This is a companion to the recent set-file-modes patch.
It adds support for a ‘nofollow’ flag to set-file-times (Bug#39773).
Like the set-file-modes patch, it needs work in the w32 port.
* admin/merge-gnulib (GNULIB_MODULES): Add futimens, utimensat.
Remove utimens.
* doc/lispref/files.texi (Changing Files):
* etc/NEWS: Mention the change.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lisp/files.el (copy-directory):
* lisp/gnus/gnus-cloud.el (gnus-cloud-replace-file):
* lisp/net/tramp-adb.el (tramp-adb-handle-copy-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-file):
* lisp/tar-mode.el (tar-copy):
* test/lisp/filenotify-tests.el (file-notify-test03-events):
* test/lisp/files-tests.el:
(files-tests-file-name-non-special-set-file-times):
* test/lisp/net/tramp-tests.el (tramp-test22-file-times):
When setting file times, avoid following symbolic links
when the file is not supposed to be a symbolic link.
* lib/futimens.c, lib/utimensat.c, m4/futimens.m4, m4/utimensat.m4:
New files, copied from Gnulib.
* lisp/gnus/gnus-cloud.el (gnus-cloud-replace-file):
When creating a file that is not supposed to exist already,
use the excl flag to check this.
* lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times):
* lisp/net/tramp-sh.el (tramp-sh-handle-set-file-times):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-times):
Accept an optional FLAG arg that is currently ignored,
and add a FIXME comment for it.
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-times):
* src/fileio.c (Fset_file_times):
Support an optional FLAG arg.
* src/fileio.c (Fcopy_file): Use futimens instead of set_file_times,
as it’s simpler and is a POSIX API.
* src/sysdep.c (set_file_times): Move from here ...
* src/w32.c (set_file_times): ... to here, and make it static,
since it is now used only in w32.c.  Presumably w32.c should also
add support for futimens and utimensat (the POSIX APIs, which
Emacs now uses) and it can remove fdutimens (the Gnulib API,
which Emacs no longer uses).
2020-03-07 12:15:43 -08:00
Glenn Morris
3274b8090b Merge from origin/emacs-27
72f87f8873 (origin/emacs-27) NS port documentation updates
5b19db98ad ; * etc/NEWS: correctly describe what fido-mode is
fc47e3ad99 Let fido-mode users force a minibuffer-exit
e734961d4c icomplete-fido-exit: New command for the M-j binding
335a9bd215 minibuffer-force-complete-and-exit: Allow input with no ma...
34132d4bf6 ; * etc/NEWS: Mark 2 entries as fully documented.
d28b73841b ; * etc/NEWS: Fix the 'mml-secure-openpgp-sign-with-sender...
d1d56a9fd9 ; * etc/NEWS: 'thunk-let' and 'thunk-let*' are fully docum...
fc4f4efabf ; * etc/NEWS: No need to document vc-hg and mergebase chan...
9e8456cf0f ; * etc/NEWS: No need to document changes in Octave mode.
25b4d6fa28 ; * etc/NEWS: No need to document changes in map.el and se...
fc4d0f86da ; * etc/NEWS: No need to document Ido news.
d4ac478cb3 ; * etc/NEWS: No need to document news of doc-view.el.
08c042bd26 Document that 'byte-compile-dynamic' is obsolete
512b66abd7 ; * etc/NEWS: No need to document 'goto-address-uri-scheme...
3103c01c3e ; * etc/NEWS: Formatting fixes.
98306fdfb8 ; * etc/NEWS: No need to document deprecation of 'cl'.
6281ed58be ; * etc/NEWS: No need to document the change in 'list-proc...
e252341e11 ; * etc/NEWS: 'backup-by-copying-when-privileged-mismatch'...
ec5a267ddc ; * etc/NEWS: Mark 'byte-count-to-string-function' as undo...
89307ebccd ; * etc/NEWS: Mark 'completion-common-part' face entry as ...
fdbe7cacfb Document the changes in 'read-answer'
10c58356e4 Document changes in lexical-binding
5cb312b5b9 Update ERC mailing list address
cb1877321b Use regexp-opt to define bibtex-autokey-transcriptions.  (...
3f9c340de0 Improve documentation of 'table-generate-source'
33b31dc314 Attempt to avoid rare segfaults in show_mouse_face
88c6db9196 Avoid crashes when a fontset has strange entries
1814c7e158 Fix rx error with ? and ??
40fb20061e * lisp/emacs-lisp/rx.el (rx--string-to-intervals): Fix err...
08d7d28d35 Fix args in 'window-text-pixel-size' call in 'fit-window-t...
cb1e30910e Have pulse.el preserve existing overlay priorities

# Conflicts:
#	etc/NEWS
2020-03-07 07:50:28 -08:00
Mattias Engdegård
1814c7e158 Fix rx error with ? and ??
The ? and ?? rx operators are special in that they can be written as
characters (space and '?' respectively).  This confused the definition
look-up mechanism in rare cases.

* lisp/emacs-lisp/rx.el (rx--expand-def): Don't look up non-symbols.
* test/lisp/emacs-lisp/rx-tests.el (rx-charset-or): Test.
2020-03-05 12:55:54 +01:00
Glenn Morris
6a0e1c4104 Merge from origin/emacs-27
a4e4510ccd Fix handling MS-Windows keyboard input above the BMP
a38bebb0c1 * etc/NEWS: More complete description of rx 'not' changes.
d373647e8f ; * doc/emacs/mini.texi (Yes or No Prompts): Fix last change.
1ca6d15656 * doc/emacs/mini.texi (Yes or No Prompts): 'y-or-n-p' now ...
fe1a447d52 Don't attempt to cache glyph metrics for FONT_INVALID_CODE
b42b894d1d Fix fit-frame-to-buffer for multi-monitor setup
366fd4fd07 (emacs-27) ; * etc/NEWS: Fix typo.
49d3cd90bd rx: Improve 'or' compositionality (bug#37659)
6b48aedb6b * lisp/tab-line.el: Fix auto-hscrolling (bug#39649)
c5f255d681 (tag: emacs-27.0.90) ; Update lisp/ldefs-boot.el
60c84ad992 ; * etc/TODO: Fix last change.
5af9e5baad ; Add an entry to TODO
d424195905 Fix rx charset generation
9908b5a614 Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/e...
6dc2ebe00e Fix overquoting in mule.el
5cca73dd82 * src/timefns.c (time_arith): Omit incorrect comment.
d767c357ca Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/e...
4dec693f70 * lisp/vc/vc-cvs.el (vc-cvs-ignore): Copy-edit doc string
ff729e3f97 ; bug#39779: Fix some typos in documentation.
696ee02c3a checkdoc: Don't mistake "cf." for sentence end

# Conflicts:
#	etc/NEWS
2020-03-04 13:57:58 -08:00
Paul Eggert
5e229f88f9 Fix rounding errors in time conversion
* src/timefns.c (frac_to_double): Pass FLT_RADIX to mpz_sizeinbase
instead of doing the radix calculation ourselves, not always
correctly.  Fix off-by-one error in scale, which caused
double-rounding.
(decode_time_components): Use frac_to_double (via decode_ticks_hz)
to fix double-rounding error that can occur even though
intermediate results are long double.
* test/src/timefns-tests.el (float-time-precision):
Test the above fixes.
2020-03-03 10:20:32 -08:00
Mattias Engdegård
49d3cd90bd rx: Improve 'or' compositionality (bug#37659)
Perform 'regexp-opt' on nested 'or' forms, and after expansion of
user-defined and 'eval' forms.  Characters are now turned into strings
for wider 'regexp-opt' scope.  This preserves the longest-match
semantics for string in 'or' forms over composition.

* doc/lispref/searching.texi (Rx Constructs): Document.
* lisp/emacs-lisp/rx.el (rx--normalise-or-arg)
(rx--all-string-or-args): New.
(rx--translate-or): Normalise arguments first, and check for strings
in subforms.
(rx--expand-eval): Extracted from rx--translate-eval.
(rx--translate-eval): Call rx--expand-eval.
* test/lisp/emacs-lisp/rx-tests.el (rx-or, rx-def-in-or): Add tests.
* etc/NEWS: Announce.
2020-03-01 10:47:14 +01:00
Mattias Engdegård
d424195905 Fix rx charset generation
* lisp/emacs-lisp/rx.el (rx--charset-p): Don't overquote.
(rx--generate-alt): Generate '.' for negated newline.
* test/lisp/emacs-lisp/rx-tests.el (rx-any, rx-charset-or): Test.
2020-02-29 10:15:51 +01:00
Paul Eggert
8ab0e7316a Port timestamp tests to odd timezones, (TICKS . HZ)
* test/src/timefns-tests.el:
(format-time-string-padding-minimal-deletes-unneeded-zeros)
(format-time-string-padding-minimal-retains-needed-zeros)
(format-time-string-padding-spaces)
(format-time-string-padding-zeros-adds-on-insignificant-side):
Don't assume local time can represent 2000-02-15 00:00:00,
as there might be a DST jump over midnight.
Work even when timestamps are of (TICKS . HZ) form.
Simplify by avoiding need to call time-add.
2020-02-27 23:39:29 -08:00
Mattias Engdegård
ef4440a9c8 Revert "Signal an error for the regexp "[:alnum:]""
This reverts commit 8d5e8cddab.
2020-02-27 18:58:05 +01:00
Mattias Engdegård
4859e8db9b Revert "Don't complain about the regexp "[:-:]""
This reverts commit 3766bf728a.
2020-02-27 18:58:05 +01:00
Mattias Engdegård
3766bf728a Don't complain about the regexp "[:-:]"
Suggested by Clément Pit-Claudel.

* src/regex-emacs.c (regex_compile):
* test/src/regex-emacs-tests.el (regexp-invalid): Tolerate ranges.
2020-02-26 22:59:22 +01:00
Mattias Engdegård
8d5e8cddab Signal an error for the regexp "[:alnum:]"
Omitting the extra brackets is a common mistake; see discussion at
https://lists.gnu.org/archive/html/emacs-devel/2020-02/msg00215.html

* src/regex-emacs.c (reg_errcode_t, re_error_msgid): Add REG_ECLASSBR.
(regex_compile): Check for the mistake.
* test/src/regex-emacs-tests.el (regexp-invalid): Test.
* etc/NEWS: Announce.
2020-02-26 22:09:17 +01:00
Michael Albinus
2261f89324 Finish Tramp's implementation of 'nofollow
* lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy):
Do not use 'nofollow.
(tramp-adb-handle-set-file-modes):
* lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes):
* lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes):
Handle FLAG properly.
(tramp-get-remote-chmod-h): Adapt implementation.

* test/lisp/net/tramp-tests.el (tramp-get-remote-chmod-h): Declare.
(tramp--test-ignore-make-symbolic-link-error): Revert last change.
(tramp-test20-file-modes): Adapt test.
2020-02-26 18:43:11 +01:00
Mattias Engdegård
03c07c88d9 Generate 'substring' byte op (bug#39709)
The 'substring' byte op was not emitted, apparently by mistake.  Fix.
Suggested by Mark Oteiza <mvoteiza@udel.edu>.

* lisp/emacs-lisp/bytecomp.el (byte-defop-compiler): Add '1-3' clause.
(byte-compile-one-to-three-args): New.
* lisp/emacs-lisp/byte-opt.el (byte-compile-side-effect-free-ops):
Add 'byte-substring'.
* test/lisp/emacs-lisp/bytecomp-tests.el
(byte-opt-testsuite-arith-data): Test 'substring'.
2020-02-25 16:40:11 +01:00
Michael Albinus
64af3c94a6 Finish implementation of {set-}file-modes FLAG arg in Tramp
* lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy): Do not use
'nofollow for temporary files.  Use `tramp-compat-set-file-modes'.
(tramp-adb-handle-write-region): Do not use 'nofollow for
temporary files.
(tramp-adb-handle-set-file-modes): Implement FLAG.

* lisp/net/tramp-compat.el (tramp-compat-file-modes)
(tramp-compat-set-file-modes): New defaliases.

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes):
Make explicit check (eq flag 'nofollow).

* lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes): Implement FLAG.
(tramp-do-copy-or-rename-file-directly)
(tramp-sh-handle-file-local-copy, tramp-sh-handle-write-region):
Do not use 'nofollow for temporary files.
(tramp-get-remote-chmod-h): New defun.

* lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes):
Implement FLAG.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes):
Implement FLAG.
(tramp-sudoedit-handle-write-region): Use `tramp-compat-set-file-modes'.

* lisp/net/tramp.el (tramp-default-file-modes): Optional argument FLAG.
(tramp-handle-file-modes): Use `file-truename' instead of
`file-chase-links'.  The latter function does not work for remote
file names.
(tramp-handle-write-region): Call `tramp-default-file-modes' with
'nofollow if needed.  Do not use 'nofollow for temporary files.

* test/lisp/net/tramp-tests.el
(tramp--test-ignore-make-symbolic-link-error): Check also for
"Cannot chmod .* with nofollow flag" error.
(tramp-test20-file-modes): Extend test.
(tramp--test-emacs28-p): New defun.
2020-02-25 13:25:57 +01:00
Mattias Engdegård
929c9d3302 ; * test/lisp/emacs-lisp/regexp-opt-tests.el: Fix last change 2020-02-21 20:34:40 +01:00
Federico Tedin
97b8a78334 Allow tempo-define-template to reassign tags to new templates
* lisp/tempo.el (tempo-define-template): Update documentation string
to mention that existing tags can be reassigned new templates.
(tempo-add-tag): Allow reassigning tags to new templates.
Additionally, invalidate tag collections in all buffers if the global
tags list is being modified.
(tempo-invalidate-collection): Allow invalidating tag collections in
all buffers at the same time.
* test/lisp/tempo-tests.el (tempo-define-tag-globally-test): Add a
test to check that new templates plus tags can be defined from any
buffer and then immediately used in other buffers.
(tempo-overwrite-tag-test): Add a test to check that tags can be
reassigned templates.
* etc/NEWS: Announce changes in tempo.el.

(Bug#39555)
2020-02-21 11:15:00 +02:00
Mattias Engdegård
41450a8ea5 Less bad permutation generator in regexp-opt test
* test/lisp/emacs-lisp/regexp-opt-tests.el
(regexp-opt-test--permutation, regexp-opt-test--factorial): Remove.
(regexp-opt-test--permutations): Rewrite.
2020-02-20 22:00:44 +01:00
Glenn Morris
398afbaf6f Merge from origin/emacs-27
9f08524748 (origin/emacs-27) Fix broken regexps
1d10885763 ; spelling and comment fix
614203bc80 ; make change-history-commit
28399e585e * Makefile.in (PREFERRED_BRANCH): Now emacs-27.
62afbc513a Fix bug when visiting euc-jp-encoded directories
a2c4eeeecd Clarify when fixnums are used.
4e5ac4b0c6 Reorder discussion of integer basics
f765aad28b Make OMake support slightly less expensive (bug#39595)
39410cfc5a Speed up 'msft' and 'watcom' compilation error regexps
96a269d045 Speed up 'maven' compilation error message regexp
efc9d4fe3e Amend c-backward-sws better to handle multiline block comm...
2020-02-20 07:50:30 -08:00
Mattias Engdegård
770f76f050 Remove subsumed repetitions in regexps
Make regexps smaller and faster by removing terms that are superfluous
by virtue of standing next to another term that matches more.  See
https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00949.html
for details.

* lisp/bs.el (bs--make-header-match-string):
* lisp/gnus/deuglify.el (gnus-outlook-repair-attribution-block):
* lisp/gnus/message.el (message-subject-trailing-was-ask-regexp)
(message-subject-trailing-was-regexp):
* lisp/informat.el (Info-validate):
* lisp/net/browse-url.el (browse-url-button-regexp):
* lisp/net/rcirc.el (rcirc-url-regexp):
* lisp/org/ob-core.el (org-babel-remove-result):
* lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org/org-capture.el (org-capture-set-target-location):
* lisp/org/org-table.el (org-table-expand-lhs-ranges):
* lisp/org/org.el (org-maybe-keyword-time-regexp, org-ts-regexp)
(org-ts-regexp-inactive, org-ts-regexp-both):
* lisp/play/gametree.el (gametree-hack-file-layout):
* lisp/progmodes/cc-mode.el (c-Java-defun-prompt-regexp):
* lisp/progmodes/idlw-shell.el (idlwave-shell-halting-error):
* lisp/progmodes/ruby-mode.el (ruby-mode-set-encoding):
* lisp/progmodes/verilog-mode.el (verilog-error-font-lock-keywords)
(verilog-verilint-off, verilog-case-indent-level)
(verilog-within-translate-off, verilog-start-translate-off)
(verilog-back-to-start-translate-off, verilog-end-translate-off)
(verilog-expand-dirnames):
* lisp/term.el (term-control-seq-regexp):
* lisp/textmodes/reftex-vars.el (featurep):
* lisp/url/url-gw.el (url-open-telnet):
* lisp/vc/ediff-ptch.el (ediff-context-diff-label-regexp):
* lisp/vc/pcvs-parse.el (cvs-parse-status):
* test/src/regex-emacs-tests.el (regex-tests-PCRE):
Remove subsumed repetitions.
* lisp/progmodes/sh-script.el (sh-syntax-propertize-function):
Simplify repetition of a repetition.
2020-02-20 16:05:18 +01:00
Mattias Engdegård
f765aad28b Make OMake support slightly less expensive (bug#39595)
When run with -p or -P, OMake regurgitates error messages that
prevented further progress, indented by 6 spaces.  Use that fact
to ameliorate the modification done to other error message regexps.

* lisp/progmodes/compile.el (compilation-parse-errors):
When 'omake' is enabled, allow error messages to be indented by 0 or 6
spaces instead of any number of spaces, to avoid pathological
behaviour.
(compilation-error-regexp-alist-alist): Anchor the 'omake' pattern to
bol for performance.  Repair the 'ruby-Test::Unit' pattern, which
relied on the previously over-generous 'omake' hack.
* etc/compilation.txt (OMake): Add examples.
* test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data)
(compile-test-error-regexps): Add test for OMake (indented error).
2020-02-17 11:23:41 +01:00
Mattias Engdegård
96a269d045 Speed up 'maven' compilation error message regexp
Anchor the regexp at line-start to prevent quadratic behaviour when
it doesn't match (bug#39595).  It's unclear whether the type tag, like
[ERROR], is always present; we keep it optional just in case.

* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Rewrite 'maven' regexp, using rx for clarity.
* etc/compilation.txt (maven): More examples.
* test/lisp/progmodes/compile-tests.el
(compile-tests--test-regexps-data): No leading spaces; they seems to
stem from a misunderstanding in bug#11517.
2020-02-17 11:23:41 +01:00
Glenn Morris
f633e014ac Merge from origin/emacs-27
7ceb45f61f (origin/emacs-27) Reformulate c-end-of-macro, handling mul...
888ffd960c Fix unexec failure on macOS 10.15.4
b392c9f365 Fix 'reverse-region' when less than one line is in region
7448834f73 Correct default regexp in 'package-menu-hide-package'
faada7ca42 Remove obsolete menu entry "Redisplay buffer"
78d76cd93c Remove redundant 'msft' compilation error rule (bug#39595)
75a9eee8b8 ; * src/editfns.c (Fbuffer_size): Tiny clarification.
4d8d25d641 * doc/lispref/variables.texi (special-variable-p): Clarify...
9f6a4bbcc9 Remove the optional KEEP-ORDER argument to regexp-opt
d1e8ce8bb6 Make after-change-functions called from call-process get t...

# Conflicts:
#	etc/NEWS
2020-02-16 07:50:36 -08:00
Glenn Morris
ccb15ada75 Remove another test for deleted lread feature
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--old-style-backquotes): Remove.
2020-02-15 09:11:34 -08:00
Glenn Morris
a9e7ae39ce Remove lread tests for a feature that was deleted
* test/src/lread-tests.el (lread-tests--old-style-backquotes)
(lread-tests--force-new-style-backquotes): Remove.
2020-02-14 11:10:55 -08:00
Michael Albinus
bbe13596b1 Fix Tramp tests for MS Windows
* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process): Improve for MS-Windows.
2020-02-14 14:50:55 +01:00
Mattias Engdegård
9f6a4bbcc9 Remove the optional KEEP-ORDER argument to regexp-opt
This argument was added for the 'or' clause in rx, but it turned out
to be a bad idea (bug#37659), and there seems to be little other use
for it.

* lisp/emacs-lisp/regexp-opt.el (regexp-opt): Remove KEEP-ORDER.
* doc/lispref/searching.texi (Regexp Functions):
* etc/NEWS: Remove it from the documentation.
* test/lisp/emacs-lisp/regexp-opt-tests.el (regexp-opt-test--match-all)
(regexp-opt-test--check-perm, regexp-opt-test--explain-perm)
(regexp-opt-keep-order, regexp-opt-longest-match): Simplify test.
2020-02-13 20:43:42 +01:00
Glenn Morris
a13d1f9539 Merge from origin/emacs-27
0304f53076 (origin/emacs-27) doc/misc/org.texi: Fix @dircategory
027da652a4 Fix display of minibuffer prompt in ido.el
5a21aaff46 rx: Use longest match for all-string 'or' forms (bug#37659)
2b12c2b6f2 Make sure not to mark directories
ff4ed4a0ff ; Add a TODO
3a5129a1c9 vc-hg-dir-status-files: Fix when DIR is not repository root

# Conflicts:
#	etc/NEWS
2020-02-13 07:50:30 -08:00
Michael Albinus
7fda394192 Fix `tramp-interrupt-process'
* lisp/net/tramp.el (tramp-interrupt-process): Improve command.

* test/lisp/net/tramp-tests.el (tramp-test06-directory-file-name)
(tramp-test26-file-name-completion): Simplify.
(tramp-test31-interrupt-process): Remove :unstable tag.
2020-02-13 16:34:07 +01:00
Michael Albinus
de1d150a6e Fix Tramp tests towards *BSD
* test/lisp/net/tramp-tests.el (tramp-get-remote-gid): Declare.
(tramp-test18-file-attributes): Check `file-ownership-preserved-p'
only if possible.
(tramp-test30-make-process): Modify test due to *BSD.
2020-02-12 20:26:47 +01:00
Mattias Engdegård
5a21aaff46 rx: Use longest match for all-string 'or' forms (bug#37659)
Revert to the Emacs 26 semantics that always gave the longest match
for rx 'or' forms with only string arguments.  This guarantee was
never well documented, but it is useful and people likely have come to
rely on it.  For example, prior to this change,

 (rx (or ">" ">="))

matched ">" even if the text contained ">=".

* lisp/emacs-lisp/rx.el (rx--translate-or): Don't tell regexp-opt to
preserve the matching order.
* doc/lispref/searching.texi (Rx Constructs): Document the
longest-match guarantee for all-string 'or' forms.
* test/lisp/emacs-lisp/rx-tests.el (rx-or): Update test.
2020-02-12 11:20:47 +01:00
Stefan Monnier
2645ae1222 * lisp/simple.el (undo-redo): New command
(undo--last-change-was-undo-p): New function.

* test/lisp/simple-tests.el (simple-tests--exec): New function.
(simple-tests--undo): New test.
2020-02-08 22:06:41 -05:00