1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-23 22:20:24 -08:00
Commit graph

4277 commits

Author SHA1 Message Date
Michael Albinus
35a86f0b6f Implement quoting the local part of a remote file name
* doc/emacs/files.texi (Quoted File Names):
* etc/NEWS: Mention quoting the local part of a remote file name.

* lisp/net/tramp.el (tramp-dissect-file-name): Check with
`tramp-tramp-file-p'.
(tramp-quoted-name-p, tramp-quote-name, tramp-unquote-name):
New defsubst.
(tramp-handle-substitute-in-file-name)
(tramp-handle-make-auto-save-file-name): Handle quoted files.
(tramp-shell-quote-argument): Unquote argument.

* lisp/net/tramp-sh.el (tramp-sh-handle-file-truename):
Handle quoted files.

* test/lisp/net/tramp-tests.el (tramp--test-expensive-test): New defvar.
(tramp--test-make-temp-name): New argument QUOTED.
(tramp-test01-file-name-syntax)
(tramp-test02-file-name-dissect)
(tramp-test04-substitute-in-file-name)
(tramp-test05-expand-file-name, tramp-test07-file-exists-p)
(tramp-test08-file-local-copy)
(tramp-test09-insert-file-contents)
(tramp-test10-write-region, tramp-test11-copy-file)
(tramp-test12-rename-file, tramp-test13-make-directory)
(tramp-test14-delete-directory, tramp-test15-copy-directory)
(tramp-test16-directory-files)
(tramp-test17-insert-directory)
(tramp-test18-file-attributes)
(tramp-test19-directory-files-and-attributes)
(tramp-test20-file-modes, tramp-test21-file-links)
(tramp-test22-file-times, tramp-test23-visited-file-modtime)
(tramp-test24-file-name-completion, tramp-test25-load)
(tramp-test26-process-file, tramp-test27-start-file-process)
(tramp-test28-shell-command, tramp-test30-vc-registered)
(tramp-test31-make-auto-save-file-name)
(tramp--test-check-files)
(tramp-test35-asynchronous-requests): Test also quoted file names.
(tramp--test-shell-command-to-string-asynchronously): Rename.
(tramp-test29-environment-variables): Use it.
2016-12-04 12:12:06 +01:00
Eli Zaretskii
dd4b913153 ; * test/lisp/progmodes/compile-tests.el: Fix a typo in a comment. 2016-12-01 20:26:54 +02:00
Eli Zaretskii
2f68cb3e05 Fix bugs with buffer-local tags tables
* lisp/progmodes/etags.el (visit-tags-table): After
'visit-tags-table-buffer' returns, retrieve the value of
'tags-file-name' from the buffer we started in.  Force
recomputation of 'tags-completion-table' next time it is used,
since the list of tags table has changed.
(visit-tags-table-buffer): Accept an additional optional argument
CBUF, the buffer in which to start processing, and switch to that
buffer if CBUF is non-nil.  All callers changed to supply a
non-nil CBUF when they call 'visit-tags-table-buffer' in a loop.
Doc fix.
(tags-completion-table): Accept an optional argument, the buffer
for which to build 'tags-completion-table', and build that
buffer's completion table.
(tags-lazy-completion-table): Pass the current buffer to
'tags-completion-table'.
(tags-file-name): Don't say in the doc string that setting this
variable directly is enough; say that 'visit-tags-table' should be
used for that.  (Bug#158)  (Bug#17326)  (Bug#23164)

* doc/emacs/maintaining.texi (Select Tags Table): Delete the
advice to set 'tags-file-name' directly.

* test/lisp/progmodes/etags-tests.el: New tests.
2016-12-01 18:49:51 +02:00
Tino Calancha
561ce852ad * test/lisp/ibuffer-tests.el (ibuffer-test-Bug24997): Add test for Bug#24997. 2016-11-24 10:39:33 +09:00
Ulf Jasper
f8e1b18d37 Fix Bug#24199.
* lisp/calendar/icalendar.el (icalendar--do-create-ical-alarm): Quote
  bracket in doc string (make checkdoc happy).
  (icalendar-import-buffer),
  (icalendar-import-buffer),
  (icalendar--convert-ical-to-diary),
  (icalendar--add-diary-entry): Rename argument diary-file to
  diary-filename (make checkdoc happy).
  (icalendar--convert-recurring-to-diary): Take care of byday-clause
  in monthly recurring events.  Actually fix Bug#24199.

* test/lisp/calendar/icalendar-tests.el (icalendar-import-bug-24199): New.
2016-11-23 18:09:34 +01:00
Tino Calancha
d8a1a56f5b * test/lisp/ibuffer-tests.el (ibuffer-test-Bug25000): Add test for Bug25000. 2016-11-23 21:19:16 +09:00
Tino Calancha
49ac780228 Add test suite for buff-menu.el
* test/lisp/buff-menu-tests.el: New file.
(buff-menu-24962): Add test for Bug#24962.
2016-11-19 00:17:50 +09:00
Glenn Morris
67df076793 ; Replace "25.2" with "26.1" where appropriate, which is almost everywhere
Ref:
http://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00692.html
http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01215.html
2016-11-17 22:50:40 -08:00
Simen Heggestøyl
edda93cfb1 Add tests for rot13.el
* lisp/rot13.el (rot13): Docstring correction.

* test/lisp/rot13-tests.el: New file with tests for rot13.el.
2016-11-17 19:19:59 +01:00
Nicolas Petton
f63976857b
Do not use map.el in seq-tests.el
* test/lisp/emacs-lisp/seq-tests.el: Do not use map.el.  map.el was
introduced in Emacs 25.1, but seq.el is also available in GNU ELPA for
Emacs 24.5.
2016-11-16 18:37:26 +01:00
Simen Heggestøyl
4e2ef64449 Complete the name of PostgreSQL databases
* lisp/progmodes/sql.el (sql-postgres-login-params): Complete database
name.
(sql-postgres-list-databases): New function returning a list of
available PostgreSQL databases.

* test/lisp/progmodes/sql-tests.el: New file with tests for sql.el.
2016-11-15 19:08:22 +01:00
Michael Albinus
6647e05174 Implement connection-local variables
* doc/lispref/variables.texi (Connection Local Variables): New section.

* etc/NEWS: Mention connection-local variables.

* lisp/files-x.el (enable-connection-local-variables)
(connection-local-variables-alist, connection-local-class-alist)
(connection-local-criteria-alist): New defvars.
(connection-local-get-classes)
(connection-local-get-class-variables): New defsubst.
(connection-local-set-classes)
(connection-local-set-class-variables)
(hack-connection-local-variables)
(hack-connection-local-variables-apply): New defuns.
(with-connection-local-classes): New defmacro.

* lisp/net/tramp.el (tramp-set-connection-local-variables): New defun.

* lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* lisp/net/lisp/net/tramp-sh.el (tramp-maybe-open-connection):
* lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Use it.

* test/lisp/files-x-tests.el: New file.
2016-11-14 13:56:58 +01:00
Michael Albinus
dba9bc9752 Refine multi-hop specs in Tramp
* lisp/net/tramp.el (tramp-tramp-file-p): Suppress "/:" and "/c:".

* test/lisp/net/tramp-tests.el
(tramp-test01-file-name-syntax): Multi-hop specs don't need a
method.  "/h:" is allowed on non MS Windows.
2016-11-09 15:34:40 +01:00
Daniel Colascione
112111c4e4 Avoid infloop in python
Fix bug#24905

* lisp/progmodes/python.el (python-info-docstring-p): Improve
infloop avoidance: replace (bobp) with generic test for
forward progress.
* test/lisp/progmodes/python-tests.el (python-bob-infloop-avoid): Add
test for bug#24905
2016-11-08 15:26:43 -08:00
Paul Eggert
a59f4bb5b8 ; Spelling fixes 2016-11-04 15:07:13 -07:00
Tino Calancha
76e297c15f (thing-at-point 'list) return nil if no list at point
* lisp/thingatpt.el (thing-at-point-bounds-of-list-at-point):
Check first if we are at the beginning of a top-level sexp (Bug#24627).
If point is inside a comment or string, look for a list out of the
comment/string.
Escape '[' in doc string.
* test/lisp/thingatpt-tests.el (thing-at-point-bug24627): Update
expected test result as pass.
2016-11-03 20:33:19 +09:00
Noam Postavsky
9688d2f64b Don't allow implicit package name arg for binders
It's unlikely that

    (use-package foopkg :bind "<some-key>")

intendes to bind <some-key> to 'foopkg command.
2016-10-31 08:49:21 -04:00
Noam Postavsky
65c7b42a14 Don't allow nil as a mode function
This means (use-package foopkg :mode (".foo")) will add (".foo"
. foopkg) into auto-mode-alist instead of the broken (".foo" . nil),
this is more consistent with the behaviour of (use-package foopkg
:mode (".foo" ".bar")).
2016-10-31 08:49:21 -04:00
Noam Postavsky
fc57b34299 Refactor pair normalizers; add tests for them
This is not a pure refactoring, it also fixes a bug where
:bind ([keysym] . "string") would actually bind keysym to nil (i.e.,
unbind it).  It now binds to "string" as expected.
2016-10-31 08:49:21 -04:00
Noam Postavsky
5ed9a6b5a5 Remove obsolete mplist tests
The mplist functions were removed in the 2.0
refactoring (4ae584f3ff).
2016-10-31 08:49:21 -04:00
Tino Calancha
0465bf5115 Add more tests for Bug#24627
* test/lisp/thingatpt-tests.el (thing-at-point-bug24627):
Add tests for 'list-at-point'.
2016-10-27 18:06:54 +09:00
Filipp Gunbin
4e45b55a95 * lisp/shell.el (shell--unquote&requote-argument): Match data misuse
* lisp/shell.el (shell--unquote&requote-argument): Fix
off-by-one thinko.  Don't use match data after a failed string-match.
2016-10-26 14:31:12 -04:00
Damien Cassou
bd22beb6e4 Add seq-random-elt to seq.el
* lisp/emacs-lisp/seq.el (seq-random-elt): Add function to return a
  random element from it's sequence parameter.

* test/lisp/emacs-lisp/seq-tests.el (test-seq-random-elt-take-all
  test-seq-random-elt-return-nil): Test the new function

* doc/lispref/sequences.texi: Document the new function
2016-10-25 12:32:57 +02:00
Philipp Stephani
56f8384bb3 Minor fixes to cc-mode-tests.el
See Bug#24747.

* progmodes/cc-mode-tests.el: Rename from cc-mode.el; fix typo in
file-local variable; add comments to make checkdoc happy.
2016-10-20 20:22:40 +02:00
Tino Calancha
f63a4b82f0 cl-seq: Remove max limit on input sequence length
* lisp/emacs-lisp/cl-seq.el (cl-fill, cl-replace, cl-delete)
(cl--position, cl-nsubstitute, cl-substitute, cl-remove):
Remove limit on maximum length for the input sequence
(#Bug24264).
* test/lisp/emacs-lisp/cl-seq-tests.el: Update test expected result as passed.
2016-10-20 19:51:55 +09:00
Simen Heggestøyl
07c0db4344 Add tests for foreign completions in CSS mode
* test/lisp/textmodes/css-mode-tests.el
(css-test-foreign-completions): New test for
`css--foreign-completions'.
(css-test-complete-selector-tag): Rename test.
(css-test-complete-selector-class): New test testing completion of
class names in selectors.
(css-test-complete-selector-id): New test testing completion of IDs in
selectors.
2016-10-15 11:23:26 +02:00
Tino Calancha
b0f1d23ec4 Add test for Bug#24627
* /test/lisp/thingatpt-tests.el (thing-at-point-bug24627): New test.
2016-10-13 17:56:22 +09:00
Philipp Stephani
5b774598f4 Don’t consider nested let-alist forms
See Bug#24641.

