1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-19 10:22:27 +00:00
Commit Graph

2393 Commits

Author SHA1 Message Date
Michael Albinus
2ffdc041b1 * test/Makefile.in (url-tramp-test.log): Do not handle special. 2017-12-09 14:30:04 +01:00
Michael Albinus
34bedf5d0b Sync with Tramp 2.4.0-pre
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.4.0-pre".

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
Use `tramp-handle-file-directory-p'.
(tramp-adb-parse-device-names)
(tramp-adb-handle-expand-file-name)
(tramp-adb-handle-file-truename, tramp-adb-handle-process-file):
Adapt `tramp-make-tramp-file-name' call.
(tramp-adb-handle-file-directory-p): Remove.
(tramp-adb-maybe-open-connection): Do not set
tramp-current-*.

* lisp/net/tramp-cache.el (tramp-get-hash-table):
Adapt `tramp-make-tramp-file-name' call.

* lisp/net/tramp-cmds.el (tramp-cleanup-connection): Do not set
tramp-current-*.

* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
Use `tramp-handle-file-directory-p'.
(tramp-gvfs-dbus-event-error): Trace with verbosity 6.
(tramp-gvfs-do-copy-or-rename-file): Use `file-truename'.
(tramp-gvfs-handle-file-directory-p): Remove.
(tramp-gvfs-handler-askpassword): Do not set tramp-current-*.

* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
(tramp-sh-handle-start-file-process)
(tramp-maybe-open-connection, tramp-get-remote-path): Do not
set tramp-current-*.
(tramp-maybe-open-connection): Set "password-vector" property.

* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Use `tramp-handle-file-accessible-directory-p' and
`tramp-handle-file-directory-p'.
(tramp-smb-handle-copy-directory, tramp-smb-handle-file-acl)
(tramp-smb-handle-set-file-acl)
(tramp-smb-maybe-open-connection): Do not set tramp-current-*.
(tramp-smb-handle-file-directory-p): Remove.
(tramp-smb-handle-make-symbolic-link):
Use `tramp-get-connection-buffer' rather than `buffer-name'.

* lisp/net/tramp.el (tramp-current-method, tramp-current-user)
(tramp-current-domain, tramp-current-host)
(tramp-current-port): Remove.
(tramp-dissect-file-name): No special handling of localname anymore.
(tramp-make-tramp-file-name): Reimplemnt with new signature.
(tramp-completion-make-tramp-file-name): Fix docstring.
(tramp-get-buffer, tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-check-cached-permissions, tramp-local-host-p)
(tramp-get-remote-tmpdir, tramp-clear-passwd):
Adapt `tramp-make-tramp-file-name' call.
(tramp-completion-handle-file-name-all-completions)
(tramp-action-login, tramp-read-passwd): Do not set
tramp-current-*.
(tramp-handle-file-directory-p): New defun.
(tramp-handle-verify-visited-file-modtime): Remove superfluous
`with-parsed-tramp-file-name'.
(tramp-process-actions, tramp-read-passwd):
Use "password-vector" property.
(tramp-call-process, tramp-call-process-region): No special
setting of vec.
(tramp-read-passwd): Handle "login-as" property.

* test/lisp/net/tramp-tests.el (tramp-test21-file-links):
Special code for "smb".
2017-12-09 13:22:52 +01:00
Michael Albinus
b067fa1f7d Minor Tramp fixes
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Fix a bug when renaming.

* test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test.
(tramp-test42-delay-load, tramp-test42-remote-load-path):
Skip unless Emacs >= 26.
2017-12-09 11:35:04 +01:00
Michael Albinus
9d9cbafce2 Fix Bug#29579
* lisp/files.el (file-name-non-special):
Inhibit `file-name-handler-alist' only for some operations.
Add missing operations.  (Bug#29579)

* lisp/net/tramp-compat.el (tramp-compat-file-name-quote):
Do not quote if it is quoted already.

* lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory):
Use `copy-tree' but `copy-sequence'.

* lisp/net/tramp.el (tramp-handle-file-truename): Handle several
trailing slashes correctly.

* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file, tramp-test24-file-acl)
(tramp-test25-file-selinux, tramp--test-check-files):
Handle also quoted file names.
(tramp-test21-file-links): Fix file name quoting test.
(tramp-test24-file-acl): Be more robust for "smb" method.
(tramp-test35-make-auto-save-file-name): Enable hidden test cases.
2017-12-09 11:33:48 +01:00
Michael Albinus
7eea3144d4 Minor Tramp fixes
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Fix a bug when renaming.

