Mark Oteiza [Mon, 14 Aug 2017 05:54:11 +0000 (01:54 -0400)]
Tiny JSON performance improvement
Get rid of some needless uses of apply. Measuring with
(benchmark-run 10 (json-read-file "test.json"))
showed 1.5-2.5% reduction of execution time.
* lisp/json.el (json-peek): Nix let-binding.
(json-read-string): Use concat for making a string from chars.
(json-read-array): Use cond and more appropriate conversion instead
of blindly applying.
Eli Zaretskii [Sun, 13 Aug 2017 14:53:48 +0000 (17:53 +0300)]
Fix vertical cursor motion when cursor is on the fringe
* lisp/simple.el (line-move-visual): Fix an off-by-one error in
setting temporary-goal-column when newline overflows into the
fringe. Support that use case in R2L paragraphs as well.
Eli Zaretskii [Sun, 13 Aug 2017 14:49:07 +0000 (17:49 +0300)]
Fix vertical cursor motion across too wide images
* src/indent.c (Fvertical_motion): If lines are truncated and we
end up beyond the right margin of the window, don't assume we are
in the next screen line, unless VPOS actually says so. (Bug#28071)
Paul Eggert [Sun, 13 Aug 2017 03:04:43 +0000 (20:04 -0700)]
Fix make-temp-file bug with ""/"."/".." prefix
The bug with "." and ".." has been present for a while; I
introduced the bug with "" earlier today in my patch for Bug#28023.
* lisp/files.el (make-temp-file): Do not use expand-file-name if
PREFIX is empty or "." or "..", as it does the wrong thing.
Compute absolute-prefix here ...
(files--make-magic-temp-file): ... instead of here ...
* src/fileio.c (Fmake_temp_file_internal): ... or here.
* lisp/files.el (make-temp-file): If the prefix is empty, append
"/" to the absolute prefix so that the new files are children
rather than siblings of temporary-file-directory. This fixes a
bug introduced in the previous change.
* test/lisp/files-tests.el (files-test-make-temp-file-empty-prefix):
New test, for the bug.
Paul Eggert [Sat, 12 Aug 2017 21:00:17 +0000 (14:00 -0700)]
Improve make-temp-file performance on local files
For the motivation behind this patch, please see Bug#28023 and:
http://emacshorrors.com/posts/make-temp-name.html
Although, given the recent changes to Tramp, the related security
problem in make-temp-file is already fixed, make-temp-file still has
several unnecessary system calls. In the typical case on GNU/Linux,
this patch replaces 8 syscalls (symlink, open, close, readlinkat, uname,
getpid, unlink, umask) by 2 (open, close).
* admin/merge-gnulib (GNULIB_MODULES): Add tempname, now
that Emacs is using it directly.
* configure.ac (AUTO_DEPEND): Remove AC_SYS_LONG_FILE_NAMES;
no longer needed.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lisp/files.el (files--make-magic-temp-file): Rename from
make-temp-file.
(make-temp-file): Use make-temp-file-internal for
non-magic file names.
* src/fileio.c: Include tempname.h.
(make_temp_name_tbl, make_temp_name_count)
(make_temp_name_count_initialized_p, make_temp_name): Remove.
(Fmake_temp_file_internal): New function.
(Fmake_temp_name): Use it.
* src/filelock.c (get_boot_time): Use Fmake_temp_file_internal
instead of make_temp_name.
Paul Eggert [Sat, 12 Aug 2017 17:54:32 +0000 (10:54 -0700)]
Document internal-use naming conventions
* doc/lispref/functions.texi (Function Names):
* doc/lispref/variables.texi (Tips for Defining):
Document naming conventions for internal-use functions and vars.
See Bug#28023#59.
Paul Eggert [Sat, 12 Aug 2017 16:06:55 +0000 (09:06 -0700)]
Simplify re and document 'autoconf.sh all'
* GNUmakefile (ALL_IF_GIT): Remove; no longer needed, now that
./autogen.sh defaults to "all". All uses removed.
* README: Mention autoconf.sh's effect on Git configuration.
Paul Eggert [Sat, 12 Aug 2017 15:56:52 +0000 (08:56 -0700)]
Default autogen.sh to 'all'
This addresses a problem noted by RMS in:
http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00052.html
* autogen.sh (do_git): Set to true if this script is invoked
with no arguments and there is a .git subdirectory.
Eli Zaretskii [Sat, 12 Aug 2017 11:44:20 +0000 (14:44 +0300)]
Fix completion on directory names on MS-DOS/MS-Windows
* src/msdos.c (faccessat):
* src/w32.c (faccessat): Support relative file names, and add D_OK
to 'mode' if the argument is a directory. This unbreaks file-name
completion when the completion result is a directory.
Eli Zaretskii [Sat, 12 Aug 2017 08:29:37 +0000 (11:29 +0300)]
Use Gnulib 'tempname' on MS-Windows
* lib-src/ntlib.h (mkdir, open): Remove redefinitions. They are
now in nt/inc/ms-w32.h.
* lib-src/ntlib.c (sys_mkdir, sys_open): New functions.
(mkostemp): Remove.
* src/w32.c (mkostemp): Remove.
(sys_mkdir): Accept a second (unused) argument.
* src/fileio.c (Fmake_directory_internal): Remove the WINDOWSNT
specific call to mkdir. (Bug#28023)
* nt/inc/ms-w32.h (mkdir): Remove from "#ifdef emacs" and redefine
to accept 2 arguments.
(open): Remove from "#ifdef emacs".
* nt/mingw-cfg.site (ac_cv_func_mkostemp): Remove.
* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_mkostemp)
(OMIT_GNULIB_MODULE_tempname): Remove.
* lisp/faces.el: Define the face.
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header):
* lisp/info.el (Info-fontify-node): Use the new face.
* doc/emacs/display.texi (Standard Faces):
* etc/NEWS: Document the new face. (Bug#28033)
Arash Esbati [Fri, 11 Aug 2017 21:57:35 +0000 (23:57 +0200)]
Make a case-sensitive match for strings
* lisp/textmodes/reftex.el (reftex-typekey-check): Temporarily
let-bind `case-fold-search' to nil in order to be case-sensitive
when matching a string. (Bug#27518)
Stephen Berman [Fri, 11 Aug 2017 09:28:57 +0000 (11:28 +0200)]
Fix a minor todo-mode regression
* lisp/calendar/todo-mode.el (todo-get-overlay): Wrap in
save-excursion. This fixes a regression introduced by the fix
for bug#27609, whereby trying to raise the priority of the
first item or lower the priority of the last item, which
should be noops, moves point to the item's start. Clarify
comment.
* test/lisp/calendar/todo-mode-tests.el
(todo-test-raise-lower-priority): Add test cases for trying to
raise first item and lower last item.
(with-todo-test): Clear abbreviated-home-dir, since we change HOME.
(todo-test-toggle-item-header02): Remove ":expected-result
:failed" and tests of point after todo-next-item, since the
effect when using Todo mode is not reproducible in the test
environment. Add commentary about this.
Paul Eggert [Fri, 11 Aug 2017 08:04:30 +0000 (01:04 -0700)]
Improve performance for rename-file etc.
Although this does not fix Bug#27986, it is a step forward.
I plan to propose a more-significant patch later.
* lisp/files.el (directory-name-p): Move from here ...
* src/fileio.c (Fdirectory_name_p): ... to here.
(directory_like, cp_like_target): New static functions.
(Fcopy_file, Frename_file, Fadd_name_to_file)
(Fmake_symbolic_link):
Use them, to avoid directory-testing syscalls on file names that
must be directories if they exist. Omit unnecessary
initializations and CHECK_STRING calls.
(Frename_file): Don't call file_name_case_insensitive_p
twice on the same file. Compare both file names expanded, instead
of the old name expanded and the new one unexpanded.
Noam Postavsky [Mon, 7 Aug 2017 01:35:04 +0000 (21:35 -0400)]
Respect buffer-local value of tags-table-list (Bug#27772)
* lisp/progmodes/etags.el (visit-tags-table-buffer): Save the current
buffer around the `tags-table-including' calls so as to get buffer
local variables from the right buffer later.
* test/lisp/progmodes/etags-tests.el (etags-visit-tags-table-buffer):
New test.
* test/lisp/progmodes/etags-tests.el (etags-tests--test-dir): New
constant.
(etags-bug-158, etags-bug-23164): Use it so that when running the test
interactively, setting EMACS_TEST_DIRECTORY is not needed.
Paul Eggert [Wed, 9 Aug 2017 18:38:04 +0000 (11:38 -0700)]
Merge from gnulib
This incorporates:
2017-08-09 tempname: do not depend on secure_getenv
2017-08-08 extensions: add _OPENBSD_SOURCE
2017-08-06 manywarnings: Add support for C++
2017-08-06 warnings, manywarnings: Add support for multiple languages
* admin/merge-gnulib: Don't use m4/manywarnings-c++.m4.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/secure_getenv.c, m4/secure_getenv.m4: Remove.
* lib/tempname.c, m4/extensions.m4, m4/manywarnings.m4, m4/warnings.m4:
Copy from gnulib.
Eli Zaretskii [Wed, 9 Aug 2017 17:15:46 +0000 (20:15 +0300)]
Fix crashing emacs-module tests on MS-Windows
* src/w32fns.c (syms_of_w32fns) <w32-disable-abort-dialog>: New
variable.
(emacs_abort): If w32-disable-abort-dialog is non-nil, abort right
away, without displaying the Abort dialog, which waits for the user.
* test/src/emacs-module-tests.el (module--test-assertion): Run the
inferior Emacs with the w32 abort dialog disabled. Expect the
status of the aborted Emacs sub-process to be 3 on MS-Windows and
2 on MS-DOS.
Mark Oteiza [Tue, 8 Aug 2017 19:10:49 +0000 (15:10 -0400)]
Replace some uses of eval
There are a number of places where eval is used unnecessarily to get
or set the value of a symbol.
* lisp/calendar/calendar.el (diary-date-forms): Use default-value in
custom setter.
* lisp/desktop.el (desktop-clear): Use set-default instead.
* lisp/international/ogonek.el (ogonek-read-encoding): Use
symbol-value.
Mark Oteiza [Tue, 8 Aug 2017 19:00:21 +0000 (15:00 -0400)]
Convert uses of looking-at in viper-ex to following-char
* lisp/emulation/viper-ex.el (viper-get-ex-token): Bind
(following-char) and use it in the subsequent cond's clauses.
(viper-ex, ex-quit, viper-get-ex-file): Use following-char instead.
Convert single branch ifs to when
Paul Eggert [Tue, 8 Aug 2017 16:49:40 +0000 (09:49 -0700)]
Document make-temp-name magic limitations
* doc/lispref/files.texi (Unique File Names):
* src/fileio.c (Fmake_temp_name): Document that make-temp-name
does not guarantee uniqueness on magic file names.
Tom Tromey [Sun, 5 Mar 2017 17:48:41 +0000 (10:48 -0700)]
Show number of errors in compilation-mode mode-line
Bug#25354
* lisp/progmodes/compile.el (compilation-num-errors-found): Provide
default value.
(compilation-num-warnings-found, compilation-num-infos-found): New
defvars.
(compilation-mode-line-errors): New defconst.
(compilation-face): Remove.
(compilation-type, compilation--note-type): New functions.
(compilation-parse-errors): Call compilation--note-type.
(compilation-start): Include compilation-mode-line-errors in
mode-line-process.
(compilation-setup): Initialize compilation-num-* variables to 0.
(compilation-handle-exit): Include compilation-mode-line-errors in
mode-line-process.
* doc/emacs/building.texi (Compilation): Document new feature.
Mark Oteiza [Tue, 8 Aug 2017 01:50:11 +0000 (21:50 -0400)]
Do some cleanup in mailcap.el
* lisp/net/mailcap.el: Use lexical-binding.
(mailcap--set-user-mime-data, mailcap-possible-viewers): Use pcase
destructuring.
(mailcap-mime-data): Remove some entries for ancient functions.
(mailcap-parse-mailcaps, mailcap-mime-info): Nix single-branch ifs.
(mailcap-parse-mimetype-file): Just use append.
(mailcap-command-p): Remove unused function.
Tino Calancha [Tue, 8 Aug 2017 01:25:27 +0000 (10:25 +0900)]
query-replace: Undo replacements performed with 'comma
During a `query-replace', the char ',' replaces the character
at point and doesn't move point; right after, the char 'u'
must undo such replacement (Bug#27268).
* lisp/replace.el (replace--push-stack):
New macro extracted from `perform-replace'.
(perform-replace): Use it.
* test/lisp/replace-tests.el (query-replace--undo): Add test.
Don't define gv expanders in compiler's runtime (Bug#27016)
This prevents definitions being compiled from leaking into the current
Emacs doing the compilation.
* lisp/emacs-lisp/gv.el (gv-define-expander): Use function-put instead
of `put' with `eval-and-compile'.
* test/lisp/emacs-lisp/gv-tests.el: New tests.
Noam Postavsky [Fri, 4 Aug 2017 23:50:21 +0000 (19:50 -0400)]
Let the cl-typep effects of defclass work during compilation (Bug#27718)
* lisp/emacs-lisp/eieio.el (defclass): Use `define-symbol-prop'
instead of `put'.
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-tests--dummy-function): Remove.
(eieio-test-25-slot-tests, eieio-test-23-inheritance-check): Don't
expect to fail if compiled.
Stefan Monnier [Fri, 14 Jul 2017 04:32:34 +0000 (00:32 -0400)]
Let `define-symbol-prop' take effect during compilation
* src/fns.c (syms_of_fns): New variable `overriding-plist-environment'.
(Fget): Consult it.
* lisp/emacs-lisp/bytecomp.el (byte-compile-close-variables): Let-bind
it to nil.
(byte-compile-define-symbol-prop): New function, handles compilation
of top-level `define-symbol-prop' and `function-put' calls by putting
the symbol setting into `overriding-plist-environment'.
; Avoid test failures when running from compiled test files
* test/lisp/dom-tests.el: Require `subr-x' during runtime as well.
* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-defstruct-record):
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-23-inheritance-check, eieio-test-25-slot-tests): Mark as
expected to fail when byte-compiled.
This kludge catches errors caused by evaluating arguments in ert's
should, should-not, and should-error macros; it also catches
macroexpansion errors inside of the above macros (Bug#24402).
* lisp/emacs-lisp/ert.el: (ert--should-signal-hook): New function.
(ert--expand-should-1): Catch macroexpansion errors.
* test/lisp/emacs-lisp/ert-tests.el (ert-test-should-error-argument)
(ert-test-should-error-macroexpansion): Tests for argument and
expansion errors.
Reuben Thomas [Sun, 4 Dec 2016 22:39:27 +0000 (22:39 +0000)]
Add Enchant support to ispell.el (Bug#17742)
* lisp/textmodes/ispell.el (ispell-program-name): Add “enchant”.
(ispell-really-enchant): Add variable.
(ispell-check-version): If using Enchant, check it’s new enough (at
least 1.6.1). (Like the ispell check, this is absolute: cannot work
without.)
(ispell-enchant-dictionary-alist): Add variable.
(ispell-find-enchant-dictionaries): Add function, based on
ispell-find-aspell-dictionaries.
(ispell-set-spellchecker-params): Allow dictionary auto-detection for
Enchant, and call ispell-find-enchant-dictionaries to find them. Use
old ispell name to locale mapping code for Enchant too.
(ispell-send-replacement): Make it work with Enchant.
Reuben Thomas [Wed, 28 Jun 2017 21:40:33 +0000 (22:40 +0100)]
Allow async command output buffer to be shown only on output
* lisp/simple.el (async-shell-command-display-buffer): Add
defcustom.
(shell-command): Use the new defcustom to determine whether to show
the buffer immediately, or add a process filter that shows it only
when there is some output.
* etc/NEWS: Document the new variable.
* doc/emacs/misc.texi: Likewise.
Thanks to Juri Linkov and Eli Zaretskii for advice and guidance.
Eli Zaretskii [Mon, 7 Aug 2017 17:47:53 +0000 (20:47 +0300)]
Fix infinite recursion under prettify-symbols-mode and linum-mode
* src/xdisp.c (get_overlay_strings_1)
(handle_single_display_spec, push_prefix_prop): Invalidate the
composition information before starting to iterate on a string.
Otherwise we might think in set_iterator_to_next that we are
delivering characters from a composition, and do all kinds of
nonsensical things, like over-step the string end. (Bug#27761)
Paul Eggert [Mon, 7 Aug 2017 06:53:40 +0000 (23:53 -0700)]
Fix a couple more make-temp-file races
* lisp/files.el (basic-save-buffer-2, move-file-to-trash):
Use make-temp-name, not make-temp-file with retry.
(basic-save-buffer-2): Use condition-case, instead of
unwind-protect with a success flag.
Merge null and without-null regexp alists (Bug#27840, Bug#27873)
* lisp/progmodes/grep.el (grep-mode-font-lock-keywords): Allow for NUL
characters following filename in grep context lines.
(grep--regexp-alist-column, grep--regexp-alist-bin-matcher)
(grep-with-null-regexp-alist, grep-fallback-regexp-alist): Remove.
(grep-regexp-alist): Recombine their contents here.
(grep-mode):
* lisp/cedet/semantic/symref/grep.el
(semantic-symref-parse-tool-output-one-line):
* lisp/progmodes/xref.el (xref-collect-matches): Use the variable
`grep-regexp-alist' rather than the function.
Paul Eggert [Sun, 6 Aug 2017 23:57:08 +0000 (16:57 -0700)]
Fix some crashes on self-modifying Elisp code
Prompted by a problem report by Alex in:
http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00143.html
* src/eval.c (For, Fprogn, Fsetq, FletX, eval_sub):
Compute XCDR (x) near XCAR (x); although this doesn't fix any bugs,
it is likely to run a bit faster with typical hardware caches.
(Fif): Use Fcdr instead of XCDR, to avoid crashing on
self-modifying S-expressions.
(Fsetq, Flet, eval_sub): Count the number of arguments as we go
instead of trusting an Flength prepass, to avoid problems when the
code is self-modifying.
(Fquote, Ffunction, Fdefvar, Fdefconst): Prefer !NILP to CONSP
where either will do. This is mostly to document the fact that
the value must be a proper list. It's also a tiny bit faster on
typical machines nowadays.
(Fdefconst, FletX): Prefer XCAR+XCDR to Fcar+Fcdr when either will do.
(eval_sub): Check that the args are a list as opposed to some
other object that has a length. This prevents e.g. (if . "string")
from making Emacs dump core in some cases.
* test/src/eval-tests.el (eval-tests--if-dot-string)
(eval-tests--let-with-circular-defs, eval-tests--mutating-cond):
New tests.
Mark Oteiza [Sun, 6 Aug 2017 14:15:17 +0000 (10:15 -0400)]
; Fix previous commit
The mailcap minibuffer completion used dynamic binding. Locally set
a dynamic variable.
* lisp/dired-aux.el: Store list of files in
`minibuffer-completion-table'.
Tino Calancha [Sun, 6 Aug 2017 12:53:07 +0000 (21:53 +0900)]
dired-delete-file: Do not TAB complete the user answer
This action might delete directories containing valuable information.
Before previous commit, we prompted users with `yes-or-no-p'
which doesn't TAB complete the user answer. Let's play safe and
keep requiring full answers.
* emacs-master/lisp/dired.el (dired-delete-file): Use `read-string'
instead of `completing-read' to read the user answers.
Tino Calancha [Sun, 6 Aug 2017 04:46:51 +0000 (13:46 +0900)]
dired-do-delete: Allow to delete dirs recursively without prompts
* lisp/dired.el (dired-delete-file): Accept 2 additional answers:
'all', to delete all directories recursively and no prompt anymore.
'quit', to cancel directory deletions (Bug#27940).
Show help message when user inputs 'help'.
(dired-do-flagged-delete): Bind locally dired-recursive-deletes
so that we can overwrite its global value.
Wrapp the loop within a catch '--delete-cancel to catch when
the user abort the directtry deletion.
* doc/emacs/dired.texi (Dired Deletion): Update manual.
* etc/NEWS (Changes in Specialized Modes and Packages in Emacs 26.1):
Announce this change.
Paul Eggert [Sun, 6 Aug 2017 04:27:45 +0000 (21:27 -0700)]
Fix a couple of make-temp-file races
* lisp/emacs-lisp/autoload.el (autoload--save-buffer):
* lisp/emacs-lisp/bytecomp.el (byte-compile-file):
Use make-temp-file, not make-temp-name, to avoid an unlikely race
that could lose data. Remove the deletion hook as quickly as
possible after the file is renamed; though a race still remains
here, it is smaller than before.
Tino Calancha [Sun, 6 Aug 2017 04:05:16 +0000 (13:05 +0900)]
dired-revert: save line numbers instead of positions
Positions might change if the length of one dired header line
changes; this happen, for instance, if we add new files.
Instead, line numbers are invariant under shrinks/enlargements
of the file header.
https://lists.gnu.org/archive/html/emacs-devel/2017-07/msg01092.html
* lisp/dired.el (dired-save-positions): Save the line numbers at point.
(dired-restore-positions): Use forward-line to restore the original
position (Bug#27968).
* test/lisp/dired-tests.el (dired-test-bug27968): Add test.
Eli Zaretskii [Sat, 5 Aug 2017 11:22:04 +0000 (14:22 +0300)]
Make header line in some modes be sensitive to display-line-numbers
* lisp/ruler-mode.el (ruler-mode-ruler, ruler-mode-window-col):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header)
(tabulated-list-print-entry): Account for the width taken by
line-number display. (Bug#27895)
Eli Zaretskii [Sat, 5 Aug 2017 09:52:55 +0000 (12:52 +0300)]
Fix a bug in 'generate-new-buffer-name'
* src/buffer.c (Fgenerate_new_buffer_name): Test IGNORE for being
nil before calling string-equal, since the latter will compare
"nil and 'nil' as equal. (Bug#27966)
* test/src/buffer-tests.el
(test-generate-new-buffer-name-bug27966): New test.
* lisp/faces.el (describe-face): Return (buffer-string). Reorder
the placement of variables/faces in describe-symbol, to put more
emphasis on the variable entry rather than the face. (Bug#24543)
Paul Eggert [Sat, 5 Aug 2017 05:46:31 +0000 (22:46 -0700)]
Merge from gnulib
This incorporates:
2017-08-04 manywarnings: port to 64-bit GCC builds of Emacs
2017-08-01 manywarnings: port to 32-bit GCC bug
* lib/gnulib.mk.in: Regenerate.
* m4/manywarnings.m4: Copy from gnulib.
Tino Calancha [Sat, 5 Aug 2017 05:04:56 +0000 (14:04 +0900)]
insert-directory-wildcard-in-dir-p: Tweak regexp
This function must return non-nil for a wildcard like '/*/*.txt'.
* lisp/files.el (insert-directory-wildcard-in-dir-p): Adjust regexp.
* test/lisp/files-tests.el (files-tests--insert-directory-wildcard-in-dir-p):
Add test.
Noam Postavsky [Fri, 4 Aug 2017 21:55:50 +0000 (17:55 -0400)]
; Fix map-tests when compiled
* test/lisp/emacs-lisp/map-tests.el (test-map-elt-testfn)
(test-map-put-testfn-alist): Make sure the lookup key is really non-eq
to the map's key, even if the code is compiled.
Tino Calancha [Fri, 4 Aug 2017 15:53:48 +0000 (00:53 +0900)]
ls-lisp: Drop eshell dependencies
Use 'file-expand-wildcards' instead of 'eshell-extended-glob' to
expand the wildcards.
Suggested by Fabrice Popineau in:
https://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00108.html
* lisp/ls-lisp.el (ls-lisp--dired): Use file-expand-wildcards.
Tino Calancha [Fri, 4 Aug 2017 13:35:29 +0000 (22:35 +0900)]
Fix dired-test-bug27631 on MS-Windows
Skip the test if Dired use 'ls' emulation with lisp. The same
bug is tested in their respective test suites: ls-lisp-tests.el
and em-ls-tests.el.
* test/lisp/dired-tests.el (dired-test-bug27631): Skip test if 'ls-lisp'
or 'eshell' features are enabled.
Eli Zaretskii [Fri, 4 Aug 2017 13:10:06 +0000 (16:10 +0300)]
Fix dired-test-bug25609 on MS-Windows
* test/lisp/dired-tests.el (dired-test-bug25609): On MS-Windows,
pass temporary files through file-truename, to avoid bogus
failures due to file-name comparison as strings.
Tino Calancha [Fri, 4 Aug 2017 05:15:51 +0000 (14:15 +0900)]
Fix 2 tests that fail in MS-Windows
https://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00018.html
* test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084):
Add comments to explain the test logic.
Pass '--binary' option to 'patch' program in windows environments.
Check explicitely that a backup is created before compare file contents.
* test/lisp/dired-tests.el (dired-test-bug25609):
Declare variable 'dired-dwim-target' right before the test.
Add comments to explain the test logic.
Ensure, before test the bug condition, that we are displaying the
2 dired buffers created in this test, and no other dired buffer
is shown.
Paul Eggert [Fri, 4 Aug 2017 00:57:24 +0000 (17:57 -0700)]
Fix version numbers for some GnuTLS features
Problem reported by Glenn Morris (Bug#27708#58).
* src/gnutls.c (HAVE_GNUTLS_X509_SYSTEM_TRUST):
New macro. Use it instead of low-level version number checks.
(HAVE_GNUTLS_AEAD): Move here from gnutls.h, and rename from
HAVE_GNUTLS3_AEAD. All uses changed. Indent preprocessor lines.
* src/gnutls.h (HAVE_GNUTLS3_CIPHER, HAVE_GNUTLS3_DIGEST)
(HAVE_GNUTLS3_HMAC): Remove, since these were available
before GnuTLS 3.0.0 and the code checks them only if HAVE_GNUTLS3
is defined. Remove all uses; this simplifies the code a bit.
Paul Eggert [Thu, 3 Aug 2017 23:18:45 +0000 (16:18 -0700)]
Port recent rename changes to RHEL 7 + NFS
Problem reported by Ted Zlatanov in:
http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00082.html
* src/fileio.c (Frename_file): On RHEL 7 + NFS, renameat2 can fail
with errno == EINVAL when it is not supported. So treat that case
like errno == ENOSYS. Also, when ok_if_already_exists is neither
nil nor an integer, just call plain rename; this avoids an extra
syscall to renameat2 when the latter fails with errno == EINVAL or
ENOSYS or ENOENT.