* lisp/emacs-lisp/let-alist.el (let-alist--deep-dot-search): Don’t
consider symbols in nested ‘let-alist’ forms.

* test/lisp/emacs-lisp/let-alist-tests.el
(let-alist--deep-dot-search--nested): Add a unit test.
2016-10-08 18:36:54 +02:00
Philipp Stephani
b661efd90d Make querying to kill processes customizable
Introduce a new customization option, `confirm-kill-processes', that
users can set to nil if they don't want Emacs to nag them about killing
processes.

* lisp/files.el (confirm-kill-processes): New customization option.
(save-buffers-kill-emacs): Use customization option.

* test/lisp/files-tests.el
(files-test--save-buffers-kill-emacs--confirm-kill-processes): Add
test for new customization option.

* doc/emacs/entering.texi (Exiting): Document new user option.

* doc/lispref/processes.texi (Query Before Exit): Document new
user option.

* etc/NEWS: Document new user option.
2016-10-01 14:25:27 +02:00
Eli Zaretskii
05c98ddec7 ; * test/src/undo-tests.el: Moved from test/lisp/legacy/. 2016-09-24 13:27:57 +03:00
Eli Zaretskii
0123d56738 ; * Move test/lisp/legacy/textprop-tests.el to test/src/. 2016-09-24 13:23:20 +03:00
Eli Zaretskii
7f287b7f78 Incorporate syntax-tests in lisp-tests.
* test/lisp/emacs-lisp/lisp-tests.el: Add tests from
test/lisp/legacy/syntax-tests.el.
* test/lisp/legacy/syntax-tests.el: File deleted.
2016-09-24 13:20:19 +03:00
Eli Zaretskii
25d66a430e ; * test/src/process-tests.el: Renamed from test/lisp/legacy/process-tests.el. 2016-09-24 13:12:43 +03:00
Eli Zaretskii
ef5c799c66 Incorporate occur-tests in replace-tests
* test/lisp/replace-tests.el: Add tests from
test/lisp/legacy/occur-tests.el.
* test/lisp/legacy/occur-tests.el: File deleted.
2016-09-24 13:00:40 +03:00
Eli Zaretskii
4e71b5b343 Incorporate lexbind-tests.el in bytecomp-test.el
* test/lisp/emacs-lisp/bytecomp-tests.el: Added tests from
test/lisp/legacy/lexbind-tests.el.
* test/lisp/legacy/lexbind-tests.el: File deleted.
2016-09-24 12:53:46 +03:00
Eli Zaretskii
e8ae0bc707 ; * test/src/font-tests.el: Moved from test/lisp/legacy/font-parse-tests.el. 2016-09-24 12:40:10 +03:00
Eli Zaretskii
23efc43d01 ; * test/lisp/files-tests.el: Minor copyedits. 2016-09-24 12:35:54 +03:00
Eli Zaretskii
4f05e930ca ; * test/lisp/files-tests.el: Moved from test/lisp/legacy/. 2016-09-24 12:34:15 +03:00
Eli Zaretskii
0cba344477 Incorporate core-elisp-tests in lisp-tests
* test/lisp/emacs-lisp/lisp-tests.el: Added tests from
test/lisp/legacy/core-elisp-tests.el.
* test/lisp/legacy/core-elisp-tests.el: File removed.
2016-09-24 12:30:22 +03:00
Eli Zaretskii
2f4776bf32 Move coding-tests.el and decoder-test.el to their places
* test/src/coding-tests.el: Added all the tests from
test/lisp/legacy/decoder-tests.el.
* test/lisp/legacy/decoder-tests.el: File deleted.
2016-09-24 12:18:54 +03:00
Eli Zaretskii
3facefd162 ; * test/src/coding-tests.el: Moved from test/lisp/legacy/. 2016-09-24 12:04:55 +03:00
Eli Zaretskii
c5e71d574a ; * test/lisp/emacs-lisp/bytecomp-tests.el: Fix header and 'provide'. 2016-09-24 12:01:44 +03:00
Eli Zaretskii
57b07f7a8a ; * test/lisp/emacs-lisp/bytecomp-tests.el: Moved from test/lisp/. 2016-09-24 11:59:42 +03:00
Eli Zaretskii
90351d98b6 ; * test/lisp/bytecomp-tests.el: Moved from test/lisp/legacy/. 2016-09-24 11:55:03 +03:00
Tino Calancha
469fcaa7f8 Add test for Bug#21454
* test/lisp/legacy/files-tests.el (files-test-bug-21454): New test.
2016-09-13 18:01:38 +09:00
Noam Postavsky
68f4b52927 Don't require isearch-update before isearch-done
It is useful to be able to call `isearch-done' unconditionally to
ensure a non-isearching state.

