1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-31 20:02:42 +00:00
Commit Graph

449 Commits

Author SHA1 Message Date
Dmitry Gutov
af67e79a52 Fix Bug#15874
* lisp/progmodes/ruby-mode.el (ruby-mode-syntax-table): Don't modify
syntax for `?'.
(ruby-expr-beg): Expect that `!' will have syntax class "symbol"
where appropriate already.
(ruby-syntax-propertize-function): Propertize `?' and `!' at the
end of method names.
2013-12-06 06:22:08 +02:00
Cameron Desautels
bf4906d7ca * lisp/emacs-lisp/regexp-opt.el (regexp-opt-charset): Fix ^.
* test/automated/regexp-tests.el: New file.

Fixes: debbugs:16046
2013-12-05 15:25:54 -05:00
Michael Albinus
6e0458c49f * automated/dbus-tests.el: New file. 2013-12-05 16:31:57 +01:00
Paul Eggert
f224e50022 Spelling and punctuation fixes. 2013-12-01 14:33:13 -08:00
Eli Zaretskii
de20f087b8 Fix reftex-tests on MS-Windows.
test/automated/reftex-tests.el (reftex-parse-from-file-test): Run
 temp-dir through file-truename, to make sure the temporary file
 names are comparable as strings.
2013-11-29 12:33:31 +02:00
Eli Zaretskii
a48eb50b56 Fix decoder-tests test on MS-Windows.
test/automated/decoder-tests.el (ert-test-decoder-prefer-utf-8):
 Force Unix EOLs by using 'utf-8-unix', since the default of
 'utf-8' is system-dependent, while the test expects to see Unix
 EOLs.
2013-11-29 11:35:58 +02:00
Glenn Morris
0845be757d Replace PATH_SEP with pre-existing SEPCHAR.
* configure.ac:
* test/automated/Makefile.in: Use SEPCHAR in place of PATH_SEP.
2013-11-28 15:50:09 -08:00
Eli Zaretskii
f7ec0d94d0 Fix the test suite on Windows.
configure.ac (PATH_SEP): Set and AC_SUBST.

 test/automated/Makefile.in (PATH_SEP): Set this instead of
 PATH_SEPARATOR.
 (EMACSOPT): Use $(PATH_SEP).
2013-11-28 19:35:13 +02:00
Michael Albinus
23293cb07a * automated/file-notify-tests.el (auto-revert-stop-on-user-input):
Set to nil.
2013-11-28 17:14:13 +01:00
Michael Albinus
1baa1e49d8 * automated/file-notify-tests.el
(file-notify-test-remote-temporary-file-directory):
Check $REMOTE_TEMPORARY_FILE_DIRECTORY.
(tramp-read-passwd): Check $REMOTE_ALLOW_PASSWORD.
(file-notify--deftest-remote): Cleanup connection initially.
(file-notify-test03-autorevert): Run also in batch mode.  Use a
larger timeout for remote files.  `sit-for' 1 second; 0.1 second
does not work on MS Windows.  Call `accept-process-output' for
remote files.  Apply `string-match' instead of `string-equal', the
messages are different on MS Windows.

* automated/tramp-tests.el (tramp-test-temporary-file-directory):
Use $REMOTE_TEMPORARY_FILE_DIRECTORY.
(tramp-read-passwd): Check $REMOTE_ALLOW_PASSWORD.
2013-11-27 15:23:32 +01:00
Bozhidar Batsov
4e9fc48c06 Improve a couple of changelog entries. 2013-11-26 12:38:19 +02:00
Glenn Morris
0b09f7c0d3 Stop some python tests leaving temp-files behind
* test/automated/python-tests.el (python-shell-make-comint-1)
(python-shell-make-comint-2, python-shell-get-process-1):
Suppress creation of some temp-files.
2013-11-23 12:46:43 -08:00
Glenn Morris
f4d341afb6 Use skip-unless in some python tests
* test/automated/python-tests.el (python-shell-parse-command-1)
(python-shell-make-comint-1, python-shell-make-comint-2)
(python-shell-get-process-1)
(python-shell-internal-get-or-create-process-1):
Skip rather than fail if prereqs not found.
2013-11-23 12:42:38 -08:00
Glenn Morris
17e0445be4 Empty elements in EMACSLOADPATH now stand for the default
* src/lread.c (load_path_check): Take path to check as argument.
(load_path_default): New, split from init_lread.
(init_lread): Move calc of default load-path to load_path_default.
Empty elements in EMACSLOADPATH now stand for the default.
(load-path): Doc fix.

* src/emacs.c (decode_env_path): Add option to treat empty elements
as nil rather than ".".

* src/callproc.c (init_callproc_1, init_callproc):
* src/image.c (Vx_bitmap_file_path):
* src/lisp.h (decode_env_path):
* lread.c (Vsource_directory):
Update for new argument spec of decode_env_path.

