1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00
Commit Graph

536 Commits

Author SHA1 Message Date
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
Glenn Morris
88302cbb9f * test/automated/eshell (eshell-test/for-name-shadow-loop): Tweak previous 2013-09-16 15:20:44 -04:00
Glenn Morris
cde40d2bb8 * test/automated/eshell.el (eshell-test/for-name-shadow-loop):
Test value before and after loop as well as during.
2013-09-16 14:42:41 -04:00
Dmitry Gutov
578c21bc03 * lisp/progmodes/ruby-mode.el (ruby-operator-re): Consider line
continuation character an operator, as far as indentation is
concerned.

Fixes: debbugs:15369
2013-09-16 02:42:26 +03:00
Glenn Morris
1e53bb4bf2 * lisp/eshell/esh-cmd.el (eshell--local-vars): New variable.
(eshell-rewrite-for-command): Add for loop vars to eshell--local-vars.

* lisp/eshell/esh-var.el (eshell-get-variable): Respect eshell--local-vars.

* test/automated/eshell.el (eshell-test/for-name-shadow-loop):
New test.
(eshell-test/for-loop, eshell-test/for-name-loop): Doc fix.

Fixes: debbugs:15372
2013-09-14 17:10:45 -07:00
Glenn Morris
e16582b6bc * test/automated/eshell.el (eshell-test/for-loop, eshell-test/for-name-loop):
Ensure environment variables don't confuse us.
2013-09-13 13:13:52 -04:00
Glenn Morris
bc2c0769db * test/automated/eshell.el (eshell-test-command-result): Clean up when done 2013-09-13 09:16:57 -07:00
Glenn Morris
6ad9cb087a * test/automated/eshell.el (eshell-test-command-result): New,
again using a temp directory.
Replace eshell-command-result with this throughout.
2013-09-13 09:11:19 -07:00
Glenn Morris
9dc7e8e1a4 * test/automated/eshell.el (with-temp-eshell): Use a temp directory
for eshell-directory-name.