* lisp/isearch.el (isearch-done): Check that `isearch--current-buffer'
is a live buffer before using it (Bug #21091).
* test/lisp/isearch-tests.el (isearch--test-done): Test it.
2016-09-10 09:13:09 -04:00
Simen Heggestøyl
367f8568bc * lisp/emacs-lisp/ring.el: Use lexical-binding
* lisp/emacs-lisp/ring.el (ring-elements): Don't use the RESULT
argument of `dotimes' when the iteration variable isn't referred by
it.
(ring-member): Don't pass nil as the RESULT argument of `dotimes'
since it's the default.
2016-09-09 18:46:55 +02:00
Simen Heggestøyl
e951aa1459 Add tests for ring.el
* test/lisp/emacs-lisp/ring-tests.el: New file with tests for ring.el.
2016-09-08 19:18:40 +02:00
Karl Fogel
2b404e8391 Use normal double quotes in TeX / LaTeX comments
* lisp/textmodes/tex-mode.el (tex-insert-quote): When in a comment,
  default to inserting a normal double quote (") instead of TeX-style
  open (``) or close ('') quote marks.

* etc/NEWS (TeX mode): Note the change.

* test/lisp/electric-tests.el (autowrapping-7): Adjust accordingly.

See this thread for discussion:

  https://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00611.html
  From: Karl Fogel <kfogel {_AT_} red-bean.com>
  To: Emacs Development <emacs-devel {_AT_} gnu.org>
  Subject: [PATCH] Have LaTeX mode use normal double quotes in comments.
  Date: Mon, 29 Aug 2016 14:44:12 -0500
  Message-ID: <87twe3icmr.fsf@red-bean.com>
2016-08-30 11:14:37 -05:00
Simen Heggestøyl
91734c6bd3 Add tests for dom.el
* test/lisp/dom-tests.el: New file with tests for dom.el.
2016-08-28 18:36:27 +02:00