* leim/Makefile.in (RUN_EMACS): Empty EMACSLOADPATH rather than unsetting.

* lisp/Makefile.in (emacs): Empty EMACSLOADPATH rather than unsetting.

* test/automated/Makefile.in (emacs):
Empty EMACSLOADPATH rather than unsetting.

* doc/emacs/cmdargs.texi (General Variables):
Empty elements in EMACSLOADPATH now mean the default load-path.

* doc/lispref/loading.texi (Library Search):
Empty elements in EMACSLOADPATH now mean the default load-path.

* etc/NEWS: Mention this.

Fixes: debbugs:12100
2013-11-22 17:55:16 -08:00
Bozhidar Batsov
3065465703 Add missing ChangeLog entries 2013-11-22 13:02:26 +02:00
Glenn Morris
48592bfdf5 * automated/ruby-mode-tests.el (ruby-exit!-font-lock): Set expected-result. 2013-11-21 19:08:31 -08:00
Glenn Morris
29660b6b98 * test/automated/Makefile.in: Tweak previous change 2013-11-20 20:31:33 -05:00
Glenn Morris
009111d66f * test/automated/Makefile.in (XARGS_LIMIT): New, set by configure.
(compile-main): Pass XARGS_LIMIT to xargs.

(Cargo-culted from lisp/Makefile.in.)
2013-11-20 19:26:05 -05:00
Glenn Morris
2df102287e Use path-separator with -L, rather than just :
* lisp/startup.el (command-line-1): Use path-separator with -L.

* test/automated/Makefile.in (PATH_SEPARATOR): New, set by configure.
(EMACSOPT): Use PATH_SEPARATOR.

* doc/emacs/cmdargs.texi (Action Arguments): Use path-separator with -L.