* test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test.
(tramp-test42-delay-load, tramp-test42-remote-load-path):
Skip unless Emacs >= 26.
2017-12-08 16:37:53 +01:00
Paul Eggert
47423f0603 Fix zero-padding bug with (format "%#08x" n)
Problem reported by Gustaf Waldemarson (Bug#29609).
* src/editfns.c (styled_format):
Put zero padding after a leading "0x", not before.
* test/src/editfns-tests.el (format-sharp-0-x): New test.
2017-12-07 18:08:56 -08:00
Michael Albinus
a1bbc49015 Fix Bug#29579
* lisp/files.el (file-name-non-special):
Inhibit `file-name-handler-alist' only for some operations.
Add missing operations.  (Bug#29579)

* lisp/net/tramp-compat.el (tramp-compat-file-name-quote):
Do not quote if it is quoted already.

* lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory):
Use `copy-tree' but `copy-sequence'.

* lisp/net/tramp.el (tramp-handle-file-truename): Handle several
trailing slashes correctly.

* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file, tramp-test24-file-acl)
(tramp-test25-file-selinux, tramp--test-check-files):
Handle also quoted file names.
(tramp-test21-file-links): Fix file name quoting test.
(tramp-test24-file-acl): Be more robust for "smb" method.
(tramp-test35-make-auto-save-file-name): Enable hidden test cases.
2017-12-06 20:49:30 +01:00
Noam Postavsky
cfa50d30f2 ; Tracing for eieio-test random failure (Bug#24503)
* test/Makefile.in [EMACS_HYDRA_CI]: Always show log for eieio-tests.
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (top-level): Trace
cl-generic functions.
(eieio-test-dump-trace): New function.
(eieio-test-37-obsolete-name-in-constructor): Use it.
2017-12-03 15:39:02 -05:00
Noam Postavsky
dbe410d9ad Fix faceup tests when run from elc
String literals may be shared by the compiler, so the test string
needs to be copied before adding properties to it.  For single
properties, just use a string literal with properties.
* test/lisp/emacs-lisp/faceup-tests/faceup-test-basics.el
(faceup-markup): Split into...
(faceup-markup-basics, faceup-markup-escaping, faceup-markup-plain)
(faceup-markup-plain-full-text, faceup-markup-anonymous-face)
(faceup-markup-anonymous-face-2keys, faceup-markup-anonymous-nested)
(faceup-markup-nested, faceup-markup-overlapping)
(faceup-markup-multi-face, faceup-markup-multi-property): New tests.
2017-12-03 15:39:01 -05:00
Noam Postavsky
f924956ed1 ; test/lisp/dired-aux-tests.el (with-dired-bug28834-test): Fix debug decl. 2017-12-03 14:53:36 -05:00
Paul Eggert
9d7f0e27e0 Merge from origin/emacs-26
04e5b28ff1 Fix bug in i18n/l10n optimization
8227087194 Let autoload-compute-prefix be set file-locally (Bug#29471)
98ca7d5f26 Improve edit-kbd-macro prompting in case of remapped keys ...
c02c1f6be7 Add tests on electric-indentation and Python multiline str...
946bb6d225 Disable electric indent for python strings (Bug#29305)
35f1ed10e4 ; ChangeLog.2: Fix bug reference.
ac316634e4 Fix buffer overflow in fontname conversion (Bug#29523)
bf9b972843 Fix byte compilation of files with leading directories
ac144dc835 * lisp/files.el (make-backup-file-name-1): Fix scoping error.
1b351c8a47 Revert Tramp commit from 2017-11-20
77cf972592 Improve documentation of buffer-list commands and features
66ec92af00 Fix backing up remote files in local directories on MS-Win...
7e61e74da7 * doc/emacs/mule.texi (Output Coding): Clarify sendmail co...
1e25cd79ff Revert "Fix backing up remote files in local directories o...
f52d79500b Fix a typo in ELisp manual
bf26fc3656 * lisp/composite.el (find-composition): Fix a typo in the ...
2017-12-02 21:38:05 -08:00
Paul Eggert
f1204e1dda Merge from origin/emacs-26
8c8b673288 Fix backing up remote files in local directories on MS-Win...
8eb6870be6 Fix vertical cursor motion in pixel-scroll.el
625e84f156 Fix typos in doc strings of message.el
9292276a44 Fix a typo in the Emacs manual
42509c0649 Improve the documentation of 'table-insert-sequence'
93dc7ae4a4 Port better to QNX
ad99550610 Make tramp-test42-auto-load more robust
af0ce33d08 ; * lisp/composite.el (find-composition): Fix a typo in la...
bdbcdbac43 Avoid assertions in find-composition
2017-12-02 21:38:05 -08:00
Lele Gaifax
c02c1f6be7 Add tests on electric-indentation and Python multiline strings (Bug#29305)
* test/lisp/progmodes/python-tests.el
(python-indent-electric-comma-inside-multiline-string,
python-indent-electric-comma-after-multiline-string): New tests.
2017-12-02 09:35:44 -05:00
Michael Heerdegen
cc58d4de56 Add macros thunk-let' and thunk-let*'
* lisp/emacs-lisp/thunk.el (thunk-let, thunk-let*): New macros.
* test/lisp/emacs-lisp/thunk-tests.el:
(thunk-let-basic-test, thunk-let*-basic-test)
(thunk-let-bound-vars-cant-be-set-test)
(thunk-let-laziness-test, thunk-let*-laziness-test)
(thunk-let-bad-binding-test): New tests for `thunk-let' and
`thunk-let*.

* doc/lispref/eval.texi (Deferred Eval): New section.
* doc/lispref/elisp.texi: Update menu.
2017-12-01 08:54:05 +01:00
Michael Albinus
ad99550610 Make tramp-test42-auto-load more robust
* test/lisp/net/tramp-tests.el (tramp-test42-auto-load):
Make it more robust.  Don't skip.
2017-11-30 20:31:33 +01:00
Glenn Morris
f069ea4f84 Merge from origin/emacs-26
408862f02a (origin/emacs-26) ; * lisp/emacs-lisp/bytecomp.el: Tweak m...
9964db4c34 Restore obsolete method of changing byte-compile-dest-file
3dd25aeecb Some minor Tramp corrections
d670a15f25 * doc/misc/url.texi (http/https): Fix typo
99d07e8d5e Remove some bogus definition-prefixes from loaddefs
6067f0c702 Shell-quote wildcards when invoking 'vc-git-grep'
0540df10e6 Update documentation of '.dir-locals-2.el'
f2441ab320 ; Fix some tiny doc and comment typos
22ff46e6d8 ; Fix some comment typos

# Conflicts:
#	etc/NEWS
2017-11-29 17:12:56 -08:00
Glenn Morris
7aedb6116f Merge from origin/emacs-26
02d114d6b8 * lisp/tree-widget.el (tree-widget-end-guide): Escape it. ...
0a85d12474 Fix ELisp "Warning Tips"
06d05fec84 Fix Bug#29163
ac64fdb248 Harden exec_byte_code against redefining 'error'
700f74e4c8 Fix Edebug specs for if-let* and and-let* (Bug#29236)
0ded1b41a9 Fix Edebug's handling of dotted specs (bug#6415)
16358d4fcb Improve documentation of "constant" symbols
2017-11-29 17:12:05 -08:00
Michael Albinus
3dd25aeecb Some minor Tramp corrections
* lisp/net/tramp.el (tramp-handle-directory-file-name):
Handle several trailing slashes correctly.
(tramp-handle-file-selinux-context): New defun.

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Use `tramp-handle-file-selinux-context'.

* test/lisp/net/tramp-tests.el (tramp-test06-directory-file-name):
Extend test.
(tramp-test17-insert-directory): Make check more robust.
(tramp-test42-auto-load): Combine several let forms.
(tramp-test42-delay-load, tramp-test42-recursive-load)
(tramp-test42-remote-load-path, tramp-test43-unload): Rename.
2017-11-29 09:37:42 +01:00
Stefan Monnier
91a7f934ac * lisp/emacs-lisp/cl-macs.el: Fix bug#26073.
* lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand):
Implement Common-Lisp's behavior for symbol-macro's let-rebindings.
(cl--letf, cl-letf): Don't get fooled into using a plain `let` for
symbol-macros.

* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-symbol-macrolet-hide):
New test.
2017-11-27 15:33:30 -05:00
Stefan Monnier
cea0bca54f * lisp/emacs-lisp/cl-macs.el: Fix &key with no key arg
* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-empty-keyargs): New test.
* lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Fix it.
2017-11-27 12:45:16 -05:00
Michael Albinus
06d05fec84 Fix Bug#29163
* lisp/net/tramp.el (tramp-autoload-file-name-regexp):
Do not use "\\'" in regexp.  (Bug#29163)
(top) Do not run (tramp-register-autoload-file-name-handlers)
when loading tramp.el.

* test/lisp/net/tramp-tests.el (tramp--test-mock-p): New defun.
(tramp-test32-environment-variables-and-port-numbers)
(tramp-test41-asynchronous-requests): Use it.
(tramp-test42-auto-load): New test.
(tramp-test43-recursive-load, tramp-test44-remote-load-path)
(tramp-test45-delay-load, tramp-test46-unload): Rename.
2017-11-27 13:31:53 +01:00
Gemini Lasswell
700f74e4c8 Fix Edebug specs for if-let* and and-let* (Bug#29236)
* test/lisp/emacs-lisp/subr-x.el (if-let*, if-let): Change Edebug
spec to cause Edebug to instrument tests the results of which are
not bound to symbols (the (VALUEFORM) case).
(and-let*): Change Edebug spec to allow empty body.

*test/lisp/emacs-lisp/subr-x-tests.el:
(subr-x-and-let*-test-group-1): Add missing quote to erroneous
form so Edebug will work on this test.
2017-11-26 17:36:14 -08:00
Gemini Lasswell
0ded1b41a9 Fix Edebug's handling of dotted specs (bug#6415)
* lisp/emacs-lisp/cl-macs.el (cl-destructuring-bind): Use
cl-macro-list1 instead of cl-macro-list in Edebug spec.

* lisp/emacs-lisp/edebug.el (edebug-after-dotted-spec): Delete
unused variable.
(edebug-dotted-spec): Add docstring.
(edebug-match-specs): Allow &optional and &rest specs to
match nothing at the tail of a dotted form. Handle matches of
dotted form tails which return non-lists.

* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-dotted-forms):
New test.

* test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el:
(edebug-test-code-use-destructuring-bind): New function.
2017-11-26 13:44:15 -08:00
Paul Eggert
d20161b25e Merge from origin/emacs-26
a89f0b6f33 maint: shorten https://lists.gnu.org/archive/html/... links
8be3aee281 Merge from Gnulib
265cee553f Work around GCC bug 80776 on Fedora 27 x86
dc7a97fb84 Tweak copy-file, rename-file doc
cfa2a944d4 Change font-lock-extend-region-multiline handling in mhtml...
a8664cc998 Minor cleanup in tramp-gvfs-handle-file-local-copy
55c5b12fa0 Add test for Bug#29423 in Tramp.
3198a1646e Avoid jumbled order in HTML rendered by shr.el
23bfc2d2db Make sure 'dired-filename' property is always put by ls-lisp
f7fdaea4c0 A better solution for bug#29347
86e6ed8521 ; * src/thread.c (acquire_global_lock): Fix thinko in last...
f300852037 Avoid a hang after C-g while sit-for on a Unix TTY
d7fc719ff1 Improve the doc string of 'list-packages'
b4f67ebb92 Improve discoverability of 'defvar' for suppressing warnings
8a2b204e64 Improve discoverability of 'read-buffer-completion-ignore-...
eea4e9194c Improve documentation of self-insert-uses-region-functions
e6e41dac87 Reflect changes in copy-file and rename-file in doc strings
0ec534070f * lisp/progmodes/cc-vars.el (c-offsets-alist): Doc fix.  (...
1d0dbdff6c Reorder type predicates in ELisp manual
b081ec9dd7 Fix backward scrolling in buffers with header-line
8e40429c96 ; Fix some doc typos
ed2c542920 * lisp/bindings.el (buffer-file-coding-system): Add explic...
d82474e452 * src/fns.c (syms_of_fns) <overriding-plist-environment>: ...
292c09ff6d Fix incorrect interaction of drag/drop and double click (b...
d6fadb1d26 * lisp/menu-bar.el (menu-bar-options-save): Add display-li...
daa959efbc * lisp/menu-bar.el (menu-bar-options-save): Add global-dis...
17fc74d1b9 * lisp/follow.el (follow-mode): Restore mode line lighter....
f20c2e2f3d ; Compare process status against 127 exactly
2d203ffb7e Extract the common part of ruby-flymake-simple and ruby-fl...
09944d499a Add Rubocop Flymake backend
c65a0ae7c4 ; Fix a typo
7ab7603125 Update nt/INSTALL.W64 (Bug#28601)
11db253c08 Remove incorrect NEWS item about VC state indicator (Bug#2...
2fdc01c036 * lisp/emacs-lisp/byte-run.el (defsubst): Doc fix.
735c8b516e Make c-defun-name analyze more thoroughly a function type ...
92f0c4cd56 Avoid bogus abbreviated file names if HOME changes
8d450453fa * lisp/emacs-lisp/byte-run.el (inline): Give it a doc.
37a3b4ea40 Fix erc keep-place module with new defaults (Bug#29111)
6c312605bf Add window divider faces to NS (bug#29353)

# Conflicts:
#	etc/NEWS
#	lisp/ruler-mode.el
2017-11-25 22:55:35 -08:00
Paul Eggert
a89f0b6f33 maint: shorten https://lists.gnu.org/archive/html/... links 2017-11-25 22:48:12 -08:00
Michael Albinus
55c5b12fa0 Add test for Bug#29423 in Tramp.
* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory):
Add test for Bug#29423.
2017-11-25 16:03:53 +01:00
Glenn Morris
92f0c4cd56 Avoid bogus abbreviated file names if HOME changes
* lisp/files.el (abbreviate-file-name):
If HOME changes, ignore `abbreviated-home-dir'.  (Bug#19657#20)
* test/lisp/files-tests.el (files-test-abbreviated-home-dir): New.
2017-11-21 12:27:36 -05:00
Glenn Morris
5f1cf4b5c7 Merge from origin/emacs-26
fc5b8f1 Fix Bug#29149
5622b2e Merge branch 'emacs-26' of git.sv.gnu.org:/srv/git/emacs into...
4da8799 (emacs-26) Fix misbehavior when drawing three-pixel high hori...
1b082c8 MH-E: don't automatically download external-body parts
069f978 ; * lisp/emacs-lisp/byte-run.el: Fix a typo in a comment.
504a56c ; Fix last commit
a34e44e ; Fix last commit
a8892b4 Further fix for Bug#29291
d14923b Fix divider frame params on NS (bug#29352)
b2518ac Spelling fixes

# Conflicts:
#	etc/NEWS
#	test/lisp/net/tramp-tests.el
2017-11-20 13:10:11 -05:00
Glenn Morris
33bfbfee7e Merge from origin/emacs-26
6e6bf60 Don't let delete_frame select a tooltip frame (Bug#27647)
e9dd580 Filter obtrusive events in help-read-key-sequence.
90075e8 Fix symlink flag in tramp-gvfs-handle-file-attributes
c355529 Fix bug in tramp-handle-file-truename
4c21d04 Fix a typo in doc string of electric-indent-functions-without...
319c2de Avoid assertion violations in echo_area_display
63c7733 ; * lisp/ido.el (ido-find-alternate-file): Doc fix.  (Bug#29278)
cbd319a Fix case-folding in Occur
29520b0 Fix quick-calc in C mode with hex values
3e80124 Improve documentation of dired-next/prev-marked-file
90add18 Prevent aborts in line-move-visual
648c128 More fixes in src/.gdbinit
104f3e5 Document how to enter whitespace when using grep-read-files
2017-11-20 13:08:35 -05:00
Glenn Morris
93a4953463 Merge from origin/emacs-26
42c8768 Fix .gdbinit following lisp.h changes
720322a ; Spelling fixes
617c556 * lisp/simple.el (shell-command): Doc fixes.
1faade8 Fix marker adjustment for undo (Bug#29118)
2017-11-20 13:08:34 -05:00
Michael Albinus
504a56cf32 ; Fix last commit 2017-11-19 12:50:05 +01:00
Michael Albinus
a34e44e8ee ; Fix last commit
* test/lisp/net/tramp-tests.el (tramp-test24-file-acl):
Check for local ACL support.  (Bug#29291)
2017-11-19 12:22:30 +01:00
Michael Albinus
f41bcae3e5 ; * test/lisp/net/tramp-tests.el (tramp-test24-file-acl):
Remove test instrumentation.
2017-11-19 12:18:37 +01:00
Michael Albinus
a8892b4e62 Further fix for Bug#29291
* test/lisp/net/tramp-tests.el (tramp-test24-file-acl):
Check for local ACL support.  (Bug#29291)
2017-11-19 12:11:18 +01:00
Michael Albinus
ecda09c22d ; * test/lisp/net/tramp-tests.el (tramp-test24-file-acl): More instrumentation 2017-11-19 11:06:19 +01:00
Michael Albinus
c355529bae Fix bug in tramp-handle-file-truename
* lisp/net/tramp.el (tramp-handle-file-truename): Expand localname.

* test/lisp/net/tramp-tests.el (tramp-test21-file-links): Check also
relative symbolic links.
2017-11-18 14:24:03 +01:00
Michael Albinus
345c7d9c7b ; * test/lisp/net/tramp-tests.el (tramp-test24-file-acl): Instrument test. 2017-11-17 13:38:52 +01:00
Michael Albinus
d8e0951d5f ; Remove Tramp test instrumentation. Do not merge
* test/Makefile.in: Remove instrumentation for tramp-tests.

* test/lisp/net/tramp-tests.el (tramp-test41-asynchronous-requests):
Remove instrumentation.
2017-11-17 13:14:58 +01:00
Paul Eggert
720322aab8 ; Spelling fixes 2017-11-16 00:01:00 -08:00
Glenn Morris
52d822f31b Merge from origin/emacs-26
796c7f7 (origin/emacs-26) ; Fix last fix of 'mouse-drag-and-drop-region'
40d41dd (emacs-26) Fix Bug#28139
a5ec644 Fix Bug#29291
8b900e5 Fix Bug#2928
ff7bd84 Make 'mouse-drag-and-drop-region' work with 'mouse-autoselect...
0491de8 * etc/PROBLEMS: Remove fixed xterm-mouse-mode problems
caa39f4 Fix cookie handling (bug#29282)
93304e3 Improve documentation of Edebug and macros
2017-11-14 17:43:06 -05:00
Michael Albinus
a5ec644caa Fix Bug#29291
* test/lisp/net/tramp-tests.el (tramp-test24-file-acl):
Preserve permissions when copying.  (Bug#29291)
2017-11-14 10:38:41 +01:00
Michael Albinus
8b900e5ba2 Fix Bug#2928
* test/lisp/net/tramp-tests.el (tramp-test25-file-selinux):
Enhance test.  (Bug#29287)
(tramp-test44-delay-load): Fix for older Emacsen.
2017-11-14 10:21:55 +01:00
Paul Eggert
99ceefa8ec Merge from origin/emacs-26
79108894db Port to IBM xlc 12.01
d14956099d Simplify by removing HAVE_STRUCT_ATTRIBUTE_ALIGNED
b1573a97e1 Use alignas to fix GCALIGN-related bugs
5d68dc9a2f Change vectorlike from struct to union
6aa0a26b46 Don't enable cursor-sensor-mode in mhtml-mode
2b8ef8dddf * lisp/files.el (abbreviate-file-name): Doc fix.  (Bug#29267)
fe85ce1e16 Unbreak interactive run of a flymake test (bug#29267)
48ad00390d Fix Bug#29225
42daf83f08 CC Mode: Fix defun-open being recognized as brace-list-ope...
7775c47298 Merge from Gnulib
e470d16448 Pacify GCC when configured --with-x-toolkit=no
49450d0951 * lisp/find-dired.el (find-grep-dired): Doc fix.  (Bug#29262)
e286b3381f Fix more flymake-diag-region eob corner cases and add test...

# Conflicts:
#	src/lisp.h
2017-11-13 10:54:20 -08:00
João Távora
fe85ce1e16 Unbreak interactive run of a flymake test (bug#29267)
See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19657#20 for the
technique used here.

* test/lisp/progmodes/flymake-tests.el (ruby-backend):
Let-bind abbreviated-home-dir.
2017-11-12 12:34:36 +00:00
Michael Albinus
48ad00390d Fix Bug#29225
* src/fileio.c (Fset_file_acl): Report error only when
acl_errno_valid returns true.  (Bug#29225)

* test/lisp/net/tramp-tests.el (tramp-test24-file-acl)
(tramp-test25-file-selinux): New tests.
(tramp-test26-file-name-completion, tramp-test27-load)
(tramp-test28-process-file, tramp-test29-start-file-process)
(tramp-test30-interrupt-process, tramp-test31-shell-command)
(tramp-test32-environment-variables)
(tramp-test32-environment-variables-and-port-numbers)
(tramp-test33-explicit-shell-file-name)
(tramp-test34-vc-registered)
(tramp-test35-make-auto-save-file-name)
(tramp-test36-find-backup-file-name)
(tramp-test37-make-nearby-temp-file)
(tramp-test38-special-characters)
(tramp-test38-special-characters-with-stat)
(tramp-test38-special-characters-with-perl)
(tramp-test38-special-characters-with-ls, tramp-test39-utf8)
(tramp-test39-utf8-with-stat, tramp-test39-utf8-with-perl)
(tramp-test39-utf8-with-ls, tramp-test40-file-system-info)
(tramp-test41-asynchronous-requests)
(tramp-test42-recursive-load, tramp-test43-remote-load-path)
(tramp-test44-delay-load, tramp-test45-unload): Rename.
2017-11-12 13:06:09 +01:00
João Távora
e286b3381f Fix more flymake-diag-region eob corner cases and add tests (bug#29201)
* lisp/progmodes/flymake.el (flymake-diag-region): Correct
more eob corner cases.

* test/lisp/progmodes/flymake-tests.el
(eob-region-and-trailing-newline): New test.
2017-11-11 23:44:52 +00:00
Noam Postavsky
1fa0766cfa ; Merge from emacs-26
9533d76b0b Keep Man sections in natural order (bug#28998)
d63c9a96f5 * lisp/minibuffer.el: Install a workaround for bug#16274
7657a86709 Fix comparisons with tip_frame in GTK builds
603a0716a8 Improve the documentation of M-n for entering file names
72f813fb56 Fix desktop auto-save timer when linum-mode is used
44340b475f Fix "C-h k" in xterm-mouse-mode
05aa6d4a68 Fix off-by-1 bug in --enable-checking=stringbytes
096f638ddc Correct the indentation of C99's compound literals.
c52a2aa8f3 Improve the doc string of 'dired-isearch-filter-filenames'
e592b92482 * lisp/isearch.el (search-invisible): Doc fix.  (Bug#29222)
f3e69a80ab Fix display of line numbers in GTK builds
e6f1fd4091 Fix previous change to flymake-diag-region (bug#29174)
89382780e1 flymake-diag-region really returns nil if region is invali...
535688a418 Flymake correctly highlights whole last line if eob (bug#2...
72e62d3fdb Protect Flymake checkdoc backend against checkdoc errors (...
b28de57411 Sort entries of the Flymake diagnostics buffer (bug#29175)
fc56bea142 Correctly indent C++14 brace lists which are a second argu...
9dde8be9cd Fix redisplay of overlay-arrows on GUI frames
0da08f2f8e Protect Flymake tests against older Ruby and Perl (bug#29187)
781f276cc1 Fix URL cookie expiration bug
2017-11-11 11:12:00 -05:00
João Távora
0da08f2f8e Protect Flymake tests against older Ruby and Perl (bug#29187)
* test/lisp/progmodes/flymake-tests.el (perl-backend): Search
for the error from the bottom.
(ruby-backend): Protect against situation of bug#29187
2017-11-09 09:38:11 +00:00
Paul Eggert
6ee8270594 Merge from origin/emacs-26
255ba01148 Fix handling of nil PRED2 arg for completion-table-with-pr...
949b70a7d8 ; Minor comment copyedit in window.c
20f9bf30f0 Describe Lao rendering problem
3d61657694 Fix docstring of arabic-shaper-ZWNJ-handling
db949166ec Handle single-line comments correctly (Bug#26049)
795bb233a5 * test/lisp/net/tramp-tests.el (tramp-test16-file-expand-w...
ba00ea7d0d * etc/PROBLEMS: Add URL to relevant issues for xterm+evil bug
4a6015811e ; In text.texi fix typo spotted by Štěpán Němec
93cd8415b2 Document new treatment of 'comment-auto-fill-only-comments'
ca2d94ba61 Do not load Tramp unless `tramp-mode' is non-nil
709478eaa8 Prefer `customize-set-variable' in tramp.texi
5d36f2227f Fix last change in hscroll_window_tree
72d07d1950 Ediff: add some missing documentation
18af404ef3 Support python virtualenv on w32 (Bug#24464)
efd0371c23 Improve dired deletion error handling (Bug#28797)
5d744e032f Don't replace user input when completion prefix is empty (...
ec6cf35c5f ; Describe xt-mouse problems with Evil mode
c572e1f329 Return non-nil from gnutls-available-p under GnuTLS 2.x
a2cc6d74c5 Fix Flymake help-echo functions across windows (bug#29142)
58bb3462ee Add tests for Flymake backends for Ruby and Perl
58e742b21d Add a Flymake backend for Perl
9dee764165 Add a Flymake backend for Ruby
3ad712ebc9 Add a Flymake backend for Python (bug#28808)
8db2b3a79b Allow "%" in Tramp host names
8c50842790 ; Fix typo in test/file-organization.org
00fa4449cd ; Fix typo
918a2dda07 Use hybrid malloc for FreeBSD (Bug#28308)
725ab635d9 Add html-, mhtml- and python-mode support to semantic symref
369da28702 Improve documentation of 'window-scroll-functions'
93818eed8a Fix subtle problems in tabulated-list-mode with line numbers
1f1de8e872 Make gdb-non-stop-setting default to nil on MS-Windows
680e8e119b Fix gdb-mi prompt after "attach PID" command
ff33074546 Fix doc string of 'window-configuration-change-hook'
787b75ad71 Improve documentation of window hooks
d9be8704ae Fix hscroll suspension after cursor motion
6f43d29d29 ; * CONTRIBUTE, admin/make-tarball.txt: Doc tweaks re 'ema...
a0d30d6369 Introduce a function to CC Mode which displays the current...
383abc8898 ; Fix some comment typos
b02c2714c3 Fix typos in ediff-wind.el
4f38bdec74 Examine tex-chktex--process in the correct buffer
94b490529a * nt/INSTALL.W64: Update to current mingw64 install instru...
c25113d4ac Don't resignal errors in flymake-diag-region
e950f329c0 New xref-quit-and-goto-xref command bound to TAB (bug#28814)
5d34e1b288 Allow split-window-sensibly to split threshold in further ...
2a973edeac Honor window-switching intents in xref-find-definitions (b...
78e9065e9f * lisp/emacs-lisp/generator.el (iter-do): Add a debug decl...
caa63cc96c * lisp/progmodes/flymake.el (flymake-start): Fix dead buff...
9f4f130b79 Fix buffer name comparison in async shell-command

# Conflicts:
#	etc/NEWS
#	lisp/vc/ediff-wind.el
2017-11-08 19:22:26 -08:00
Ryan C. Thompson
255ba01148 Fix handling of nil PRED2 arg for completion-table-with-predicate
* lisp/minibuffer.el (completion-table-with-predicate): Don't act as
if strict is non-nil when pred2 is nil (Bug#27841).
* test/lisp/minibuffer-tests.el
(completion-table-with-predicate-test): Add a test for Bug#27841.
2017-11-07 21:25:55 -05:00
Glenn Morris
48f149b40b ; * test/src/keyboard-tests.el: Standardize copyright and license. 2017-11-07 18:59:35 -05:00
Chris Feng
1f3f4b1296 Handle unread-command-events consistently (bug#23980)
* src/keyboard.c (read_char): Events put into `unread-command-events'
with the form (t . EVENT) should always have the t stripped when read
out.
* test/src/keyboard-tests.el: New tests for `unread-command-events'.
2017-11-08 00:39:43 +08:00
Glenn Morris
795bb233a5 * test/lisp/net/tramp-tests.el (tramp-test16-file-expand-wildcards):
Clean up properly.
2017-11-06 18:50:53 -05:00
Michael Albinus
ca2d94ba61 Do not load Tramp unless `tramp-mode' is non-nil
* lisp/net/tramp.el (tramp-autoload-file-name-handler): Load Tramp only if
`tramp-mode' is non-nil.
(tramp-unload-file-name-handlers): Unload also
`tramp-autoload-file-name-handler'.

* test/lisp/net/tramp-tests.el (tramp-test42-delay-load): Extend test.
2017-11-05 20:08:05 +01:00
João Távora
58bb3462ee Add tests for Flymake backends for Ruby and Perl
* test/lisp/progmodes/flymake-tests.el (perl-backend)
(ruby-backend): New tests.
(warning-predicate-rx-perl, warning-predicate-function-perl):
Delete tests.

* test/lisp/progmodes/flymake-resources/test.pl: Include an
error the test file.

* test/lisp/progmodes/flymake-resources/test.rb: file.
2017-11-05 12:55:43 +00:00
Michael Albinus
8c50842790 ; Fix typo in test/file-organization.org 2017-11-05 12:40:13 +01:00
Łukasz Jędrzejewski
e973c5f5f4 Extract user from host when searching for entries in auth-source-pass
* lisp/auth-source-pass.el (auth-source-pass--user): New function.
(auth-source-pass--find-match): Use it.  When the user is not
explicitly specified and no entry is found, extract the user from
the host and then search again.  (Bug#29045)
* test/lisp/auth-source-pass-tests.el
(auth-source-pass-find-match-matching-extracting-user-from-host):
Add a new test case.

Copyright-paperwork-exempt: yes
2017-11-04 12:24:49 +02:00
Paul Eggert
aa75424672 Merge from origin/emacs-26
a87ce5c4b4 * src/lisp.h (GCALIGNED): Clarify comment (Bug#29040).
8a31e9993f ; etc/NEWS: Add cpp-message-min-time-interval.  (Bug#28961)
ac0bb9a192 Improve the doc of eshell-cmpl-* custom variables (Bug#25069)
36400c7dc9 Fix mouse-scrollbar offset on GNUstep and old macOS (bug#2...
04bc1410c2 Merge from Gnulib
6b08ad5263 Fix alignment portability problems
a9f8706fa8 Fix completion of colon after CSS property (Bug#29056)
9031dec527 ; * src/alloc.c (sweep_symbols): Fix last change.
fdd3dcfa4e * src/alloc.c (sweep_symbols): Tweak last change
27964af438 In frame parameters documentation mention desktop saving/r...
1bd4e7c243 ; Fix typo in ChangeLog.3
4182a60d31 Don't have frameset save the 'client' parameter (Bug#29067)
9d31a97092 ; Spelling fixes
460a25f212 Handle generic variables in cl-defgeneric Edebug spec
dc0a25c2f9 Give a more sensible message if file-attributes fails (Bug...
8453423c7c Avoid wrong value from file-attributes on Linux kernel bef...
70621e2571 Fix customization of debugger-print-function (Bug#29077)

# Conflicts:
#	etc/NEWS
2017-11-02 21:02:12 -07:00
Paul Eggert
1441eb76fd Merge from origin/emacs-26
460fe4a1bc ; Doc fixes
41adf3281e Avoid duplicate calls to xfree for the same pointer
3e7ebbe1bd Don't clobber docstrings of explicitly-defined mode hook v...
9c8fe0248b Avoid fullscreen ediff control frames by default (Bug#29026)
7d32176acc Fix the bug#24034 change (revno 9eb028f) causing infloop (...
ee493663ba Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/e...
ca5eb0d0b7 Fix a typo in the ELisp manual
d10c9479ca Fix doc and doc-strings for minibuffer window related func...
18331d00da Fix "Args out of range" error in c-determine-limit.  Fixes...
edde35e6f8 * lisp/progmodes/perl-mode.el: Fix electric indentation wi...
056587c45f Extend mhtml submode region when in comment
4c4ad80848 Fix mthml submode lighting at end of buffer
557e252aa2 Remember more variables in mhtml-mode
336cd0a11a ; * lisp/select.el (select-enable-primary): Add missing pe...
134099bc90 ; * etc/NEWS (EUDC): Mark as not requiring documentation.
1a340274bf * etc/NEWS (EUDC): Deprecate BBDB 2.x backward compatibility.
4189d0ef7b Fix minibuffer window related docs and strings (Bug#28978)
2ebdde6e9c Add ChkTeX flymake backend for latex-mode
5b59841791 Fix doc typos
82a16c547b Fix some duplicate word typos
266888b1d7 * doc/lispref/commands.texi (Adjusting Point): Fix wording...
00c3c6d88d Avoid segfaults in 64-bit Windows builds
a8e6741066 Fix conversion of pixel coordinates to buffer position
d43b486f6c Fix doc strings in desktop.el
9102fb603e Add Index to ERT manual
68182a4710 Make manuals and NEWS consistent
451823b0e5 Don't allow (minibuffer-window-active-p nil) to return t
cc8f72ca22 Clarify obsolescence message for 'whitespace-tab'
50f711e7fa Fix some duplicate words typos
8bd9524a7c * lisp/button.el (button-activate): Fix doc typo.
0b0d91e60a * lisp/calendar/todo-mode.el (todo-toggle-mark-item): Fix ...
e6b4e5ffdf Fix some doc typos
e8636ac8cc Fix startup display on Cygwin
3926c5ad83 * src/fileio.c (Fset_default_file_modes): Fix typo in doc ...
9715317dfd * lisp/dired.el (dired-find-alternate-file): Doc fix.  (Bu...
9e442a001a Improve documentation of how faces are applied to display ...
1bda71ec3b Improve pixel-scroll-mode
196106d37d Support Certification Authority Authorization in dns-mode.el
ec08d70b4f Improve documentation of set-default-file-modes

# Conflicts:
#	etc/NEWS
2017-11-02 21:01:44 -07:00
Paul Eggert
c66a3944ed Merge from origin/emacs-26
7f089aa5f6 Require seq in rmc.el
53aaad1dfc Make an example code introduced in the Gnus info work (bug...
7b29db222f Enable gnus-read-ephemeral-* to run multiple times (bug#29...
015f0bb2d8 Port thread.c to OpenBSD ARM
ad68bbd0da Fix another "wrong side of point" error in CC Mode.
646e56e150 Fix Bug#28959
685fd77959 Fix duplicate .o file on QNX
e562356c3f Fix two js indentation problems
b8cf159bbc Update documentation for windows build
46540a1c7a Fix a "wrong side of point" error in CC Mode.  Fixes bug #...
57ca409111 Fix autoload of flymake from elisp-mode during bootstrap (...
aee0bc8775 Fix non-native fullscreen on NS (bug#28872)
d6c1a9cb8a ; Fix author email address in test/lisp/url/url-tramp-test...
761c630766 Fix Bug#28982
628b653209 Fix windows build errors
e8a06a5f9a Fix compile warning for non-w32 builds
0c536a20fb Display commit in package description, if available (Bug#2...
1d83257a1d Port to QNX
19667f44ef * configure.ac: Tweak libcurses diagnostic.
3fc05cfaec Scripts to automate windows binary distribution
928a106939 Fix Edebug specs for map-let and with-maps-do
46f2ee0d4c * test/lisp/net/tramp-tests.el (tramp-test41-delay-load): ...
b51009d7f0 * admin/authors.el (authors-canonical-author-name): Ignore...
a015db90e3 * test/lisp/progmodes/sql-tests.el (sql-tests-postgres-lis...
529a9c09d3 Further work on Bug#28889
c6deabaf4d Improve Tramp backward compatibility
8093e82e42 Improve backward compatibility of tramp-tests.el
46cdc01daa Fix some ‘window-normalize-’ prefixed functions (Bug#28947)
6360611457 Port to OpenIndiana
a012ec766c Don't fill keywords after Emacs Lisp docstring
b7c4aa951c Refactor c-forward-token-2 with new function c-forward-ove...
3aee7be62e Avoid unnecessary rounding errors in timestamps
2bfa42855b Fix xdg timestamp error on 32-bit Emacs
237e96bc52 Test that advice doesn't trigger bytecomp warnings (Bug#28...
d719ea6ad5 Another fix for unsafe directory error message (Bug#865)
b060e091c3 Handle https url for debbugs mbox (Bug#28831)
9e4265ef91 Ignore string properties when saving eshell history (Bug#2...
0f286ca85a Fix Bug#28889
2017-11-02 21:01:04 -07:00
Paul Eggert
9d31a97092 ; Spelling fixes 2017-11-01 22:07:43 -07:00
Glenn Morris
e6b4e5ffdf Fix some doc typos
* lisp/calendar/todo-mode.el (todo-next-item)
(todo-previous-item, todo-toggle-item-header):
* lisp/window.el (move-to-window-group-line):
* src/editfns.c (Fformat):
* test/lisp/calendar/todo-mode-tests.el (todo-test-move-item05):
Fix doc typos.

; And in some comments.
2017-10-27 20:04:47 -04:00
Tino Calancha
7f089aa5f6 Require seq in rmc.el
* lisp/emacs-lisp/rmc.el: Require seq (Bug#28975).
* test/lisp/emacs-lisp/rmc-tests.el (test-read-multiple-choice): Add test.
2017-10-27 20:21:26 +09:00
Anders Lindgren
a0e5a02125 New package, `faceup'
`faceup' is a framework for regression testing of font-lock
keywords in ert.  It is based on a human-readable markup
language.  (Bug#16063 and bug#28311).

* lisp/emacs-lisp/faceup.el:
* test/lisp/emacs-lisp/faceup-tests/faceup-test-basics.el:
* test/lisp/emacs-lisp/faceup-tests/faceup-test-files.el:
* test/lisp/emacs-lisp/faceup-resources/faceup-test-mode.el:
* test/lisp/emacs-lisp/faceup-resources/faceup-test-this-file-directory.el:
* test/lisp/emacs-lisp/faceup-resources/files/test1.txt:
* test/lisp/emacs-lisp/faceup-resources/files/test1.txt.faceup:
New files.
2017-10-26 21:31:28 +02:00
Michael Albinus
646e56e150 Fix Bug#28959
* lisp/net/tramp.el (tramp-handle-find-backup-file-name):
Use `tramp-tramp-file-p' rather than `tramp-file-name-p'.  Add
hop to backup file name.  (Bug#28959)

* test/lisp/net/tramp-tests.el (tramp-test34-find-backup-file-name):
New test.
(tramp-test35-make-nearby-temp-file)
(tramp-test36-special-characters)
(tramp-test36-special-characters-with-stat)
(tramp-test36-special-characters-with-perl)
(tramp-test36-special-characters-with-ls, tramp-test37-utf8)
(tramp-test37-utf8-with-stat, tramp-test37-utf8-with-perl)
(tramp-test37-utf8-with-ls, tramp-test38-file-system-info)
(tramp-test39-asynchronous-requests)
(tramp-test40-recursive-load, tramp-test41-remote-load-path)
(tramp-test42-delay-load, tramp-test43-unload): Rename.
2017-10-26 16:24:28 +02:00
Dmitry Gutov
e562356c3f Fix two js indentation problems
Fix intentation problems reported in
https://github.com/mooz/js2-mode/issues/463.
* lisp/progmodes/js.el (js--continued-expression-p):
Check syntax state after /.
(js--multi-line-declaration-indentation):
Check syntax state before "const".
2017-10-26 02:43:53 +03:00
Michael Albinus
d6c1a9cb8a ; Fix author email address in test/lisp/url/url-tramp-tests.el 2017-10-25 13:45:01 +02:00
Michael Albinus
761c630766 Fix Bug#28982
* admin/MAINTAINERS: Add test/lisp/url/url-tramp-tests.el.

* lisp/url/url-tramp.el (url-tramp-convert-url-to-tramp)
(url-tramp-convert-tramp-to-url): Adapt to recent Tramp changes.

* test/lisp/url/url-tramp-tests.el: New file.  (Bug#28982)
2017-10-25 13:36:49 +02:00
Gemini Lasswell
928a106939 Fix Edebug specs for map-let and with-maps-do
* lisp/emacs-lisp/map.el (map-let): Fix Edebug spec (bug#24777).
* test/lisp/emacs-lisp/map-tests.el (with-maps-do): Fix Edebug spec.
2017-10-24 08:17:33 -07:00
Michael Albinus
46f2ee0d4c * test/lisp/net/tramp-tests.el (tramp-test41-delay-load): New test.
(tramp-test42-unload): Rename.
2017-10-24 11:55:20 +02:00
Glenn Morris
a015db90e3 * test/lisp/progmodes/sql-tests.el
(sql-tests-postgres-list-databases-error): Silence compiler.
2017-10-23 22:02:46 -07:00
Michael Albinus
8093e82e42 Improve backward compatibility of tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp--test-emacs26-p): Fix docstring.
(tramp-test41-unload): Skip unless Emacs >= 26.
2017-10-23 12:46:32 +02:00
Alexander Gramiak
a012ec766c Don't fill keywords after Emacs Lisp docstring
This approach does mean that keywords that have spaces before them
inside of docstrings aren't filled, but I think this is should be fine
until Bug#28937 is fixed.

* lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Add a colon to
paragraph-start unconditionally, but require that it follows at least
one space.  (Bug#24622)
* test/lisp/emacs-lisp/lisp-tests.el: New tests for Bug#24622 and
Bug#7751.
2017-10-22 12:46:55 -06:00
John Williams
237e96bc52 Test that advice doesn't trigger bytecomp warnings (Bug#28803)
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--test-no-warnings-with-advice): New test.

Copyright-paperwork-exempt: yes
2017-10-21 19:20:46 -04:00
Noam Postavsky
9e4265ef91 Ignore string properties when saving eshell history (Bug#28700)
* lisp/eshell/em-hist.el (eshell-write-history): Remove properties
before inserting history strings.
(eshell-read-history): Remove obsolete comment.
* test/lisp/eshell/em-hist-tests.el (eshell-write-readonly-history):
New test.
2017-10-21 15:19:14 -04:00
Paul Eggert
3155cb1585 Merge from origin/emacs-26
11bd8aa24b Fix flymake's loading of subr-x
b500e06f4d Fix Bug#28896
d815de017b Skip a Flymake test for old gcc versions
fd3d8610b2 Make :align-to account for display-line-numbers
831eafc8ae Augment Flymake API for third-party extensions
ddd547fada Improve treatment of Fortran's "class default"
234b1e3864 Flymake backends must check proc obsoleteness in source bu...
3ea6a4d4ba Skip an rsync test in tramp-tests.el
25f83fa7c5 ; Indentation fixes
4d578d432d On Windows default a frame's border width to zero (Bug#28873)
6f1dea5c74 Spelling fixes
b8433b0954 Use pop-to-buffer-same-window instead of switch-to-buffer
2f7163fb72 Fix the MSDOS build.
2551d28fe8 Fix line number display after 'widen'
dc8812829b Remove resizable attribute on macOS undecorated frames (bu...
b970a4a52a Fix handling of `border-width' in `frameset--restore-frame...
445e92658f Mention how to send CC to > 1 address in a bug report
8ca6fa585a Improve format-time-string doc
2e1b3522b8 Improve documentation of 'line-number-display-width'
5b6e59cfdb Implement vc-default-dir-extra-headers for vc-rcs
22adeca42a In NEWS give advice on use of `switch-to-buffer' (Bug#28645)
2c3e6f1ddc Dont update primary selection with winner-undo
b38724ab67 Work around ImageMagick bug 825
20cc68e871 Document rectangle-preview option more (Bug#27974)
a0b7b301dd Do not reject https://gnu.org in commit messages
fb4200a875 Fix Edebug spec for cl-defun (bug#24255)
db68cefe72 Fix errors in kmacro.el post-command-hook
c63b344c3d Fix range-error in image-dired.el
081d2187c4 Fix 'line-number-display-width' in hscrolled windows
16e85456e7 Fix error in tramp-smb-handle-insert-directory
613db8d35c Don't reject PBM header whitespace unnecessarily
3205b12a78 Fix regression in display of PPM images
1ca9ae7069 Require subr-x when compiling nnimap.el
de60992053 Fix ert-test finding by symbol (Bug#28849)
51615a8082 Don't remember old debugger window (Bug#17882)
5980de3727 Disable python native completion on w32 (Bug#28580)
616b4c5956 Let select-frame-by-name choose any frame when called from...
8eb3c01dbd * lisp/dired-aux.el (dired-create-directory): Doc fix.
325dfdae13 Avoid compilation warnings in optimized builds
f79382819c ; * src/composite.c (Fclear_composition_cache): Fix last c...
f95cd5cd70 Improve customization of arabic-shaper-ZWNJ-handling.
a7f154688d Improve customization type of 'mouse-drag-and-drop-region'
864734d112 ; Prefer https: to http: in GNU URLs
3c78960a47 Encourage https: in commit messages
def9715282 ; Cleanup of etc/NEWS
4e59ecc646 Fix wording in Elisp manual's child frames section (Bug#28...
eda9f5018c Another fix for C mode fontification of w32 source files
05aadd8990 Fix fontification of ALIGN_STACK functions
aa0c38f358 Make sure thread stack is properly aligned on MS-Windows
d7038020aa Do not under-align pseudovectors
ff33053012 Fix indentation bug in multi-line CSS selectors
8968be822e ; * etc/NEWS: Grammar and spelling fixes
716b84034d gnutls_mac_get_nonce_size has been added in gnutls 3.3
55e313f7be ; * CONTRIBUTE: More suggestions for using US English.
622c675648 * CONTRIBUTE: Suggest American English.

# Conflicts:
#	etc/NEWS
#	msdos/sed2v2.inp
2017-10-20 22:44:13 -07:00
Tino Calancha
cb29f41624 Allow to copy/rename file into a non-existent dir
* lisp/dired-aux.el (dired-create-destination-dirs): New option.
(dired-maybe-create-dirs): New defun.
(dired-copy-file-recursive, dired-rename-file): Use it (Bug#28834).
* lisp/dired-aux-tests.el (dired-test-bug28834): Add test.
* doc/emacs/dired.texi (Operating on Files): Update manual.
* etc/NEWS (Changes in Specialized Modes and Packages in Emacs 27.1)
Announce this change.
2017-10-21 13:05:48 +09:00
Paul Eggert
c75f505dea Prefer nil to (current-time) when either works
* doc/misc/gnus.texi (Category Syntax):
* lisp/allout-widgets.el (allout-widgets-post-command-business):
* lisp/cedet/ede/detect.el (ede-detect-qtest):
* lisp/cedet/pulse.el (pulse-momentary-highlight-overlay)
(pulse-tick):
* lisp/cedet/semantic.el (bovinate):
* lisp/cedet/semantic/analyze.el:
(semantic-analyze-current-symbol-default, semantic-adebug-analyze):
* lisp/cedet/semantic/analyze/refs.el (semantic-analyze-current-tag):
* lisp/cedet/semantic/lex.el (semantic-lex-test):
* lisp/cedet/semantic/symref/filter.el:
(semantic-symref-test-count-hits-in-tag):
* lisp/cedet/srecode/dictionary.el (srecode-adebug-dictionary):
* lisp/cedet/srecode/map.el (srecode-adebug-maps):
* lisp/desktop.el (desktop-create-buffer):
* lisp/emacs-lisp/benchmark.el (benchmark-elapse):
* lisp/emacs-lisp/elp.el (elp--make-wrapper):
* lisp/epa.el (epa--show-key):
* lisp/erc/erc.el (erc-lurker-cleanup, erc-lurker-p):
* lisp/gnus/gnus-agent.el (gnus-agent-fetch-articles)
(gnus-agent-expire-group-1, gnus-agent-store-article):
* lisp/gnus/gnus-art.el (article-lapsed-string):
* lisp/gnus/gnus-cloud.el (gnus-cloud-update-newsrc-data)
(gnus-cloud-collect-full-newsrc):
* lisp/gnus/gnus-group.el (gnus-group-timestamp-delta):
* lisp/gnus/gnus-html.el (gnus-html-cache-expired):
* lisp/gnus/gnus-score.el (gnus-score-load-file)
(gnus-decay-scores):
* lisp/gnus/nndiary.el (nndiary-expired-article-p):
* lisp/gnus/nnmail.el (nnmail-expired-article-p):
* lisp/gnus/nnmaildir.el (nnmaildir--scan):
* lisp/gnus/score-mode.el (gnus-score-edit-insert-date):
* lisp/image/gravatar.el (gravatar-cache-expired):
* lisp/net/newst-backend.el (newsticker--image-get)
(newsticker--cache-mark-expired):
* lisp/nxml/rng-maint.el (rng-time-function):
* lisp/org/org-agenda.el (org-agenda-to-appt):
* lisp/org/org-clock.el (org-clock-resolve-clock)
(org-clock-resolve, org-resolve-clocks-if-idle):
* lisp/org/org-colview.el (org-columns-edit-value, org-columns)
(org-columns-compute-all, org-agenda-columns):
* lisp/org/org-element.el (org-element--cache-interrupt-p)
(org-element--cache-sync):
* lisp/org/org-habit.el (org-habit-get-faces)
(org-habit-insert-consistency-graphs):
* lisp/org/org-indent.el (org-indent-add-properties):
* lisp/org/org-timer.el (org-timer-start)
(org-timer-pause-or-continue, org-timer-seconds)
(org-timer-show-remaining-time, org-timer-set-timer):
* lisp/org/org.el (org-babel-load-file, org-current-time)
(org-today, org-auto-repeat-maybe, org-read-date-analyze)
(org-small-year-to-year, org-goto-calendar):
* lisp/org/ox.el (org-export-insert-default-template):
* lisp/time.el (emacs-uptime):
* lisp/type-break.el (type-break-mode, type-break)
(type-break-time-warning-schedule, type-break-check):
* lisp/url/url-cache.el (url-cache-expired):
* lisp/url/url.el (url-retrieve-synchronously):
* test/lisp/char-fold-tests.el (char-fold--speed-test):
* test/manual/cedet/semantic-ia-utest.el:
(semantic-symref-test-count-hits-in-tag):
* test/manual/cedet/semantic-tests.el (semantic-idle-pnf-test)
(semantic-lex-test-full-depth):
Use nil instead of (current-time) where either will do, as nil is
a bit more efficient and should have less timing error.
2017-10-20 19:42:23 -07:00
Glenn Morris
11bd8aa24b Fix flymake's loading of subr-x
* lisp/progmodes/flymake.el, test/lisp/progmodes/flymake-tests.el:
No need to load subr-x at run-time.
2017-10-20 13:07:30 -04:00
Michael Albinus
b500e06f4d Fix Bug#28896
* lisp/net/tramp-adb.el (tramp-adb-handle-rename-file):
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): Handle FILENAME
being a directory.  (Bug#28896)

* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file): Test also FILENAME being a directory.
2017-10-20 12:46:54 +02:00
João Távora
d815de017b Skip a Flymake test for old gcc versions
Fixes: 28906

* test/lisp/progmodes/flymake-tests.el
(different-diagnostic-types): Skip this test for gcc versions
< 5.
2017-10-20 11:28:07 +01:00
Glenn Morris
ddd547fada Improve treatment of Fortran's "class default"
* lisp/progmodes/f90.el (f90-start-block-re, f90-no-block-limit):
Handle "class default".  (Bug#28786)
* test/automated/f90.el (f90-test-bug25039): Add "class default".
2017-10-19 20:05:48 -04:00
Michael Albinus
3ea6a4d4ba Skip an rsync test in tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp-test17-dired-with-wildcards):
Skip for "rsync".
2017-10-19 17:47:14 +02:00
Eli Zaretskii
db68cefe72 Fix errors in kmacro.el post-command-hook
* lisp/kmacro.el (kmacro-step-edit-active): Initialize to nil to
avoid 'void-variable' errors.  (Bug#28818)
* test/lisp/kmacro-tests.el
(kmacro-tests-step-edit-cleans-up-hook): Now succeeds.  (Bug#18708)
2017-10-16 19:36:06 +03:00
Paul Eggert
864734d112 ; Prefer https: to http: in GNU URLs 2017-10-14 19:19:24 -07:00
Simen Heggestøyl
ff33053012 Fix indentation bug in multi-line CSS selectors
* lisp/textmodes/css-mode.el (css--colon-inside-selector-p): Fix
indentation of multi-line CSS selectors that include both a
pseudo-class and parenthesis.

* test/manual/indent/css-mode.css: Add test for the above change.
2017-10-13 21:57:52 +02:00
Paul Eggert
3d0d5b4ebd Merge from origin/emacs-26
05d0c0f802 ; * ChangeLog.3: ChangeLog fixes.
fbabae6b24 * ChangeLog.3: Update.
eab051991e Fix docstring style for 'functionp'
e8a7c41b4e Format shell commands in tramp.texi
0526aac4eb Unbreak the button in the Flymake diagnostics buffer again
c89f001de1 Add mode map to Flymake diagnostic button
f9cd8ee681 Tweak the Flymake diagnostics buffer again
0e83f5f279 Simplify Flymake diagnostics buffer UX
cf4a15b9b6 First stab at a Flymake diagnostics buffer
e4a1556392 * etc/NEWS (Flymake): Rewrite entry.
00adeb43e9 Improve the Flymake manual
44c6401733 ; * etc/NEWS: Clarify the description of "---" and "+++".
042b3cfbd2 Fix two Flymake bugs
3dfa2ca4dc Don't log "emergencies" in the Flymake legacy backend
1c2e188440 Add full documentation on new Flymake API
0f7f677f82 Fix some Flymake docstrings and messages
21e7075781 Make three new Flymake commands for debugging common problems
c9be9a3678 ; INSTALL.REPO: Add -d to "thorough cleaning" suggestion.
5d51403ceb ; Typo fixes, mostly repeated words
0d004ed01a ; Spelling fixes
0485aa76c9 ; * src/lread.c (syms_of_lread) <module-file-suffix>: Fix ...
ba7fb37d6a * admin/authors.el (authors-renamed-files-alist): addition.
14dca4a79a ; ChangeLog.3 fixes
f352d0257c Fix PWD check on DOS_NT
934f08f3de Fix unlikely overflows with wd length
6c2b1e89ef * lisp/gnus/message.el: Improve last commit
7ed7360855 Fix problems when editing raw undecoded message (Bug#28671)
aca5f0072b Avoid encoding errors in message.el
0c36663db5 Improve doc string and prompt of 'grep-read-files'
2da83c9d36 Avoid assertion violations when line numbers are displayed
5b81f65ad0 ; * lisp/emacs-lisp/rmc.el: Minor fix for copyright and li...
11b37b4a9f Be lazy when starting Flymake checks
36ed9a9ede Fix last change in frameset.el
62e5c119af Describe how window dividers can replicate vertical border...
e2150d994a Add line-number faces to the display-line-numbers group
89b0023044 Increase xterm click count only within double-click-fuzz
745aea2296 Change pause in fullscreen toggling for NS port (bug#28496)
1cd334cd47 Handle PARENTS properly in tramp-*-handle-make-directory
f1c73de47d ; Merge from Gnulib (comment changes only)
7c2c117c91 Improve test for unreachable dirs
2202952b83 * src/xsmfns.c (x_session_initialize): Fix memory leak.
a9b72976de Merge branch 'emacs-26' of git.sv.gnu.org:/srv/git/emacs i...
64baaff8c5 New option for handling ZWNJ in Arabic text rendering
c194fb61c6 Make python prettify symbols into a defvar (Bug#28713)
6dfc778d54 Fix fullscreen crash on macOS (bug#28496)
3db0dc2168 Fix crash when closing fullscreen frame on macOS (bug#28661)
bc80da5bd3 Support gio tool in Tramp
349e0eb5ff Fix flymake-goto-next-error when message has %-constructs
0fa353b504 * src/gnutls.c (syms_of_gnutls): Remove duplicated call to...
dc6ae15a8d Move the entry about 'format' into Incompatible Lisp Changes
75174a632d Fix glitches in displaying TTY menus
238fbcb20e Create new Edebug spec for docstrings and use it in closures
2d58d51329 Avoid byte-compilation warnings in message.el

# Conflicts:
#	etc/NEWS
2017-10-12 13:44:16 -07:00
Stefan Monnier
57b22f490d * test/lisp/help-fns-tests.el (help-fns-test-dangling-alias): New test. 2017-10-12 10:19:26 -04:00
Paul Eggert
5d51403ceb ; Typo fixes, mostly repeated words 2017-10-09 22:55:06 -07:00
Philipp Stephani
6abff55b55 Revert "Raise an error when detecting old-style backquotes."
This reverts commit 9613690f6e.
2017-10-09 16:08:15 +02:00
João Távora
11b37b4a9f Be lazy when starting Flymake checks
Don't start the check immediately if the buffer is not being
displayed.  Wait until it is, using window-configuration-change-hook.

This enables the user to batch-enable flymake-mode on many buffers and
not have that operation exhaust system resources for checking each
one.  Likewise, an editing or save operation in a currently
non-displayed buffer does not immediately start a check.

* lisp/progmodes/flymake.el (flymake-start-on-flymake-mode):
Rename from flymake-start-syntax-check-on-find-file.
(flymake-start-syntax-check-on-find-file): Obsolete alias for
flymake-start-on-flymake-mode.
(flymake-start): Redesign.  Affect the global post-command-hook
and local window-configuraiton-change-hook.
(flymake--schedule-timer-maybe)
(flymake-after-change-function, flymake-after-save-hook): Pass
t to flymake-start.

* test/lisp/progmodes/flymake-tests.el (flymake-tests--call-with-fixture)
(dummy-backends, recurrent-backend): Start flymake check
explicitly and immediately.
2017-10-09 11:12:57 +01:00
Gemini Lasswell
3c2e8eff8c Stop Testcover from producing spurious 1value errors
Fix bug#25351 by copying results of form evaluations for later
comparison.
* lisp/emacs-lisp/testcover.el (testcover-after): Copy the result
of a form's first evaluation and compare subsequent evaluations to
the copy. Improve the error message used when a form's value
changes.
(testcover--copy-object, testcover--copy-object1): New functions.
* test/lisp/emacs-lisp/testcover-resources/testcases.el
(by-value-vs-by-reference-bug-25351): Remove expected failure tag.
(circular-lists-bug-24402): Add another circular list case.
2017-10-08 16:13:39 -07:00
Gemini Lasswell
d79cf638f2 Rewrite Testcover's internals, fixing several bugs
* lisp/emacs-lisp/testcover.el: Rewrite the internals of Testcover
to analyze instrumented code instead of reinstrumenting it.  Use new
hooks in Edebug to collect code coverage information at runtime
using Edebug's instrumentation.
Includes fixes for: (bug#11307) (bug#24509) (bug#24688) (bug#24743)
(bug#25316) (bug#25326).
(testcover-compose-functions): Remove mapcar.
(testcover-start, testcover-this-defun): Analyze code instead of
reinstrumenting it. Set edebug-behavior for each definition.
(testcover--read, testcover-1value, testcover-reinstrument)
(testcover-reinstrument-list, testcover-reinstrument-compose):
Deleted.
(testcover-after-instrumentation, testcover-init-definition)
(testcover-before): New functions.
(testcover-enter): Change call signature to match edebug-enter.
(testcover-after, testcover-mark): Add handling of 'maybe and
'noreturn.
(testcover-analyze-coverage, testcover-analyze-coverage-progn)
(testcover-analyze-coverage-edebug-after)
(testcover-analyze-coverage-wrapped-form)
(testcover-analyze-coverage-wrapped-application)
(testcover-analyze-coverage-compose)
(testcover-analyze-coverage-backquote)
(testcover-analyze-coverage-backquote-form)
(testcover-coverage-combine): New functions to analyze instrumented
code.

* lisp/emacs-lisp/gv.el: Modify edebug-after's gv-expander to
instrument in the setter as well as the getter.

* test/lisp/emacs-lisp/testcover-tests.el
(testcover-tests-run-test-case): Use `edebug-default-enter'
instead of `edebug-enter' to detect Edebug invocation
during tests.

* test/lisp/emacs-lisp/testcover-resources/testcases.el
(constants-bug-25316)
(customize-defcustom-bug-25326)
(1-value-symbol-bug-25316)
(quotes-within-backquotes-bug-25316)
(backquote-1value-bug-24509)
(pcase-bug-24688)
(defun-in-backquote-bug-11307-and-24743)
(closure-1value-bug)
(backquoted-vector-bug-25316)
(vector-in-macro-spec-bug-25316)
(mapcar-is-not-compose): Remove expected failure tags.
(function-with-edebug-spec-bug-25316): Remove expected failure tag
and modify expected result.
(quoted-backquote): New test.

* lisp/textmodes/rst.el: Remove workarounds for bugs in Testcover.
(rst-testcover-defcustom): Deleted.

* lisp/subr.el (1value): Remove incorrect description of
testcover-1value from docstring, replace with description of
Testcover's treatment of 1value.
2017-10-08 16:08:49 -07:00
Philipp Stephani
9613690f6e Raise an error when detecting old-style backquotes.
They have been deprecated for a decade now.

* src/lread.c (Fload): Don't use record_unwind_protect to warn about
old-style backquotes any more.  They now generate a hard error.
(read1): Signal an error when detecting old-style backquotes.  Remove
unused label.
(syms_of_lread): Remove unused internal variable
'lread--old-style-backquotes'.
(load_error_old_style_backquotes): Rename from
'load_warn_oldstyle_backquotes'.  Signal an error.

* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Remove check
from byte compiler.  It isn't triggered any more.

* test/src/lread-tests.el (lread-tests--old-style-backquotes): Adapt
unit test.

* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--old-style-backquotes)
(bytecomp-tests-function-put): Adapt unit tests.

* etc/NEWS: Document change.
2017-10-08 18:52:37 +02:00
Michael Albinus
1cd334cd47 Handle PARENTS properly in tramp-*-handle-make-directory
* lisp/net/tramp-adb.el (tramp-adb-handle-make-directory):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-make-directory):
Handle PARENTS properly.

* test/lisp/net/tramp-tests.el (tramp-test13-make-directory):
Extend test.
2017-10-08 13:55:20 +02:00
Stefan Monnier
11f9cb522f Merge emacs-26 2017-10-06 09:50:54 -04:00
Gemini Lasswell
9a10c8713b Fix dynamic binding wrapper in iter-lambda (bug#25965)
* lisp/emacs-lisp/generator.el (cps--make-dynamic-binding-wrapper):
Remove extra evaluation of form.
* test/lisp/emacs-lisp/generator-tests.el
(cps-iter-lambda-with-dynamic-binding): New test.
2017-10-05 12:43:15 -07:00
Michael Albinus
4ac5ac50c9 Merge branch 'emacs-26' of git.sv.gnu.org:/srv/git/emacs into emacs-26 2017-10-03 16:08:04 +02:00
Michael Albinus
a9ac20c179 Add support for `file-system-info' in Tramp
* lisp/net/tramp.el (tramp-file-name-for-operation):
Add `file-system-info'.

* lisp/net/tramp-adb.el (tramp-adb-handle-file-system-info): New defun.
(tramp-adb-file-name-handler-alist): Use it.

* lisp/net/tramp-gvfs.el (tramp-gvfs-file-system-attributes)
(tramp-gvfs-file-system-attributes-regexp): New defconst.
(tramp-gvfs-handle-file-system-info): New defun.
(tramp-gvfs-file-name-handler-alist): Use it.
(tramp-gvfs-get-directory-attributes): Fix property name.
(tramp-gvfs-get-root-attributes): Support also file system attributes.

* lisp/net/tramp-sh.el (tramp-sh-handle-file-system-info): New defun.
(tramp-sh-file-name-handler-alist): Use it.
(tramp-sh-handle-insert-directory): Insert size information.
(tramp-get-remote-df): New defun.

* lisp/net/tramp-smb.el (tramp-smb-handle-file-system-info): New defun.
(tramp-smb-file-name-handler-alist): Use it.
(tramp-smb-handle-insert-directory): Insert size information.

* test/lisp/net/tramp-tests.el (tramp-test37-file-system-info):
New test.
(tramp-test38-asynchronous-requests)
(tramp-test39-recursive-load, tramp-test40-remote-load-path)
(tramp-test41-unload): Rename.
2017-10-03 16:07:32 +02:00
João Távora
f6e909b41e Flymake backends can report multiple times per check
Rewrote a significant part of the Flymake backend API.  Flymake now
ignores the return value of backend functions: a function can either
returns or errors.  If it doesn't error, a backend is no longer
constrained to call REPORT-FN exactly once.  It may do so any number
of times, cumulatively reporting diagnostics.  Flymake keeps track of
outdated REPORT-FN instances and disconsiders obsolete reports.
Backends should avoid reporting obsolete data by cancelling any
ongoing processing at every renewed call to the backend function.

Consolidated flymake.el internal data structures to require less
buffer-local variables.  Adjusted Flymake's mode-line indicator to the
new semantics.

Adapted and simplified the implementation of elisp and legacy
backends, fixing potential race conditions when calling backends in
rapid succession.

Added a new test for a backend that calls REPORT-FN multiple
times.  Simplify test infrastructure.

* lisp/progmodes/flymake-elisp.el (flymake-elisp-checkdoc)
(flymake-elisp-byte-compile): Error instead of returning nil
if not in emacs-lisp-mode.
(flymake-elisp--byte-compile-process): New buffer-local variable.
(flymake-elisp-byte-compile): Mark (and kill) previous process
obsolete process before starting a new one.  Don't report if
obsolete process.

* lisp/progmodes/flymake-proc.el
(flymake-proc--current-process): New buffer-local variable.
(flymake-proc--processes): Remove.
(flymake-proc--process-filter): Don't bind
flymake-proc--report-fn.
(flymake-proc--process-sentinel): Rewrite.  Don't report if
obsolete process.
(flymake-proc-legacy-flymake): Rewrite.  Mark (and kill)
previous process obsolete process before starting a new
one.  Integrate flymake-proc--start-syntax-check-process
helper.
(flymake-proc--start-syntax-check-process): Delete.
(flymake-proc-stop-all-syntax-checks): Don't use
flymake-proc--processes, iterate buffers.
(flymake-proc-compile):

* lisp/progmodes/flymake.el (subr-x): Require it
explicitly.
(flymake-diagnostic-functions): Reword docstring.
(flymake--running-backends, flymake--disabled-backends)
(flymake--diagnostics-table): Delete.
(flymake--backend-state): New buffer-local variable and new defstruct.
(flymake--with-backend-state, flymake--collect)
(flymake-running-backends, flymake-disabled-backends)
(flymake-reporting-backends): New helpers.
(flymake-is-running): Use flymake-running-backends.
(flymake--handle-report): Rewrite.
(flymake-make-report-fn): Ensure REPORT-FN runs in the correct
buffer or not at all.
(flymake--disable-backend, flymake--run-backend): Rewrite.
(flymake-start): Rewrite.
(flymake-mode): Set flymake--backend-state.
(flymake--mode-line-format): Rewrite.

* test/lisp/progmodes/flymake-tests.el
(flymake-tests--wait-for-backends): New helper.
(flymake-tests--call-with-fixture): Use it.
(included-c-header-files): Fix whitespace.
(flymake-tests--diagnose-words): New helper.
(dummy-backends): Rewrite for new semantics.  Use cl-letf.
(flymake-tests--assert-set): Use quote.
(recurrent-backend): New test.
2017-10-03 14:18:55 +01:00
João Távora
8118f0f95f Fix three Flymake bugs when checking C header files
The first of these problems is longstanding: if an error-less B.h is
included from error-ridden A.h, flymake's legacy parser will panic
(and disable itself) since it sees a non-zero exit for a clean file.
To fix this, recommend returning 'true' in the documentation for the
check-syntax target.

Another problem was introduced by the parser rewrite.  For error
patterns spanning more than one line, point may be left in the middle
of a line and thus render other patterns useless.  Those patterns were
written for the old line-by-line parser.  To make them useful again,
move to the beginning of line in those situations.

The third problem was also longstanding and happened on newer GCC's:
The "In file included from" prefix confused
flymake-proc-get-real-file-name.  Fix this.

Also updated flymake--diag-region to fallback to highlighting a full
line less often.

Add automatic tests to check this.

* lisp/progmodes/flymake-proc.el
(flymake-proc--diagnostics-for-pattern): Fix bug when patterns
accidentally spans more than one line.  Don't create
diagnostics without error messages.
(flymake-proc-real-file-name-considering-includes): New
helper.
(flymake-proc-allowed-file-name-masks): Use it.

* lisp/progmodes/flymake.el (flymake-diag-region): Make COL
argument explicitly optional.  Only fall back to full line in extreme
cases.

* test/lisp/progmodes/flymake-tests.el
(included-c-header-files): New test.
(different-diagnostic-types): Update.

* test/lisp/progmodes/flymake-resources/Makefile
(check-syntax): Always return success (0) error code.
(CC_OPTS): Add -Wextra

* test/lisp/progmodes/flymake-resources/errors-and-warnings.c
(main): Rewrite comments.

* test/lisp/progmodes/flymake-resources/errors-and-warnings.c:
Include some dummy header files.

* test/lisp/progmodes/flymake-resources/no-problems.h: New file.

* test/lisp/progmodes/flymake-resources/some-problems.h: New file.

* doc/misc/flymake.texi (Example---Configuring a tool called
via make): Recommend adding "|| true" to the check-syntax target.
2017-10-03 14:18:55 +01:00
João Távora
73601787b4 Tweak Flymake commands flymake-goto-[next/prev]-error
Add filters, useful for backends like the upcoming
flymake-elisp-checkdoc backend, for example, which litters everything
with low-priority notes.

Also re-implement wraparound for flymake-goto-next-error. Manual
mentions this, so it's probably a good idea to keep it.  Added a new
customization variable flymake-wrap-around to control it.

* lisp/progmodes/flymake.el (flymake-goto-prev-error)
(flymake-goto-next-error): Accept FILTER argument.
(flymake-wrap-around): New variable.
(flymake-goto-next-error): Wrap around according to flymake-wrap-around.

* test/lisp/progmodes/flymake-tests.el
(different-diagnostic-types, dummy-backends): Pass FILTER to
flymake-goto-prev-error.
(different-diagnostic-types)
(dummy-backends): Use flymake-wrap-around.
2017-10-03 14:18:54 +01:00
João Távora
f930963dd4 Simplify Flymake logging and erroring
Use display-warning and a dedicated *Flymake log* buffer.

To ease readability, flymake log messages are now prefixed with a
common prefix and the buffer that originated them.

Some situations of over-zealous logging are fixed.

Use byte-compiler info, if available, to determine whence the
flymake-related log message is coming.

* lisp/progmodes/flymake-proc.el
(flymake-proc--diagnostics-for-pattern): Improve log message.
(flymake-proc--panic): Always flymake-log an error
(flymake-proc--safe-delete-file)
(flymake-proc--safe-delete-directory):
Downgrade warning
(flymake-proc-start-syntax-check): Simplify slightly.
(flymake-proc--start-syntax-check-process): Simplify.
(flymake-proc--init-find-buildfile-dir)
(flymake-proc--init-create-temp-source-and-master-buffer-copy):
No need to warn twice.

* lisp/progmodes/flymake.el (flymake-log): Convert to macro.
(flymake--log-1): New helper.
(flymake-log-level): Deprecate.
(flymake-error): New helper.
(flymake-ler-make-ler, flymake--handle-report, flymake-mode):
Use flymake-error.
(flymake-on-timer-event)
(flymake--handle-report, flymake--disable-backend)
(flymake--run-backend, flymake-start, flymake-mode-on)
(flymake-mode-off, flymake-after-change-function)
(flymake-after-save-hook, flymake-find-file-hook): Adjust
flymake-log calls.

* test/lisp/progmodes/flymake-tests.el
(flymake-tests--call-with-fixture): Only log errors.
2017-10-03 14:18:54 +01:00
João Távora
94a88c1ae9 New Flymake API variable flymake-diagnostic-functions
Lay groundwork for multiple active backends in the same buffer.

Backends are lisp functions called when flymake-mode sees fit.  They
are responsible for examining the current buffer and telling
flymake.el, via return value, if they can syntax check it.
Backends should return quickly and inexpensively, but they are also
passed a REPORT-FN argument which they may or may not call
asynchronously after performing more expensive work.

REPORT-FN's calling convention stipulates that a backend calls it with
a list of diagnostics as argument, or, alternatively, with a symbol
denoting an exceptional situation, usually some panic resulting from a
misconfigured backend.  In keeping with legacy behaviour,
flymake.el's response to a panic is to disable the issuing backend.

The flymake--diag object representing a diagnostic now also keeps
information about its source backend.  Among other uses, this allows
flymake to selectively cleanup overlays based on which backend is
updating its diagnostics.

* lisp/progmodes/flymake-proc.el (flymake-proc--report-fn):
New dynamic variable.
(flymake-proc--process): New variable.
(flymake-can-syntax-check-buffer): Remove.
(flymake-proc--process-sentinel): Simplify.  Use
unwind-protect.  Affect flymake-proc--processes here.
Bind flymake-proc--report-fn.
(flymake-proc--process-filter): Bind flymake-proc--report-fn.
(flymake-proc--post-syntax-check): Delete
(flymake-proc-start-syntax-check): Take mandatory
report-fn.  Rewrite.  Bind flymake-proc--report-fn.
(flymake-proc--process-sentinel): Rewrite and simplify.
(flymake-proc--panic): New helper.
(flymake-proc--start-syntax-check-process): Record report-fn
in process.  Use flymake-proc--panic.
(flymake-proc-stop-all-syntax-checks): Use mapc.  Don't affect
flymake-proc--processes here.  Record interruption reason.
(flymake-proc--init-find-buildfile-dir)
(flymake-proc--init-create-temp-source-and-master-buffer-copy):
Use flymake-proc--panic.
(flymake-diagnostic-functions): Add
flymake-proc-start-syntax-check.
(flymake-proc-compile): Call
flymake-proc-stop-all-syntax-checks with a reason.

* lisp/progmodes/flymake.el (flymake-backends): Delete.
(flymake-check-was-interrupted): Delete.
(flymake--diag): Add backend slot.
(flymake-delete-own-overlays): Take optional filter arg.
(flymake-diagnostic-functions): New user-visible variable.
(flymake--running-backends, flymake--disabled-backends): New
buffer-local variables.
(flymake-is-running): Now a function, not a variable.
(flymake-mode-line, flymake-mode-line-e-w)
(flymake-mode-line-status): Delete.
(flymake-lighter):  flymake's minor-mode "lighter".
(flymake-report): Delete.
(flymake--backend): Delete.
(flymake--can-syntax-check-buffer): Delete.
(flymake--handle-report, flymake--disable-backend)
(flymake--run-backend, flymake--run-backend):  New helpers.
(flymake-make-report-fn): Make a lambda.
(flymake--start-syntax-check): Iterate
flymake-diagnostic-functions.
(flymake-mode): Use flymake-lighter.  Simplify.  Initialize
flymake--running-backends and flymake--disabled-backends.
(flymake-find-file-hook): Simplify.

* test/lisp/progmodes/flymake-tests.el
(flymake-tests--call-with-fixture): Use flymake-is-running the
function.  Check if flymake-mode already active before activating it.
Add a thorough test for flymake multiple backends

* lisp/progmodes/flymake.el (flymake--start-syntax-check):
Don't use condition-case-unless-debug, use condition-case

* test/lisp/progmodes/flymake-tests.el
(flymake-tests--assert-set): New helper macro.
(dummy-backends): New test.
2017-10-03 13:53:22 +01:00
João Távora
54beebb4e0 Flymake highlights GCC info/notes as detected by flymake-proc.el
* lisp/progmodes/flymake-proc.el
(flymake-proc--diagnostics-for-pattern): Rewrite (using cl-loop) to
honour more sophisticated flymake-proc-diagnostic-type-pred.
(flymake-warning-re): Is now an obsolete alias for
flymake-proc-diagnostic-type-pred.
(flymake-proc-diagnostic-type-pred): Rename and augment from
flymake-proc-warning-predicate.  (flymake-proc-warning-predicate):
Delete.

* lisp/progmodes/flymake.el (flymake-note): New face.
(flymake-diagnostic-types-alist): Simplify.
(flymake-note): New overlay category.
(flymake--lookup-type-property): Only lookup single keys, not lists.
(flymake--diag-errorp): Rewrite.
(flymake--highlight-line): Use flymake--lookup-type-property.

* test/lisp/progmodes/flymake-tests.el
(different-diagnostic-types): Rename from errors-and-warnings.
Check notes.
(flymake-tests--call-with-fixture): Use
flymake-proc-diagnostic-type-pred.
2017-10-03 13:52:24 +01:00
João Távora
0d26e45ab4 Add a new Flymake test for multiple errors and warnings
* test/lisp/progmodes/flymake-tests.el
(flymake-tests--call-with-fixture): Save excursion.
(errors-and-warnings): New test.

* test/lisp/progmodes/flymake-resources/errors-and-warnings.c:
New test fixture.
2017-10-03 13:52:24 +01:00
João Távora
9f8ad133eb Refactor Flymake tests in preparation for more tests
Introduce a slightly more generic fixture macro.

Also make flymake-tests.el friendlier to interactive runs, by not
killing buffers visited by the user.

* test/lisp/progmodes/flymake-tests.el
(flymake-tests--call-with-fixture): New helper from
flymake-tests--current-face.  Don't kill file buffers already
being visited before the test starts.
(flymake-tests--with-flymake): New macro.
(flymake-tests--current-face): Delete.
(warning-predicate-rx-gcc, warning-predicate-function-gcc)
(warning-predicate-rx-perl, warning-predicate-function-perl):
Use flymake-test--with-flymake.
2017-10-03 13:51:45 +01:00
João Távora
bbcb079522 Allow running Flymake tests from interactive sessions
* test/lisp/progmodes/flymake-tests.el (flymake-tests-data-directory):
Expand to reasonable value if no
EMACS_TEST_DIRECTORY. (flymake-tests--current-face): Work around
"weirdness" of bug 17647 with read-event.
2017-10-03 13:51:05 +01:00
João Távora
1c30f9fc08 Flymake diagnostics now apply to arbitrary buffer regions
Make Flymake UI some 150 lines lighter

Strip away much of the original implementation's complexity in
manipulating objects representing diagnostics as well as creating and
navigating overlays.

Lay some groundwork for a more flexible approach that allows for
different classes of diagnostics, not necessarily line-based.
Importantly, one overlay per diagnostic is created, whereas the
original implementation had one per line, and on it it concatenated
the results of errors and warnings.

This means that currently, an error and warning on the same line are
problematic and the warning might be overlooked but this will soon be
fixed by setting appropriate priorities.

Since diagnostics can highlight arbitrary regions, not just lines, the
faces were renamed.

Tests pass and backward compatibility with interactive functions is
maintained, but probably any third-party extension or customization
relying on more than a trivial set of flymake.el internals has stopped
working.

* lisp/progmodes/flymake-proc.el
(flymake-proc--diagnostics-for-pattern): Use new flymake-ler-make
constructor syntax.

* lisp/progmodes/flymake.el (flymake-ins-after)
(flymake-set-at, flymake-er-make-er, flymake-er-get-line)
(flymake-er-get-line-err-info-list, flymake-ler-set-file)
(flymake-ler-set-full-file, flymake-ler-set-line)
(flymake-get-line-err-count, flymake-get-err-count)
(flymake-highlight-err-lines, flymake-overlay-p)
(flymake-make-overlay, flymake-region-has-flymake-overlays)
(flymake-find-err-info)
(flymake-line-err-info-is-less-or-equal)
(flymake-add-line-err-info, flymake-add-err-info)
(flymake-get-first-err-line-no)
(flymake-get-last-err-line-no, flymake-get-next-err-line-no)
(flymake-get-prev-err-line-no, flymake-skip-whitespace)
(flymake-goto-line, flymake-goto-next-error)
(flymake-goto-prev-error, flymake-patch-err-text): Delete
functions no longer used.
(flymake-goto-next-error, flymake-goto-prev-error): Rewrite.
(flymake-report): Rewrite.
(flymake-popup-current-error-menu): Rewrite.
(flymake--highlight-line): Rename from
flymake-highlight-line.  Call `flymake--place-overlay.
(flymake--place-overlay): New function.
(flymake-ler-errorp): New predicate.
(flymake-ler): Simplify.
(flymake-error): Rename from
flymake-errline.
(flymake-warning): Rename from flymake-warnline.
(flymake-warnline, flymake-errline): Obsoletion aliases.

* test/lisp/progmodes/flymake-tests.el (warning-predicate-rx-gcc)
(warning-predicate-function-gcc, warning-predicate-rx-perl)
(warning-predicate-function-perl): Use face `flymake-warning'.
2017-10-03 13:49:04 +01:00
João Távora
bb8b663d32 Move symbols in flymake-proc.el to separate namespace
Every symbol in this flymake now starts with the prefix flymake-proc-.

Make obsolete aliases for (almost?) every symbol.

Furthermore, many flymake-proc.el symbols are prefixed with
"flymake-proc--", that is they were considered internal.

Some customization variables, interactive functions, and other symbols
considered useful to user customizations or third-party libraries are
considered "public" or "external" and so use a "flymake-proc-" prefix.

* lisp/progmodes/flymake-proc.el: Every symbol renamed.

* test/lisp/progmodes/flymake-tests.el
(flymake-tests--current-face): Use
flymake-proc-warning-predicate, not flymake-warning-predicate.

* lisp/progmodes/flymake-proc.el
(flymake-proc--get-project-include-dirs-function)
(flymake-proc--get-project-include-dirs-imp)
(flymake-proc--get-include-dirs-dot) (flymake-proc--get-tex-args)
(flymake-proc--find-make-buildfile)
(flymake-proc--get-syntax-check-program-args)
(flymake-proc--init-create-temp-source-and-master-buffer-copy)
(flymake-proc--init-find-buildfile-dir)
(flymake-proc--get-full-nonpatched-file-name)
(flymake-proc--get-full-patched-file-name) (flymake-proc--base-dir,
flymake-proc--temp-master-file-name) (flymake-proc--master-file-name)
(flymake-proc--temp-source-file-name)
(flymake-proc--delete-temp-directory) (flymake-proc--kill-process)
(flymake-proc--start-syntax-check-process)
(flymake-proc--compilation-is-running)
(flymake-proc--safe-delete-directory) (flymake-proc--safe-delete-file)
(flymake-proc--get-program-dir) (flymake-proc--restore-formatting)
(flymake-proc--clear-project-include-dirs-cache)
(flymake-proc--project-include-dirs-cache)
(flymake-proc--get-system-include-dirs)
(flymake-proc--get-project-include-dirs)
(flymake-proc--add-project-include-dirs-to-cache)
(flymake-proc--get-project-include-dirs-from-cache)
(flymake-proc--post-syntax-check) (flymake-proc--process-sentinel)
(flymake-proc--process-filter) (flymake-proc--create-master-file)
(flymake-proc--find-buffer-for-file)
(flymake-proc--copy-buffer-to-temp-buffer)
(flymake-proc--read-file-to-temp-buffer)
(flymake-proc--save-buffer-in-file) (flymake-proc--replace-region,
flymake-proc--check-include)
(flymake-proc--check-patch-master-file-buffer)
(flymake-proc--master-file-compare)
(flymake-proc--find-possible-master-files)
(flymake-proc--included-file-name, flymake-proc--same-files)
(flymake-proc--fix-file-name, flymake-proc--find-buildfile)
(flymake-proc--clear-buildfile-cache)
(flymake-proc--add-buildfile-to-cache)
(flymake-proc--get-buildfile-from-cache)
(flymake-proc--find-buildfile-cache)
(flymake-proc--get-real-file-name-function)
(flymake-proc--get-cleanup-function) (flymake-proc--get-init-function)
(flymake-proc--get-file-name-mode-and-masks)
(flymake-proc--processes): Rename to internal symbol from
flymake-proc- version.
2017-10-03 13:49:04 +01:00
Paul Eggert
4829a3b033 Merge from origin/emacs-26
5172fa02cc Prefer HTTPS to HTTP for gnu.org
8cdd8b920a Merge from Gnulib
60b7668b89 Keep eww buffer current when looking up CSS on MDN
bd49b6f1b3 Workaround for faulty localtime() under macOS 10.6
913808e224 Doc amendment for syntax-ppss.
98dc91fda8 Remove incorrect NEWS entry about 'find-library'
539d8626cd Remove inadvertent changes to syntax.texi in last commit.
8c18dcbc78 Amend documentation for text-quoting-style becoming a user...
5f76ac150a Make the value nil in text-quoting-style mean what it does...
d5e4e004fa Make text-quoting-style customizable.  Introduce t and new...
1ba3471b9b eshell.texi improvements
7abb5c3960 Fix ns-win.el on GNUstep
07ea5ef99a Fix reference style in org.texi
b03b4f6d79 Improve handling of iconification of child frames (Bug#28611)
ba9139c501 Revert "Don't lose arguments to eshell aliases (Bug#27954)"
43fac3beae Make "unsafe directory" error message more informative (Bu...
c59ddb2120 Fix slot typecheck in eieio-persistent
8b2ab5014b Fix semantic-ia-fast-jump
5b45e7e1c3 Bind vc-region-history
f172894595 Exit macro definition on undefined keys
289fe6c0d1 Reset bidi-paragraph-direction on article rendering
a4f7518817 Fix url-http use of url-current-object
4a755ed421 Avoid assertions in vc-hg.el on MS-Windows
cb93a6ce72 Improve documentation of 'copy-sequence'
200ef6f721 Minor update of ack.texi
cb407d3e87 * doc/emacs/emacs.texi (Acknowledgments): Add more contrib...
82b6c765ff Improve indexing of multi-file/buffer Isearch commands
645ff6c702 Add CAM02 JCh and CAM02-UCS J'a'b' conversions
157007b58e Fix uses of @kindex in the Emacs manual
63a45e8837 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/e...
3ab2f9bbb9 Merge from gnulib
cbc8324488 Prefer HTTPS to HTTP for gnu.org
bbda601d1d ; Spelling fixes
695cf5300b Wait for frame visibility with timeout in w32term too
e1f6e3127a Bring back the busy wait after x_make_frame_visible (Bug#2...
bccf635217 ; * src/gtkutil.c (xg_check_special_colors): Add another G...
f428757cdb Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/e...
26d58f0c58 ; Standardize license notices
73dba0f466 Fix last doc string change in simple.el
2017-10-01 21:58:52 -07:00
Paul Eggert
5172fa02cc Prefer HTTPS to HTTP for gnu.org
This fixes some URLs I omitted from my previous pass,
notably those in lists.gnu.org.  Although lists.gnu.org
does not yet support TLS 1.1, TLS 1.0 is better than nothing.
* lisp/erc/erc.el (erc-official-location):
* lisp/mail/emacsbug.el (report-emacs-bug):
Use https:, not http:.
2017-10-01 19:59:01 -07:00
Paul Eggert
8136df6a8c Make logcount act like CL on negative arg
Behaving like Common Lisp is less likely to lead to surprises,
as it yields the same answers on 32- vs 64-bit machines.
* doc/lispref/numbers.texi (Bitwise Operations):
Document behavior on negative integers.
* src/data.c (Flogcount):
Behave like Common Lisp for negative arguments.
* test/src/data-tests.el (data-tests-popcnt)
(data-tests-logcount): Test negative args too.
2017-09-30 15:38:14 -07:00
Philipp Stephani
d247e1d30a Electric quote mode: Conditionally replace " (Bug#24710)
* lisp/electric.el (electric-quote-replace-double): New user option.
(electric-quote-post-self-insert-function): Use it.

* test/lisp/electric-tests.el (electric-quote-replace-double-disabled)
(electric-quote-replace-double-bob)
(electric-quote-replace-double-bol)
(electric-quote-replace-double-after-space)
(electric-quote-replace-double-after-letter)
(electric-quote-replace-double-after-paren): New unit tests.

* doc/emacs/text.texi (Quotation Marks): Document
'electric-quote-replace-double'.
2017-10-01 00:20:36 +02:00
Mark Oteiza
185f333406 Add logcount (Bug#22689)
* doc/lispref/numbers.texi (Bitwise Operations): Add documentation.
* etc/NEWS: Mention.
* src/data.c (logcount32, logcount64): New functions.
(logcount): New Lisp function.
(syms_of_data): Declare it.
* test/src/data-tests.el (data-tests-popcnt, data-tests-logcount): New
test.
2017-09-30 14:16:18 -04:00
Paul Eggert
20a09de953 Merge from origin/emacs-26
3ab2f9bbb9 Merge from gnulib
cbc8324488 Prefer HTTPS to HTTP for gnu.org
bbda601d1d ; Spelling fixes
695cf5300b Wait for frame visibility with timeout in w32term too
e1f6e3127a Bring back the busy wait after x_make_frame_visible (Bug#2...
bccf635217 ; * src/gtkutil.c (xg_check_special_colors): Add another G...
26d58f0c58 ; Standardize license notices
61225964ed Revert "bug#28609: simple.el"
a75ab3b3fb bug#28609: simple.el
c7a21430c1 ; * etc/NEWS: Fix last change.
33401b26b1 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/e...
d4b2bbdc73 Merge branch 'emacs-26' into scratch/org-mode-merge
c1ac8c170f Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/e...
af130f900f Fix ert backtrace saving for non-`signal'ed errors (Bug#28...
7476eeaa23 Revert "Fix build on macOS (bug#28571)"
fec63089d5 Fix build on macOS (bug#28571)
0f9a78e770 Add tests for `css-current-defun-name'
88a0dd71f1 In w32fullscreen_hook don't add decorations to undecorated...
18073beb14 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/e...
1eef11b7be Fix doc string of 'dired-listing-switches'
eaefbc26d5 ; Add files missing in ab351d442d
ab351d442d Update Org to v9.1.1
2017-09-29 22:06:33 -07:00
Paul Eggert
98ac36efe4 Merge from origin/emacs-26
1e5949642a ; * src/gtkutil.c (xg_create_frame_widgets): Add FIXME re....
e7c8da4d05 bug#28609: simple.el
827db6b559 Use a separate syntax-ppss cache for narrowed buffers
a2244f417a Improve python3-compatibility of fallback completion (Bug#...
79162cb0db Fix subr-x-tests when running from elc
66d35ae49d * lisp/eshell/esh-util.el (eshell-condition-case): Add deb...
f5e72b04d9 Make sh-indentation into an alias for sh-basic-offset (Bug...
a58d0c590a Fix loading of smie-config rules (Bug#24848)
3a68dec327 ; Update NEWS for the change in eldoc-message
5a41dd0a1f Reset default-directory inside *xref-grep* buffer
49cd561dc6 * test/lisp/tramp-tests.el (tramp-test21-file-links): Spec...
b719f6b20b Loosen strict parsing requirement for desktop files
c7a0c13777 * lisp/xdg.el (xdg-thumb-uri): Fix doc string.
dc6b3560e5 Fix documentation of `make-frame' and related variables an...
3d3778d82a Accept new `always' value for option `buffer-offer-save'
638f64c40a Improve new NS scrolling variable names
d93301242f Document 'replace-buffer-contents' in the manual.
00e4e3e9d2 Fix undecorated frame resizing issues on NS (bug#28512)
820739bbb5 ; * doc/emacs/display.texi (Display Custom): Fix wording.
f2b2201594 ; Spelling and URL fixes
0e143b1fc5 Documentation improvements for 'display-line-numbers'
f656ccdb43 ; Fix typo
d64da52d57 Fix last change in bat-mode.el
908af46abd Fix restoring in GUI sessions desktop saved in TTY sessions
51cbd85454 Improve syntax highlighting in bat-mode
0273916618 Document the 'list-FOO' convention
d24ec58540 Expose viewing conditions in CAM02-UCS metric
a81d5a3d3f Revert "Set frame size to actual requested size (bug#18215)"
0bf066d4b2 Add tests for Edebug
68baca3ee1 Catch more messages in ert-with-message-capture
28e0c410c9 ; * lisp/mouse.el (secondary-selection-exist-p): Doc fix.
31e1d9ef2f Support setting region from secondary selection and vice v...
047f02f00f Fix new copy-directory bug with empty dirs
fbd15836af * doc/lispref/strings.texi (Formatting Strings): Improve i...
f16a8d5dbd Fix 2 testsuite tests for MS-Windows
965cffd89c Rename timer-list to list-timers
a5fec62b51 Provide native touchpad scrolling on macOS
7b3d1c6beb Fix MinGW64 build broken by recent MinGW64 import libraries
c83d0c5fdf Fix crashes in 'move-point-visually' in minibuffer windows
7f3d5f929d * src/emacs.c (usage_message): Don't mention 'find-file'.
6845282200 Fix a minor inaccuracy in the Emacs manual
74d7bb9498 Fix errors in flyspell-post-command-hook
40fdbb01d0 Work on Tramp's file-truename
1a01423b3c Fix bug with make-directory on MS-Windows root
066efb8666 Fix log-view-diff-common when point is after last entry
3f006b56cd Adapt fileio-tests--symlink-failure to Cygwin
ee512e9a82 Ignore buffers whose name begins with a space in save-some...
9e1b5bd92c Improve tramp-interrupt-process robustness
8d4223e61b Minor Tramp doc update
331d0e520f Fix gensym
466df76f7d Cleanup in files-tests.el
6359fe630a Remove old cl-assert calls in 'newline'
059184e645 Avoid crash with C-g C-g in GC
541006c536 Fix format-time-string %Z bug with negative tz
679e05eeb9 message-citation-line-format %Z is now tz name
4e8888d438 Use doc-view or pdf-tools on any window-system
5f28f0db73 Fix bug with min and max and NaNs
37b5e661d2 Fix recently-introduced copy-directory bug
6bbbc38b34 Merge from Gnulib
57249fb297 Fix compatibility problem in Tramp
411bec82c4 Avoid GCC 7 compilation warning in eval.c
34a6774daa ; Partially revert c3445aed51
3003ac0469 Adapt Tramp version.  Do not merge
48d39c39e8 Search for Syntax section when viewing MDN
9d101376b4 Allow smerge-keep-current to work for empty hunks
13aba24add Call vc-setup-buffer in vc-git-log-{in,out}going
1d599df5e0 Fix last change to textmodes/page-ext.el
a726e09a9a * test/src/lcms-tests.el (lcms-cri-cam02-ucs): Skip if lcm...
546413e1ac * test/src/lcms-tests.el (lcms-whitepoint): Skip if lcms2 ...
96aaeaaffa ; * src/lcms.c: Minor stylistic changes in comments.
c3df816585 Fix compilation warning in etags.c
2017-09-29 22:06:14 -07:00
Paul Eggert
cbc8324488 Prefer HTTPS to HTTP for gnu.org
This catches some URLs I missed in my previous scan,
or perhaps were added after the scan.
2017-09-29 17:48:22 -07:00
Paul Eggert
bbda601d1d ; Spelling fixes 2017-09-29 16:41:50 -07:00
Simen Heggestøyl
0f9a78e770 Add tests for `css-current-defun-name'
* test/lisp/textmodes/css-mode-tests.el (css-test-current-defun-name)
(css-test-current-defun-name-nested)
(css-test-current-defun-name-complex): New tests for
`css-current-defun-name'.
2017-09-28 18:55:06 +02:00
Mark Oteiza
a17f30d7cd Add MIME apps spec utilities
Facilitates finding associations between MIME types and desktop files
that report an association with that type.  Combined with mailcap.el's
MIME facilities, it should be easy to use desktop files.
* lisp/xdg.el (xdg-mime-table): New variable.
(xdg-mime-apps-files, xdg-mime-collect-associations, xdg-mime-apps):
New functions.
* test/data/xdg/mimeapps.list: New file.
* test/data/xdg/mimeinfo.cache: New file.
* test/lisp/xdg-tests.el (xdg-mime-associations): New test.
2017-09-26 17:48:00 -04:00
Noam Postavsky
79162cb0db Fix subr-x-tests when running from elc
* test/lisp/emacs-lisp/subr-x-tests.el (subr-x-and-let*-test-group-1):
Use `eval' around the `should-error' cases.
2017-09-25 19:39:19 -04:00
Michael Albinus
49cd561dc6 * test/lisp/tramp-tests.el (tramp-test21-file-links): Special code for smb. 2017-09-25 17:52:24 +02:00
Mark Oteiza
b719f6b20b Loosen strict parsing requirement for desktop files
There are other desktop-looking files, for instance those having to do
with MIME typess, that would benefit from being able to be read by this
function.  It helps to have some flexibility.
* lisp/xdg.el (xdg-desktop-read-file): Remove an error condition.
* test/lisp/xdg-tests.el: Remove a test.
2017-09-25 08:45:08 -04:00
Paul Eggert
f2b2201594 ; Spelling and URL fixes 2017-09-23 00:36:56 -07:00
Mark Oteiza
d24ec58540 Expose viewing conditions in CAM02-UCS metric
Also add tests from the colorspacious library.  Finally, catch an
errant calculation, where degrees were not being converted to radians.
* src/lcms.c (deg2rad, default_viewing_conditions):
(parse_viewing_conditions): New functions.
(lcms-cam02-ucs): Add comments pointing to references used.  Expand
the docstring and explain viewing conditions.  JCh hue is given in
degrees and needs to be converted to radians.
(lcms-d65-xyz): Remove.  No need to duplicate this in Lisp or make the
API needlessly impure.
* test/src/lcms-tests.el: Reword commentary.
(lcms-rgb255->xyz): New function.
(lcms-cri-cam02-ucs): Fix let-binding.
(lcms-dE-cam02-ucs-silver): New test, assimilated from colorspacious.
2017-09-21 23:06:00 -04:00
Gemini Lasswell
0bf066d4b2 Add tests for Edebug
* tests/lisp/emacs-lisp/edeug-tests.el: New file.
* tests/lisp/emacs-lisp/edebug-resources/edebug-test-code.el: New file.
2017-09-21 13:36:08 -07:00
Paul Eggert
047f02f00f Fix new copy-directory bug with empty dirs
Problem reported by Afdam Plaice (Bug#28520) and by Eli Zaretskii
(Bug#28483#34).  This is another bug that I introduced in my
recent copy-directory changes.
* lisp/files.el (copy-directory): Work with empty subdirectories, too.
* test/lisp/files-tests.el (files-tests--copy-directory):
Test for this bug.
2017-09-20 11:50:35 -07:00
Eli Zaretskii
f16a8d5dbd Fix 2 testsuite tests for MS-Windows
* test/lisp/ibuffer-tests.el (test-buffer-list): Don't try to
create files with "*" in their names.
* test/src/editfns-tests.el (format-time-string-with-zone): Adapt
results to MS-Windows build.  Reported by Fabrice Popineau
<fabrice.popineau@gmail.com>.
2017-09-20 10:16:11 +03:00
Ken Brown
3f006b56cd Adapt fileio-tests--symlink-failure to Cygwin
* test/src/fileio-tests.el (fileio-tests--symlink-failure)
[CYGWIN]: Skip the case of a symlink target starting with '\';
this is treated specially on Cygwin.
2017-09-18 17:22:52 -04:00
Mark Oteiza
331d0e520f Fix gensym
* lisp/subr.el (gensym): Actually implement the default prefix.
* test/lisp/subr-tests.el (subr-tests--gensym): New test.
2017-09-18 09:00:45 -04:00
Michael Albinus
466df76f7d Cleanup in files-tests.el
* test/lisp/files-tests.el (files-tests--make-directory)
(files-tests--copy-directory): Cleanup temporary directories.
2017-09-18 10:00:17 +02:00
Paul Eggert
541006c536 Fix format-time-string %Z bug with negative tz
* src/editfns.c (tzlookup): Fix sign error in %Z when a purely
numeric zone is negative (Bug#28746).
* test/src/editfns-tests.el (format-time-string-with-zone):
Add test for this bug.
2017-09-17 20:39:12 -07:00
Paul Eggert
5f28f0db73 Fix bug with min and max and NaNs
* src/data.c (minmax_driver): Fix bug with (min 0 NaN), which
mistakenly yielded 0.  Also, pacify GCC in a better way.
* test/src/data-tests.el (data-tests-min): Test for the bug.
2017-09-17 15:26:41 -07:00
Paul Eggert
37b5e661d2 Fix recently-introduced copy-directory bug
Problem reported by Andrew Christianson (Bug#28451):
* lisp/files.el (copy-directory): If COPY-CONTENTS, make the
destination directory if it does not exist, even if it is a
directory name.  Simplify, and omit unnecessary test for an
already-existing non-directory target, since make-directory
diagnoses that for us now.
* test/lisp/files-tests.el (files-tests--copy-directory):
Test for this bug.
2017-09-17 13:06:54 -07:00
Michael Albinus
57249fb297 Fix compatibility problem in Tramp
* lisp/net/tramp.el (tramp-interrupt-process): Better error handling.

* lisp/net/tramp-compat.el (default-toplevel-value): Move up.
(top): Do not call `tramp-change-syntax' anymore.
(tramp-compat-directory-name-p): New defalias.

* lisp/net/tramp-adb.el (tramp-adb-handle-copy-file):
* lisp/net/tramp-sh.el (tramp-sh-handle-copy-directory):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-copy-file): Use it.

* test/lisp/net/tramp-tests.el (tramp-test28-interrupt-process):
Modify test.
2017-09-17 19:16:59 +02:00
Tom Tromey
9d101376b4 Allow smerge-keep-current to work for empty hunks
Bug#25555
* lisp/vc/smerge-mode.el (smerge-get-current): Allow point to be at
match-end.
* test/lisp/vc/smerge-mode-tests.el: New file.
2017-09-16 21:55:05 -06:00
Glenn Morris
a726e09a9a * test/src/lcms-tests.el (lcms-cri-cam02-ucs): Skip if lcms2 not present. 2017-09-16 13:56:56 -07:00
Glenn Morris
546413e1ac * test/src/lcms-tests.el (lcms-whitepoint): Skip if lcms2 not present.
(cherry picked from commit 8081df2691)
2017-09-16 13:56:56 -07:00
Mark Oteiza
5490ccc5eb Add lisp variable lcms-d65-xyz
This serves as the default optional argument for functions in this
library.
* src/lcms.c (lcms-d65-xyz): New variable.
(lcms-cam02-ucs): Use it.  Use better word in docstring.  Fix bug
color1 -> color2.
* test/src/lcms-tests.el: Add some tests for lcms-cri-cam02-ucs.
(lcms-colorspacious-d65): New variable.
2017-09-16 12:49:28 -04:00
Mark Oteiza
f5f261c690 Add lcms-temp->white-point and initial tests
* src/lcms.c (lcms-temp->white-point): New function.
* test/src/lcms-tests.el: New file.
2017-09-15 23:49:42 -04:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November.  Change these FTP URLs to https://ftp.gnu.org
instead.  Make similar changes for URLs to other organizations moving
away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
2017-09-13 15:54:37 -07:00
Paul Eggert
5da53a0191 Prefer HTTPS to HTTP for gnu.org
This patch just changes code files; a followup companion patch
(much larger) will affect the commentary.  This part is
separated out to make it easier to review.
* .dir-locals.el (change-log-mode):
* lisp/org/org-info.el (org-info-other-documents)
(org-info-map-html-url):
* lisp/org/ox-html.el (org-html-creator-string):
* lisp/startup.el (fancy-startup-text, fancy-about-text)
(fancy-splash-head):
* test/lisp/ffap-tests.el (ffap-other-window--bug-25352):
* test/lisp/thingatpt-tests.el (thing-at-point-test-data):
Use HTTPS instead of HTTP.
2017-09-13 15:54:25 -07:00
Simen Heggestøyl
e7d6c62209 Add tests for color.el
* lisp/color.el (color-name-to-rgb, color-complement): Clarify in
docstrings that RGB triplets should use four digits per component.
(color-rgb-to-hsl): Break line to avoid "Hidden behind deeper element"
warning.

* test/lisp/color-tests.el: New file.
2017-09-13 20:23:44 +02:00
Michael Albinus
4ab44f75d6 Improve backward compatibility of tramp-tests
* test/lisp/net/tramp-tests.el (seq): Don't require.
(tramp--test-emacs26-p): New defun.
(tramp-test10-write-region, tramp-test11-copy-file)
(tramp-test12-rename-file, tramp-test15-copy-directory)
(tramp-test21-file-links): Use it.
(tramp-test16-file-expand-wildcards): Use `copy-sequence'.
2017-09-13 20:10:40 +02:00
Eric Abrahamsen
9b980e2691 Allow write-contents-functions to short-circuit buffer save
Bug#28412

* lisp/files.el (basic-save-buffer): Re-arrange function so that
  write-contents-functions are run earlier. If they return non-nil,
  consider the buffer saved without requiring the buffer to be
  visiting a file.
  (save-some-buffers): This function should consider any buffer with a
  buffer-local value for write-contents-functions eligible for
  saving.
* test/lisp/files-tests.el (files-test-no-file-write-contents): New
  test.
* doc/lispref/files.texi (Saving Buffers): Mention in docs.
* etc/NEWS: And in NEWS.
2017-09-12 16:06:12 -07:00
Mark Oteiza
4612b2a2b3 Implement and-let*
This also includes changes to if-let and when-let.  The single tuple
special case is ambiguous, and binding a symbol to nil is not as
useful as binding it to its value outside the lexical scope of the
binding.  (Bug#28254)
* etc/NEWS: Mention.
* lisp/emacs-lisp/subr-x.el (internal--listify):
(internal--build-binding-value-form): Extend to account for
solitary symbols and (EXPR) items in binding varlist.
(if-let*, when-let*): Nix single tuple case and incumbent
bind-symbol-to-nil behavior.
(and-let*): New macro.
(if-let, when-let): Mark obsolete.  Redefine in terms of if-let*, so
they implicitly gain the new features without breaking existing code.
* test/lisp/emacs-lisp/subr-x-tests.el: Adjust tests for: lack of
single-tuple special case, lack of binding solitary symbols to nil,
and the introduction of uninterned symbols for (EXPR) bindings.  Add
SRFI-2 test suite adapted to Elisp.
2017-09-12 13:18:06 -04:00
Michael Albinus
49a42fbd27 Extend tramp-tests according to bug#27986
* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file, tramp-test15-copy-directory)
(tramp-test21-file-links): Extend tests.
(tramp-test13-make-directory, tramp-test14-delete-directory):
Specifiy error symbol in `should-error'.
2017-09-12 11:20:49 +02:00
Michael Albinus
7004545244 Further optimization in Tramp's file name decomposition
* lisp/net/tramp.el (tramp-syntax): Recompute all file name
components.  Call `custom-set-variables' after loading.
(tramp-build-prefix-format, tramp-build-prefix-regexp)
(tramp-build-method-regexp)
(tramp-build-postfix-method-format)
(tramp-build-postfix-method-regexp)
(tramp-build-prefix-ipv6-format)
(tramp-build-prefix-ipv6-regexp)
(tramp-build-postfix-ipv6-format)
(tramp-build-postfix-ipv6-regexp)
(tramp-build-postfix-host-format)
(tramp-build-postfix-host-regexp)
(tramp-build-file-name-regexp)
(tramp-build-completion-file-name-regexp): New defuns.
(tramp-prefix-format, tramp-prefix-regexp)
(tramp-method-regexp, tramp-postfix-method-format)
(tramp-postfix-method-regexp, tramp-prefix-ipv6-format)
(tramp-prefix-ipv6-regexp, tramp-postfix-ipv6-format)
(tramp-postfix-ipv6-regexp, tramp-postfix-host-format)
(tramp-postfix-host-regexp)
(tramp-remote-file-name-spec-regexp)
(tramp-file-name-structure, tramp-file-name-regexp)
(tramp-completion-file-name-regexp): Convert defuns into defvars.
(tramp-prefix-regexp-alist)
(tramp-postfix-method-regexp-alist)
(tramp-prefix-ipv6-regexp-alist)
(tramp-postfix-ipv6-regexp-alist)
(tramp-postfix-host-regexp-alist)
(tramp-remote-file-name-spec-regexp-alist): Remove.
(tramp-build-remote-file-name-spec-regexp)
(tramp-build-file-name-structure): Simplify.
(tramp-completion-file-name-regexp-alist): New defconst.
(tramp-tramp-file-p, tramp-dissect-file-name)
(tramp-make-tramp-file-name)
(tramp-completion-make-tramp-file-name)
(tramp-rfn-eshadow-update-overlay-regexp)
(tramp-register-file-name-handlers)
(tramp-completion-handle-file-name-all-completions)
(tramp-completion-dissect-file-name, tramp-clear-passwd):
* lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler):
* lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered)
(tramp-compute-multi-hops): Use variables but functions for
file name components.

* test/lisp/net/tramp-tests.el (tramp-test24-file-name-completion):
Use variables but functions for file name components.
2017-09-11 17:12:32 +02:00
Paul Eggert
29963648dd Port tramp-tests to new copy-directory behavior
* test/lisp/net/tramp-tests.el (tramp-test15-copy-directory):
Use directory name as arg for copy-directory when we want
the special behavior.
2017-09-10 23:05:20 -07:00
Paul Eggert
cf9891e14e Fix some make-directory bugs
* lisp/files.el (files--ensure-directory): New function.
(make-directory): Use it to avoid bugs when (make-directory FOO t)
is invoked on a non-directory, or on a directory hierarchy that
is being built by some other process while Emacs is running.
* test/lisp/files-tests.el (files-tests--make-directory): New test.
2017-09-10 20:38:19 -07:00
Paul Eggert
01c885f21f Fix race with rename-file etc. with dir NEWNAME
This changes the behavior of rename-file etc. slightly.
The old behavior mostly disagreed with the documentation, and had
a race condition bug that could allow attackers to modify victims'
write-protected directories (Bug#27986).
* doc/lispref/files.texi (Changing Files): Document that in
rename-file etc., NEWFILE is special if it is a directory name.
* etc/NEWS: Document the change in behavior.
* src/fileio.c (directory_like): Remove.  All uses removed.
(expand_cp_target): Test only whether NEWNAME is a directory name,
not whether it is currently a directory.  This avoids a race.
(Fcopy_file, Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
Document behavior if NEWNAME is a directory name.
(Frename_file): Simplify now that the destdir behavior occurs
only when NEWNAME is a directory name.
* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file, tramp--test-check-files):
Adjust tests to match new behavior.
2017-09-10 15:46:51 -07:00
Paul Eggert
cdef84fb68 Spelling fixes
* lisp/progmodes/cc-langs.el:
(c-ambiguous-overloadable-or-identifier-prefixes): Rename from
c-ambiguous-overloadable-or-identifier-prefices.  Caller changed.
2017-09-10 09:24:37 -07:00
Mark Oteiza
e716538911 Avoid looking at localized strings
* lisp/xdg.el (xdg-desktop-read-group): Add condition to catch
localized strings.
* test/lisp/xdg-tests.el (xdg-desktop-parsing): Add test to ensure
parsing l10n strings doesn't error but is essentially a no-op.
2017-09-09 23:14:07 -04:00
Mark Oteiza
4131f9785e Add function to read all entries in a group
Use that to extend xdg-desktop-read-file.  Also fix a bug where all
entries in all groups were read and returned by xdg-desktop-read-file.
* lisp/xdg.el (xdg-desktop-read-group): New function.
(xdg-desktop-read-file): Use it.
* test/data/xdg/malformed.desktop: New file.
* test/data/xdg/test.desktop: Add another section.
* test/lisp/xdg-tests.el (xdg-desktop-parsing): Test presence of a key
in another group.  Test reading a prescribed group.  Test detecting a
malformed key=value.
2017-09-09 12:26:50 -04:00
Mark Oteiza
be9bc8e67d ; Fix previous commit
See https://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00101.html
* test/lisp/xdg.el: Remove match data tests.
* lisp/xdg.el (xdg-user-dir): Fix docstring. Remove save-match-data.
(xdg-desktop-read-file, xdg-desktop-strings): Remove save-match-data.
2017-09-09 00:46:41 -04:00
Eli Zaretskii
e2a10d7fa8 Fix 'directory-file-name' on DOS_NT systems as well
* src/fileio.c (directory_file_name) [DOS_NT]: Fix the DOS_NT case
to be consistent with last change.

* test/src/fileio-tests.el (fileio-tests--odd-symlink-chars):
Disable on MS-Windows.
(fileio-tests--directory-file-name-dos-nt)
(fileio-tests--file-name-as-directory-dos-nt): New tests.
2017-09-08 10:51:14 +03:00
Paul Eggert
aedc566a94 Fix bug: (directory-file-name "///") returned "//"
* src/fileio.c (directory_file_name): For "///" and longer,
return "/", not "//", as per POSIX.
* test/src/fileio-tests.el (fileio-tests--directory-file-name)
(fileio-tests--file-name-as-directory): New tests.
2017-09-07 17:47:24 -07:00
Glenn Morris
a0e3f715fc Skip emacsclient tests if --enable-profiling was used
* test/lib-src/emacsclient-tests.el
(emacsclient-test-call-emacsclient): Make it a macro.
Handle "Profiling timer expired" return from emacsclient.  (Bug#28319)
(emacsclient-test-alternate-editor-allows-arguments)
(emacsclient-test-alternate-editor-allows-quotes): Update for above.
2017-09-06 20:06:57 -04:00
Mark Oteiza
9604f9cd33 Add XDG desktop file parsing and tests
* lisp/xdg.el: Add support for Desktop Entry Specification.
(xdg--user-dirs-parse-line): Check if file is readable.
(xdg-desktop-group-regexp, xdg-desktop-entry-regexp): New variables.
(xdg--desktop-parse-line, xdg-desktop-read-file, xdg-desktop-strings):
New functions.
* test/lisp/xdg-tests.el:
* test/data/xdg/test.desktop:
* test/data/xdg/wrong.desktop: New files.
2017-09-06 13:17:05 -04:00
Glenn Morris
d48f30057f Allow for adjusting line length of test backtraces
* test/Makefile.in (TEST_BACKTRACE_LINE_LENGTH): New option.
(%.log): Respect backtrace line length.
2017-09-05 20:46:38 -04:00
Glenn Morris
a2cf4d49f1 Minor emacsclient-tests simplification
* test/lib-src/emacsclient-tests.el (emacsclient-test-emacs):
Simplify.  Also work when running installed.
2017-09-05 18:55:49 -04:00
Glenn Morris
df4940c8dd emacsclient-tests: remove some debug statements
* test/lib-src/emacsclient-tests.el
(emacsclient-test-call-emacsclient): Remove debug statements.
2017-09-05 16:01:11 -04:00
Simen Heggestøyl
fca6238453 Handle non-zero exit status from psql more gracefully
* lisp/progmodes/sql.el (sql-postgres-list-databases): Handle non-zero
exit statuses from `psql -ltX' more gracefully by returning nil.

* test/lisp/progmodes/sql-tests.el
(sql-tests-postgres-list-databases-error): New test.
2017-09-05 20:31:21 +02:00
Mark Oteiza
485e25312d Move soundex.el test to a proper test
* test/lisp/soundex-tests.el: New file.
* lisp/soundex.el: Use lexical-binding.  Remove commented test.
2017-09-05 12:03:10 -04:00
Mark Oteiza
9f64d59ae6 Add tests for mailcap.el
* test/data/mailcap/mime.types: New file.
* test/lisp/net/mailcap-tests.el: New file.
2017-09-05 11:55:01 -04:00
Glenn Morris
514e147dd3 emacsclient-tests: add some debug statements
* test/lib-src/emacsclient-tests.el
(emacsclient-test-call-emacsclient): Add debug statements.
2017-09-04 09:21:24 -07:00
Michael Albinus
8a65d7a731 Work on Tramp's (symbolic) links
* doc/misc/tramp.texi (Traces and Profiles): Mention the
backtrace when tramp-verbose is greater than or equal to 10.

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
Use `tramp-handle-add-name-to-file'.

* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Use
`tramp-handle-add-name-to-file' and `tramp-handle-file-truename'.

* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link): Improve.

* lisp/net/tramp-smb.el (tramp-smb-errors):
Add "NT_STATUS_CONNECTION_DISCONNECTED" and
"NT_STATUS_OBJECT_PATH_SYNTAX_BAD".
(tramp-smb-file-name-handler-alist): Use `tramp-handle-file-truename'.
(tramp-smb-do-file-attributes-with-stat): Return non-nil only
if one of the attributes is non-nil.
(tramp-smb-handle-file-local-copy): Use `file-truename'.
(tramp-smb-handle-file-truename): Move to tramp.el.
(tramp-smb-handle-insert-directory): Show symlinks.
(tramp-smb-handle-make-symbolic-link): Improve.
(tramp-smb-read-file-entry): Handle extended file modes in Samba.

* lisp/net/tramp.el (tramp-handle-add-name-to-file)
(tramp-handle-file-truename): New defuns.

* test/lisp/net/tramp-tests.el (tramp-test21-file-links): Extend test.
(tramp--test-check-files): Make check for "smb".
2017-09-04 13:10:52 +02:00
Glenn Morris
48116f9126 emacsclient-tests: call-process may return non-integer
* test/lib-src/emacsclient-tests.el
(emacsclient-test-alternate-editor-allows-arguments)
(emacsclient-test-alternate-editor-allows-quotes):
Handle non-integer return from call-process.
2017-09-03 10:56:18 -07:00
Philipp Stephani
71766a45f1 Improve error messages for improper plists (Bug#27726)
* src/fns.c (Fplist_put, Flax_plist_get, Flax_plist_put)
(Fplist_member, syms_of_fns): Use ‘plistp’ as pseudo-predicate for
improper plists instead of ‘listp.’

* test/src/fns-tests.el (plist-get/odd-number-of-elements)
(lax-plist-get/odd-number-of-elements)
(plist-put/odd-number-of-elements)
(lax-plist-put/odd-number-of-elements)
(plist-member/improper-list): Add unit tests.
2017-09-02 21:08:04 +02:00
Reuben Thomas
2b91b841b2 Fix a mis-binding in a test
* test/lisp/progmodes/python-tests.el
(python-shell-calculate-process-environment-3): Fix binding of
process-environment.  A level of parens was missing.

This was found after Glenn Morris noticed a similar problem with the
patch for Bug#28319.
2017-09-01 23:41:36 +01:00
Reuben Thomas
6c995e4194 Fix a mis-binding and a bad defun name in a test (Bug#28319)
test/lib-src/emacs-client-tests.el (call-emacsclient): Rename
emacsclient-test-call-emacsclient.
(emacsclient-test-alternate-editor-allows-arguments)
(emacsclient-test-alternate-editor-allows-quotes): Fix let-binding of
process-environment.

Thanks to Glenn Morris for noticing these errors.
2017-09-01 23:41:15 +01:00
Glenn Morris
cae005f28d * test/Makefile.in (check-no-automated-subdir): Silence by default. 2017-09-01 18:29:49 -04:00
Glenn Morris
44c971bb67 * test/Makefile.in (ELFILES): Sort, for a reproducible order. 2017-09-01 18:27:31 -04:00
Reuben Thomas
4bc2795a40 Stop emacsclient tests hanging (Bug#28319)
* test/lib-src/emacsclient-tests.el
(emacsclient-test-alternate-editor-allows-arguments): Use a
non-existent file to communicate with server, so that any existing
default server will not be hijacked (in fact, the test does
not need a server).
(emacsclient-test-alternate-editor-allows-quotes): Likewise.
2017-09-01 21:32:12 +01:00
Samuel Freilich
cda26e6462 Do not split line before width of fill-prefix
When auto-filling a paragraph, don't split a line before the width of the
fill-prefix, creating a subsequent line that is as long or longer (Bug#20774).
* lisp/simple.el (do-auto-fill): Only consider break-points that are later in
the line than the width of the fill-prefix.  This is a more general solution
than the previous logic, which only skipped over the exact fill-prefix.  The
fill-prefix doesn't necessarily match the prefix of the first line of a
paragraph in adaptive-fill-mode.
2017-08-30 20:10:36 -04:00
Reuben Thomas
98f01a13a3 Add support for arguments in emacsclient's ALTERNATE_EDITOR (Bug #25082)
* lib-src/emacsclient.c (fail): Parse ALTERNATE_EDITOR, or
corresponding command-line argument, into quote- or space-separated
tokens.  If a token starts with a quote, then it naturally is expected
to end with a quote; escaping is not supported. This is enough to cope
with the typical case of requiring the initial path to be quoted,
common on Windows where it may contain spaces.
* etc/NEWS: Document.
* doc/emacs/misc.texi: Likewise.
* doc/man/emacsclient.1: Tweak to remove the implication that only an
editor can be specified (the manual already mentions a “command”).
Fix a small error where “EDITOR” is referred to rather than
“ALTERNATE_EDITOR”.
* test/lib-src/emacsclient-tests.el: Add tests.
2017-08-30 21:59:38 +01:00
Michael Albinus
9376ea3f6c Improve symlinks for Tramp
* lisp/files.el (files--splice-dirname-file): Quote whole file.

* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link):
Do not expand TARGET, it could be remote.
(tramp-sh-handle-file-truename): Check for cyclic symlink also
in case of readlink.  Quote result if it looks remote.
(tramp-sh-handle-file-local-copy): Use `file-truename'.

* test/lisp/net/tramp-tests.el (tramp-test08-file-local-copy)
(tramp-test09-insert-file-contents): Test also file missing.
(tramp-test21-file-links): Extend test.
2017-08-30 12:00:26 +02:00
Michael Albinus
3a19e6ec23 Further fixes in tramp-smb.el
* lisp/net/tramp-smb.el (tramp-smb-handle-file-truename): New defun.
(tramp-smb-file-name-handler-alist): Use it.
(tramp-smb-handle-make-symbolic-link): Unquote target.

* test/lisp/net/tramp-tests.el
(tramp--test-ignore-make-symbolic-link-error): New defmacro.
(tramp-test18-file-attributes, tramp-test21-file-links)
(tramp--test-check-files): Use it.
2017-08-28 18:08:16 +02:00
Tom Tromey
9e79a31c09 Fix auto-fill bug in js-mode
* lisp/progmodes/js.el (js-do-auto-fill): New function.
(js-mode): Set normal-auto-fill-function.
* test/lisp/progmodes/js-tests.el (js-mode-fill-comment-bug): New
test.
2017-08-27 12:54:19 -06:00
Michael Albinus
79cc9445e1 Tramp cleanup
* lisp/net/tramp-sh.el (tramp-sh-extra-args): Remove compat code.
(tramp-sh-handle-make-symbolic-link): More robust check for
TARGET remoteness.

* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory):
Disable copying by tar temporarily, it doesn't work reliably.
(tramp-smb-do-file-attributes-with-stat): Resolve symlink.
(tramp-smb-handle-make-symbolic-link): Fix implementation.

* lisp/net/tramp.el (tramp-handle-file-symlink-p): Simplify.

* test/lisp/net/tramp-tests.el (tramp-test21-file-links):
Extend test.
2017-08-27 19:16:58 +02:00
Paul Eggert
e8001d4c27 Do not munge contents of local symbolic links
This lets Emacs deal with arbitrary local symlinks without
mishandling their contents (Bug#28156).  For example,
(progn (shell-command "ln -fs '~' 'x'") (rename-file "x" "/tmp/x"))
now consistently creates a symbolic link from '/tmp/x' to '~'.
Formerly, it did that only if the working directory was on the
same filesystem as /tmp; otherwise, it expanded the '~' to
the user's home directory.
* lisp/dired.el (dired-get-filename): Use files--name-absolute-system-p
instead of rolling our own code.
* lisp/files.el (files--name-absolute-system-p): New function.
(file-truename, file-chase-links): Use it to avoid mishandling
symlink contents that begin with ~.
(copy-directory, move-file-to-trash):
Use concat rather than expand-file-name, to avoid mishandling
symlink contents that begin with ~.
* src/fileio.c (Fmake_symbolic_link): Do not expand leading "~" in the
target unless interactive.  Strip leading "/:" if interactive.
(emacs_readlinkat): Do not prepend "/:" to the link target if
it starts with "/" and contains ":" before NUL.
* test/src/fileio-tests.el (try-link): Rename from try-char,
and accept a string instead of a char.  All uses changed.
(fileio-tests--symlink-failure): Also test leading ~, and "/:",
to test the new behavior.
2017-08-26 18:36:38 -07:00
Michael Albinus
cc7530cae0 Fix Tramp part of Bug#28156
* lisp/files.el (file-name-non-special): Use `file-name-quote'
instead prefixing "/:", the file could already be quoted.

* lisp/net/tramp.el (tramp-error): Handle null arguments.
(tramp-handle-make-symbolic-link):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
(tramp-sh-handle-add-name-to-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file)
(tramp-smb-handle-make-symbolic-link): Adapt implementation to
stronger semantics in Emacs.  (Bug#28156)

* test/lisp/net/tramp-tests.el (tramp-test21-file-links):
Extend test.
2017-08-26 15:09:55 +02:00
Tino Calancha
303481b4ec Keep face available if there are no matches
If font-lock-mode is disabled in the current buffer, and
there are no matches for REGEXP, then keep FACE available
for a next search.
* lisp/hi-lock.el (hi-lock-set-pattern): Add FACE into
hi-lock--unused-faces if font-lock-mode is disabled and
there are no matches.
* test/lisp/hi-lock-tests.el (hi-lock-test-set-pattern): Add test.
2017-08-25 00:09:50 +09:00
Michael Albinus
0332a0ef2b Minor improvements for tramp-interrupt-process, documentation
* doc/lispref/processes.texi (Signals to Processes):
* etc/NEWS: Document interrupt-process-functions.

* lisp/net/tramp.el (tramp-interrupt-process): Test also for
`process-live-p'.

* src/process.c (Vinterrupt_process_functions): Fix docstring.

* test/lisp/net/tramp-tests.el (tramp-test28-interrupt-process):
Extend test.
2017-08-24 15:53:56 +02:00
Michael Albinus
336707efb3 Test `file-expand-wildcards' for Tramp
* lisp/net/tramp-compat.el (tramp-advice-file-expand-wildcards):
Remove, not needed anymore.

* test/lisp/net/tramp-tests.el (top): Require seq.el.
(tramp-test16-directory-files): Simplify.
(tramp-test16-file-expand-wildcards): New test.
(tramp-test28-interrupt-process): Skip for older Emacsen.
2017-08-22 16:22:33 +02:00
Alexander Gramiak
ee9392a699 Add tests for cl-macs.el (Bug#27559)
* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-test-loop): Remove
duplicate.
(cl-loop-destructuring-with): Move to cl-macs-tests.el.
* test/lisp/emacs-lisp/cl-macs-tests.el: New file.
2017-08-21 20:52:25 -04:00
Reuben Thomas
ba0bb332dd Treat tests in lib-src like tests in src
* test/Makefile.in (test_template): Depend on a .c source file for a
test under lib-src, as for src.  (Thanks, Glenn Morris for pointing me
in the right direction.)
2017-08-22 01:41:45 +01:00
Michael Albinus
01844e40dc Implement `interrupt-process-functions'
* lisp/net/tramp.el (tramp-interrupt-process): Rename from
`tramp-advice-interrupt-process'.  Adapt according to changed API.
(top): Add it to `interrupt-process-functions'.

* src/process.c (Finternal_default_interrupt_process): New defun.
(Finterrupt_process): Change implementation, based on
Vinterrupt_process_functions.
(Vinterrupt_process_functions): New defvar.

* test/lisp/net/tramp-tests.el (tramp-test40-unload): Do not
test removal of advice.
2017-08-21 17:30:33 +02:00
Noam Postavsky
cdfe1cbca7 ; Remove python-shell-calculate-command-1 test
* test/lisp/progmodes/python-tests.el
(python-shell-calculate-pythonpath-1): Remove, it merely reprises the
body of `python-shell-calculate-command' and it has been broken on w32
since the fix for Bug#25025 was applied.
2017-08-20 16:42:15 -04:00
Michael Albinus
296472f5c5 Implement `interrupt-process' for remote processes (Bug#28066)
* lisp/net/tramp-sh.el (tramp-sh-handle-start-file-process):
Support sending signals remotely.
(tramp-open-connection-setup-interactive-shell):
Trace "remote-tty" connection property.

* lisp/net/tramp.el (tramp-advice-interrupt-process): New defun.
(top): Add advice to `interrupt-process'.  (Bug#28066)

* test/lisp/net/tramp-tests.el (tramp-test28-interrupt-process):
New test.
(tramp-test29-shell-command)
(tramp-test30-environment-variables)
(tramp-test30-environment-variables-and-port-numbers)
(tramp-test31-explicit-shell-file-name)
(tramp-test32-vc-registered)
(tramp-test33-make-auto-save-file-name)
(tramp-test34-make-nearby-temp-file)
(tramp-test35-special-characters)
(tramp-test35-special-characters-with-stat)
(tramp-test35-special-characters-with-perl)
(tramp-test35-special-characters-with-ls, tramp-test36-utf8)
(tramp-test36-utf8-with-stat, tramp-test36-utf8-with-perl)
(tramp-test36-utf8-with-ls)
(tramp-test37-asynchronous-requests)
(tramp-test38-recursive-load, tramp-test39-remote-load-path)
(tramp-test40-unload): Rename.
(tramp-test40-unload): Test also removal of advice.
2017-08-20 21:18:05 +02:00
Paul Eggert
1b8d0fe44a Change recent symlink tests to just test ASCII
* test/src/fileio-tests.el (fileio-tests--symlink-failure):
Be less ambitious about testing non-ASCII chars and encoding
errors, as there are too many portability issues.
2017-08-19 17:57:45 -07:00
Paul Eggert
83f0d60e49 Don’t adjust CRLF in file names
* doc/misc/gnus.texi (Non-ASCII Group Names):
* etc/NEWS:
* test/lisp/net/tramp-tests.el (tramp--test-utf8):
Use utf-8-unix, not utf-8, for default-file-name-coding-system, so
that CRLF in file names is left alone.
* lisp/international/mule-cmds.el (set-default-coding-systems):
Do not alter CRLF in file name coding systems.
(prefer-coding-system): Ignore differences in CRLF processing when
checking whether we used the user-specified file name coding system.
* test/src/fileio-tests.el: New file.
2017-08-19 17:17:09 -07:00
Noam Postavsky
8ed6446300 ; * test/lisp/auth-source-tests.el: Require cl-lib' instead of cl'. 2017-08-18 22:29:32 -04:00
Ted Zlatanov
94f3f13d6d
Fix and document make-temp-file optional text parameter
* lisp/files.el (make-temp-file): Fix initial TEXT parameter.
(files--make-magic-temp-file): Support optional TEXT parameter.
* etc/NEWS: Document it.
* doc/lispref/files.texi: Document it.
* test/lisp/auth-source-tests.el: Minor reformat.
2017-08-18 21:59:39 -04:00
Ted Zlatanov
10cde01c5e
* test/lisp/auth-source-tests.el: Avoid `string-join' to be simple. 2017-08-18 21:14:17 -04:00
Ted Zlatanov
9ff5edc713
* test/lisp/auth-source-tests.el: Minor cleanups to use CL. 2017-08-18 18:46:19 -04:00
Ted Zlatanov
3565437bf2
Add auth-source tests and codify its API better
The auth-source behavior was unclear in some API use cases, so these
extra tests codify and test it. For details see
https://github.com/DamienCassou/auth-password-store/issues/29

* lisp/files.el (make-temp-file): Add new initial TEXT parameter.
* test/lisp/auth-source-tests.el (auth-source-test-searches): Add
  auth-source tests and simplify them with the new `make-temp-file'.
2017-08-18 18:31:00 -04:00
Mark Oteiza
87645443b5 Treat control characters in JSON strings as invalid
* lisp/json.el (json-peek): Reduce to following-char.
(json-pop, json-read): Zero (null char) means end of file.
(json-read-escaped-char): Delimit URL properly.
(json-read-string): Signal error for ASCII control characters.
* test/lisp/json-tests.el (test-json-peek): Check for zero instead of
:json-eof symbol.
(test-json-read-string): New test for control characters in JSON
strings.
2017-08-17 20:00:52 -04:00
Michael Albinus
ddda5ae547 Set `default-directory' for watchdog in tramp-test.el
* test/lisp/net/tramp-tests.el (tramp-test36-asynchronous-requests):
Set `default-directory' for watchdog.
2017-08-17 11:35:41 +02:00
Tino Calancha
400934b694 files-tests.el: Remove unused lexical variable
* test/lisp/files-tests.el (file-test--do-local-variables-test);
Remove unused var 'files-test-queried'.
2017-08-16 20:14:52 +09:00
Noam Postavsky
3305dec538 Add tests for previous commit
* test/lisp/progmodes/elisp-mode-tests.el
(elisp-mode-tests--face-propertized-string): New function.
(elisp--highlight-function-argument-indexed)
(elisp--highlight-function-argument-keyed-1)
(elisp--highlight-function-argument-keyed-2): New tests.
2017-08-15 21:22:41 -04:00
Simen Heggestøyl
141cc78aa4 Support indentation of detached Less CSS rulesets
* lisp/textmodes/css-mode.el (css-smie-rules): Provide better support
for indentation of detached rulesets passed to Less mixins.

* test/manual/indent/less-css-mode.less: New file.
2017-08-15 14:38:15 +02:00
Eric Abrahamsen
c59ddb2120 Fix slot typecheck in eieio-persistent
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-slot-type-is-class-p):
  An `or' form can specify multiple potential classes (or null) as
  valid types for a slot, but previously only the final element of the
  `or' was actually checked. Now returns all valid classes in the `or'
  form.
  (eieio-persistent-validate/fix-slot-value): Check if proposed value
  matches any of the valid classes.
* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el
  (eieio-test-multiple-class-slot): Test this behavior.
2017-09-30 16:28:00 -07:00
Mark Oteiza
645ff6c702 Add CAM02 JCh and CAM02-UCS J'a'b' conversions
* src/lcms.c (rad2deg, parse_jch_list, parse_jab_list, xyz_to_jch):
(jch_to_xyz, jch_to_jab, jab_to_jch): New functions.
(lcms-jch->xyz, lcms-jch->xyz, lcms-jch->jab, lcms-jab->jch): New Lisp
functions.
(lcms-cam02-ucs): Refactor.
(syms_of_lcms2): Declare new functions.
* test/src/lcms-tests.el (lcms-roundtrip, lcms-ciecam02-gold):
(lcms-jmh->cam02-ucs-silver): New tests.
* etc/NEWS: Mention new functions.
2017-09-30 08:00:53 -04:00
Tino Calancha
66b75d3f20 archive-int-to-mode: Fix order of testing S_ISUID, S_ISGID bits
* lisp/arc-mode.el (archive-int-to-mode):
Swap order of 2048 and 1024 tests (Bug#28092).
* test/lisp/arc-mode-tests.el (arc-mode-test-archive-int-to-mode):
Update test.
2017-08-15 15:43:31 +09:00
Glenn Morris
4fe9a9efcf Clean up temp files after some tests
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--with-temp-file): Also delete .elc file if present.
* test/lisp/progmodes/etags-tests.el
(etags-buffer-local-tags-table-list): Delete temp file at end.
2017-08-14 17:23:18 -04:00
Tino Calancha
8c8be4f8f4 Add test suites for arc-mode and tar-mode
* test/lisp/arc-mode-tests.el (arc-mode-test-archive-int-to-mode)
* test/lisp/tar-mode-tests.el (tar-mode-test-tar-grind-file-mode):
New tests.
2017-08-13 23:41:46 +09:00
Paul Eggert
ebf53ed4f6 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.
2017-08-12 20:05:23 -07:00
Michael Albinus
ec5cfaa456 Implement EXCL of write-region for Tramp
* lisp/net/ange-ftp.el (ange-ftp-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region)
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region)
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
Implement MUSTBENEW.

* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file)
* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
(tramp-sh-handle-add-name-to-file)
(tramp-do-copy-or-rename-file)
* lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link):
Adapt error message for `file-already-exists'.

* src/lisp.h:
* src/eval.c (call8): New function.

* src/fileio.c (write_region): Pass also lockname and
mustbenew to the file name handler.

* test/lisp/net/tramp-tests.el (tramp-test10-write-region):
Add tests for MUSTBENEW.
2017-08-12 12:30:39 +02:00
Stephen Berman
e3ed43f4ac 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.
2017-08-11 11:28:57 +02:00
Noam Postavsky
179499cde9 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.
2017-08-10 21:30:37 -04:00
Eli Zaretskii
7fc27ea70b 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.
2017-08-09 20:15:46 +03:00
Tino Calancha
da4438e14f dired-delete-file: Dont't ask for empty dirs
* lisp/dired.el (dired--yes-no-all-quit-help): New defun.
(dired-delete-file): Use it.  Dont't ask for empty dirs (Bug#27940).

* test/lisp/dired-tests.el (dired-test-with-temp-dirs):
New auxiliar macro.
(dired-test-bug27940): Add new test.
2017-08-09 14:48:49 +09:00
Tino Calancha
919ac3ae16 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.
2017-08-08 10:25:27 +09:00
Noam Postavsky
79a74568e9 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.
2017-08-07 18:54:49 -04:00
Noam Postavsky
b5c8e9898d 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.
2017-08-07 18:54:49 -04:00
Stefan Monnier
cc30d77ecd 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'.

Co-authored-by: Noam Postavsky <npostavs@gmail.com>
2017-08-07 18:54:49 -04:00
Gemini Lasswell
00f7e31110 Add a test of handling of circular values to testcover-tests
* test/lisp/emacs-lisp-testcover-resources/testcases.el
(testcover-testcase-cyc1): New function.
(testcover-tests-circular-lists-bug-24402): New test.
2017-08-07 18:54:48 -04:00
Noam Postavsky
95a04fd26c ; 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.
2017-08-07 18:43:55 -04:00
Alexander Gramiak
054c198c12 Catch argument and macroexpansion errors in ert
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.
2017-08-07 18:43:54 -04:00
Reuben Thomas
89187e93d2 Revert "Add support for arguments in ALTERNATE_EDITOR to emacsclient"
This reverts commit 28f1fe97da.
2017-08-07 21:58:55 +01:00
Reuben Thomas
28f1fe97da Add support for arguments in ALTERNATE_EDITOR to emacsclient
* lib-src/emacsclient.c (fail): Parse ALTERNATE_EDITOR, or
corresponding command-line argument, into space-separated tokens.
* etc/NEWS: Document.
* test/lib-src/emacsclient-tests.el: Add a test.
2017-08-07 21:57:22 +01:00
Paul Eggert
93511e9473 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.
2017-08-06 16:58:35 -07:00
Tino Calancha
b1b99edd3e Minor tweak in a dired test
* test/lisp/dired-tests.el (dired-test-bug27968):
Ensure the new header has different length than the original one.
2017-08-06 22:16:56 +09:00
Tino Calancha
c0df64db08 Dired w/ eshell-ls: Handle shell wildcards in file name
* lisp/eshell/em-ls.el (eshell-ls--insert-directory):
Use eshell-extended-glob (Bug#27844).
* test/lisp/dired-tests.el (dired-test-bug27844): Add test.
2017-08-06 13:23:18 +09:00
Tino Calancha
7c3593f817 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.
2017-08-06 13:09:31 +09:00
Eli Zaretskii
885c512603 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.
2017-08-05 12:52:55 +03:00
Eli Zaretskii
2441d0118b Fix files-tests.el for MS-Windows
* test/lisp/files-tests.el
(files-tests--file-name-non-special--subprocess): Fix this test
for MS-Windows.
2017-08-05 11:38:04 +03:00
Tino Calancha
055e2a1906 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.
2017-08-05 14:20:28 +09:00
Noam Postavsky
3a0f2dfa79 ; 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.
2017-08-04 18:22:06 -04:00
Tino Calancha
5ae7dda560 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.
2017-08-04 22:35:29 +09:00
Eli Zaretskii
bc6ab63653 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.
2017-08-04 16:10:06 +03:00
Tino Calancha
db5d38ddb0 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.
2017-08-04 14:15:51 +09:00
Stephen Berman
6129120103 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.
2017-08-02 17:25:44 +02:00
Michael Albinus
4207733f4a ; Extend traces in tramp-test36-asynchronous-requests for hydra 2017-08-02 10:59:57 +02:00
Tino Calancha
ae055834a9 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.
2017-08-02 17:53:14 +09:00
Tino Calancha
a79671c97f 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.
2017-08-02 16:47:28 +09:00
Tino Calancha
0668ecc0cd * test/lisp/ls-lisp-tests.el: Rename it from ls-lisp.el 2017-08-02 16:31:58 +09:00
Tino Calancha
f74164a845 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.
2017-08-02 00:01:45 +09:00
Eli Zaretskii
21375a29ac 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.
2017-08-01 17:45:25 +03:00
Tino Calancha
f3ad15933a 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.
2017-08-01 23:31:43 +09:00
Tino Calancha
c5305ff6c4 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.
2017-08-01 19:05:02 +09:00
Tino Calancha
192342a3a9 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.
2017-07-31 21:59:47 +09:00
Michael Albinus
3d58ea1c0b 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.
2017-07-31 14:32:24 +02:00
Michael Albinus
55d62d344a ; Change instrumentation code in tramp-tests.el 2017-07-31 09:43:04 +02:00
Michael Albinus
65d428228b * test/lisp/net/tramp-tests.el (tramp-test17-dired-with-wildcards): New test. 2017-07-30 13:08:36 +02:00
Tino Calancha
6f6639d6ed 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.
2017-07-30 11:11:04 +09:00
Stephen Berman
8e394b082b 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.
2017-07-29 13:34:47 +02:00
Stefan Monnier
d66dcde46a * 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
2017-07-28 12:27:00 -04:00