It seems we don't have permission to write to HOME on hydra.
2013-09-12 20:55:56 -07:00
Glenn Morris
e3066edb0a ChangeLog typo fix 2013-09-12 16:42:40 -04:00
Glenn Morris
2d5788f46d * test/automated/eshell.el (with-temp-eshell): Avoid hangs in batch mode
due to "has a running proces; kill it?" prompts.
2013-09-12 16:39:13 -04:00
Stefan Monnier
ae5e4c483a * lisp/eshell/*.el: Use lexical-binding.
* test/automated/eshell.el: Move from test/eshell.el.
(eshell-test/for-loop, eshell-test/for-name-loop): New tests.

Fixes: debbugs:15231
2013-09-12 16:15:53 -04:00
Barry O'Reilly
ebb9984728 Change comparison functions =, <, >, <=, >= to take many arguments.
* src/data.c: Change comparison functions' interface and
  implementation
* src/lisp.h: Make arithcompare available for efficient two arg
  comparisons
* src/bytecode.c: Use arithcompare
* src/fileio.c: Use new interface
* test/automated/data-tests.el: New tests for comparison functions
* etc/NEWS
2013-09-11 01:03:23 -04:00
Dmitry Gutov
88527bc0a2 * lisp/progmodes/ruby-mode.el (ruby-calculate-indent): Consider
two-character operators and whether the character preceding them
changes their meaning.

Fixes: debbugs:15208
2013-09-03 03:29:10 +03:00
Glenn Morris
f8ccce0306 Tweak to Makefile rules that list *.el files
* lisp/Makefile.in (setwins, setwins_almost, setwins_for_subdirs):
* test/automated/Makefile.in (setwins):
Avoid leading space in $wins.  Otherwise the sed command used by
eg compile-main ends up containing "/*.el".

Fixes: debbugs:15170
2013-08-31 19:12:32 -07:00
Paul Eggert
50b13cdedb * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
for portability to hosts where /bin/sh has problems.
2013-08-27 23:01:52 -07:00
Paul Eggert
b73517d9ec Spelling fixes. 2013-08-27 12:02:42 -07:00
David Engster
6ee6031083 Imported EIEIO test suite from CEDET upstream
* automated/eieio-tests.el, automated/eieio-test-persist.el:
* automated/eieio-test-methodinvoke.el: EIEIO tests from CEDET
  upstream.  Changed to use ERT.
2013-08-21 21:42:52 +02:00
Glenn Morris
f47ad1af27 Remove stray execute bit 2013-08-19 23:39:17 -07:00
Daniel Hackney
281c7202cc * package-test.el: Remove tar-package-building functions. Tar file
used for testing is included in the repository.
(package-test-install-texinfo, package-test-cleanup-built-files): Remove.
2013-08-13 20:56:58 -04:00
Fabián Ezequiel Gallina
ad75644970 * lisp/progmodes/python.el (python-imenu--build-tree)
(python-imenu--put-parent): Simplify and Fix (GH bug 146).

* test/automated/python-tests.el (python-imenu-create-index-4)
(python-imenu-create-flat-index-2): New tests.
2013-08-13 13:36:32 -03:00
Lars Magne Ingebrigtsen
7d8e68fed3 Add a test for decompressing gzipped data 2013-08-12 20:36:05 +02:00
Glenn Morris
3e2cd454fd Extract truncate-string-to-width tests to a separate file
* test/automated/mule-util.el: New file, with tests extracted from
lisp/international/mule-util.el.
Copyright years based on when the original test-suite comment was
added to lisp/international/mule-util.el (in 2002).

* lisp/international/mule-util.el: Extract comment test-suite out to
separate file.
2013-08-04 18:32:00 -07:00
Stefan Monnier
671d5c1654 * lisp/subr.el (macrop): New function.
(text-clone--maintaining): New var.
(text-clone--maintain): Rename from text-clone-maintain.  Use it
instead of inhibit-modification-hooks.

* lisp/emacs-lisp/nadvice.el (advice--normalize): For aliases to macros, use
a proxy, so as handle autoloads and redefinitions of the target.
(advice--defalias-fset, advice-remove): Use advice--symbol-function.

* lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates):
Remove bogus (arrayp . stringp) pair.  Add entries for `vectorp'.
(pcase--mutually-exclusive-p): New function.
(pcase--split-consp): Use it.
(pcase--split-pred): Use it.  Optimize the case where `pat' is a qpat
mutually exclusive with the current predicate.

* test/automated/advice-tests.el (advice-tests-nadvice): Test removal
before definition.
(advice-tests-macroaliases): New test.

* lisp/emacs-lisp/edebug.el (edebug-lookup-function): Remove function.
(edebug-macrop): Remove.  Use `macrop' instead.
* lisp/emacs-lisp/advice.el (ad-subr-p): Remove.  Use `subrp' instead.
(ad-macro-p):
* lisp/eshell/esh-cmd.el (eshell-macrop):
* lisp/apropos.el (apropos-macrop): Remove.  Use `macrop' instead.
2013-08-04 16:18:11 -04:00
Glenn Morris
dc8dfa8a70 * ert-tests.el: Disable failing test that no-one seems to know how to fix. 2013-08-03 21:37:10 -07:00
Glenn Morris
f8654242f1 * test/automated/icalendar-tests.el (icalendar-tests--test-export)
(icalendar-tests--test-import): Remove debug messages.
2013-08-03 21:34:01 -07:00
Glenn Morris
2ad0a06772 * test/automated/icalendar-tests.el (icalendar-tests--test-export)
(icalendar-tests--test-import): Try more precise TZ specification.
2013-08-03 19:30:11 -07:00
Glenn Morris
5e471f0dbc * test/automated/icalendar-tests.el (icalendar-tests--test-export)
(icalendar-tests--test-import): Add debug messages.
2013-08-03 09:44:18 -07:00
Glenn Morris
5edd44c276 Fix previous core-elisp-tests.el fix 2013-08-02 18:47:54 -07:00
Glenn Morris
1f21d30894 * test/automated/core-elisp-tests.el (core-elisp-tests): Fix defcustom. 2013-08-02 18:43:30 -07:00
Glenn Morris
f3ffcd8c96 icalendar-tests.el tweaks related to timezone handling
* test/automated/icalendar-tests.el (icalendar-tests--test-export)
(icalendar-tests--test-import):
Use getenv/setenv rather than set-time-zone-rule.
(icalendar-tests--test-import): Reset zone even if error occurred.
2013-08-02 21:02:51 -04:00
Stefan Monnier
a104f656c8 Make defvar affect the default binding outside of any let.
* src/eval.c (default_toplevel_binding): New function.
(Fdefvar): Use it.
(unbind_to, backtrace_eval_unrewind): Do a bit of CSE simplification.
(Fdefault_toplevel_value, Fset_default_toplevel_value): New subrs.
(syms_of_eval): Export them.
* src/data.c (Fdefault_value): Micro cleanup.
* src/term.c (init_tty): Use "false".
* lisp/custom.el (custom-initialize-default, custom-initialize-set)
(custom-initialize-reset, custom-initialize-changed): Affect the
toplevel-default-value (bug#6275, bug#14586).
* lisp/emacs-lisp/advice.el (ad-compile-function): Undo previous workaround
for bug#6275.
* test/automated/core-elisp-tests.el: New file.
2013-08-02 17:16:33 -04:00
Glenn Morris
7d7e9a7314 * test/automated/file-notify-tests.el (file-notify--test-remote-enabled):
Try to check that the remote system has a notification program.
2013-08-01 19:10:51 -04:00
Glenn Morris
67a177722c * test/automated/undo-tests.el (undo-test2, undo-test5): Be quieter. 2013-07-31 00:08:47 -07:00
Michael Albinus
e81dd54dc2 * automated/file-notify-tests.el
(file-notify--test-local-enabled): New defconst.  Replaces all
`file-notify-support' occurences.
(file-notify--test-remote-enabled): New defun.
(file-notify--deftest-remote): Use it.
(file-notify-test00-availability): Rewrite.
(file-notify-test00-availability-remote): New defun.
(file-notify-test01-add-watch): Rewrite first erroneous check.
2013-07-24 15:56:19 +02:00
Glenn Morris
bbece175c9 Use a @configure_input@ comment at the start of generated Makefiles 2013-07-23 18:57:17 -04:00
Glenn Morris
97afc49a1a * inotify-test.el (inotify-file-watch-simple): Delete temp-file when done. 2013-07-23 15:54:01 -04:00
Glenn Morris
66878244eb * test/automated/subword-tests.el: Require subword. 2013-07-23 09:08:47 -07:00
Stefan Monnier
0ac26976f1 * lisp/progmodes/subword.el: Fix boundary case.
(subword-forward-regexp): Make it a constant.  Wrap optional \\W in its
own group.
(subword-backward-regexp): Make it a constant.
(subword-forward-internal): Don't treat a trailing capital as the
beginning of a word.
* test/automated/subword-tests.el: New file.

Fixes: debbugs:13758
2013-07-22 12:25:32 -04:00
Fabián Ezequiel Gallina
1f0480d4cd * lisp/progmodes/python.el (python-imenu--build-tree): Fix corner case
in nested defuns.

* test/automated/python-tests.el (python-imenu-create-index-2)
(python-imenu-create-index-3): New tests.
2013-07-12 22:55:58 -03:00
Glenn Morris
6e0e82a034 ChangeLog fixes 2013-07-11 13:18:48 -04:00
Glenn Morris
a19b3c2d97 Stop reimplementing a bunch of cl- functions in ert
* lisp/emacs-lisp/ert.el: Require cl-lib at runtime too.
(ert--cl-do-remf, ert--remprop, ert--remove-if-not)
(ert--intersection, ert--set-difference, ert--set-difference-eq)
(ert--union, ert--gensym-counter, ert--gensym-counter)
(ert--coerce-to-vector, ert--remove*, ert--string-position)
(ert--mismatch, ert--subseq): Remove reimplementations of cl funcs.
(ert-make-test-unbound, ert--expand-should-1)
(ert--expand-should, ert--should-error-handle-error)
(should-error, ert--explain-equal-rec)
(ert--plist-difference-explanation, ert-select-tests)
(ert--make-stats, ert--remove-from-list, ert--string-first-line):
Use cl-lib functions rather than reimplementations.

* test/automated/ert-tests.el: Require cl-lib at runtime too.
(ert-test-special-operator-p): Use cl-gensym rather than ert-- version.
(ert-test-remprop, ert-test-remove-if-not, ert-test-remove*)
(ert-test-set-functions, ert-test-gensym)
(ert-test-coerce-to-vector, ert-test-string-position)
(ert-test-mismatch): Remove tests.

* test/automated/cl-lib.el: New, split from ert-tests.el.
2013-07-11 09:13:38 -07:00
Glenn Morris
d2e1542aa9 Quieten ruby-mode-tests.el compilation
* test/automated/ruby-mode-tests.el (ruby-deftest-move-to-block):
Goto point-min.
(works-on-do, zero-is-noop, ok-with-three, ok-with-minus-two)
(ruby-move-to-block-skips-percent-literal)
(ruby-move-to-block-skips-heredoc)
(ruby-move-to-block-moves-from-else-to-if)
(ruby-beginning-of-defun-does-not-fold-case)
(ruby-end-of-defun-skips-to-next-line-after-the-method):
Replace goto-line with forward-line/goto-char.
(ruby-move-to-block-does-not-fold-case): Remove unneeded end-of-buffer.
2013-07-11 09:04:56 -07:00
Glenn Morris
03d0198115 Silence package-test.el compilation
* test/automated/package-test.el (makeinfo-buffer): Autoload.
(compilation-in-progress, tar-parse-info, tar-header-name): Declare.
(package-test-install-texinfo): Don't require makeinfo.
2013-07-11 09:01:26 -07:00
Glenn Morris
709c6d2b1c * test/automated/files.el: Stop "local variables" confusion. 2013-07-11 09:00:05 -07:00
Glenn Morris
63cd50d4e2 * automated/flymake-tests.el (flymake-tests): Remove unused group. 2013-07-11 08:58:15 -07:00
Glenn Morris
a550ba3359 Silence icalendar-tests.el compilation
* test/automated/icalendar-tests.el (icalendar-tests--do-test-cycle):
Use with-current-buffer.
2013-07-11 08:57:45 -07:00
Glenn Morris
7faba176ba * undo-tests.el (undo-test-buffer-modified, undo-test-file-modified): New tests. 2013-07-11 08:56:41 -07:00
Michael Albinus
59eb37e5f5 * automated/file-notify-tests.el (file-notify-test00-availability):
Set :expected-result.
(file-notify-test01-add-watch, file-notify-test01-add-watch-remote)
(file-notify-test02-events, file-notify-test02-events-remote)
(file-notify-test03-autorevert, file-notify-test03-autorevert-remote):
Skip when `file-notify-support' is nil.  (Bug#14823)
2013-07-09 09:52:25 +02:00
Glenn Morris
0b57d6fc8e * automated/inotify-test.el (inotify-add-watch, inotify-rm-watch): Declare.
(inotify-file-watch-simple): Silence compiler.
2013-07-09 00:43:12 -07:00
Glenn Morris
a87b74fe64 * test/automated/python-tests.el (python-indent-block-enders):
Make it actually test something.
2013-07-09 00:35:26 -07:00
Glenn Morris
08be5fba9c ChangeLog fix 2013-07-09 00:14:39 -07:00
Glenn Morris
771b2fc303 Explictly require ert in some test/automated/*.el files
* automated/add-log-tests.el, automated/advice-tests.el:
* automated/imenu-test.el, automated/python-tests.el:
* automated/ruby-mode-tests.el, automated/xml-parse-tests.el:
Explictly require ert.
2013-07-09 00:11:50 -07:00
Kenichi Handa
0f01f02fe7 decoder-tests.el (decoder-tests-prefer-utf-8-read):
Use with-ccoding-priority to avoid side-effect (Bug#14781).
2013-07-08 20:51:55 +09:00
Michael Albinus
84b6d3df1a * automated/file-notify-tests.el
(file-notify-test-remote-temporary-file-directory): Use
`null-device' on w32.
(file-notify--test-tmpfile, file-notify--test-tmpfile1)
(file-notify--test-results, file-notify--test-event)
(file-notify--deftest-remote, file-notify--event-test)
(file-notify--test-event-handler)
(file-notify--test-make-temp-name): Renamed, in order to mark them
internal.
(tramp-message-show-message, tramp-read-passwd): Tweak them for
better fitting in noninteractive tests.
(file-notify-test00-availability): Renamed from `file-notify-test0'.
(file-notify-test01-add-watch): Renamed from `file-notify-test1'.
Use `temporary-file-directory '.
(file-notify-test01-add-watch-remote): New test.
(file-notify-test02-events): Renamed from `file-notify-test2'.
(file-notify-test02-events-remote): Renamed from `file-notify-test3'.
(file-notify-test03-autorevert): Renamed from
`file-notify-test4'.  Use timeouts.
(file-notify-test03-autorevert-remote): Renamed from
`file-notify-test5'.
2013-07-05 16:06:14 +02:00
Michael Albinus
46e4f8217a * automated/file-notify-tests.el: New package. 2013-07-04 11:43:17 +02:00
Dmitry Gutov
3086ca2e2c * lisp/progmodes/ruby-mode.el (ruby-move-to-block): When we're at a
middle of block statement initially, lower the depth.  Remove
FIXME comment, not longer valid.  Remove middle of block statement
detection, no need to do that anymore since we've been using
`ruby-parse-region' here.
2013-07-03 05:02:18 +04:00
Paul Eggert
adc5dbceb0 Spelling fixes. 2013-06-30 08:10:33 -07:00
Dmitry Gutov
6dbafa3000 * lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function): Don't
start heredoc inside a string or comment.
2013-06-30 06:23:10 +04:00
Kenichi Handa
2ed909207e merge trunk 2013-06-29 12:31:15 +09:00
Kenichi Handa
3e3da66030 decoder-tests.el (decoder-tests-gen-file): New arg FILE.
(decoder-tests-ao-gen-file): Renamed from decoder-tests-filename.
Callers changed.
(decoder-tests-filename): New function.
(decoder-tests-prefer-utf-8-read)
(decoder-tests-prefer-utf-8-write): New function.
(ert-test-decoder-prefer-utf-8): New test.
2013-06-28 23:39:40 +09:00
Glenn Morris
9c8d35d532 Add Copyright header, standardize license notice 2013-06-27 09:14:05 -07:00
Dmitry Gutov
79f38c4eee * test/automated/package-x-test.el: Change the commentary.
(package-x-test--single-archive-entry-1-3)
(package-x-test--single-archive-entry-1-4): Fix the tests, by
using the appropriate data structure.
2013-06-27 13:51:55 +04:00
Dmitry Gutov
10a2da6ea4 * test/automated/package-x-test.el: Change the commentary. 2013-06-27 13:30:37 +04:00
Dmitry Gutov
9ea5cf9fbd * automated/Makefile.in (setwins): Include the 'data' subdirectory.
* automated/package-x-test.el: New file.

* automated/package-test.el: New file.

* automated/data/package: New directory, with test examples.

* lisp/emacs-lisp/package-x.el (package-upload-buffer-internal): Adapt
to `package-desc-version' being a list.  Use
`package--ac-desc-version' to retrieve version from a package
archive element.
2013-06-27 13:26:54 +04:00
Glenn Morris
df86ba7d4d * python-tests.el (python-tests-with-temp-file): Clean up after ourself 2013-06-26 22:46:51 -07:00
Glenn Morris
568a53f290 Fix ChangeLog typo 2013-06-26 19:16:53 -07:00
Glenn Morris
fc3ec98234 * automated/undo-tests.el (undo-test3): Remove test that seems to
nothing that the previous one doesn't, except leave a tempfile.

Fix copyright header.
2013-06-26 19:00:54 -07:00
Glenn Morris
f2136e1e28 info-xref.el: Update for Texinfo 5 change in *note format
* lisp/info-xref.el (info-xref-node-re, info-xref-note-re): New constants.
(info-xref-check-buffer): Use info-xref-note-re.

* test/automated/info-xref.el: New file.
2013-06-25 18:52:09 -07:00
Glenn Morris
51f853872f * test/automated/occur-tests.el (occur-test-create): New function.
Use it to create separate tests for each element, so we run them
all rather than stopping at the first error.
2013-06-24 19:24:32 -07:00
Glenn Morris
e31106e80a * test/automated/occur-tests.el (occur-tests):
Update for 2013-05-29 change to occur header line.
2013-06-24 19:52:33 -04:00
Eduard Wiebe
c5b0993e5f Extend flymake's warning predicate to be a function. Test suite for flymake.
* lisp/progmodes/flymake.el (flymake-warning-predicate): New.
(flymake-parse-line): Use it.
(flymake-warning-re): Make obsolete alias to
`flymake-warning-predicate'.
* doc/misc/flymake.texi (Parsing the output, Customizable variables):
Add reference to `flymake-warning-predicate'.
* test/automated/flymake-tests.el:
* test/automated/flymake/warnpred/Makefile
* test/automated/flymake/warnpred/test.c
* test/automated/flymake/warnpred/test.pl: New files.

Fixes: debbugs:14217
2013-06-21 10:36:13 -04:00
Juanma Barranquero
4f40506961 Fix typos in ChangeLogs. 2013-06-19 22:10:57 +02:00
Dmitry Gutov
d1bbba4fa5 * lisp/progmodes/ruby-mode.el (ruby-syntax-before-regexp-re):
Distinguish ternary operator tokens from slash symbol and slash
char literal.
2013-06-19 02:17:56 +04:00
Tassilo Horn
02a87775d4 * automated/reftex-tests.el (reftex-parse-from-file-test): Fix
test.
2013-06-12 16:43:46 +02:00
Tassilo Horn
18d78c5ed3 * automated/reftex-tests.el: New test suite for reftex. 2013-06-12 14:49:25 +02:00
Dmitry Gutov
973d1e126c * lisp/progmodes/ruby-mode.el (ruby-syntax-expansion-allowed-p):
Highlight expansions inside regexp literals.
2013-05-31 20:55:03 +04:00
Dmitry Gutov
19bb8e6293 * lisp/progmodes/ruby-mode.el (ruby-syntax-expansion-allowed-p): New
function, checks if expression expansion is allowed in given parse
state.
(ruby-syntax-propertize-expansion): Use it.
(ruby-syntax-propertize-function): Bind `case-fold-search' to nil
around the body.

* test/automated/ruby-mode-tests.el: New tests, for percent literals
and expression expansion.
2013-05-31 10:04:33 +04:00
Leo Liu
f236dd8432 * lisp/emacs-lisp/smie.el (smie-highlight-matching-block): Always turn
off the highlight first.

* lisp/progmodes/octave.el (octave-indent-comment): Tweak regexps.
(octave-help): Small simplification.

* test/indent/octave.m: Tweak.
2013-05-29 14:50:48 +08:00
Aidan Gauland
797c9e3df2 Rewrite Eshell tests using ERT 2013-05-26 19:54:01 +12:00
Leo Liu
cce6beebb7 * indent/octave.m: Add tests for %!, # and ### comments 2013-05-25 10:03:03 +08:00
Stefan Monnier
650cff3d87 * lisp/emacs-lisp/smie.el (smie-auto-fill): Rework to be more robust.
(smie-setup): Use add-function to set it.

* lisp/progmodes/octave.el (octave-smie-rules): Return nil rather than
0 after a semi-colon; it works better for smie-auto-fill.
(octave--indent-new-comment-line): New function.
(octave-indent-new-comment-line): Use it (indirectly).
(octave-mode): Don't disable smie-auto-fill.  Use add-function to
modify comment-line-break-function.
2013-05-24 15:37:55 -04:00
Kenichi Handa
bc9a50032c test/automated/decoder-tests.el: New file 2013-05-23 20:18:43 +09:00
Dmitry Gutov
1a0a0a8a6a * lisp/progmodes/ruby-mode.el (ruby-expression-expansion-re): Allow to
start at point, so that expansion starting right after opening
slash in a regexp is recognized.
(ruby-syntax-before-regexp-re): New defvar, extracted from
ruby-syntax-propertize-function.  Since the value of this regexp
is looked up at runtime now, we should be able to turn
`ruby-syntax-methods-before-regexp' into a defcustom later.
(ruby-syntax-propertize-function): Split regexp matching into two
parts, for opening and closing slashes.  That allows us to skip
over string interpolations and support multiline regexps.
Don't call `ruby-syntax-propertize-expansions', instead use another rule
for them, which calls `ruby-syntax-propertize-expansion'.
(ruby-syntax-propertize-expansions): Move `remove-text-properties'
call to `ruby-syntax-propertize-function'.
(ruby-syntax-propertize-expansion): Extracted from
`ruby-syntax-propertize-expansions'.  Handles one expansion.
(ruby-syntax-propertize-heredoc): Explicitly call
`ruby-syntax-propertize-expansions'.
(ruby-syntax-propertize-percent-literal): Leave point right after
the percent symbol, so that the expression expansion rule can
propertize the contents.

* test/automated/ruby-mode-tests.el (ruby-heredoc-highlights-interpolations)
(ruby-regexp-skips-over-interpolation)
(ruby-regexp-continues-till-end-when-unclosed)
(ruby-regexp-can-be-multiline)
(ruby-interpolation-inside-percent-literal): New tests.

* test/indent/ruby.rb: Add multiline regexp example.
2013-05-19 10:01:23 +04:00
Stefan Monnier
a9e4425bc9 * lisp/progmodes/ruby-mode.el: First cut at SMIE support.
(ruby-use-smie): New var.
(ruby-smie-grammar): New constant.
(ruby-smie--bosp, ruby-smie--implicit-semi-p)
(ruby-smie--forward-token, ruby-smie--backward-token)
(ruby-smie-rules): New functions.
(ruby-mode-variables): Setup SMIE if applicable.
* test/indent/ruby.rb: Fix indentation after =; add more cases.
2013-05-08 16:25:57 -04:00
Stefan Monnier
323885fd82 * lisp/progmodes/perl-mode.el: Add support for here documents.
(perl-syntax-propertize-function): Match here-doc markers.
(perl-syntax-propertize-special-constructs): Find their end.
(perl-imenu-generic-expression): Use [:alnum:].
2013-05-06 15:33:56 -04:00
Stefan Monnier
aa7dab9754 * lisp/progmodes/pascal.el (pascal--syntax-propertize): New const.
(pascal-mode): Use it.  Use setq-local.
(pascal-font-lock-keywords): Use backquotes.
Merge the two entries that handle function definitions.
* test/indent/pascal.pas: Add test for mis-identified comments.
2013-05-04 22:26:38 -04:00
Masatake YAMATO
38ef2c8490 Added bug number (Bug#14112) to my last ChangeLog entries. 2013-04-20 04:56:16 +09:00
Masatake YAMATO
1398a54d6a * automated/imenu-tests.el: New file. 2013-04-20 04:02:55 +09:00
Fabián Ezequiel Gallina
adc3121366 New faster Imenu implementation.
* lisp/progmodes/python.el:
(python-imenu-prev-index-position):
(python-imenu-format-item-label-function)
(python-imenu-format-parent-item-label-function)
(python-imenu-format-parent-item-jump-label-function):
New vars.
(python-imenu-format-item-label)
(python-imenu-format-parent-item-label)
(python-imenu-format-parent-item-jump-label)
(python-imenu--put-parent, python-imenu--build-tree)
(python-imenu-create-index, python-imenu-create-flat-index)
(python-util-popn): New functions.
(python-mode): Set imenu-create-index-function to
python-imenu-create-index.

* test/automated/python-tests.el (python-imenu-prev-index-position-1):
Removed test.
(python-imenu-create-index-1, python-imenu-create-flat-index-1):
New tests.

Fixes: debbugs:14058
2013-04-18 23:31:09 -03:00
Fabián Ezequiel Gallina
04754d3612 * lisp/progmodes/python.el (python-nav--syntactically): Fix cornercases
and do not care about match data.

* test/automated/python-tests.el (python-nav-backward-defun-2)
(python-nav-backward-defun-3, python-nav-forward-defun-2)
(python-nav-forward-defun-3): New tests.
2013-04-17 19:23:13 -03:00
Fabián Ezequiel Gallina
083850a6a1 New defun movement commands.
* lisp/progmodes/python.el (python-nav--syntactically)
(python-nav--forward-defun, python-nav-backward-defun)
(python-nav-forward-defun): New functions.

* test/automated/python-tests.el (python-nav-backward-defun-1)
(python-nav-forward-defun-1): New tests.
2013-04-17 02:08:20 -03:00
Dmitry Gutov
fb549d640a * lisp/progmodes/ruby-mode.el (ruby-beginning-of-defun)
(ruby-end-of-defun, ruby-move-to-block): Bind `case-fold-search'
to nil.
(ruby-end-of-defun): Remove the unused arg, change the docstring
to reflect that this function is only used as the value of
`end-of-defun-function'.
(ruby-beginning-of-defun): Remove "top-level" from the docstring,
to reflect an earlier change that beginning/end-of-defun functions
jump between methods in a class definition, as well as top-level
functions.
2013-04-16 03:07:14 +04:00
Paul Eggert
54ac5d4745 Spelling fixes. 2013-04-14 14:57:21 -07:00
Masatake YAMATO
694569fc79 * test/automated/add-log-tests.el: New file.
Fixes: debbugs:14112
2013-04-10 02:37:17 +09:00
Paul Eggert
b9edfa5c63 Spelling fixes. 2013-04-01 00:58:04 -07:00
Glenn Morris
8d3655be5a Merge from emacs-24; up to 2012-12-26T16:22:18Z!michael.albinus@gmx.de 2013-03-30 09:55:47 -07:00
Fabián Ezequiel Gallina
c9886b39eb Un-indent after "pass" and "return" statements
* lisp/progmodes/python.el (python-indent-block-enders): New var.
(python-indent-calculate-indentation): Use it.

* test/automated/python-tests.el
(python-indent-block-enders): New test.
(python-info-current-defun-2): Fix test.

Fixes: debbugs:13888
2013-03-25 22:55:11 -03:00
Paul Eggert
307d0e95ee Spelling fixes. 2013-03-10 21:07:45 -07:00
Glenn Morris
24958590a0 Add 24.3 release to ChangeLogs 2013-03-10 19:35:23 -07:00
Dmitry Gutov
ab89e9f9a5 * lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function): Only
propertize regexp when not inside a string.

Fixes: debbugs:13885
2013-03-06 22:56:29 +04:00
Paul Eggert
2054a6c311 * indent/octave.m: Fix encoding error in comment. Add coding tag. 2013-03-05 00:06:54 -08:00
Glenn Morris
929aeac608 Merge from emacs-24; up to 2012-12-23T02:41:17Z!rgm@gnu.org 2013-02-27 22:30:48 -08:00
Fabián Ezequiel Gallina
b85f342318 * automated/python-tests.el
(python-tests-with-temp-buffer): Doc fix.
(python-tests-with-temp-file): New macro.
(python-tests-shell-interpreter): New var.
(python-shell-get-process-name-1)
(python-shell-internal-get-process-name-1)
(python-shell-parse-command-1)
(python-shell-calculate-process-environment-1)
(python-shell-calculate-process-environment-2)
(python-shell-calculate-process-environment-3)
(python-shell-calculate-exec-path-1)
(python-shell-calculate-exec-path-2)
(python-shell-make-comint-1)
(python-shell-make-comint-2)
(python-shell-get-process-1)
(python-shell-get-or-create-process-1)
(python-shell-internal-get-or-create-process-1): New tests.
2013-02-25 12:02:05 -03:00
Paul Eggert
52b823c8af Spelling fixes. 2013-02-24 23:49:40 -08:00
Glenn Morris
cfbf790d80 Merge from emacs-24; up to 2012-12-21T07:35:02Z!ueno@gnu.org 2013-02-21 08:56:49 -08:00
Glenn Morris
62cfd799f1 ChangeLog fix 2013-02-21 08:54:51 -08:00
Fabián Ezequiel Gallina
4dddd5dcda Added intial test suite for python.el.
* automated/python-tests.el
(python-tests-with-temp-buffer): New macro.
(python-tests-look-at): New function.
(python-tests-look-at-1)
(python-tests-look-at-2)
(python-indent-pep8-1)
(python-indent-pep8-2)
(python-indent-pep8-3)
(python-indent-inside-paren-1)
(python-indent-inside-paren-2)
(python-indent-after-block-1)
(python-indent-after-block-2)
(python-indent-dedenters-1)
(python-indent-after-backslash-1)
(python-indent-after-backslash-2)
(python-nav-beginning-of-defun-1)
(python-nav-beginning-of-defun-2)
(python-nav-end-of-defun-1)
(python-nav-end-of-defun-2)
(python-nav-beginning-of-statement-1)
(python-nav-end-of-statement-1)
(python-nav-forward-statement-
(python-nav-backward-statement-1)
(python-nav-backward-statement-2)
(python-nav-beginning-of-block-1)
(python-nav-end-of-block-1)
(python-nav-forward-block-1)
(python-nav-lisp-forward-sexp-safe-1)
(python-nav-forward-sexp-1)
(python-nav-forward-sexp-2)
(python-nav-forward-sexp-3)
(python-nav-up-list-1)
(python-nav-backward-up-list-1)
(python-imenu-prev-index-position-1)
(python-info-current-defun-1)
(python-info-current-defun-2)
(python-info-current-defun-3)
(python-info-current-symbol-1)
(python-info-current-symbol-2)
(python-info-current-symbol-3)
(python-info-statement-starts-block-p-1)
(python-info-statement-starts-block-p-2)
(python-info-statement-ends-block-p-1)
(python-info-statement-ends-block-p-2)
(python-info-beginning-of-statement-p-1)
(python-info-beginning-of-statement-p-2)
(python-info-end-of-statement-p-1)
(python-info-end-of-statement-p-2)
(python-info-beginning-of-block-p-1)
(python-info-beginning-of-block-p-2)
(python-info-end-of-block-p-1)
(python-info-end-of-block-p-2)
(python-info-closing-block-1)
(python-info-closing-block-2)
(python-info-line-ends-backslash-p-1)
(python-info-beginning-of-backslash-1)
(python-info-continuation-line-p-1)
(python-info-block-continuation-line-p-1)
(python-info-block-continuation-line-p-2)
(python-info-assignment-continuation-line-p-1)
(python-info-assignment-continuation-line-p-2)
(python-info-looking-at-beginning-of-defun-1)
(python-info-current-line-comment-p-1)
(python-info-current-line-empty-p)
(python-util-goto-line-1)
(python-util-clone-local-variables-1)
(python-util-forward-comment-1): New tests.
2013-02-20 17:27:08 -03:00
Dmitry Gutov
71a048c16b (ruby-add-log-current-method): Improve performance at the expense
of accuracy.  `ruby-block-contains-point' is relatively slow, so
only use it for method and singleton class blocks.

* test/automated/ruby-mode-tests.el
(ruby-add-log-current-method-after-inner-class): Lower
expectations: move point inside a method, initially.
2013-02-14 09:45:33 +04:00
Dmitry Gutov
53ca88c478 * lisp/progmodes/ruby-mode.el (ruby-parse-partial): Don't increase
depth for unfinished percent literal.  Not using it in the caller.
(ruby-move-to-block): Jump over multiline literals of all types,
ignoring code-looking contents inside them.

* test/automated/ruby-mode-tests.el
(ruby-move-to-block-skips-percent-literal): Add depth-affecting
bits inside the examples.
(ruby-move-to-block-skips-heredoc): New test.
2013-02-14 07:33:55 +04:00
Dmitry Gutov
7132e457ad * lisp/progmodes/ruby-mode.el (ruby-move-to-block): Improve
performance.  Instead of recalculating indentation fully for each
line, sum up indentation depth based only on visited lines.
(ruby-parse-partial): Increase the depth after "do" even when END
is right after it.
(ruby-parse-partial): When END is in the middle of a percent
literal, increase the depth if the delimiter chars belong to the
paren syntax class.

* test/automated/ruby-mode-tests.el
(ruby-move-to-block-skips-percent-literal): New test.
2013-02-13 12:15:05 +04:00
Chong Yidong
6e5c1569e9 Merge FFAP's URI-detection code into thingatpt.el.
* lisp/ffap.el: Require thingatpt.
(ffap-url-at-point): Delegate URI detection to thing-at-point.
All URI-valid characters are now recognized.
(ffap-string-at-point): Use use-region-p.
(ffap-url-regexp): Extra character is handled by thing-at-point.
(ffap-string-at-point-mode-alist): Allow parentheses.
(ffap-newsgroup-regexp, ffap-newsgroup-heads, ffap-newsgroup-p):
Convert to aliases; code moved to thingatpt.el.
(ffap-gnus-hook): Use setq-local.

* lisp/thingatpt.el: Rewrite the URL detection routines, absorbing some
code from ffap.el.
(thing-at-point-beginning-of-url-regexp): New var.
(thing-at-point-uri-schemes): Update list of URI schemes.
(thing-at-point-url-regexp): Variable deleted.
(thing-at-point-markedup-url-regexp): Disallow newlines.
(thing-at-point-newsgroup-regexp)
(thing-at-point-newsgroup-heads)
(thing-at-point-default-mail-uri-scheme): New variables.
(thing-at-point-bounds-of-url-at-point): Rewrite.  Use ffap's
method to find the possible bounds of the URI at point.  New
optional argument to find ill-formed URIs.
(thing-at-point-url-at-point): Rewrite.  New arguments for finding
ill-formed URIs.  Use thing-at-point-bounds-of-url-at-point, and
the scheme-adding heuristics from ffap-url-at-point.
(thing-at-point--bounds-of-well-formed-url): New function.  Do
parens matching to decide whether to include parens in the URI

* test/automated/thingatpt.el: New file.

Fixes: debbugs:5673
2013-02-04 20:02:25 +08:00
Chong Yidong
984096edf5 Fix byte compilation warning in files testsuite.
* automated/files.el (file-test--do-local-variables-test): Avoid
compilation warning message.
2013-02-03 16:55:45 +08:00
Stefan Monnier
c4f268a137 * lisp/progmodes/opascal.el: Rename from delphi.el. Use lexical-binding.
(opascal-newline-always-indents): Remove custom.
(opascal-tab, opascal-newline): Remove commands.
(opascal-new-comment-line): Insert "\n" instead of calling newline.
(opascal-mode-map): Keep default bindings for RET and TAB and DEL.
(opascal-save-match-data): Remove, use save-match-data instead.
(opascal-save-state): Use with-silent-modifications.
2013-01-30 20:58:24 -05:00
Dmitry Gutov
a324b8c791 * progmodes/ruby-mode.el (ruby-move-to-block): Work with (maybe
temporarily) broken indentation.
* automated/ruby-mode-tests.el (ruby-block-test-example):
  Break indentation of the do block opener and add a line inside it.
* automated/ruby-mode-tests.el (works-on-do, ok-with-three):
  Adjust line numbers.
2013-01-28 05:20:42 +04:00
Dmitry Gutov
b162502414 * automated/ruby-mode-tests.el
(ruby-indent-spread-args-in-parens): New test.
2013-01-28 02:47:34 +04:00
Stefan Monnier
cb9c0a53bc * lisp/emacs-lisp/advice.el (ad-preactivate-advice): Adjust the cleanup to
the use of nadvice.el.
* lisp/emacs-lisp/nadvice.el (advice--tweak): Make it possible for `tweak'
to return an explicit nil.
(advice--remove-function): Change accordingly.
* test/automated/advice-tests.el: Split up.  Add advice-test-preactivate.
2013-01-15 01:05:22 -05:00
Glenn Morris
51e7349210 Fix interpretation of gnu line.col1-col2 error message format
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
* test/automated/compile-tests.el (compile-tests--test-regexps-data):
Fix interpretation of gnu line.col1-col2 format.

Fixes: debbugs:13335
2013-01-13 17:08:13 -08:00
Wolfgang Jenkner
327a6ccaa0 * lisp/man.el: Handle different "man -k" behaviors. Use utf-8.
(Man-man-k-use-anchor): New var.
(Man-parse-man-k): New function.
(Man-completion-table): Use it.
(man): Flush the completion cache between uses.
* test/automated/man-tests.el: New file.

Fixes: debbugs:13160
2013-01-10 10:01:35 -05:00
Aaron S. Hawley
51fb557877 * test/automated/undo-tests.el (undo-test0): Adjust error to code change. 2013-01-09 16:29:27 -05:00
Aaron S. Hawley
3bace969f3 * lisp/simple.el (primitive-undo): Move from undo.c.
* src/undo.c (Fprimitive_undo): Move to simple.el.
(syms_of_undo): Remove declaration for Sprimitive_undo.
* test/automated/undo-tests.el: New file.
2013-01-08 14:13:31 -05:00
Stefan Monnier
4986fa2175 * lisp/emacs-lisp/advice.el (ad-activate-advised-definition): Refresh the
advice list when the interactive-spec of ad-Advice-* changes.
2013-01-07 13:03:01 -05:00
Stefan Monnier
4a74c81880 * lisp/view.el (view--enable, view--disable): Rename from view-mode-enable
and view-mode-disable and assume it's called from view-mode.
(view-mode-enable, view-mode-disable): Redefine as obsolete
compatibility layer above view-mode.
(view-mode-enter): Call `view-mode'.
* lisp/files.el (after-find-file): Call `view-mode'.
2013-01-03 21:53:48 -05:00
Paul Eggert
09b8afb6c8 Update copyright dates to 2013. 2013-01-02 08:30:50 -08:00
Paul Eggert
0877d0dc24 Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.ca 2013-01-02 08:13:04 -08:00
Paul Eggert
ab422c4d68 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
Paul Eggert
fee0bd5f32 Use URLs, not Boston addresses, in copyright notices. 2012-12-31 07:34:32 -08:00
Glenn Morris
82e2a1f054 Merge from emacs-24; up to 2012-12-03T21:07:47Z!eggert@cs.ucla.edu 2012-12-27 00:21:08 -08:00
Dmitry Gutov
db590ef6e3 * lisp/progmodes/ruby-mode.el (ruby-indent-beg-re): Only allow "class",
"module" and "def" to have indentation before them.  Regression
  from 2012-09-07T04:15:56Z!dgutov@yandex.ru (see the new test).

* test/automated/ruby-mode-tests.el
  (ruby-indent-after-block-in-continued-expression): New test.
2012-12-26 20:45:19 +04:00
Dmitry Gutov
bb808526ae * lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function):
Extract `ruby-syntax-propertize-expansions'.
(ruby-syntax-propertize-expansions): Only change syntax on
certain string delimiters, to punctuation.  This way the common
functions like forward-word and thing-at-point still work.
(ruby-match-expression-expansion): Improve readability.
(ruby-block-contains-point): New function.
(ruby-add-log-current-method): Handle several edge cases.

* test/automated/ruby-mode-tests.el
Rename one interpolation test; add three more.
(ruby-with-temp-buffer): New macro, use it where appropriate.
(ruby-add-log-current-method-examples): Use "_" for target point.
Add four tests for ruby-add-log-current-method.
2012-12-14 10:58:15 +04:00
Dmitry Gutov
dbb530d988 * lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function):
Extract `ruby-syntax-propertize-expansions'.
(ruby-syntax-propertize-expansions): Only change syntax on
certain string delimiters, to punctuation.  This way the common
functions like forward-word and thing-at-point still work.

* test/automated/ruby-mode-tests.el
Rename one interpolation test; add three more.
2012-12-14 08:55:23 +04:00
Glenn Morris
a0099d31a6 Fix for indentation of f90 preproc lines embedded in continuations
* lisp/progmodes/f90.el (f90-line-continued, f90-indent-region):
Treat preprocessor lines embedded in continuations like comments.
(f90-indent-line): Special-case preprocessor lines. 

* test/automated/f90.el (f90-test-bug13138): New test.
2012-12-10 20:42:49 -08:00
Rüdiger Sonderfeld
81606b1050 Support filesystem notification through inotify on GNU/Linux.
configure.ac (inotify): New option.
 (HAVE_INOTIFY): Test for inotify.

 src/termhooks.h (enum event_kind) [HAVE_INOTIFY]: Add
 FILE_NOTIFY_EVENT.
 src/lisp.h (syms_of_inotify) [HAVE_INOTIFY]: Add prototype.
 src/keyboard.c (Qfile_inotify) [HAVE_INOTIFY]: New variable.
 (syms_of_keyboard): DEFSYM it.
 (kbd_buffer_get_event) [HAVE_INOTIFY]: Generate FILE_NOTIFY_EVENT.
 (make_lispy_event): Support FILE_NOTIFY_EVENT by generating
 Qfile_inotify events.
 (keys_of_keyboard) [HAVE_INOTIFY]: Bind file-inotify events in
 special-event-map to inotify-handle-event.
 src/emacs.c (main) [HAVE_INOTIFY]: Call syms_of_inotify.
 src/Makefile.in (base_obj): Add inotify.o.
 src/inotify.c: New file.

 lisp/subr.el (inotify-event-p, inotify-handle-event): New functions.

 test/automated/inotify-test.el: New test.
2012-12-10 06:17:21 -05:00
Chong Yidong
89eb3b0ae7 Fix for bad test in ruby-mode-tests.el.
* automated/ruby-mode-tests.el (ruby-add-log-current-method-examples):
Don't use loop macro, to allow automated testing to work.
2012-12-02 14:06:32 +08:00
Stefan Monnier
23ba2705e2 Make called-interactively-p work for edebug or advised code.
* lisp/subr.el (called-interactively-p-functions): New var.
(internal--called-interactively-p--get-frame): New macro.
(called-interactively-p, interactive-p): Rewrite in Lisp.
* lisp/emacs-lisp/nadvice.el (advice--called-interactively-skip): New fun.
(called-interactively-p-functions): Use it.
* lisp/emacs-lisp/edebug.el (edebug--called-interactively-skip): New fun.
(called-interactively-p-functions): Use it.
* lisp/allout.el (allout-called-interactively-p): Don't assume
called-interactively-p is a subr.
* src/eval.c (Finteractive_p, Fcalled_interactively_p, interactive_p): Remove.
(syms_of_eval): Remove corresponding defsubr.
* src/bytecode.c (exec_byte_code): `interactive-p' is now a Lisp function.
* test/automated/advice-tests.el (advice-tests--data): Remove.
(advice-tests): Move the tests directly here instead.
Add called-interactively-p tests.
2012-11-19 23:24:09 -05:00
Stefan Monnier
19dc72069c Use cl-lib instead of cl, and interactive-p => called-interactively-p.
* lisp/erc/erc-track.el, lisp/erc/erc-networks.el, lisp/erc/erc-netsplit.el:
* lisp/erc/erc-dcc.el, lisp/erc/erc-backend.el: Use cl-lib, nth, pcase, and
called-interactively-p instead of cl.
* lisp/erc/erc-speedbar.el, lisp/erc/erc-services.el:
* lisp/erc/erc-pcomplete.el, lisp/erc/erc-notify.el, lisp/erc/erc-match.el:
* lisp/erc/erc-log.el, lisp/erc/erc-join.el, lisp/erc/erc-ezbounce.el:
* lisp/erc/erc-capab.el: Don't require cl since we don't use it.
* lisp/erc/erc.el: Use cl-lib, nth, pcase, and called-interactively-p i.s.o cl.
(erc-lurker-ignore-chars, erc-common-server-suffixes): Move before first use.
* lisp/json.el: Don't require cl since we don't use it.
* lisp/color.el: Don't require cl.
(color-complement): `caddr' -> `nth 2'.
* test/automated/ert-x-tests.el: Use cl-lib.
* test/automated/ert-tests.el: Use lexical-binding and cl-lib.
2012-11-19 12:24:12 -05:00
Stefan Monnier
dd0c5bbb36 * lisp/emacs-lisp/advice.el (ad-make-advised-definition): Improve last fix. 2012-11-16 13:02:39 -05:00
Dmitry Gutov
c62792e7df * lisp/progmodes/ruby-mode.el
(ruby-syntax-propertize-function): After everything else, search
for expansions in string literals, mark their insides as
whitespace syntax and save match data for font-lock.
(ruby-font-lock-keywords): Highlight just the 2nd group from
expression expansion matches.
(ruby-match-expression-expansion): Use the match data saved to the
text property in ruby-syntax-propertize-function.

* test/automated/ruby-mode-tests.el
Change direct font-lock face references to var references.
(ruby-interpolation-suppresses-syntax-inside): New test.
(ruby-interpolation-inside-percent-literal-with-paren): New
failing test.
2012-11-14 16:17:21 +04:00
Dmitry Gutov
8619323f69 * lisp/progmodes/ruby-mode.el (ruby-expr-beg): Make heredoc detection
more strict.  Add docstring.

* test/automated/ruby-mode-tests.el (ruby-indent-singleton-class): Pass.
(ruby-indent-inside-heredoc-after-operator)
(ruby-indent-inside-heredoc-after-space): New tests.
2012-11-14 10:34:17 +04:00
Dmitry Gutov
5e9419e849 * lisp/progmodes/ruby-mode.el (ruby-move-to-block): Looks for a block
start/end keyword a bit harder.  Works with different values of N.
Add more comments.
(ruby-end-of-block): Update accordingly.

* test/automated/ruby-mode-tests.el (ruby-heredoc-font-lock)
(ruby-singleton-class-no-heredoc-font-lock)
(ruby-add-log-current-method-examples): New tests.
(ruby-test-string): Extract from ruby-should-indent-buffer.
(ruby-deftest-move-to-block): New macro.
Add several move-to-block tests.
2012-11-13 22:57:26 +04:00
Stefan Monnier
3c442f8b25 * lisp/emacs-lisp/advice.el: Layer on top of nadvice.el.
Remove out of date self-require hack.
(ad-do-advised-functions): Use simple `dolist'.
(ad-advice-name, ad-advice-protected, ad-advice-enabled)
(ad-advice-definition): Redefine as functions.
(ad-advice-classes): Move before first use.
(ad-make-origname, ad-set-orig-definition, ad-clear-orig-definition)
(ad-make-mapped-call, ad-make-advised-docstring, ad-make-plain-docstring)
(ad--defalias-fset): Remove functions.
(ad-make-advicefunname, ad-clear-advicefunname-definition): New functions.
(ad-get-orig-definition): Rewrite.
(ad-make-advised-definition-docstring): Change base docstring.
(ad-real-orig-definition): Rewrite.
(ad-map-arglists): Change name of called function.
(ad--make-advised-docstring): Redirect `function' from ad-Advice-...
(ad-make-advised-definition): Simplify.
(ad-assemble-advised-definition): Tweak for new calling context.
(ad-activate-advised-definition): Setup ad-Advice-* instead of ad-Orig-*.
(ad--defalias-fset): Rename from ad-handle-definition.  Make it set the
function and call ad-activate if needed.
(ad-activate, ad-deactivate): Don't call ad-handle-definition any more.
(ad-recover): Clear ad-Advice-* instead of ad-Orig-*.
(ad-compile-function): Compile ad-Advice-*.
(ad-activate-on-top-level, ad-with-auto-activation-disabled): Remove.
(ad-start-advice, ad-stop-advice): Remove.
2012-11-13 09:12:46 -05:00
Dmitry Gutov
5745cae698 * lisp/progmodes/ruby-mode.el (ruby-add-log-current-method): Print the
period before class method names, not after.  Remove handling of
one impossible case.  Add comments.

* test/automated/ruby-mode-tests.el 
(ruby-add-log-current-method-examples): New test.
(ruby-test-string): Extract from ruby-should-indent-buffer.
2012-11-13 13:30:16 +04:00
Dmitry Gutov
f178c32dd1 * lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Never
font-lock the beginning of singleton class as heredoc.

* test/automated/ruby-mode-tests.el (ruby-heredoc-font-lock)
(ruby-singleton-class-no-heredoc-font-lock): New tests.
2012-11-13 07:07:09 +04:00
Stefan Monnier
413d4689c0 * lisp/emacs-lisp/cl.el (dolist, dotimes, declare): Use advice-add to
override the default.
* lisp/emacs-lisp/cl-macs.el (cl-dolist, cl-dotimes): Rewrite without using
cl--dotimes/dolist.
* lisp/subr.el (dolist, dotimes, declare): Redefine them normally, even when
`cl' is loaded.

* lisp/emacs-lisp/nadvice.el (advice--normalize): New function, extracted
from add-advice.
(advice--strip-macro): New function.
(advice--defalias-fset): Use them to handle macros.
(advice-add): Use them.
(advice-member-p): Correctly handle macros.
2012-11-12 22:00:09 -05:00
Glenn Morris
f78ee6afc0 Merge from emacs-24; up to 2012-11-09T14:45:15Z!dmantipov@yandex.ru 2012-11-12 18:25:59 -08:00
Stefan Monnier
231d8498eb * lisp/emacs-lisp/nadvice.el: New package.
* lisp/subr.el (special-form-p): New function.
* lisp/emacs-lisp/elp.el: Use lexical-binding and advice-add.
(elp-all-instrumented-list): Remove var.
(elp-not-profilable): Remove elp-wrapper.
(elp-profilable-p): Use autoloadp and special-form-p.
(elp--advice-name): New const.
(elp-instrument-function): Use advice-add.
(elp--instrumented-p): New predicate.
(elp-restore-function): Use advice-remove.
(elp-restore-all, elp-reset-all): Use mapatoms.
(elp-set-master): Use elp--instrumented-p.
(elp--make-wrapper): Rename from elp-wrapper, return a function
suitable for advice-add.  Use cl-inf.
(elp-results): Use mapatoms+elp--instrumented-p.
* lisp/emacs-lisp/debug.el: Use lexical-binding and advice-add.
(debug-function-list): Remove var.
(debug): Rename arg, and then let-bind it explicitly inside.
(debugger-setup-buffer): Rename arg.
(debugger-setup-buffer): Adjust counts to new debug-on-entry setup.
(debugger-frame-number): Adjust to new debug-on-entry setup.
(debug--implement-debug-on-entry): Rename from
implement-debug-on-entry, add argument.
(debugger-special-form-p): Remove, use special-form-p instead.
(debug-on-entry): Use advice-add.
(debug--function-list): New function.
(cancel-debug-on-entry): Use it, along with advice-remove.
(debug-arglist, debug-convert-byte-code, debug-on-entry-1): Remove.
(debugger-list-functions): Use debug--function-list instead of
debug-function-list.
* lisp/emacs-lisp/advice.el (ad-save-real-definition): Remove, unused.
(ad-special-form-p): Remove, use special-form-p instead.
(ad-set-advice-info): Use add-function and remove-function.
(ad--defalias-fset): Adjust accordingly.
* test/automated/advice-tests.el: New tests.
2012-11-12 15:43:43 -05:00
Dmitry Gutov
d1e1e53dec * lisp/progmodes/ruby-mode.el (ruby-move-to-block): When moving
backward, always stop at indentation.  Reverts the change from
2012-08-12T22:06:56Z!monnier@iro.umontreal.ca.

Fixes: debbugs:12851
2012-11-12 05:11:06 +04:00
Stefan Monnier
3618df4590 * lisp/progmodes/sh-script.el (sh--inside-noncommand-expression):
Rename from sh--inside-arithmetic-expression, handle more cases.

Fixes: debbugs:11263
2012-10-30 23:10:25 -04:00
Stefan Monnier
b08b6da7fe * lisp/progmodes/sh-script.el (sh--inside-arithmetic-expression): New func.
(sh-font-lock-open-heredoc): Use it.

Fixes: debbugs:12770
2012-10-30 22:45:34 -04:00
Stefan Monnier
d7f9cc8528 * lisp/vc/diff-mode.el (diff-context->unified): Don't get confused by "hunk
header comments".
(diff-unified->context, diff-context->unified)
(diff-reverse-direction, diff-fixup-modifs): Use `use-region-p'.
2012-10-29 11:14:10 -04:00
Eli Zaretskii
8111f5e6f0 Adapt compile.el to changes in MSVC diagnostics format.
lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
 Adjust the msft regexp to the output of Studio 2010, and move msft
 before edg-1.  See the discussion on emacs-devel,
 http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00579.html,
 for the details.

 etc/compilation.txt (msft): Add error messages in new Studio 2010
 format.

 test/automated/compile-tests.el (compile-tests--test-regexps-data):
 Add data for msft's new format.
2012-10-14 09:40:05 +02:00
Dmitry Gutov
32fb816220 * lisp/progmodes/ruby-mode.el (ruby-brace-to-do-end): Don't add extra
whitespace after "end".
(ruby-do-end-to-brace): Collapse block to one line if it fits
within fill-column.
2012-09-19 02:10:19 +04:00
Dmitry Gutov
c326883141 * lisp/progmodes/ruby-mode.el (ruby-toggle-block): Guess the current block,
not just expect to be at its beginning.  Adjust callees.
Succeed when do-end block has no space before the pipe character.
(ruby-brace-to-do-end): When the original block is one-liner,
convert to multiline.  Reindent the result.

* test/automated/ruby-mode-tests.el:
(ruby-toggle-block-to-multiline): New test.
(ruby-should-indent-buffer, ruby-toggle-block-to-do-end)
(ruby-toggle-block-to-brace): Use buffer-string.
2012-09-09 03:32:25 +04:00
Dmitry Gutov
616c6c36aa * lisp/progmodes/ruby-mode.el (ruby-match-expression-expansion): Only
fail when reached LIMIT.
2012-09-08 19:13:14 +04:00
Dmitry Gutov
0ba2d4b646 * lisp/progmodes/ruby-mode.el (ruby-indent-beg-re): Add pieces from
ruby-beginning-of-indent, simplify, allow all keywords to have
indentation before them.
(ruby-beginning-of-indent): Adjust for above.  Search until the
found point is not inside a string or comment.
(ruby-font-lock-keywords): Allow symbols to start with "@"
character, give them higher priority than variables.
(ruby-syntax-propertize-function)
(ruby-font-lock-syntactic-keywords): Remove the "not comments"
matchers.  Expression expansions are not comments when inside a
string, and there comment syntax status is irrelevant.
(ruby-match-expression-expansion): New function.  Check that
expression expansion is inside a string, and it's not escaped.
(ruby-font-lock-keywords): Use it.

* test/automated/ruby-mode-tests.el: New tests (Bug#11613).
2012-09-07 08:15:56 +04:00
Glenn Morris
eada086196 Merge from emacs-24; up to 2012-05-04T19:17:01Z!monnier@iro.umontreal.ca 2012-08-28 09:01:59 -07:00
Chong Yidong
19c17fc147 Update release logs 2012-08-24 17:53:39 +08:00
Chong Yidong
450809af98 * src/xdisp.c (handle_invisible_prop): Fix ellipses at overlay string ends.
* test/redisplay-testsuite.el (test-redisplay): Use switch-to-buffer.

Fixes: debbugs:3874
2012-08-20 00:19:05 +08:00
Chong Yidong
a999ce26e9 Make display strings obey buffer-invisibility-spec.
* src/xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
for the string case.

* redisplay-testsuite.el (test-redisplay-4): New test.

Fixes: debbugs:3874
2012-08-18 15:23:30 +08:00
Chong Yidong
ddf0e868c2 Bump version to 24.2 2012-08-16 00:12:37 +08:00
Dmitry Gutov
f063063a8a * lisp/progmodes/ruby-mode.el (ruby-syntax-methods-before-regexp): New const.
(ruby-syntax-propertize-function): Use it to recognize regexps.
Don't look at the text after regexp, just use the whitelist.
* test/indent/ruby.rb: Rearrange examples, add new ones.

Fixes: debbugs:6286
2012-08-14 08:38:11 -04:00
Chong Yidong
45e7ed7165 Improve the file-local variable regression test.
* test/automated/files.el: Test every combination of values for
enable-local-variables and enable-local-eval.
2012-08-14 12:04:25 +08:00
Nobuyoshi Nakada
0d9e2599ec Merge from upstream ruby-mode.el
* lisp/progmodes/ruby-mode.el (ruby-mode-map): Remove unnecessary
binding for `newline'.
(ruby-move-to-block): When moving backward, stop at block opening,
not indentation.
* progmodes/ruby-mode.el (ruby-brace-to-do-end)
(ruby-do-end-to-brace, ruby-toggle-block): New functions.
* progmodes/ruby-mode.el (ruby-mode-map): Add binding for
`ruby-toggle-block'.
* test/automated/ruby-mode-tests.el (ruby-move-to-block-stops-at-opening)
(ruby-toggle-block-to-do-end, ruby-toggle-block-to-brace): New test.
2012-08-12 18:06:56 -04:00
Glenn Morris
9ff9402d3a ChangeLog date fixes 2012-08-10 21:46:38 -07:00
Chong Yidong
5725bd2cc0 Merge from emacs-24; up to 2012-05-02T11:38:01Z!lekktu@gmail.com 2012-08-11 10:13:55 +08:00
Dmitry Gutov
9d2ed8a27e * test/automated/ruby-mode-tests.el (ruby-should-indent):
Add docstring, check (current-indentation) instead of (current-column).
(ruby-should-indent-buffer): New function.
Add tests for `ruby-deep-indent-paren' behavior.
Port all tests from test/misc/test_ruby_mode.rb in Ruby repo.

Fixes: debbugs:12169
2012-08-10 16:25:43 -04:00
Dmitry Gutov
9cd80478d6 Merge stuff from upsteam ruby-mode, part 1.
* lisp/progmodes/ruby-mode.el (ruby-mode-map): Remove deprecated
binding (use `M-;' instead).
(ruby-expr-beg, ruby-parse-partial): ?, _, and : are symbol
constituents, ! is not (but kinda should be).
(ruby-singleton-class-p): New function.
(ruby-expr-beg, ruby-in-here-doc-p)
(ruby-syntax-propertize-heredoc): Use it.
(ruby-syntax-propertize-function): Adjust for changes in
`ruby-syntax-propertize-heredoc'.

* test/automated/ruby-mode-tests.el (ruby-should-indent)
(ruby-assert-state): New functions.
Add new tests.

Fixes: debbugs:12169
2012-08-10 16:19:09 -04:00
Glenn Morris
711f4590cd * test/automated/files.el (files-test-disable-local-variables): New test. 2012-08-10 00:13:06 -07:00
Glenn Morris
5f168c207f * test/automated/files.el: New file. 2012-08-08 00:33:10 -07:00
Glenn Morris
bf1757d19a * test/automated/Makefile.in (all): Fix typo. 2012-08-07 15:11:18 -04:00
David Engster
c91562a619 New tests for XML name expansion.
* automated/xml-parse-tests.el (xml-parse-tests--qnames): New
variable to hold test data for name expansion.
(xml-parse-tests): Test the two different types of name expansion.
2012-07-29 21:57:28 +02:00
Juri Linkov
d8efda90aa * test/automated/occur-tests.el (occur-test-case): Use predefined
buffer name " *test-occur*" instead of a random buffer name.
2012-07-29 03:12:13 +03:00
Dmitry Gutov
c28662a8dc * lisp/progmodes/ruby-mode.el (ruby-parse-partial): No error when end
up inside string symbol literal.
* test/automated/ruby-mode-tests.el: New file with one test.

Fixes: debbugs:11923
2012-07-20 07:10:25 -04:00
Stefan Monnier
efc26dbecd * lisp/progmodes/sh-script.el (sh-syntax-propertize-function): Mark "${#VAR"
as not-a-comment.
* test/indent/shell.sh: Add test case for ${#VAR}.

Fixes: debbugs:11946
2012-07-17 04:38:12 -04:00
Stefan Monnier
45fd731c4d * lisp/textmodes/tex-mode.el (tex-font-lock-keywords-1): Highlight not only
$$..$$ but also $..$ using regexps.
Use tex-verbatim for \url and \path.
(tex-font-lock-keywords): Define as defconst like the others.
(tex-common-initialization): Don't use font-lock-syntax-table any more.
* test/indent/latex-mode.tex: New file.

Fixes: debbugs:11953
2012-07-17 04:11:31 -04:00
Stefan Monnier
a464a6c73a More CL cleanups and reduction of use of cl.el.
* woman.el, winner.el, vc/vc-rcs.el, vc/vc-hooks.el, vc/vc-hg.el:
* vc/vc-git.el, vc/vc-dir.el, vc/vc-bzr.el, vc/vc-annotate.el:
* textmodes/tex-mode.el, textmodes/sgml-mode.el, tar-mode.el:
* strokes.el, ses.el, server.el, progmodes/js.el, progmodes/gdb-mi.el:
* progmodes/flymake.el, progmodes/ebrowse.el, progmodes/compile.el:
* play/tetris.el, play/snake.el, play/pong.el, play/landmark.el:
* play/hanoi.el, play/decipher.el, play/5x5.el, nxml/nxml-mode.el:
* net/secrets.el, net/quickurl.el, midnight.el, mail/footnote.el:
* image-dired.el, ibuffer.el, ibuf-macs.el, ibuf-ext.el, hexl.el:
* eshell/eshell.el, eshell/esh-io.el, eshell/esh-ext.el:
* eshell/esh-cmd.el, eshell/em-ls.el, eshell/em-hist.el:
* eshell/em-cmpl.el, eshell/em-banner.el:
* url/url.el, url/url-queue.el, url/url-parse.el, url/url-http.el:
* url/url-future.el, url/url-dav.el, url/url-cookie.el:
* calendar/parse-time.el, test/eshell.el: Use cl-lib.
* wid-browse.el, wdired.el, vc/vc.el, vc/vc-mtn.el, vc/vc-cvs.el:
* vc/vc-arch.el, tree-widget.el, textmodes/texinfo.el:
* textmodes/refill.el, textmodes/css-mode.el, term/tvi970.el:
* term/ns-win.el, term.el, shell.el, ps-samp.el:
* progmodes/perl-mode.el, progmodes/pascal.el, progmodes/gud.el:
* progmodes/glasses.el, progmodes/etags.el, progmodes/cwarn.el:
* play/gamegrid.el, play/bubbles.el, novice.el, notifications.el:
* net/zeroconf.el, net/xesam.el, net/snmp-mode.el, net/mairix.el:
* net/ldap.el, net/eudc.el, net/browse-url.el, man.el:
* mail/mailheader.el, mail/feedmail.el:
* url/url-util.el, url/url-privacy.el, url/url-nfs.el, url/url-misc.el:
* url/url-methods.el, url/url-gw.el, url/url-file.el, url/url-expand.el:
Dont use CL.
* ibuf-ext.el (ibuffer-mark-old-buffers): Use float-time.
* eshell/esh-opt.el (eshell-eval-using-options): Quote code with
`lambda' rather than with `quote'.
(eshell-do-opt): Adjust accordingly.
(eshell-process-option): Simplify.
* eshell/esh-var.el:
* eshell/em-script.el: Require `esh-opt' for eshell-eval-using-options.
* emacs-pcase.el (pcase--dontcare-upats, pcase--let*)
(pcase--expand, pcase--u1): Rename pcase's internal `dontcare' pattern
to `pcase--dontcare'.
* emacs-cl.el (labels): Mark obsolete.
(cl--letf, letf): Move to cl-lib.
(cl--letf*, letf*): Remove.
* emacs-cl-lib.el (cl-nth-value): Use defalias.
* emacs-cl-macs.el (cl-dolist, cl-dotimes): Add indent rule.
(cl-progv): Rewrite.
(cl--letf, cl-letf): Move from cl.el.
(cl-letf*): New macro.
* emacs-cl-extra.el (cl--progv-before, cl--progv-after): Remove.
2012-07-11 19:13:41 -04:00
Chong Yidong
566df3fcac Clean up syntax-table usage in xml.el
* xml.el (xml--parse-buffer): Use xml-syntax-table.
(xml-parse-tag): Likewise, and avoid changing entity tables.
(xml-syntax-table): Define from scratch, making sure not to give
x2000 and other Unicode spaces whitespace syntax, since those are
not spaces in XML.
(xml-parse-fragment): Delete unused function.
(xml-name-start-char-re, xml-name-char-re, xml-name-re)
(xml-names-re, xml-nmtoken-re, xml-nmtokens-re, xml-char-ref-re)
(xml-entity-ref, xml-pe-reference-re)
(xml-reference-re,xml-att-value-re, xml-tokenized-type-re)
(xml-notation-type-re, xml-enumeration-re, xml-enumerated-type-re)
(xml-att-type-re, xml-default-decl-re, xml-att-def-re)
(xml-entity-value-re): Use syntax references in regexps where
possible; no need to define inside a let-binding.
(xml-parse-dtd): Use xml-pe-reference-re.
(xml-entity-or-char-ref-re): New defconst.
(xml-parse-string, xml-substitute-special): Use it.
2012-07-05 00:14:05 +08:00
Chong Yidong
a76e6535dc * xml.el: Protect parser against XML bombs.
(xml-entity-expansion-limit): New variable.
(xml-parse-string, xml-substitute-special): Use it.
(xml-parse-dtd): Avoid infloop if the DTD is not terminated.

* test/automated/xml-parse-tests.el: Update testcases.
2012-07-03 13:28:42 +08:00
Chong Yidong
a7aef6f5c6 * lisp/xml.el: Handle entity and character reference expansion correctly.
(xml-default-ns): New variable.
(xml-entity-alist): Use XML spec definitions for lt and amp.
(xml-parse-region): Make first two arguments optional.  Discard
text properties.
(xml-parse-tag-1): New function, spun off from xml-parse-tag.  All
callers changed.
(xml-parse-tag): Call xml-parse-tag-1.  For backward
compatibility, this function should not modify buffer contents.
(xml-parse-tag-1): Fix opening-tag regexp.
(xml-parse-string): Rewrite, handling entity and character
references properly.
(xml--entity-replacement-text): Signal an error if a parameter
entity is undefined.

* test/automated/xml-parse-tests.el (xml-parse-tests--data): More
testcases.
2012-07-03 00:21:54 +08:00
Chong Yidong
6fe566a752 * xml.el (xml-parse-dtd): Use proper regexps for ELEMENT declarations.
* test/automated/xml-parse-tests.el: Update testcase.

Fixes: debbugs:7172
2012-07-01 19:05:17 +08:00
Chong Yidong
fbf2e7ad3b Improve xml parameter entity parsing, and add a new ERT test.
* test/automated/xml-parse-tests.el: New file.

* lisp/xml.el (xml--parse-buffer): New function.  Move most of
xml-parse-region here.
(xml-parse-region): Copy region into a temporary buffer, since
parameter entity substitution requires changing buffer contents.
Use xml--parse-buffer.
(xml-parse-file): Use xml--parse-buffer.
(xml-parse-dtd): Make parameter entity substitution work right.
2012-07-01 15:17:05 +08:00
Stefan Monnier
d5c6faf921 * lisp/emacs-lisp/cl.el (flet): Mark obsolete.
* lisp/emacs-lisp/cl-macs.el (cl-flet*): New macro.
* lisp/vc/vc-rcs.el (vc-rcs-annotate-command, vc-rcs-parse):
* lisp/progmodes/js.el (js-c-fill-paragraph):
* lisp/progmodes/ebrowse.el (ebrowse-switch-member-buffer-to-sibling-class)
(ebrowse-switch-member-buffer-to-derived-class):
* test/automated/ert-x-tests.el (ert-test-run-tests-interactively-2):
* lisp/play/5x5.el (5x5-solver): Use cl-flet.

Fixes: debbugs:11780
2012-06-27 11:11:28 -04:00
Ulf Jasper
ee5747918f icalendar / icalendar-tests: Fix Bug#11473 -- unescape commas in timezone specs
2012-06-08 Nick Dokos <nicholas.dokos@hp.com>

	* calendar/icalendar.el (icalendar--parse-vtimezone): Import TZID
	string properly, fixes Bug#11473.

2012-06-08  Ulf Jasper  <ulf.jasper@web.de>

	* automated/icalendar-tests.el (icalendar--parse-vtimezone): Test
	escaped commas in TZID (Bug#11473).
	(icalendar-import-with-timezone): New.
	(icalendar-real-world): Add new testcase as found in the bugreport
	of Bug#11473.
2012-06-08 19:34:09 +02:00
Chong Yidong
94f0aa3464 Bump version to 24.1.
Add release logs.
Regenerate AUTHORS and ldefs-boot.el.
2012-06-01 17:51:00 +08:00
Ulf Jasper
6dbaa1c769 icalendar-tests: Fix Bug#11525 -- Add icalendar-import-format-uid
2012-05-29  Ulf Jasper  <ulf.jasper@web.de>

	* calendar/icalendar.el
	(icalendar-export-region): Export UID properly.

2012-05-29 Leo Liu <sdl.web@gmail.com>
	* calendar/icalendar.el (icalendar-import-format): Add
	`icalendar-import-format-uid' (Bug#11525).
	(icalendar-import-format-uid): New.
	(icalendar--parse-summary-and-rest, icalendar--format-ical-event):
	Export UID.
2012-05-29 21:42:49 +02:00
Stefan Monnier
5814f126ba * lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Simplify Maven regexp, and make sure the file can't start with a space.

Fixes: debbugs:11517
2012-05-21 00:28:41 -04:00
Glenn Morris
b847032c75 Command substitution already runs in a subshell
* Makefile.in (install-arch-indep, install-doc, install-info, uninstall):
* leim/Makefile.in (leim-list.el, install):
* lib-src/Makefile.in (insrcdir, $(DESTDIR)${archlibdir}):
* lisp/Makefile.in (setwins, setwins_almost, setwins_for_subdirs):
* test/automated/Makefile.in (setwins):
Scrap superfluous subshells.
2012-05-20 17:44:34 -07:00
Ted Zlatanov
5e561bc76d add url-util.el test file
* automated/url-util-tests.el: New file to test
lisp/url/url-util.el.  Only `url-build-query-string' and
`url-parse-query-string' are tested right now.
2012-05-15 04:52:15 -04:00
Stefan Monnier
461ef3c518 Add some shell indentation test cases.
* test/indent/shell.sh:
* test/indent/shell.rc: Add some test cases.
2012-04-28 16:04:34 -04:00
Stefan Monnier
dfbd787fe6 * lisp/progmodes/ruby-mode.el: Simplify last change, and cleanup code.
(ruby-syntax-propertize-regexp): Remove.
(ruby-syntax-propertize-function): Split regexp into chunks.
Match following code directly.
* test/indent/ruby.rb: New file, to test new syntax-propertize code.
2012-04-24 13:06:12 -04:00
Glenn Morris
ab7ce8c155 Add another vc-bzr test
* lisp/vc/vc-bzr.el (vc-bzr-status): Avoid condition-case-unless-debug.

* test/automated/vc-bzr.el (vc-bzr-test-faulty-bzr-autoloads): New test.
2012-04-10 20:24:26 -07:00
Ted Zlatanov
6c0c7cfc67 Move url-future.el ERT test to test/automated/url-future-tests.el.
* lisp/url/url-future.el (url-future-test): Move to test/automated.

* test/automated/url-future-tests.el (url-future-tests): Move from
lisp/url/url-future.el and rename.
2012-02-13 13:45:36 -05:00
Juanma Barranquero
6df6ae42fe Fix typos in ChangeLogs. 2012-01-31 17:15:03 +01:00
Ulf Jasper
bdbc1c4e3e test/automated/icalendar-tests: Fix broken test
2012-01-29  Ulf Jasper  <ulf.jasper@web.de>

	* automated/icalendar-tests.el (icalendar-import-non-recurring):
	Fix broken test, caused by missing trailing blank.
2012-01-29 13:28:20 +01:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Paul Eggert
22bcf20469 Spelling fixes. 2011-12-30 17:27:15 -08:00
Paul Eggert
99d990817c Spelling fixes. 2011-12-18 22:21:24 -08:00
Paul Eggert
a87ef89906 Spelling fixes. 2011-12-15 14:14:12 -08:00
Stefan Monnier
15e0efc7dc * lisp/progmodes/pascal.el: Declare `ind' as dyn-bound.
Fixes: debbugs:10264
2011-12-13 10:33:25 -05:00
Paul Eggert
c80e3b4aed Spelling fixes. 2011-12-04 00:02:42 -08:00
Chong Yidong
5c09001c73 Fix for compilation-tests.el testsuite
* automated/compile-tests.el (compile-tests--test-regexps-data):
Increase column numbers by one to reflect change in how
compilation-message is recorded	(Bug#10172).
2011-12-03 11:04:21 +08:00
Paul Eggert
ee7683ebb7 Spelling fixes. 2011-11-22 23:03:56 -08:00
Glenn Morris
394c65f1c1 Move rmailmm test functions to test/ directory.
* lisp/mail/rmailmm.el (test-rmail-mime-handler)
(test-rmail-mime-bulk-handler)
(test-rmail-mime-multipart-handler): Move tests to test/ directory.

* test/rmailmm.el: New file, split from lisp/mail/rmailmm.el.
2011-11-21 21:55:06 -05:00
Juanma Barranquero
fe7a3057a3 Fix typos. 2011-11-20 20:35:27 +01:00
Juanma Barranquero
cd1181dbec Fix typos. 2011-11-20 04:48:53 +01:00
Paul Eggert
e1dbe924b5 Spelling fixes. 2011-11-19 18:29:42 -08:00
Paul Eggert
5396468298 Spelling fixes. 2011-11-19 01:18:31 -08:00
Paul Eggert
4c36be58ca Spelling fixes. 2011-11-17 01:09:20 -08:00
Juanma Barranquero
7877f37394 Fix typos. 2011-11-16 18:47:25 +01:00
Juanma Barranquero
58179ccebd Fix typos. 2011-11-16 13:34:47 +01:00
Juanma Barranquero
c701515351 Fix typos. 2011-11-15 18:37:37 +01:00
Paul Eggert
da6062e6ea Spelling fixes. 2011-11-14 23:55:13 -08:00
Paul Eggert
91af3942e9 Spelling fixes. 2011-11-14 15:59:56 -08:00
Paul Eggert
8350f087ef Spelling fixes. 2011-11-14 12:23:26 -08:00