* etc/NEWS: Related edit.
2013-11-20 19:21:50 -05:00
Bozhidar Batsov
1959436678 * test/automated/ruby-mode-tests.el:
Add a few tests for `ruby--insert-coding-comment'.
2013-11-20 13:51:12 +02:00
Bozhidar Batsov
2d16124303 * test/automated/ruby-mode-tests.el:
Add a failing test for bug #15874.
2013-11-20 13:01:31 +02:00
Paul Eggert
ec2c4ee6d2 Improve API of recently-added bool vector functions.
The old API had (bool-vector-count-matches A B)
and (bool-vector-count-matches-at A B I), which gave the
misleading impression that the two functions were variants, one
with a location I.  The new API has (bool-vector-count-population A)
and (bool-vector-count-consecutive A B I) to make the distinction
clearer.  The first function no longer has a B argument, since the
caller can easily determine the number of nils if the length and
number of ts is known.
* src/data.c (Fbool_vector_count_population): Rename from
bool_vector_count_matches, and accept just 1 argument.
(Fbool_vector_count_consecutive): Rename from
Fbool_vector_count_matches_at.
* test/automated/data-tests.el: Adjust to API changes.

Fixes: debbugs:15912
2013-11-18 10:56:42 -08:00
Adam Sokolnicki
56cd894e90 * lisp/progmodes/ruby-mode.el (ruby-toggle-block): Don't stop at
interpolation curlies.

Fixes: debbugs:15914
2013-11-17 23:39:13 +02:00
Michael Albinus
0010ca514d * automated/tramp-tests.el (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): Cleanup connection initially.
2013-11-16 12:46:37 +01:00
Michael Albinus
82407168e6 * automated/tramp-tests.el (tramp-test29-utf8): Cleanup the
connection before running the test.  Reenable last test case.
2013-11-15 14:49:17 +01:00
Michael Albinus
8e4af24017 * automated/tramp-tests.el (tramp-test29-utf8): Comment last test
case, it fails in batch mode.  Needs further investigations.
2013-11-15 09:28:42 +01:00
Michael Albinus
3cd4192f84 * automated/tramp-tests.el (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): Protect unwindforms with `ignore-errors'.
(tramp-test29-utf8): New test.
2013-11-15 09:03:19 +01:00
Michael Albinus
927fbd6b95 * automated/file-notify-tests.el (file-notify-test02-events)
(file-notify-test03-autorevert): Suppress messages in `write-region'.

* automated/tramp-tests.el (tramp-test02-file-name-dissect)
(tramp-test03-file-name-defaults, tramp-test21-file-links): Add tests.
(tramp-test26-process-file, tramp-test28-shell-command): Ensure,
that the directory is not empty when calling "ls".
2013-11-13 16:36:12 +01:00
Dmitry Gutov
7b08f97e71 * lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Disambiguate between
binary "|" operator and closing block args delimiter.  Remove
FIXME comment referring to Ruby 1.8-only syntax.
(ruby-smie--implicit-semi-p): Not after "|" operator.
(ruby-smie--closing-pipe-p): New function.
(ruby-smie--forward-token, ruby-smie--backward-token): Use it.
(ruby-smie-rules): Indent after "|".
2013-11-12 16:15:14 +02:00
Michael Albinus
8ee0219ffe * automated/tramp-tests.el (tramp-test-temporary-file-directory):
Check $TRAMP_TEST_TEMPORARY_FILE_DIRECTORY.
(tramp-read-passwd): Check $TRAMP_TEST_ALLOW_PASSWORD.
(tramp-test09-insert-file-contents, tramp-test10-write-region):
(tramp-test26-process-file): Add tests.
(tramp-test11-copy-file): Remove debug message.
(tramp-test20-file-modes): Special case, if user is "root".
2013-11-11 16:22:57 +01:00
Dmitry Gutov
1629a32997 * lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p):
Not after "||".
(ruby-smie-rules): Indent non-hanging "begin" blocks as part of
their parent.
2013-11-09 01:59:56 +02:00
Michael Albinus
1c49d6c2fe * automated/file-notify-tests.el:
* automated/tramp-tests.el: Add `tramp-own-remote-path' to
`tramp-remote-path' when running on hydra.
(tramp-test07-file-exists-p): Remove instrumentation code.
(tramp-test26-process-file): Don't use "/bin/true" and
"/bin/false", these paths do not exist on hydra.
2013-11-08 10:31:15 +01:00
Michael Albinus
540993833c * automated/tramp-tests.el: Add tramp-own-remote-path' to tramp-remote-path'. 2013-11-08 08:52:28 +01:00
Stefan Monnier
7dd8b873bb Rename test/automated/sentinel-tests.el to process-tests.el 2013-11-07 23:40:51 -05:00
Dmitry Gutov
d85783ca32 * indent/ruby.rb: New example 2013-11-08 05:30:24 +02:00
Helmut Eller
21cfbae5b5 * test/automated/sentinel-tests.el: New file. 2013-11-07 22:28:19 -05:00
Dmitry Gutov
1f92392383 * lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Improve precedences
of "and", "or", "&&" and "||".
(ruby-smie--args-separator-p): Prohibit keyword "do" as the first
argument.  Prohibit opening curly brace because it could only be a
block opener in that position.
(ruby-smie--forward-token, ruby-smie--backward-token): Separate
"|" from "&" or "*" going after it.  That can happen in block
arguments.
(ruby-smie--indent-to-stmt): New function, seeks the end of
previous statement or beginning of buffer.
(ruby-smie-rules): Use it.
(ruby-smie-rules): Check if there's a ":" before a curly block
opener candidate; if there is, it's a hash.

* test/indent/ruby.rb: New examples.
2013-11-08 04:31:51 +02:00
Dmitry Gutov
1d1c86daf7 * lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p):
No implicit semi after "^", "and" or "or".
(ruby-smie-grammar): New tokens: "and" and "or".
(ruby-smie--args-separator-p): Fix the check for tokens at POS.
Exclude "and" and "or".  Remove "do" in order to work around token
priorities.
(ruby-smie-rules): Add all infix tokens.  Handle the case of
beginning-of-buffer.
2013-11-07 05:02:01 +02:00
Dmitry Gutov
b420ccfc4c * lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Lower priority of
"." compared to "do".
2013-11-07 03:58:12 +02:00
Glenn Morris
6b4ac03ebe Guard against possible accidental matches with parent dirs in Makefiles
* lisp/Makefile.in (setwins_almost, setwins_for_subdirs):
Avoid accidental matches.

* test/automated/Makefile.in (setwins): Avoid accidental matches.
2013-11-06 12:56:48 -05:00
Michael Albinus
6865f4d507 * automated/tramp-tests.el (tramp-test07-file-exists-p):
Fix docstring.  Instrument, in order to hunt failure on hydra.
2013-11-06 09:33:02 +01:00
Glenn Morris
c76489d611 Skip some tests rather than expect failure when prereqs not met
* automated/flymake-tests.el (warning-predicate-rx-gcc)
(warning-predicate-function-gcc, warning-predicate-rx-perl)
(warning-predicate-function-perl):
* automated/info-xref.el (info-xref-test-makeinfo):
* automated/vc-bzr.el (vc-bzr-test-bug9726, vc-bzr-test-bug9781)
(vc-bzr-test-faulty-bzr-autoloads): Skip rather than expect failure.
2013-11-05 23:50:18 -08:00
Michael Albinus
a213a54163 * automated/tramp-tests.el: New file. 2013-11-05 15:46:57 +01:00
Glenn Morris
2d748773b2 Get rid of --chdir usage in test/automated
* test/automated/Makefile.in (EMACSOPT): Move -L here.
(emacs): Set EMACS_TEST_DIRECTORY in the environment.
(setwins): Don't assume called from srcdir.  Remove legacy stuff.
(.el.elc): No more need to pass -L here.
(compile-main): Get rid of sub-shell and cd.
(compile-clean, check): Get rid of cd.
2013-11-04 21:58:40 -05:00
Glenn Morris
d511238048 Make it possible to run tests with a different working directory
* test/automated/flymake-tests.el (flymake-tests-data-directory): New.
(flymake-tests--current-face): Use flymake-tests-data-directory.
(warning-predicate-function-gcc, warning-predicate-rx-perl)
(warning-predicate-function-perl): Adapt for above change.

* test/automated/zlib-tests.el (zlib-tests-data-directory): New.
(zlib--decompress): Use zlib-tests-data-directory.
2013-11-04 21:54:38 -05:00
Glenn Morris
b5d402d6bd * test/automated/eieio-tests.el (eieio-test-37-persistent-classes):
Remove test that makes no sense.
It simply loads a file that contains some tests.
Loading the file does not run the tests, and the test are already
being run independently (which obviously involves loading the file),
since every .el file in this directory is automatically used in that way.
2013-11-04 21:22:00 -05:00
Glenn Morris
dc50338624 * test/automated/files.el (files-test-local-variable-data): Fix result typo
presumably caused by interference from dir-locals.
(file-test--do-local-variables-test): Prevent dir-locals interfering.
2013-11-04 21:00:12 -05:00
Dmitry Gutov
41784d0ba6 * test/indent/ruby.rb: Move a now-successful example. 2013-11-04 13:04:50 +02:00
Dmitry Gutov
dca01b0923 * lisp/progmodes/ruby-mode.el (ruby-smie--forward-token)
(ruby-smie--backward-token): Tokenize heredocs as semicolons.

* test/automated/ruby-mode-tests.el: Remove outdated comment.

* test/indent/ruby.rb: Add a statement on the line after heredoc.
2013-11-04 12:50:47 +02:00
Glenn Morris
8b77446f3f * test/automated/Makefile.in (abs_srcdir): Remove.
(emacs): Unset EMACSLOADPATH.
(.el.elc, check): Use -L to append srcdir to load-path.
2013-11-03 17:48:08 -08:00
Glenn Morris
67fb4e6a86 test/automated: Use relative filename for emacs executable
* Makefile.in (check): Depend on all.

* test/automated/Makefile.in (abs_top_builddir): Remove variable.
(EMACS): Use a relative file name.
(lisp-compile): Remove (assume it's up-to-date).
(compile-main): Do not run lisp-compile.
(check): Use --chdir.
2013-11-02 13:54:08 -07:00
Glenn Morris
67bb589ef9 test/automated/Makefile.in remove stuff unnecessarily copied from lisp
* test/automated/Makefile.in (abs_top_srcdir): Remove variable.
(emacs): Use abs_srcdir rather than abs_top_srcdir.
(doit, compile, compile-always): Remove stuff copied from lisp/.
(all, check, bootstrap-clean, distclean, maintainer-clean): Declare PHONY.

Remove comments copied from lisp/.
2013-11-02 13:32:22 -07:00
Glenn Morris
6f8225faee * test/automated/Makefile.in (abs_srcdir): New, set by configure. 2013-11-02 13:12:12 -07:00
Glenn Morris
1f43ed4177 * automated/Makefile.in (test): Remove variable.
(compile-main, compile-clean, compile-always, bootstrap-clean)
(check): Use srcdir rather than $test.  Check cd return value.
(compile-always): Depend on bootstrap-clean.
2013-11-02 12:56:54 -07:00
Glenn Morris
2ffcf5fef9 Minor simplifications for test/automated/Makefile
* test/automated/Makefile.in (top_builddir, abs_test, abs_lispsrc, lisp):
Remove variables.
(emacs): Use abs_top_srcdir, abs_srcdir rather than abs_lispsrc, abs_test.
(lisp-compile): Use ../../lisp rather than $lisp.
2013-11-02 12:50:41 -07:00
Dmitry Gutov
3d42b96899 * lisp/progmodes/ruby-mode.el (ruby-smie--rule-parent-skip-assign): New
function, replacement for `smie-rule-parent' for when we want to
skip over our direct parent if it's an assignment token..
(ruby-smie-rules): Use it.
2013-11-02 09:18:11 +04:00
Michael Albinus
1affc48a70 * automated/ert-tests.el (ert-test-stats-set-test-and-result):
Add a skipping test.
2013-10-31 14:31:22 +01:00
Stefan Monnier
dee4ba5979 * src/eval.c (run_hook_with_args): Use FUNCTIONP.
* test/indent/css-mode.css (.x2): Test alignement inside braces.
* test/indent/prolog.prolog: Test alignment of ->; with operator at bol.
2013-10-29 10:46:23 -04:00
Dmitry Gutov
c8c605ac9c * lisp/progmodes/ruby-mode.el (ruby-smie--bosp): Anything that goes
after `=' is probably a new expression.
2013-10-27 07:25:03 +04:00
Dmitry Gutov
778859a88c * test/indent/ruby.rb: New failing example. 2013-10-26 05:22:50 +04:00
Dmitry Gutov
bae91342a4 * lisp/progmodes/ruby-mode.el (ruby-smie--args-separator-p): Be more
specific in what the first arg can be: a non-keyword word,
string/regexp/percent literal opener, opening paren, or unary
operator followed directly by word.

* test/automated/ruby-mode-tests.el (ruby-toggle-block-to-brace): Fix
the test, in respect to adding the space after the curly.
2013-10-26 05:16:37 +04:00
Michael Albinus
4ddbf12836 * automated/ert-tests.el (ert-test-skip-unless): New test case.
(ert-test-deftest): Adapt test for changed macro expansion.
(ert-test-run-tests-interactively):
* automated/ert-x-tests.el (ert-test-run-tests-interactively-2):
Add a skipping test.

* automated/file-notify-tests.el (top): Do not require tramp-sh.el.
(file-notify--test-local-enabled): Make it a function.  Check also
for `file-remote-p' of `temporary-file-directory'.
(file-notify--test-remote-enabled-checked): New defvar.
(file-notify--test-remote-enabled): Rewrite.  Do not use Tramp
internal functions.  Cache result.
(file-notify--deftest-remote, file-notify-test00-availability)
(file-notify-test01-add-watch, file-notify-test02-events)
(file-notify-test03-autorevert): Add checks with `skip_unless'.
(file-notify-test-all): Do not check `file-notify--test-local-enabled'.
2013-10-24 09:38:45 +02:00
Dmitry Gutov
369bbf7198 * lisp/progmodes/ruby-mode.el (ruby-smie-rules): Fix the "curly block
with parameters" example.  Simplify the "is it block or is it
hash" check, but also make it more thorough.

