]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years ago; Fix map-tests when compiled
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.

7 years agoImplement iterator generator for avl-trees.
Toby S. Cubitt [Fri, 4 Aug 2017 19:34:28 +0000 (20:34 +0100)]
Implement iterator generator for avl-trees.

* lisp/emacs-lisp/avl-tree.el (avl-tree-iter): New iter-defun.

7 years agols-lisp: Drop eshell dependencies
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.

7 years ago; Improve commentary of Info-default-directory-list
Eli Zaretskii [Fri, 4 Aug 2017 13:44:02 +0000 (16:44 +0300)]
; Improve commentary of Info-default-directory-list

* lisp/info.el (Info-default-directory-list): Describe in the
commentary when it is initialized.  (Bug#27933)

7 years agoFix dired-test-bug27631 on MS-Windows
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.

7 years agoFix dired-test-bug25609 on MS-Windows
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.

7 years agoFix 2 tests that fail in MS-Windows
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.

7 years ago* lisp/shell.el (explicit-shell-file-name): Mention shell-file-name
Stefan Monnier [Fri, 4 Aug 2017 04:05:00 +0000 (00:05 -0400)]
* lisp/shell.el (explicit-shell-file-name): Mention shell-file-name

* lisp/files.el (insert-directory): Don't hardcode "-c".
* lisp/term.el (term, ansi-term): Use shell-file-name.

7 years agoFix version numbers for some GnuTLS features
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.

7 years agoPort recent rename changes to RHEL 7 + NFS
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.

7 years agoPort GnuTLS usage to Ubuntu 16.04.2 LTS
Paul Eggert [Thu, 3 Aug 2017 08:00:10 +0000 (01:00 -0700)]
Port GnuTLS usage to Ubuntu 16.04.2 LTS

* src/gnutls.h (HAVE_GNUTLS3_AEAD): Define only if GnuTLS 3.5.1 or
later, as opposed to the old 3.4.0 or later.

7 years agoSimplify configuration of HAVE_GNUTLS3 etc.
Paul Eggert [Thu, 3 Aug 2017 02:46:41 +0000 (19:46 -0700)]
Simplify configuration of HAVE_GNUTLS3 etc.

There's only one GnuTLS, so configuring these symbols at
'configure' time is overkill.  Simplify things by moving their
configuration to src/gnutls.h (Bug#27708).
* configure.ac (HAVE_GNUTLS3, HAVE_GNUTLS3_HMAC, HAVE_GNUTLS3_AEAD)
(HAVE_GNUTLS3_CIPHER, HAVE_GNUTLS3_DIGEST): Move these definitions
from here ...
* src/gnutls.h: ... to here, and simplify.

7 years agoDefault to --with-mailutils if it is installed
Paul Eggert [Thu, 3 Aug 2017 02:13:26 +0000 (19:13 -0700)]
Default to --with-mailutils if it is installed

* configure.ac (with_mailutils): Default to 'yes' if GNU Mailutils
is installed.  See:
http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00054.html

7 years agoClarify when autogen.sh should run only autoconf
Paul Eggert [Wed, 2 Aug 2017 20:01:58 +0000 (13:01 -0700)]
Clarify when autogen.sh should run only autoconf

* Makefile.in (configure, bootstrap): Run ‘./autogen.sh autoconf’,
not plain ‘./autogen.sh’, to make it clear that only
autoconf-related tools should be run here.

7 years ago.gitlab-ci.yml: Use stretch Debian image instead of unstable
Toon Claes [Wed, 26 Jul 2017 07:19:24 +0000 (09:19 +0200)]
.gitlab-ci.yml: Use stretch Debian image instead of unstable

7 years agoAdd debugging messages to a Dired test
Stephen Berman [Wed, 2 Aug 2017 15:25:44 +0000 (17:25 +0200)]
Add debugging messages to a Dired test

* test/lisp/dired-tests.el (dired-test-bug27243-01): Log
positions saved and restored by dired-revert to try and find
out why the test fails on Hydra.

7 years agols-lisp: Autoload call instead of cookie
Tino Calancha [Wed, 2 Aug 2017 09:11:31 +0000 (18:11 +0900)]
ls-lisp: Autoload call instead of cookie

* lisp/ls-lisp.el (eshell-extended-glob): autoload call instead of cookie.

7 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Wed, 2 Aug 2017 09:01:05 +0000 (11:01 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

7 years ago; Extend traces in tramp-test36-asynchronous-requests for hydra
Michael Albinus [Wed, 2 Aug 2017 08:59:57 +0000 (10:59 +0200)]
; Extend traces in tramp-test36-asynchronous-requests for hydra

7 years agoWhen renaming a file, ask only if EEXIST or ENOSYS
Paul Eggert [Wed, 2 Aug 2017 08:53:46 +0000 (01:53 -0700)]
When renaming a file, ask only if EEXIST or ENOSYS

* src/fileio.c (Frename_file): Avoid calling Ffile_directory_p
more than once on FILE.  Use renameat_noreplace, so that we can
ask the user (and unlink and retry) only if this fails with errno
== EEXIST or ENOSYS.  This avoids the need to ask the user for
permission to do an operation that will fail anyway.  Simplify
computation of ok_if_already_exists for subsidiary functions.
* src/filelock.c (rename_lock_file): Prefer renameat_noreplace
if it works, as this avoids the need to link and unlink.
* src/lisp.h (renameat_noreplace): New decl.
* src/sysdep.c [HAVE_LINUX_FS_H]: Include linux/fs.h and sys/syscall.h.
(renameat_noreplace): New function.

7 years agoWhen creating a link, ask only if EEXIST
Paul Eggert [Wed, 2 Aug 2017 08:53:46 +0000 (01:53 -0700)]
When creating a link, ask only if EEXIST

* src/fileio.c (Fadd_name_to_file, Fmake_symbolic_link):
Ask the user (and unlink and retry) only if link creation fails
with errno == EEXIST.  This avoids the need to ask the user for
permission to do an operation that will fail anyway.

7 years agodired-align-file: Inherit text properties in inserted spaces
Tino Calancha [Wed, 2 Aug 2017 08:52:57 +0000 (17:52 +0900)]
dired-align-file: Inherit text properties in inserted spaces

* lisp/dired.el (dired-align-file): Inherit text
properties in inserted spaces (Bug#27899).
* test/lisp/dired-tests.el (dired-test-bug27899): Add test.

7 years agoDon't assume /bin/sh as the 'sh' location in the local host
Tino Calancha [Wed, 2 Aug 2017 07:50:37 +0000 (16:50 +0900)]
Don't assume /bin/sh as the 'sh' location in the local host

* lisp/dired.el (dired-insert-directory): Use executable-find in
a local host.

7 years agoMove dired tests using ls emulation to different files
Tino Calancha [Wed, 2 Aug 2017 07:39:11 +0000 (16:39 +0900)]
Move dired tests using ls emulation to different files

Suggested in:
https://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00018.html
* test/lisp/dired-tests.el (dired-test-bug27693)
(dired-test-bug27762, dired-test-bug27817)
(dired-test-bug27631, dired-test-bug27843): Delete those
parts requiring either ls-lisp or eshell-ls.

* test/lisp/ls-lisp-tests.el (ls-lisp-test-bug27762)
(ls-lisp-test-bug27631, ls-lisp-test-bug27693):
Add all dired tests using ls-lisp here.

* test/lisp/eshell/em-ls-tests.el (em-ls-test-bug27631)
(em-ls-test-bug27817, em-ls-test-bug27843): New test file.  Add
all dired tests using eshell-ls here.

7 years ago* test/lisp/ls-lisp-tests.el: Rename it from ls-lisp.el
Tino Calancha [Wed, 2 Aug 2017 07:31:36 +0000 (16:31 +0900)]
* test/lisp/ls-lisp-tests.el: Rename it from ls-lisp.el

7 years ago* lisp/gnus/mm-uu.el (mm-uu-org-src-code-block-extract):
Katsumi Yamaoka [Wed, 2 Aug 2017 03:23:49 +0000 (03:23 +0000)]
* lisp/gnus/mm-uu.el (mm-uu-org-src-code-block-extract):
Say the handle is already decoded.
cf. <yw.87lgnh5cfv.fsf@alex.chromebook> in the info-gnus-english list.

7 years agoDon’t worry about unlink if errno == ENOENT
Paul Eggert [Wed, 2 Aug 2017 00:24:28 +0000 (17:24 -0700)]
Don’t worry about unlink if errno == ENOENT

* src/fileio.c (Fdelete_file):
* src/keyboard.c (Fopen_dribble_file): Do not report failure to
remove a file if unlink fails with errno == ENOENT.  This can
happen even if Emacs is the only program removing the file, in
case an NFS cache overflows.  The file does not exist if errno ==
ENOENT, so it is OK to proceed.

7 years agoFix misalignment in Dired when dired-directory is a cons
Tino Calancha [Tue, 1 Aug 2017 15:01:45 +0000 (00:01 +0900)]
Fix misalignment in Dired when dired-directory is a cons

* lisp/dired.el (dired--need-align-p, dired--align-all-files):
New defuns.
(dired-internal-noselect): Call dired--align-all-files when
dired-directory is a cons (Bug#27762).
* test/lisp/dired-tests.el (dired-test-bug27762): Test should pass.

7 years agoFix some dired-tests.el on MS-Windows
Eli Zaretskii [Tue, 1 Aug 2017 14:45:25 +0000 (17:45 +0300)]
Fix some dired-tests.el on MS-Windows

* test/lisp/dired-tests.el (dired-test-bug27243-01)
(dired-test-bug27243-02): On MS-Windows, pass test-dir through
file-truename, to avoid bogus failures due to file-name comparison
as strings.

7 years agoInsert subdir content if dir-or-list is a string w/o wildcards
Tino Calancha [Tue, 1 Aug 2017 14:31:35 +0000 (23:31 +0900)]
Insert subdir content if dir-or-list is a string w/o wildcards

* lisp/eshell/em-ls.el (eshell-ls--insert-directory):
Append '("-d") into 'eshell-ls-dired-initial-args'
if 'dired-directory' is a cons or there are wildcars (Bug#27843).
* test/lisp/dired-tests.el (dired-test-bug27843): Add test.

7 years agoUpdate todo-mode defcustoms in a less hideous way
Stephen Berman [Tue, 1 Aug 2017 12:17:44 +0000 (14:17 +0200)]
Update todo-mode defcustoms in a less hideous way

* lisp/calendar/todo-mode.el (todo-reevaluate-filelist-defcustoms)
(todo-reevaluate-default-file-defcustom)
(todo-reevaluate-category-completions-files-defcustom)
(todo-reevaluate-filter-files-defcustom): Delete these functions.
(todo-update-filelist-defcustoms): New function.  This replaces
todo-reevaluate-filelist-defcustoms, using the 'custom-type'
property instead of re-evaluating the defcustoms.
(todo-add-file, todo-rename-file, todo-delete-file)
(todo-delete-category, todo-move-category)
(todo-convert-legacy-files, todo-check-file): Replace call of
todo-reevaluate-filelist-defcustoms by
todo-update-filelist-defcustoms.
(todo-show, todo-category-completions): Replace call of
todo-reevaluate-* function by use of 'custom-type' property.

7 years ago; Auto-commit of loaddefs files.
Glenn Morris [Tue, 1 Aug 2017 10:27:40 +0000 (06:27 -0400)]
; Auto-commit of loaddefs files.

7 years agoAdd more should form calls in a failing dired test
Tino Calancha [Tue, 1 Aug 2017 10:00:59 +0000 (19:00 +0900)]
Add more should form calls in a failing dired test

Some dired tests fail intermittently in hydra.  Add few
more should form calls for debugging.
See:
https://lists.gnu.org/archive/html/emacs-devel/2017-07/msg01092.html
* test/lisp/dired-tests.el (dired-test-bug27243-01): Add few more should
forms for debugging.

7 years agoFollow SAUNA recommendations for display-line-numbers-type
Michael Albinus [Tue, 1 Aug 2017 08:13:09 +0000 (10:13 +0200)]
Follow SAUNA recommendations for display-line-numbers-type

* lisp/display-line-numbers.el (display-line-numbers-type): Do not autoload.

* lisp/menu-bar.el (display-line-numbers-type): Declare.

7 years agoAvoid most stat calls when completing file names
Paul Eggert [Mon, 31 Jul 2017 19:31:02 +0000 (12:31 -0700)]
Avoid most stat calls when completing file names

* admin/merge-gnulib (GNULIB_MODULES): Add d-type.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* m4/d-type.m4: New file, copied from gnulib.
* src/dired.c (DT_UNKNOWN, DT_DIR, DT_LINK)
[!HAVE_STRUCT_DIRENT_D_TYPE]: New constants.
(dirent_type): New function.
(file_name_completion): Use it, to avoid unnecessary calls to
stat-like functions on GNU/Linux and other platforms with d_type.
(file_name_completion_stat): Just follow the link; there is no
need to try first with AT_SYMLINK_NOFOLLOW since the directory
entry was already checked to exist.

7 years agodired-tests: Unload tested features after test them
Tino Calancha [Mon, 31 Jul 2017 12:51:12 +0000 (21:51 +0900)]
dired-tests: Unload tested features after test them

Some tests are for Dired with ls-lisp or eshell-ls.
Requiring these features add an advice on `dired' and
might affect other tests.
Do not require these features at the top of the file; require
then inside the tests and unload then at the end.
* test/lisp/dired-tests.el (dired-test-bug27693)
(dired-test-bug7131, dired-test-bug27817, dired-test-bug27631):
require ls-lisp and/or eshell-ls inside the test; unload the
features at the end.

7 years agoSmall adaptions for directory wildcards
Michael Albinus [Mon, 31 Jul 2017 12:32:24 +0000 (14:32 +0200)]
Small adaptions for directory wildcards

* lisp/dired.el (dired-insert-directory): Remove "--dired"
when there are wildcards, and the directory is remote.

* test/lisp/net/tramp-tests.el (tramp--test-make-temp-name):
Adapt docstring.
(tramp-test17-dired-with-wildcards): Skip for all methods but
those from tamp-sh.p.

7 years ago; Change instrumentation code in tramp-tests.el
Michael Albinus [Mon, 31 Jul 2017 07:43:04 +0000 (09:43 +0200)]
; Change instrumentation code in tramp-tests.el

7 years ago* lisp/dired (dired-trivial-filenames): Use \` and \' to match string bounds
Tino Calancha [Mon, 31 Jul 2017 05:55:47 +0000 (14:55 +0900)]
* lisp/dired (dired-trivial-filenames): Use \` and \' to match string bounds

7 years agoMerge from gnulib
Paul Eggert [Mon, 31 Jul 2017 05:46:58 +0000 (22:46 -0700)]
Merge from gnulib

This incorporates:
2017-07-30 Don't interpret EOVERFLOW to mean nonexistence
* lib/tempname.c: Copy from gnulib.

7 years ago; Don't use non-ASCII quotes in comments
Eli Zaretskii [Sun, 30 Jul 2017 19:42:18 +0000 (22:42 +0300)]
; Don't use non-ASCII quotes in comments

* src/regex.h:
* src/regex.c (re_wctype_parse): Don't use non-ASCII quotes in
comments.

7 years agols-lisp: Do not require em-glob at top of the file
Tino Calancha [Sun, 30 Jul 2017 11:28:33 +0000 (20:28 +0900)]
ls-lisp: Do not require em-glob at top of the file

Require em-glob inside 'ls-lisp--dired'.  This is necessary to
not break the Emacs build.
See following thread for details:
https://lists.gnu.org/archive/html/emacs-devel/2017-07/msg01083.html
* lisp/ls-lisp.el (dired-goto-next-file)
(dired-read-dir-and-switches, eshell-extended-glob):
Add function declarations.
* lisp/eshell/em-ls.el (dired-goto-next-file): Fix function declaration.

7 years ago* lisp/dired.el (dired-insert-directory): Move `file-remote-p' check up.
Michael Albinus [Sun, 30 Jul 2017 11:11:00 +0000 (13:11 +0200)]
* lisp/dired.el (dired-insert-directory): Move `file-remote-p' check up.

7 years ago* test/lisp/net/tramp-tests.el (tramp-test17-dired-with-wildcards): New test.
Michael Albinus [Sun, 30 Jul 2017 11:08:36 +0000 (13:08 +0200)]
* test/lisp/net/tramp-tests.el (tramp-test17-dired-with-wildcards): New test.

7 years agoChange default CSS property face
Simen Heggestøyl [Sun, 30 Jul 2017 09:16:58 +0000 (11:16 +0200)]
Change default CSS property face

* lisp/textmodes/css-mode.el (css-property): Inherit from
`font-lock-keyword-face' instead of `font-lock-variable-name-face' to
distinguish CSS properties from variables.

7 years agoDired: Handle posix wildcards in directory part
Tino Calancha [Sun, 30 Jul 2017 02:02:49 +0000 (11:02 +0900)]
Dired: Handle posix wildcards in directory part

Allow Dired to handle calls like
\(dired \"~/foo/*/*.el\"), that is, with wildcards within
the directory part of the file argument (Bug#27631).
* lisp/files.el (insert-directory-wildcard-in-dir-p): New predicate.
(insert-directory-clean): New defun extracted from insert-directory.
(insert-directory)
* lisp/dired.el (dired-internal-noselect)
(dired-insert-directory): Use the new predicate; when it's true,
handle the directory wildcards with a shell call.
* lisp/eshell/em-ls.el (eshell-ls-use-in-dired): Add/remove both advices.
(eshell-ls-unload-hook): New defun.  Use it in
eshell-ls-unload-hook instead of an anonymous function.
(eshell-ls--dired)
* lisp/ls-lisp.el (ls-lisp--dired):
Advice dired to handle wildcards in the directory part with both
eshell-ls and ls-lisp.
* etc/NEWS: Announce it.
* doc/emacs/dired.texi (Dired Enter): Update manual.
* test/lisp/dired-tests.el (dired-test-bug27631): Add test.

7 years ago* lisp/find-lisp.el: Enable lexical binding
Tino Calancha [Sat, 29 Jul 2017 16:00:51 +0000 (01:00 +0900)]
* lisp/find-lisp.el: Enable lexical binding

7 years ago* lisp/find-dired.el: Enable lexical binding
Tino Calancha [Sat, 29 Jul 2017 15:50:52 +0000 (00:50 +0900)]
* lisp/find-dired.el: Enable lexical binding

7 years ago* lisp/kmacro.el: Use lexical binding.
Mark Oteiza [Sat, 29 Jul 2017 15:01:57 +0000 (11:01 -0400)]
* lisp/kmacro.el: Use lexical binding.

7 years agoUse lexical-binding in dired-aux.el
Mark Oteiza [Sat, 29 Jul 2017 15:00:51 +0000 (11:00 -0400)]
Use lexical-binding in dired-aux.el

* lisp/dired.el: Use lexical binding.
(dired-do-shell-command): Remove unused bindings.

7 years ago* lisp/ido.el: Use lexical binding.
Mark Oteiza [Sat, 29 Jul 2017 14:28:57 +0000 (10:28 -0400)]
* lisp/ido.el: Use lexical binding.

7 years ago* lisp/whitespace.el: Use lexical binding.
Mark Oteiza [Sat, 29 Jul 2017 14:25:49 +0000 (10:25 -0400)]
* lisp/whitespace.el: Use lexical binding.

7 years agoartist.el: Avoid error with keyboard command invocation
Stephen Berman [Sat, 29 Jul 2017 11:59:18 +0000 (13:59 +0200)]
artist.el: Avoid error with keyboard command invocation

* lisp/textmodes/artist.el (artist-mouse-choose-operation):
Call x-popup-menu with t instead of last-nonmenu-event as the
value of the position argument; this allows invoking the
command from the keyboard without raising an error (bug#27819).

7 years agoPreserve point under 'dired-auto-revert-buffer' (third case)
Stephen Berman [Sat, 29 Jul 2017 11:34:47 +0000 (13:34 +0200)]
Preserve point under 'dired-auto-revert-buffer' (third case)

* lisp/files.el (find-file): Use pop-to-buffer-same-window
instead of switch-to-buffer.  This preserves Dired window
point when dired-auto-revert-buffer is non-nil.  (Bug#27243)

* test/lisp/dired-tests.el (dired-test-bug27243-01)
(dired-test-bug27243-02, dired-test-bug27243-03): New tests.
The first two replace a previous test that combined them; that
test intermittently fails in the Hydra build system, so maybe
separating the two cases will help locate the point of
failure.  The third test involves find-file but is here
because it, like the others, is testing the effect of
dired-auto-revert-buffer.

7 years agoDo not unset user key remaps in dired-x
Allen Li [Sat, 29 Jul 2017 09:00:56 +0000 (12:00 +0300)]
Do not unset user key remaps in dired-x

* lisp/dired-x.el (dired-x-bind-find-file): Don't map any keys if user
sets dired-x-hands-off-my-keys.  (Bug#27828)

Copyright-paperwork-exempt: yes

7 years agoImprove documentation of 'occur'
Eli Zaretskii [Sat, 29 Jul 2017 08:25:29 +0000 (11:25 +0300)]
Improve documentation of 'occur'

* doc/emacs/search.texi (Other Repeating Search):
* lisp/replace.el (occur): Make the documentation of 'occur' be
more accurate when matches overlap.  (Bug#27818)

7 years agoMinor copyedits of comments in faces.el
Eli Zaretskii [Sat, 29 Jul 2017 07:56:57 +0000 (10:56 +0300)]
Minor copyedits of comments in faces.el

* lisp/faces.el (face-font-family-alternatives): More info about
requirements from "Monospace Serif".

7 years ago; Revert "; * .gitignore: Add .deps/."
Eli Zaretskii [Sat, 29 Jul 2017 07:43:23 +0000 (10:43 +0300)]
; Revert "; * .gitignore: Add .deps/."

This reverts commit f1ed31a8f5c6f19aa5e119e670533241c6375945.

7 years agoDo not worry about paxctl on newer NetBSD
Paul Eggert [Sat, 29 Jul 2017 07:01:02 +0000 (00:01 -0700)]
Do not worry about paxctl on newer NetBSD

Problem reported privately by Thomas Klausner.
* configure.ac (emacs_uname_r): New var.  Use it to avoid paxctl
on newer NetBSD platforms, where it is not needed.  Also use it to
simplify Cygwin diagnostic.

7 years agoClarify documentation of ':inherit' face attribute
Eli Zaretskii [Sat, 29 Jul 2017 06:57:51 +0000 (09:57 +0300)]
Clarify documentation of ':inherit' face attribute

* doc/lispref/display.texi (Face Attributes): Document the special
treatment of 'unspecified' in the ':inherit' attribute.

7 years ago* lisp/password-cache.el (password-data): Use a hash-table
Stefan Monnier [Fri, 28 Jul 2017 16:27:00 +0000 (12:27 -0400)]
* lisp/password-cache.el (password-data): Use a hash-table

* lisp/auth-source.el (auth-source-magic): Remove.
(auth-source-forget+, auth-source-forget-all-cached): Adjust to new
format of password-data.
(auth-source-format-cache-entry): Just use a cons.

(password-cache-remove, password-cache-add, password-reset)
(password-read-from-cache, password-in-cache-p): Adjust accordingly.

Fixes: bug#26699
7 years ago* lisp/subr.el (define-symbol-prop): New function
Stefan Monnier [Fri, 28 Jul 2017 16:02:01 +0000 (12:02 -0400)]
* lisp/subr.el (define-symbol-prop): New function

(symbol-file): Make it find symbol property definitions.

* lisp/emacs-lisp/pcase.el (pcase-defmacro):
* lisp/emacs-lisp/ert.el (ert-set-test): Use it instead of `put'.
(ert-describe-test): Adjust call to symbol-file accordingly.

7 years ago* lisp/subr.el (method-files): Move function to cl-generic.el
Stefan Monnier [Fri, 28 Jul 2017 15:28:48 +0000 (11:28 -0400)]
* lisp/subr.el (method-files): Move function to cl-generic.el

* lisp/emacs-lisp/cl-generic.el (cl-generic-p): New function.
(cl--generic-method-files): New function, moved from subr.el.
* lisp/emacs-lisp/edebug.el (edebug-instrument-function): Use them.
* test/lisp/emacs-lisp/cl-generic-tests.el:
* test/lisp/subr-tests.el: Move and adjust method-files tests accordingly.

7 years agoPreserve this-command-keys across recursive-edit invocations
Eli Zaretskii [Fri, 28 Jul 2017 12:40:25 +0000 (15:40 +0300)]
Preserve this-command-keys across recursive-edit invocations

* src/minibuf.c (read_minibuf, read_minibuf_unwind): Save and
restore this-command-keys, to preserve it across recursive-edit.
(Bug#27470)

7 years ago; * .gitignore: Add .deps/.
Eli Zaretskii [Fri, 28 Jul 2017 09:38:22 +0000 (12:38 +0300)]
; * .gitignore: Add .deps/.

7 years agoImprove doc string of 'locate-dominating-file'
Eli Zaretskii [Fri, 28 Jul 2017 09:35:36 +0000 (12:35 +0300)]
Improve doc string of 'locate-dominating-file'

* lisp/files.el (locate-dominating-file): Doc fix.  (Bug#27798)

7 years agoNew commands 'apropos-local-variable', 'apropos-local-value'
Drew Adams [Fri, 28 Jul 2017 07:47:20 +0000 (10:47 +0300)]
New commands 'apropos-local-variable', 'apropos-local-value'

* lisp/apropos.el (apropos-local-variable, apropos-local-value):
New functions.  (Bug#27424)

* doc/emacs/help.texi (Apropos): Document 'apropos-local-variable'
and 'apropos-local-value'.
* etc/NEWS: Mention the new commands.

7 years ago* lisp/loadhist.el (unload-feature): Remove ad-hoc ELP code
Stefan Monnier [Fri, 28 Jul 2017 02:51:37 +0000 (22:51 -0400)]
* lisp/loadhist.el (unload-feature): Remove ad-hoc ELP code

* lisp/emacs-lisp/elp.el (loadhist-unload-element): Un-instrument functions.

7 years agoFix C++ class initializers not always being fontified at mode start.
Alan Mackenzie [Thu, 27 Jul 2017 17:56:23 +0000 (17:56 +0000)]
Fix C++ class initializers not always being fontified at mode start.

The problem here happened when an "outer list" of declarations moved beyond an
"inner list" containing class initializers.  These weren't being checked for
by the code.

Also, fix places in c-get-fontification-context where point is undefined.

* lisp/progmodes/cc-fonts.el (c-get-fontification-context): when argument
not-front-decl is set, test for class initializers.  Also, anchor point in
places where it is moved and is otherwise undefined.

7 years agoFix variables in C++ "for" statement not always being fontified.
Alan Mackenzie [Thu, 27 Jul 2017 17:05:53 +0000 (17:05 +0000)]
Fix variables in C++ "for" statement not always being fontified.

The error happened when there was a comma inside template delimiters.

* lisp/progmodes/cc-fonts.el (c-get-fontification-context): In "for"
statements, recognise template delimiters containing "," and "&".

7 years agoAdd watchdog process to tramp-test36-asynchronous-requests
Michael Albinus [Thu, 27 Jul 2017 10:51:45 +0000 (12:51 +0200)]
Add watchdog process to tramp-test36-asynchronous-requests

* test/lisp/net/tramp-tests.el (tramp--test-timeout-handler):
New defun.
(tramp-test36-asynchronous-requests): Use a watchdog process,
listening for SIGUSR1.

7 years agoCC Mode: Fix declarator being cut off from terminator by end of jit-lock chunk
Alan Mackenzie [Thu, 27 Jul 2017 06:27:13 +0000 (06:27 +0000)]
CC Mode: Fix declarator being cut off from terminator by end of jit-lock chunk

If a declarator is so cut off, extend the fontification chunk to include it.

* lisp/progmodes/cc-mode.el (c-fl-decl-end): New function.
(c-change-expand-fl-region, c-context-expand-fl-region): Use the new function.

7 years ago* lisp/vc/smerge-mode.el: Avoid N² blow up in degenerate cases
Stefan Monnier [Thu, 27 Jul 2017 04:21:35 +0000 (00:21 -0400)]
* lisp/vc/smerge-mode.el: Avoid N² blow up in degenerate cases

(smerge--refine-long-words): New var.
(smerge--refine-chopup-region): Use it.

7 years ago* lisp/url/url-cookie.el: Use lexical-binding
Stefan Monnier [Thu, 27 Jul 2017 04:13:27 +0000 (00:13 -0400)]
* lisp/url/url-cookie.el: Use lexical-binding

(url-cookie-host-can-set-p): Remove unused var `last'.
Use string-suffix-p.
(url-cookie-list): De morgan.
(url-cookie-quit): Remove.
(url-cookie-mode): Inherit from special-mode.
(url-cookie-mode-map): Simplify accordingly.

7 years ago* lisp/calendar/todo-mode.el (todo-print-buffer-function): Rework docstring.
Stefan Monnier [Thu, 27 Jul 2017 04:09:17 +0000 (00:09 -0400)]
* lisp/calendar/todo-mode.el (todo-print-buffer-function): Rework docstring.

7 years ago* lisp/ruler-mode.el (ruler-mode-ruler): Document problem.
Stefan Monnier [Thu, 27 Jul 2017 04:07:17 +0000 (00:07 -0400)]
* lisp/ruler-mode.el (ruler-mode-ruler): Document problem.

7 years ago* lisp/emacs-lisp/cl-generic.el (cl-generic-define-method):
Stefan Monnier [Thu, 27 Jul 2017 03:22:58 +0000 (23:22 -0400)]
* lisp/emacs-lisp/cl-generic.el (cl-generic-define-method):

Record this as the function's definition site if it's the first def.

7 years ago* doc/lispref/loading.texi (When to Autoload): New section.
Glenn Morris [Wed, 26 Jul 2017 16:40:13 +0000 (12:40 -0400)]
* doc/lispref/loading.texi (When to Autoload): New section.

7 years agoStop using unibyte buffers for ert backtraces
Glenn Morris [Wed, 26 Jul 2017 16:38:46 +0000 (12:38 -0400)]
Stop using unibyte buffers for ert backtraces

* lisp/emacs-lisp/ert.el
(ert-results-pop-to-backtrace-for-test-at-point):
Set multibyte true, not false.  This copies a
debugger-setup-buffer change from 2009-08-30, and stops the
"Backtrace for" header line containing ^X and ^Y.

7 years agoFix semantic-symref-parse-tool-output-one-line after 644cdd1aa0
Dmitry Gutov [Wed, 26 Jul 2017 16:34:48 +0000 (19:34 +0300)]
Fix semantic-symref-parse-tool-output-one-line after 644cdd1aa0

* lisp/cedet/semantic/symref/grep.el
(semantic-symref-grep--line-re): Delete.
(semantic-symref-parse-tool-output-one-line):
Use regexp and group numbers from (grep-regexp-alist).

7 years agoFix cl-defmethod indentation
Grégoire Jadi [Wed, 26 Jul 2017 15:46:16 +0000 (18:46 +0300)]
Fix cl-defmethod indentation

* lisp/emacs-lisp/cl-generic.el (cl-defmethod):
Declare (indent defun).  Fixes bug#23994.

7 years agoFix two customization types in frame.el
Martin Rudalics [Wed, 26 Jul 2017 08:14:06 +0000 (10:14 +0200)]
Fix two customization types in frame.el

* lisp/frame.el (window-divider-default-bottom-width)
(window-divider-default-right-width): Fix customization types.

7 years agoDired: Support eshell-ls from the beginning if the user wants to
Tino Calancha [Wed, 26 Jul 2017 07:42:30 +0000 (16:42 +0900)]
Dired: Support eshell-ls from the beginning if the user wants to

* lisp/dired.el (dired-insert-directory): Check for eshell-ls
as well (Bug#27817).
* test/lisp/dired-tests.el (dired-test-bug27817): Add test.

7 years ago* lisp/progmodes/sh-script.el (sh-mode): Recognize mkshrc.
Mark Oteiza [Wed, 26 Jul 2017 02:13:20 +0000 (22:13 -0400)]
* lisp/progmodes/sh-script.el (sh-mode): Recognize mkshrc.

7 years ago* lisp/emacs-lisp/eieio-compat.el (eieio--defgeneric-init-form):
Stefan Monnier [Tue, 25 Jul 2017 14:12:58 +0000 (10:12 -0400)]
* lisp/emacs-lisp/eieio-compat.el (eieio--defgeneric-init-form):

Adjust to change in cl-generic-ensure-function.

7 years ago; Instrument entry of tramp--test-instrument-test-case
Michael Albinus [Tue, 25 Jul 2017 08:05:43 +0000 (10:05 +0200)]
; Instrument entry of tramp--test-instrument-test-case

7 years agols-lisp: Add an unload function and enable lexical binding
Tino Calancha [Tue, 25 Jul 2017 05:53:44 +0000 (14:53 +0900)]
ls-lisp: Add an unload function and enable lexical binding

Enable lexical binding.
* lisp/ls-lisp.el (ls-lisp-unload-function): New defun.
* test/lisp/ls-lisp.el (ls-lisp-unload): Add test.

7 years agoregister-read-with-preview: Quit if user input C-g or ESC
Tino Calancha [Tue, 25 Jul 2017 02:38:28 +0000 (11:38 +0900)]
register-read-with-preview: Quit if user input C-g or ESC

* lisp/register.el (register-read-with-preview):
Quit if user input C-g or ESC (bug#27634).
* doc/emacs/regs.texi (Registers): Update manual.
* test/lisp/register-tests.el (register-test-bug27634): Add test.

7 years ago; Fix previous commit
Mark Oteiza [Tue, 25 Jul 2017 00:17:50 +0000 (20:17 -0400)]
; Fix previous commit

Functions prefixed with `turn-on-foo' are quite old, and in general
subsumed by the corresponding `foo-mode` command.
* lisp/display-line-numbers.el (turn-on-display-line-numbers-mode):
Rename with library prefix, mark as internal.  Nix autoload.

7 years agoRecognize MirBSD Korn shell rc file
Mark Oteiza [Tue, 25 Jul 2017 00:13:33 +0000 (20:13 -0400)]
Recognize MirBSD Korn shell rc file

* lisp/files.el (auto-mode-alist): Add .mkshrc to the list.

7 years ago* configure.ac: Be explicit about ImageMagick version in summary.
Glenn Morris [Mon, 24 Jul 2017 23:51:27 +0000 (19:51 -0400)]
* configure.ac: Be explicit about ImageMagick version in summary.

7 years agoProperly align global lispsym
Andreas Schwab [Mon, 24 Jul 2017 23:12:50 +0000 (01:12 +0200)]
Properly align global lispsym

* lib-src/make-docfile.c (close_emacs_globals): Wrap struct
Lisp_Symbols inside struct.
* src/alloc.c (sweep_symbols): Update use of lispsym.
* src/lisp.h (builtin_lisp_symbol): Likewise.

7 years agoDo not use ImageMagick 7 and later
Paul Eggert [Mon, 24 Jul 2017 22:13:26 +0000 (15:13 -0700)]
Do not use ImageMagick 7 and later

Suggested by Glenn Morris (Bug#25967#15).
* configure.ac (IMAGEMAGICK_MODULE): Reject 7 and later.

7 years ago* lisp/progmodes/perl-mode.el: Add support for indented here docs
Stefan Monnier [Mon, 24 Jul 2017 22:10:02 +0000 (18:10 -0400)]
* lisp/progmodes/perl-mode.el: Add support for indented here docs

* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function):
Recognize the new <<~ syntax for indented here docs.
(perl-syntax-propertize-special-constructs): Adjust search of the
end of here docs accordingly.

* test/manual/indent/perl.perl: Add test for indented here docs.

7 years ago(loadhist-unload-element): Move ERT and cl-generic methods
Stefan Monnier [Mon, 24 Jul 2017 19:58:30 +0000 (15:58 -0400)]
(loadhist-unload-element): Move ERT and cl-generic methods

* lisp/loadhist.el (loadhist-unload-element): Don't define cl-generic
and ert methods here.
(loadhist-unload-element) <(head define-type)>: Remove unused var `slots'.

* lisp/emacs-lisp/cl-generic.el (loadhist-unload-element): Define
unload method for cl-defmethod.
(cl-generic-ensure-function): Remove redundant `defalias'.

* lisp/emacs-lisp/ert.el (ert-set-test): Move the current-load-list
setting here...
(ert-deftest): ...from here.
(loadhist-unload-element): Define unload method for ert-deftest.

7 years agoFix Bug#27371
Michael Albinus [Mon, 24 Jul 2017 17:38:17 +0000 (19:38 +0200)]
Fix Bug#27371

* lisp/loadhist.el (loadhist-unload-element): Declare for
different entry types of `load-history'.
(loadhist--restore-autoload): New variable.
(loadhist--unload-function): New defun.
(unload-feature): Use `loadhist-unload-element'.  Recommended by
Stefan Monnier.  (Bug#27371)

* test/lisp/net/tramp-tests.el (tramp-test39-unload):
Check, that the `tramp-file-name' structure has been unloaded.

7 years agoEnsure that we parse images right in shr.el
Grégoire Jadi [Mon, 24 Jul 2017 15:29:28 +0000 (17:29 +0200)]
Ensure that we parse images right in shr.el

* lisp/net/shr.el (shr-image-fetched): Go back to the
beginning of the buffer before trying to parse the image
fetched.

7 years agoUpdate .gitignore for Valgrind and no Automake
Paul Eggert [Mon, 24 Jul 2017 05:40:21 +0000 (22:40 -0700)]
Update .gitignore for Valgrind and no Automake

* .gitignore: Remove .deps/ since we no longer use Automake.
Add vgcore.*[0-9], for debugging Emacs with Valgrind+GDB.

7 years agoMerge from gnulib
Paul Eggert [Mon, 24 Jul 2017 05:21:38 +0000 (22:21 -0700)]
Merge from gnulib

This incorporates:
2017-07-23 Rename module 'strftime' to 'nstrftime'
* admin/merge-gnulib (GNULIB_MODULES): Add nstrftime, remove strftime.
* build-aux/config.guess: Copy from gnulib.
* lib/nstrftime.c: Rename from lib/strftime.c.
* m4/nstrftime.m4: Rename from m4/strftime.m4.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.

7 years ago; Don't keep temporary buffers alive after a dired test
Tino Calancha [Mon, 24 Jul 2017 02:58:35 +0000 (11:58 +0900)]
; Don't keep temporary buffers alive after a dired test

* test/lisp/dired-tests.el (dired-test-bug22694)
(dired-test-bug25609, dired-test-bug27243)
Delete all temporary dired buffers at the end.