* test/indent/ruby.rb: Fix syntax error in the latest example.
2013-10-24 04:47:28 +04:00
Stefan Monnier
03d44565bb * lisp/progmodes/ruby-mode.el (ruby-smie-rules): Only align with parent of
{ if it is hanging.
2013-10-23 13:55:53 -04:00
Glenn Morris
b8e3b0a9ec Make building in directories with whitespace possible
Make has trouble with targets containing whitespace, 
http://savannah.gnu.org/bugs/?712, so the general approach is
to use relative paths where possible.  It's generally only Emacs
itself that needs absolute paths, eg in src/epaths.h.

* configure.ac (srcdir): Don't make it absolute - abs_srcdir exists.

* Makefile.in (abs_srcdir): New, set by configure.
(buildlisppath): Use abs_srcdir.
(install-arch-indep, install-etcdoc, install-info, install-man)
(install-etc): Quote entities that might contain whitespace.

* admin/unidata/Makefile.in (emacs, ${DSTDIR}/charprop.el):
Quote entities that might contain whitespace.

* leim/Makefile.in (abs_srcdir): New, set by configure.
(buildlisppath): Use abs_srcdir.
(RUN_EMACS, .el.elc, changed.tit, changed.misc, leim-list.el)
($(srcdir)/ja-dic/ja-dic.el, setwins, distclean, check-declare):
Quote entities that might contain whitespace.

* lib-src/Makefile.in ($(DESTDIR)${archlibdir}):
Quote entities that might contain whitespace.

* lisp/Makefile.in (abs_srcdir, abs_lisp): New, set by configure.
(emacs, compile, compile-always):
Quote entities that might contain whitespace.
(custom-deps, finder-data, autoloads): Use abs_lisp.
($(MH_E_DIR)/mh-loaddefs.el, $(TRAMP_DIR)/tramp-loaddefs.el)
($(CAL_DIR)/cal-loaddefs.el, $(CAL_DIR)/diary-loaddefs.el)
($(CAL_DIR)/hol-loaddefs.el): Manually expand target file name.

* nextstep/Makefile.in (${ns_check_file} ${ns_appdir}):
Quote entities that might contain whitespace.

* nt/Makefile.in ($(DESTDIR)${archlibdir}):
Quote entities that might contain whitespace.

* src/Makefile.in (RUN_TEMACS): Make relative (again).
($(leimdir)/leim-list.el, .el.elc, $(lispsource)/loaddefs.el)
(bootstrap-emacs$(EXEEXT)):
Quote entities that might contain whitespace.

* test/automated/Makefile.in (abs_top_srcdir, top_builddir):
New, set by configure.
(top_srcdir): Remove.
(abs_test, abs_lispsrc): New.
(lisp): No longer absolute.
(emacs, lisp-compile, compile, compile-always):
Quote entities that might contain whitespace.

Fixes: debbugs:15675
2013-10-22 23:22:54 -07:00
Dmitry Gutov
a6462ef558 * test/indent/ruby.rb: Move two examples to "working" section, add one
more.
2013-10-23 00:47:29 +04:00
Dmitry Gutov
18cacc392d * lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Remove outdated
TODO.  Add "." after " @ ".
(ruby-smie--at-dot-call): New function.  Checks if point at method
call with explicit target.
(ruby-smie--forward-token, ruby-smie--backward-token): Prepend "."
to the method name tokens when it precedes them.
(ruby-smie--backward-id, ruby-smie--forward-id): Remove.
(ruby-smie-rules): Add rule for indentation before and after "."
token.
2013-10-22 02:25:59 +04:00
Stefan Monnier
df74c4be16 * lisp/progmodes/ruby-mode.el (ruby-smie-rules): Indent after + used as
an instruction.
2013-10-21 09:34:13 -04:00
Dmitry Gutov
c7e36328c6 * indent/ruby.rb: Fix a typo 2013-10-21 10:15:47 +04:00
Dmitry Gutov
cfef16c084 * lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Add (almost) all
infix operators.
(ruby-smie--implicit-semi-p): Add new operator chars.
2013-10-21 09:54:18 +04:00
Dmitry Gutov
8c1ae48154 * lisp/progmodes/ruby-mode.el (ruby-mode-map): Add binding for
`smie-down-list'.
(ruby-smie--args-separator-p): Check that there's no newline
between method call and its arguments.
(ruby-smie-rules): Handle new cases: curly block with and without
parameters, hash surrounded with parens, block passed to
paren-less method call.

* test/indent/ruby.rb: New examples for indentation of blocks.  Example
of hash inside parens that inflooped before this commit.
2013-10-21 07:50:06 +04:00
Glenn Morris
81b9ca36da Standardize license notice 2013-10-18 00:03:48 -07:00
Barry O'Reilly
ef56692035 Don't run timers in input-pending-p. Its new check-timers param
provides the prior behavior..
* src/keyboard.c (Finput_pending_p): Accept optional check-timers
param.
* lisp/subr.el (sit-for): Call (input-pending-p t) so as to behave
as before.
* test/automated/timer-tests.el: New file.  Tests that (sit-for 0)
allows another timer to run.

Fixes: debbugs:15045
2013-10-18 00:27:34 -04:00
Stefan Monnier
85527ff309 * lisp/progmodes/sh-script.el (sh-find-prev-matching): Disable SMIE's
forward-sexp-function while we redo its job.

Fixes: debbugs:15613
2013-10-16 23:56:51 -04:00
Paul Eggert
ffb3f67aae Space after comma in ChangeLogs. 2013-10-14 23:36:43 -07:00
Dmitry Gutov
1bd9995dc0 * indent/ruby.rb: Fix an example, remove wrong example, and add two more. 2013-10-15 04:21:22 +03:00
Dmitry Gutov
1eda1d8d34 * lisp/progmodes/ruby-mode.el (ruby-smie--args-separator-p): Handle
methods ending with `?' and `!'.

* test/indent/ruby.rb: More examples for bug#15594, both failing and
now passing.
2013-10-14 04:51:20 +03:00
Glenn Morris
e903c210b6 ChangeLog fixes prompted by M-x authors 2013-10-12 17:28:30 -07:00
Stefan Monnier
650fa7bfb4 * lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Add rule for paren-free
method calls (bug#bug#15594).
(ruby-smie--args-separator-p): New function.
(ruby-smie--forward-token, ruby-smie--backward-token): Use it to
recognize paren-free method calls.
2013-10-12 16:40:50 -04:00
Dmitry Gutov
55ee77a3f9 * test/indent/ruby.rb: Add two more cases. 2013-10-11 23:45:14 +03:00
Dmitry Gutov
b68e29263f * lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Split the
cases of ? and =.
(ruby-smie-rules): Simplify the "do" rule.  The cases when the
predicate would return nil are almost non-existent.
(ruby-smie--redundant-do-p): Include "until" and "for" statements.
2013-10-11 05:11:37 +03:00
Stefan Monnier
6d8ca1720a * test/automated/ruby-mode-tests.el (ruby-with-temp-buffer): Move before
first use.
(ruby-should-indent): Use indent-according-to-mode.
(ruby-deftest-move-to-block): Use `declare'.
2013-10-10 17:43:47 -04:00
Stefan Monnier
20832de03e * lisp/menu-bar.el (tty-menu-navigation-map): Reduce redundancy. 2013-10-09 22:33:35 -04:00
Dmitry Gutov
238150c8ff * lisp/progmodes/ruby-mode.el (ruby-smie-rules): Indent after hanging
iuwu-mod token.
(ruby-smie--implicit-semi-p): Prohibit implicit semicolon after
hanging iuwu-mod token.
(ruby-smie--forward-token): Do not include a dot after a token in
that token.
(ruby-smie--backward-token): Likewise.
2013-10-09 06:18:01 +03:00
Dmitry Gutov
0ea1599d34 * lisp/progmodes/ruby-mode.el (ruby-smie--implicit-semi-p): Handle the
case of the dot in a chained method call being on the following
line.
2013-10-08 02:01:23 +03:00
Stefan Monnier
bdc6b4c8f6 * lisp/textmodes/css-mode.el (css-smie-rules): Fix indentation.
(css-mode): Use electric-indent-chars.

Fixes: debbugs:15467
2013-10-07 11:40:24 -04:00
Dmitry Gutov
2f84ba1086 * test/indent/ruby.rb: Fix a spurious change, add more failing examples. 2013-10-07 16:27:29 +03:00
Stefan Monnier
7ccae3b126 * lisp/progmodes/ruby-mode.el: Fix recently added tests.
(ruby-smie-grammar): Add - and +.
(ruby-smie--redundant-do-p, ruby-smie--forward-id)
(ruby-smie--backward-id): New functions.
(ruby-smie--forward-token, ruby-smie--backward-token): Use them.
(ruby-smie-rules): Handle hanging do.  Get rid of hack, not needed
any more.
* test/indent/ruby.rb: Add a few more tests; adjust some indentation.
2013-10-06 23:38:26 -04:00
Dmitry Gutov
568e370dad * indent/ruby.rb: Fix a factual error. 2013-10-07 00:34:40 +03:00
Dmitry Gutov
7318480cec * test/automated/ruby-mode-tests.el: Add tests for `ruby-forward-sexp'
and `ruby-backward-sexp' that fail when `ruby-use-smie' is t.

* test/indent/ruby.rb: Two more failing examples.
2013-10-06 04:21:51 +03:00
Dmitry Gutov
5cd9cda9b6 * lisp/progmodes/ruby-mode.el (ruby-smie-rules): Dedent `ensure'
keyword, too.

* test/indent/ruby.rb: Fix a syntax error, add a few failing examples.
2013-10-06 03:46:28 +03:00
Stefan Monnier
34d1a1337d Get Ruby's SMIE code to pass the test suite.
* lisp/progmodes/ruby-mode.el (ruby-use-smie): Change default.
(ruby-comment-column): Follow the global default, by default.
(ruby-smie-grammar): Add assignment syntax.
(ruby-smie--implicit-semi-p): No implicit semi-colon after an
open-paren, a comma, or a \.
(ruby-smie--forward-token, ruby-smie--backward-token): Handle heredocs,
and line continuations.
(ruby-smie-rules): Adjust handling of open-paren, now that it's never
followed by implicit semi-colons.  Add rule for string concatenation
and for indentation at BOB.
(ruby-forward-sexp, ruby-backward-sexp): Adjust for when smie is in use.

* lisp/emacs-lisp/smie.el (smie-next-sexp): Don't go back to pos before
calling next-sexp, since next-token may have skipped chars which
next-sexp doesn't know should be skipped!

* test/indent/ruby.rb: Port a few cases from automated/ruby-mode-tests.el.
Adjust indentation of continued line to the new SMIE behavior.
2013-10-05 14:37:08 -04:00
Stefan Monnier
a27c1b72c5 * lisp/textmodes/css-mode.el (css-smie-rules): Toplevel's a list.
* test/automated/completion-tests.el:
* test/indent/css-mode.css: New files.

Fixes: debbugs:15467
2013-10-04 17:45:37 -04:00
Daiki Ueno
acbadd0046 Add support for package signature checking.
* lisp/emacs-lisp/package.el (url-http-file-exists-p)
(epg-make-context, epg-context-set-home-directory)
(epg-verify-string, epg-context-result-for)
(epg-signature-status, epg-signature-to-string)
(epg-check-configuration, epg-configuration)
(epg-import-keys-from-file): Declare.
(package-check-signature): New user option.
(package-unsigned-archives): New user option.
(package-desc): Add `signed' field.
(package-load-descriptor): Set `signed' field if .signed file exists.
(package--archive-file-exists-p): New function.
(package--check-signature): New function.
(package-install-from-archive): Check package signature.
(package--download-one-archive): Check archive signature.
(package-delete): Remove .signed file.
(package-import-keyring): New command.
(package-refresh-contents): Import default keyring.
(package-desc-status): Add "unsigned" status.
(describe-package-1, package-menu--print-info)
(package-menu-mark-delete, package-menu--find-upgrades)
(package-menu--status-predicate): Support "unsigned" status.

* test/automated/data/package/signed/archive-contents:
* test/automated/data/package/signed/archive-contents.sig:
* test/automated/data/package/signed/signed-good-1.0.el:
* test/automated/data/package/signed/signed-good-1.0.el.sig:
* test/automated/data/package/signed/signed-bad-1.0.el:
* test/automated/data/package/signed/signed-bad-1.0.el.sig:
* test/automated/data/package/key.pub:
* test/automated/data/package/key.sec: New files.

* test/automated/package-test.el (package-test-update-listing)
(package-test-update-archives, package-test-describe-package):
Adjust to package.el change.
(package-test-signed): New test.
2013-10-03 16:11:27 +09:00
Dmitry Gutov
494e898bc7 * lisp/emacs-lisp/package.el (package-buffer-info, describe-package-1):
Use :url instead of :homepage, as per
http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00622.html

* test/automated/package-test.el: Update all cases to use :url instead
of :homepage.

* test/automated/package-x-test.el
(package-x-test--single-archive-entry-1-3): Same.
2013-10-01 04:38:37 +03:00
Dmitry Gutov
056453c62e * lisp/emacs-lisp/package-x.el (package-upload-buffer-internal): Pass
`extras' slot from `package-desc' to `package-make-ac-desc'.

* lisp/emacs-lisp/package.el (package-desc-from-define): Accept
additional arguments as plist, convert it to an alist and store it
in the `extras' slot.
(package-generate-description-file): Convert extras alist back to
plist and append to the `define-package' form arguments.
(package--alist-to-plist): New function.
(package--ac-desc): Add `extras' slot.
(package--add-to-archive-contents): Check if the archive-contents
vector is long enough, and if it is, pass its `extras' slot value
to `package-desc-create'.
(package-buffer-info): Call `lm-homepage', pass the returned value
to `package-desc-from-define'.
(describe-package-1): Render the homepage button.

* test/automated/package-test.el (simple-single-desc-1-4): Remove, it
was unused.
(simple-single-desc): Expect :homepage property.
(multi-file-desc): Same.
(with-package-test): Do not save previous `default-directory'
value, let-bind the var instead.
(package-test-install-single): Expect :homepage property in the
generated pkg file.
(package-test-describe-package): Expect Homepage button.
(package-test-describe-non-installed-package)
(package-test-describe-non-installed-multi-file-package): Same.
(package-test-describe-not-installed-package): Remove, it was a
duplicate.

* test/automated/package-x-test.el
(package-x-test--single-archive-entry-1-3): Expect :homepage
property.
(package-x-test--single-archive-entry-1-4): Expect nil extras slot.

* test/automated/data/package/archive-contents: Add :homepage
properties to `simple-single' and `multi-file'.

* test/automated/data/package/simple-single-1.3.el: Add URL header.

Fixes: debbugs:13291
2013-09-29 22:41:00 +03:00
Daniel Colascione
3e0b94e7ff Add set operations for bool-vector.
http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00404.html

* data.c (Qbool_vector_p): New symbol.
(bool_vector_spare_mask,popcount_size_t_generic)
(popcount_size_t_msc,popcount_size_t_gcc)
(popcount_size_t)
(bool_vector_binop_driver)
(count_trailing_zero_bits,size_t_to_host_endian)
(Fbool_vector_exclusive_or)
(Fbool_vector_union)
(Fbool_vector_intersection,Fbool_vector_set_difference)
(Fbool_vector_subsetp,Fbool_vector_not)
(Fbool_vector_count_matches)
(Fbool_vector_count_matches_at): New functions.
(syms_of_data): Intern new symbol, functions.
* alloc.c (bool_vector_payload_bytes): New function.
(Fmake_bool_vector): Instead of calling Fmake_vector,
which performs redundant initialization and argument checking,
just call allocate_vector ourselves.  Make sure we clear any
terminating padding to zero.
(vector_nbytes,sweep_vectors): Use bool_vector_payload_bytes
instead of open-coding the size calculation.
(vroundup_ct): New macro.
(vroundup): Assume argument >= 0; invoke vroundup_ct.
* casetab.c (shuffle,set_identity): Change lint_assume to assume.
* composite.c (composition_gstring_put_cache): Change
lint_assume to assume.
* conf_post.h (assume): New macro.
(lint_assume): Remove.
* dispnew.c (update_frame_1): Change lint_assume to assume.
* ftfont.c (ftfont_shape_by_flt): Change lint_assume
to assume.
* image.c (gif_load): Change lint_assume to assume.
* lisp.h (eassert_and_assume): New macro.
(Qbool_vector_p): Declare.
(CHECK_BOOL_VECTOR,ROUNDUP,BITS_PER_SIZE_T): New macros.
(swap16,swap32,swap64): New inline functions.
* macfont.c (macfont_shape): Change lint_assume to assume.
* ralloc.c: Rename ROUNDUP to PAGE_ROUNDUP throughout.
* xsettings.c (parse_settings): Use new swap16 and
swap32 from lisp.h instead of file-specific macros.
2013-09-22 01:31:55 -08:00
Ryan
31dca772ad * lisp/subr.el (internal--call-interactively): New const.
(called-interactively-p): Use it.
* test/automated/advice-tests.el (advice-test-called-interactively-p-around)
(advice-test-called-interactively-p-filter-args)
(advice-test-called-interactively-p-around): New tests.

Fixes: debbugs:3984
2013-09-20 15:59:42 -04:00
Glenn Morris
0c2a2b57fe * test/automated/eshell.el (eshell-match-result):
Return a more informative failure than simply "false".  Update callers.
2013-09-16 16:58:28 -04:00
Glenn Morris
8d95f3a69c Fix comment typo 2013-09-16 15:21:45 -04:00