1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-07 15:21:46 +00:00
Commit Graph

618 Commits

Author SHA1 Message Date
Glenn Morris
d9ca41e7a9 * test/automated/Makefile.in (%.log): If error, dump log to stdout.
This is mainly so we can see what is going on on hydra...
2014-06-26 00:32:16 -07:00
Glenn Morris
9ac6d28ab8 Merge from emacs-24; up to 2014-06-11T19:33:14Z!rgm@gnu.org 2014-06-25 23:55:15 -07:00
Glenn Morris
5bca8dfb9b Disable byte-compilation in two test/automated files
* test/automated/eieio-tests.el (no-byte-compile): Set it. 

* test/automated/ert-tests.el (no-byte-compile): Set it.

Fixes: debbugs:17851 debbugs:17852
2014-06-25 23:02:52 -07:00
Glenn Morris
5a8816f3f2 Simplify and parallize test/automated Makefile
* Makefile.in (mostlyclean, clean): Maybe clean test/automated.

* lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit): New.

* test/automated/Makefile.in: Simplify and parallelize. 
(XARGS_LIMIT, BYTE_COMPILE_EXTRA_FLAGS)
(setwins, compile-targets, compile-main, compile-clean): Remove.
(GREP_OPTIONS): Unexport.
(.el.elc): Replace with pattern rule.
(%.elc, %.log): New pattern rules.
(ELFILES, LOGFILES): New variables.
(check): Depend on LOGFILES.  Call ert-summarize-tests-batch-and-exit.
(clean, mostlyclean): New rules.
(bootstrap-clean): Simplify.
(bootstrap-clean, distclean): Depend on clean.

* .bzrignore: Ignore test/automated/*.log.

Fixes: debbugs:15991
2014-06-25 22:47:10 -07:00
Glenn Morris
f7586999d2 * flymake-tests.el (flymake-tests--current-face): Tweak previous sleep change.
Using the time-honored principle of "if it doesn't when you do X,
do it again and see what happens".
2014-06-25 18:59:37 -04:00
Stefan Monnier
30a42a5bed * test/automated/package-test.el (package-test-update-listing)
(package-test-update-archives, package-test-describe-package):
Adjust tests according to new package-list-unsigned.
2014-06-25 17:59:28 -04:00
Glenn Morris
7e58d67392 Try to fix some flymake-tests weirdness
* test/automated/flymake-tests.el (flymake-tests--current-face):
Sleep for longer.  Avoid querying.
2014-06-25 15:12:14 -04:00
Dmitry Antipov
5697ca55cb Do not allow out-of-range character position in Fcompare_strings.
* src/fns.c (validate_subarray): Add prototype.
(Fcompare_substring): Use validate_subarray to check ranges.
Adjust comment to mention that the semantics was changed.  Also see
http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00447.html.
* lisp/files.el (dir-locals-find-file, file-relative-name):
* lisp/info.el (Info-complete-menu-item):
* lisp/minibuffer.el (completion-table-subvert): Prefer string-prefix-p
to compare-strings to avoid out-of-range errors.
* lisp/subr.el (string-prefix-p): Adjust to match strict range
checking in compare-strings.
* test/automated/fns-tests.el (fns-tests-compare-string): New test.
2014-06-25 14:36:51 +04:00
Stefan Monnier
370ceb2210 Fix some indentation problem with \; and pipes.
* lisp/progmodes/sh-script.el (sh-mode-syntax-table): Set syntax of ;|&.
(sh-smie--default-forward-token, sh-smie--default-backward-token):
New functions.
(sh-smie-sh-forward-token, sh-smie-sh-backward-token)
(sh-smie-rc-forward-token, sh-smie-rc-backward-token): Use them.
(sh-smie-sh-rules): Fix indentation of a pipe at BOL.

Fixes: debbugs:17842
2014-06-24 16:16:10 -04:00
Michael Albinus
b6266364bd * automated/tramp-tests.el (tramp-test26-process-file): Extend test
according to Bug#17815.
2014-06-24 09:48:19 +02:00
Glenn Morris
c400516ab1 Merge from emacs-24; up to 2014-06-06T02:22:40Z!monnier@iro.umontreal.ca 2014-06-21 12:45:59 -07:00
Fabián Ezequiel Gallina
656f99beeb Fix completion retrieval parsing.
* progmodes/python.el (python-mode):
(python-util-strip-string): New function.
(python-shell-completion-get-completions): Use it.

* automated/python-tests.el (python-util-strip-string-1): New test.

Fixes: debbugs:17209
2014-06-21 11:14:54 -03:00
Stefan Monnier
9e248ebdc7 * lisp/progmodes/sh-script.el (sh-smie-sh-rules): For { after &&, don't
align with the surrounding parent.

Fixes: debbugs:17721
2014-06-20 10:23:30 -04:00
Stefan Monnier
500dce5f4d * lisp/emacs-lisp/smie.el (smie--hanging-eolp-function): New var.
(smie-indent--hanging-p): Use it.
* lisp/progmodes/sh-script.el (sh-set-shell): Set it.

Fixes: debbugs:17621
2014-06-19 21:05:40 -04:00
Stefan Monnier
e9638b49e5 * lisp/progmodes/sh-script.el (sh-smie-sh-rules): Use same rule for && as
for |.

Fixes: debbugs:17621
2014-06-19 18:52:12 -04:00
Michael Albinus
588001cfc7 Sync with Tramp 2.2.10.
* test/automated/tramp-tests.el (tramp--test-enabled): Ignore errors.
(tramp--instrument-test-case): Extend docstring.
(tramp-test15-copy-directory): Skip for tramp-smb.el.
(tramp-test21-file-links): Use `file-truename' for directories.
(tramp-test27-start-file-process, tramp-test28-shell-command):
Retrieve process output more robustly.
(tramp--test-check-files): Extend test.
(tramp-test30-special-characters): Skip for tramp-adb.el,
tramp-gvfs.el and tramp-smb.el.  Add further file names.
2014-06-15 17:56:58 +02:00
Glenn Morris
f9d80c5110 With GNU make, MFLAGS is not needed
* Makefile.in (CC, CFLAGS, LDFLAGS, CPPFLAGS, abs_top_srcdir):
Remove, no longer used.
(lib, lib-src, lisp, nt, src, blessmail, install-arch-dep)
(install-nt, install-strip, uninstall, uninstall-nt)
(mostlyclean, clean, distclean, bootstrap-clean)
(maintainer-clean, extraclean, TAGS, tags, check, $(DOCS)):
($(INSTALL_DOC), $(UNINSTALL_DOC), info, bootstrap, check-declare):
GNU make automatically passes command-line arguments to sub-makes.

* admin/unidata/Makefile.in (${DSTDIR}/charprop.el):
GNU make automatically passes command-line arguments to sub-makes.

* lib-src/Makefile.in (../lib/libgnu.a):
GNU make automatically passes command-line arguments to sub-makes.

* lisp/Makefile.in ($(lisp)/cus-load.el, $(lisp)/finder-inf.el)
(autoloads, $(lisp)/subdirs.el, compile-main, leim, semantic, compile)
(compile-always): GNU make automatically passes
command-line arguments to sub-makes.

* lwlib/Makefile.in ($(globals_h)):
GNU make automatically passes command-line arguments to sub-makes.

* src/Makefile.in ($(leimdir)/leim-list.el, $(srcdir)/macuvs.h)
($(lispsource)/international/charprop.el)
($(libsrc)/make-docfile$(EXEEXT), $(lwlibdir)/liblw.a)
($(oldXMenudir)/libXMenu11.a, ns-app, .el.elc)
($(lispsource)/loaddefs.el, bootstrap-emacs$(EXEEXT)):
GNU make automatically passes command-line arguments to sub-makes.

* test/automated/Makefile.in (compile-main):
GNU make automatically passes command-line arguments to sub-makes.
2014-06-13 19:05:00 -04:00
Michal Nazarewicz
1d7f01eeed * tests/automated/tildify-tests.el (tildify-test--test): Optimise the
test slightly by reusing the same temporary buffer across multiple
test cases.
2014-06-05 16:42:45 +02:00
Michal Nazarewicz
03d7d160c3 tildify.el: Rewrite `tildify-region' and co., add foreach function.
* lisp/textmodes/tildify.el (tildify-foreach-region-outside-env): New
function which calls a callback on portions of the buffer that are
outside of ignored environments.
(tildify-build-regexp): Remove function since it is now
incorporated in `tildify-foreach-region-outside-env' where it is
optimised and simplified by the use of `mapconcat'.
(tildify-tildify): Return number of substitutions made so that…
(tildify-count): …can be removed.
(tildify-find-env): Accept a new PAIRS argument which was
previously looked up in `tildify-ignored-environments-alist' each
time the function was called.  With this change, the lookup is
performed only once in `tildify-foreach-region-outside-env'.
(tildify-region): Greatly simplify the function since now most of
the work is done by `tildify-foreach-region-outside-env'.
(tildify-mode-alist): Simplify slightly by avoiding if and setq
and instead using or.

* tests/automated/tildify-tests.el (tildify-test-find-env-end-re-bug)
(tildify-test-find-env-group-index-bug): Update to support new
signature of the `tildify-foreach-region-outside-env' function.
Namely, it now takes pairs as an argument instead of looking it up in
`tildify-ignored-environments-alist'.
2014-06-05 16:42:07 +02:00
Michal Nazarewicz
eb54c73a9d tildify.el: Better support for XML
* lisp/textmodes/tildify.el  (tildify-string-alist)
(tildify-ignored-environments-alist): Add `nxml-mode' to the list of
supported modes since `xml-mode' is no longer a thing but just an
alias to the former.  Also include comments and insides of tags in
`tildify-ignored-environments-alist' for XML modes.  Finally, since
XML does not define “ ”[1], use a numeric reference for
a no-break space (namely “ ”)

[1] XML specification defines only a handful of predefined entities.
    The list is at <http://www.w3.org/TR/REC-xml/#sec-predefined-ent>
    and includes only &lt;, &gt;, &amp;, &apos; and &quot; (meaning <,
    >, &, ' and " respectively).  This is in contrast to HTML and even
    XHTML which defined a whole bunch of entities including “&nbsp;”.

* automated/tildify-tests.el (tildify-test--example-html): Add support
for generating XML code, so that…
(tildify-test-xml) …test can be added to check handling of XML
documents.
2014-06-05 16:41:01 +02:00
Michal Nazarewicz
9342feecdd tildify.el: Fix matched group indexes in end-regex building
* lisp/textmodes/tildifi.el (tildify-find-env): When looking for
a start of an ignore-environment, the regex is built by
concatenating regexes of all the environments configured in
`tildify-ignored-environments-alist'.  So for example, the following
list could be used to match TeX's \verb and \verb* commands:

    (("\\\\verb\\(.\\)" . (1))
     ("\\\\verb\\*\\(.\\)" . (1)))

This would result in the following regex being used to find the start
of any of the variants of the \verb command:

    \\\\verb\\(.\\)\\|\\\\verb\\*\\(.\\)

But now, if “\\\\verb\\*\\(.\\)” matches, the first capture group
won't match anything, and thus (match-string 1) will be nil, which
will cause building of the end-matching regex to fail.

Fix this by using capture groups from the time when the opening
regexes are matched individually.

* tests/automated/tildify-tests.el (tildify-test-find-env-group-index-bug):
New test validating fix to the above bug.
2014-06-05 16:39:18 +02:00
Michal Nazarewicz
af9a3b28c0 tildify.el: Fix end-regex building in `tildify-find-env'
* lisp/textmodes/tildify.el (tildify-find-env): The
`tildify-ignored-environments-alist' allows the end-regex
to be provided not as a static string but mix of strings and
indexes of groups matched the begin-regex.  For example, the
“\verb!…!” TeX-command (where “!” is an arbitrary character)
is handled using:

    ("\\\\verb\\*?\\(.\\)" . (1))

In the same way, the following should be supported as well:

    ("open-\\(.\\)" . ("end-" 1))

However the tildify-find-env function fails at

    (concat result
            (if (stringp (setq aux (car expression)))
                 expression  ; BUG: expression is a list
               (regexp-quote (match-string aux))))

where the string part is handled incorrectly.

The most trivial fix would be to replace `expression'
in the true-part of the if-statement with `aux', but
instead, this commit optimises `tildify-find-env' by
changing it to use `mapconcat' rather than open-coded
while-loop.

* tests/automated/tildify-tests.el (tildify-test-find-env-end-re-bug):
New test validating fix to the above bug.
2014-06-05 16:37:45 +02:00
Michael Albinus
2589f32c61 * test/automated/tramp-tests.el (tramp-test29-vc-registered):
Remove instrumentation.
2014-06-02 20:38:22 +02:00
Michael Albinus
84dbe84b9f * test/automated/tramp-tests.el (tramp-remote-process-environment): Declare.
(tramp-test29-vc-registered): Set $BZR_HOME.
2014-06-02 11:53:43 +02:00
Michael Albinus
30491d4964 * tramp-tests.el (tramp-test29-vc-registered):
Add more instrumentation code.
2014-06-01 18:16:26 +02:00
Michael Albinus
a67aaeb3a9 * automated/tramp-tests.el (tramp-test29-vc-registered):
Instrument failed test case.
2014-06-01 12:49:45 +02:00
Michael Albinus
22a949d699 Revert last patch. The problem happens in the trunk. 2014-06-01 12:38:09 +02:00
Michael Albinus
3340452bdc * tramp-tests.el (tramp-test29-vc-registered):
Instrument failed test case.
2014-06-01 11:33:57 +02:00
Michael Albinus
7a458be33c * automated/tramp-tests.el (tramp-test29-vc-registered):
Instrument failed test case.
2014-06-01 11:33:24 +02:00
Glenn Morris
03ca10a9fa * test/automated/ruby-mode-test.el (ruby-assert-face): Fix typo in previous 2014-05-28 22:55:57 -07:00
Stefan Monnier
6711a21f11 * lisp/font-lock.el (font-lock-flush, font-lock-ensure): New functions.
(font-lock-fontify-buffer): Mark interactive-only.
(font-lock-multiline, font-lock-fontified, font-lock-set-defaults):
Make buffer-local.
(font-lock-specified-p): Remove redundant boundp check.
(font-lock-flush-function, font-lock-ensure-function): New vars.
(font-lock-turn-on-thing-lock): Set them.
(font-lock-default-fontify-buffer): Obey font-lock-dont-widen.
(font-lock-after-change-function): Make `old-len' optional.
(font-lock-set-defaults): Remove redundant `set' of font-lock-defaults.
Call font-lock-flush, just in case.
* lisp/progmodes/verilog-mode.el (verilog-preprocess): Disable workaround in
recent Emacsen.
* lisp/progmodes/vera-mode.el (vera-fontify-buffer): Declare obsolete.
(vera-mode-map, vera-mode-menu): Remove bindings to it.
* lisp/progmodes/idlw-help.el (idlwave-help-fontify): Use font-lock-ensure
and with-syntax-table.
* lisp/textmodes/conf-mode.el (conf-quote-normal):
* lisp/progmodes/sh-script.el (sh-set-shell):
* lisp/progmodes/prog-mode.el (prettify-symbols-mode):
* lisp/progmodes/f90.el (f90-font-lock-n):
* lisp/progmodes/cwarn.el (cwarn-mode):
* lisp/nxml/nxml-mode.el (nxml-toggle-char-ref-extra-display):
* lisp/progmodes/compile.el (compilation-setup, compilation--unsetup):
* lisp/hi-lock.el (hi-lock-mode, hi-lock-unface-buffer)
(hi-lock-set-pattern, hi-lock-set-file-patterns): Use font-lock-flush.
* lisp/mail/rmail.el (rmail-variables): Set font-lock-dont-widen instead of
font-lock-fontify-buffer-function and
font-lock-unfontify-buffer-function.
(rmail-unfontify-buffer-function, rmail-fontify-message):
Use with-silent-modifications.
* lisp/htmlfontify.el (hfy-force-fontification): Use jit-lock-fontify-now
and font-lock-ensure.
* lisp/bs.el (bs-show-in-buffer): Use font-lock-ensure.
* lisp/gnus/mm-view.el (mm-display-inline-fontify): Use font-lock-ensure.
* lisp/gnus/gnus-cite.el (gnus-message-citation-mode): Use font-lock-flush.
* lisp/org/org-compat.el (org-font-lock-ensure): New function.
* lisp/org/ox-odt.el (org-odt-do-format-code):
* lisp/org/ox-html.el (org-html-fontify-code):
* lisp/org/org.el (org-fontify-like-in-org-mode):
* lisp/org/org-src.el (org-src-font-lock-fontify-block):
* lisp/org/org-clock.el (org-clock-get-clocktable): Use it.
* lisp/org/ox-org.el (org-org-publish-to-org): Use it.  Avoid using find-file
from Elisp.
* test/automated/ruby-mode-tests.el (ruby-assert-face): Use font-lock-ensure.
(ruby-interpolation-keeps-non-quote-syntax): Use syntax-propertize.
2014-05-28 23:45:29 -04:00
Michal Nazarewicz
fc21a7de3a * test/automated/tildify-tests.el: New file.
* lisp/textmodes/tildify.el (tildify-buffer, tildify-region):
Add dont-ask option.

Fixes: debbugs:17547
2014-05-27 21:00:44 -04:00
Stefan Monnier
c435f506a1 * test/indent/ps-mode.ps: New file.
* test/automated/core-elisp-tests.el
(core-elisp-test-window-configurations): New test.
* test/indent/octave.m: Add a few more tests.
* test/indent/ruby.rb: Add one more test.
2014-05-27 10:28:07 -04:00
Glenn Morris
86c72932a1 * package-test.el (package-test-install-single): Update for changed output. 2014-05-26 09:52:28 -07:00
Glenn Morris
015936fba1 Merge from emacs-24; up to 2014-05-26T10:21:18Z!rgm@gnu.org 2014-05-25 19:28:09 -07:00
Stefan Monnier
15ad4013c4 * lisp/emacs-lisp/nadvice.el (advice--member-p): Change second arg.
(advice-function-member-p): Tell it to check both names and functions.
(advice--add-function): Adjust call accordingly.

Fixes: debbugs:17531
2014-05-23 12:17:14 -04:00
Glenn Morris
ff965efb03 Tweak previous bytecomp-tests.el change
* test/automated/bytecomp-tests.el (test-byte-comp-compile-and-load):
Fix handling of temporary elc files.
2014-05-21 19:33:07 -07:00
Glenn Morris
f23423f322 Remove some stray test tempfiles
* test/automated/bytecomp-tests.el (test-byte-comp-compile-and-load):
Avoid leaving empty .elc tempfiles behind.
2014-05-21 21:16:37 -04:00
Glenn Morris
a7517f0fde * fns-tests.el (fns-tests-nreverse): Update for changed string behavior. 2014-05-21 21:09:51 -04:00
Dmitry Antipov
ddc30c996a * src/fns.c (Fnreverse): Allow vectors and bool vectors.
* doc/lispref/lists.texi (Building Cons Cells and Lists): Remove
description of `nreverse' and generalize it...
* doc/lispref/sequences.texi (Sequences): ...for sequences here.
* tests/automated/fns-tests.el (fns-tests-nreverse)
(fns-tests-nreverse-bool-vector): New tests.
2014-05-15 18:59:02 +04:00
Dmitry Antipov
92491099f7 * tests/automated/fns-tests.el: New file. 2014-05-15 14:06:45 +04:00
Glenn Morris
bbbabffe06 Merge from emacs-24; up to 2014-05-12T06:15:47Z!rgm@gnu.org 2014-05-11 23:59:30 -07:00
Stefan Monnier
5d03fb436f * lisp/emacs-lisp/nadvice.el: Support adding a given function multiple times.
(advice--member-p): If name is given, only compare the name.
(advice--remove-function): Don't stop at the first match.
(advice--normalize-place): New function.
(add-function, remove-function): Use it.
(advice--add-function): Pass the name, if any, to
advice--remove-function.
2014-05-10 16:07:01 -04:00
Glenn Morris
833737d71e * test/automated/vc-bzr.el: Tweak previous to use BZR_HOME rather than HOME 2014-05-08 00:23:40 -07:00
Glenn Morris
1b70208568 Fix comment typo in previous 2014-05-08 00:14:15 -07:00
Glenn Morris
aabbbc4579 Merge from emacs-24; up to 2014-05-08T06:58:46Z!rgm@gnu.org 2014-05-08 00:02:08 -07:00
Glenn Morris
b2a929a2e6 test/automated/vc-bzr.el: revise previous change
* test/automated/vc-bzr.el (vc-bzr-test-bug9726, vc-bzr-test-bug9781)
(vc-bzr-test-faulty-bzr-autoloads):
Give bzr a temporary home-directory, in case the real one is missing.
Simply disabling logging wasn't enough.
2014-05-07 23:58:46 -07:00
Glenn Morris
fb3f83f5fd Merge from emacs-24; up to 2014-05-08T03:34:20Z!rgm@gnu.org 2014-05-07 20:41:21 -07:00
Glenn Morris
606695a678 test/automated/vc-bzr.el: disable bzr's logging
This is for systems like hydra, where HOME can be read-only/absent.
See e.g. <http://hydra.nixos.org/build/10870893>.

* test/automated/vc-bzr.el (vc-bzr-test-bug9726, vc-bzr-test-bug9781)
(vc-bzr-test-faulty-bzr-autoloads): Disable bzr logging.
2014-05-07 20:34:20 -07:00
Dmitry Gutov
4dd3c4d53a * lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function):
Backtrack one char if the global/char-literal var matcher hits
inside a string.  The next char could be the beginning of an
expression expansion.

* test/automated/ruby-mode-tests.el
(ruby-interpolation-after-dollar-sign): New test.
2014-05-06 03:18:18 +04:00
Glenn Morris
6da8d06975 * lisp/help-fns.el (describe-function-1): Test for an autoload before a macro
since `macrop' works on autoloads. 

* test/automated/help-fns.el: New file.

Fixes: debbugs:17410
2014-05-05 17:33:07 -04:00
Barry O'Reilly
a7e1ffdc7e Fix ChangeLogs of 2014-05-01 commit. 2014-05-03 10:42:26 -04:00
Barry O'Reilly
4807c7eb90 Change algorithm used to adjust positions for undo in region
* simple.el (undo-make-selective-list): New algorithm fixes
incorrectness of position adjustments when undoing in region.
(Bug#17235)
(undo-elt-crosses-region): Make obsolete.
(undo-adjust-elt, undo-adjust-beg-end, undo-adjust-pos): New
functions to adjust positions using undo-deltas.
* automated/undo-tests.el (undo-test-region-deletion): New test to
demonstrate bug#17235.
(undo-test-region-example): New test to verify example given in
comments for undo-make-selective-list.

Fixes: debbugs:17325
2014-05-01 19:25:28 -04:00
Stefan Monnier
5ba339c7f4 * lisp/progmodes/perl-mode.el (perl--syntax-exp-intro-regexp): New var.
(perl-syntax-propertize-function): Use it.  Extend handling of
here-docs to the unquoted case.
2014-04-25 15:22:26 -04:00
Juanma Barranquero
dff4a9f6a4 Merge from emacs-24; up to 2014-04-25T10:35:01Z!michael.albinus@gmx.de 2014-04-25 18:11:07 +02:00
Michael Albinus
844465d6ca * automated/tramp-tests.el (top):
* automated/file-notify-tests.el (top): Do not disable interactive
passwords in batch mode.
(password-cache-expiry): Set to nil.
2014-04-25 12:35:01 +02:00
Michael Albinus
c0b9bc72cc Use a mock-up connection method for remote files.
* automated/file-notify-tests.el
(file-notify-test-remote-temporary-file-directory):
* automated/tramp-tests.el (tramp-test-temporary-file-directory):
Use a mock-up method as default.
(tramp-test00-availability): Print the used directory name.
(tramp-test33-recursive-load): Fix typo.
2014-04-24 10:21:58 +02:00
Stefan Monnier
c08684513a * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Slash after
&, |, +, - and * can't be a division.

Fixes: debbugs:17317
2014-04-22 21:56:18 -04:00
Paul Eggert
42e910349d Merge from emacs-24; up to 2014-04-22T20:19:17Z!eggert@cs.ucla.edu 2014-04-22 14:32:51 -07:00
Michael Albinus
d5ff4ded7a * automated/tramp-tests.el (tramp--test-check-files): Remove traces. 2014-04-22 12:52:08 +02:00
Michael Albinus
84b2095cba * automated/tramp-tests.el (tramp-test30-special-characters):
Remove test for backslash.
2014-04-22 09:50:58 +02:00
Daniel Colascione
12b1389c90 Correctly macroexpand top-level forms during eager macroexpand
* lisp/emacs-lisp/byte-run.el (eval-when-compile, eval-and-compile):
Improve docstrings.

* lisp/emacs-lisp/macroexp.el (internal-macroexpand-for-load): Add
`full-p' parameter; when nil, call `macroexpand' instead of
`macroexpand-all'.

* src/lread.c (readevalloop_eager_expand_eval): New function
that can recurse into toplevel forms.
(readevalloop): Call it.
* src/lisp.h: Declare Qprogn.
* src/callint.c (Qprogn): No longer static.

* test/automated/bytecomp-tests.el (test-byte-comp-compile-and-load):
Add compile flag.
(test-byte-comp-macro-expansion)
(test-byte-comp-macro-expansion-eval-and-compile)
(test-byte-comp-macro-expansion-eval-when-compile)
(test-byte-comp-macro-expand-lexical-override): Use it.
(test-eager-load-macro-expansion)
(test-eager-load-macro-expansion-eval-and-compile)
(test-eager-load-macro-expansion-eval-when-compile)
(test-eager-load-macro-expand-lexical-override): New tests.
2014-04-22 00:04:34 -07:00
Daniel Colascione
ba9b77fe20 Fix cl-lib-struct-accessors test again.
* test/automated/cl-lib.el (cl-lib-struct-accessors): Fix test to
account for removal of `cl-struct-set-slot-value'. Also, move
the defstruct to top level.
2014-04-21 23:45:41 -07:00
Daniel Colascione
66fda7948f Optimize cl-struct-slot-value; fix test
2014-04-22  Daniel Colascione  <dancol@dancol.org>

	* emacs-lisp/cl-macs.el
	(cl-struct-sequence-type,cl-struct-slot-info): Declare pure.
	(cl-struct-slot-value): Conditionally use aref or nth so that the
	compiler produces optimal code.

2014-04-22  Daniel Colascione  <dancol@dancol.org>

	* automated/cl-lib.el (cl-lib-struct-accessors): Fix test to
	account for removal of `cl-struct-set-slot-value'.
2014-04-21 20:51:12 -07:00
Stefan Monnier
622eef687c * lisp/emacs-lisp/cl-macs.el (cl--loop-let): Avoid `nil' as var name. 2014-04-21 17:18:12 -04:00
Daniel Colascione
985c035f2d Correctly treat progn contents as toplevel forms when byte compiling 2014-04-21 02:34:21 -07:00
Daniel Colascione
0c8d94555c Fix cl-the test 2014-04-20 18:28:55 -07:00
Daniel Colascione
2fa1b97db0 Fix cl-loop destructuring under `with' clause 2014-04-20 18:03:39 -07:00
Michael Albinus
f3a4812cf2 * automated/tramp-tests.el (tramp-test19-directory-files-and-attributes)
(tramp-test22-file-times): Check for `file-attributes' equality
only if there is a usable timestamp.
(tramp--test-check-files): Do not use `copy-sequence'.
2014-04-20 23:39:43 +02:00
Daniel Colascione
89a2e783c2 defstruct introspection 2014-04-19 19:34:22 -07:00
Michael Albinus
ca2e9fb306 Instrument `tramp--test-check-files' in order to get traces on hydra. 2014-04-19 23:05:30 +02:00
Daniel Colascione
6dfa19c50f Merge from emacs-24; up to 2014-04-17T02:05:48Z!eggert@cs.ucla.edu 2014-04-19 13:32:05 -07:00
Michael Albinus
5305137ad6 * automated/tramp-tests.el (tramp--test-check-files): Extend test.
(tramp-test31-utf8): Let-bind also `file-name-coding-system'.
2014-04-19 16:14:26 +02:00
Juanma Barranquero
bba633792b Merge from emacs-24; up to 2014-04-16T15:28:06Z!eggert@cs.ucla.edu 2014-04-19 01:36:51 +02:00
Michael Albinus
2a2e6726d1 * automated/tramp-tests.el (tramp-copy-size-limit): Set to nil.
(tramp--test-make-temp-name): Optional argument LOCAL.
(tramp--instrument-test-case): Show messages.  Catch also `quit'.
(tramp-test10-write-region): No special test for out-of-band copy
needed anymore.
(tramp-test11-copy-file, tramp-test12-rename-file)
(tramp-test21-file-links): Extend tests.
(tramp-test20-file-modes): More robust check for user "root".
(tramp--test-check-files): New defun.
(tramp-test30-special-characters, tramp-test33-recursive-load)
(tramp-test34-unload): New tests.
(tramp-test31-utf8, tramp-test32-asynchronous-requests):  Rename.
2014-04-18 20:58:13 +02:00
Paul Eggert
290d7ac277 Merge from emacs-24; up to 2014-04-16T15:28:26Z!monnier@iro.umontreal.ca 2014-04-16 12:43:46 -07:00
Stefan Monnier
b262bde327 * lisp/nxml/nxml-mode.el (nxml-fontify-matcher): Make sure propertization
was done.
* lisp/nxml/xmltok.el (xmltok-scan-after-comment-open): Extend unclosed
comment to EOB.

Fixes: debbugs:17264
2014-04-16 11:28:26 -04:00
Glenn Morris
e088b01d29 Avoid EMACSDATA in user environment interfering with building
* admin/grammars/Makefile.in (EMACSDATA, EMACSDOC, EMACSPATH):
* leim/Makefile.in (EMACSDATA, EMACSDOC, EMACSPATH):
* lisp/Makefile.in (EMACSDATA, EMACSDOC, EMACSPATH):
* test/automated/Makefile.in (EMACSDATA, EMACSDOC, EMACSPATH):
Unexport.

Fixes: debbugs:16429
2014-04-10 23:51:49 -07:00
Glenn Morris
536aa46681 Merge from emacs-24; up to 2014-04-04T23:31:02Z!joaotavora@gmail.com 2014-04-10 23:43:20 -07:00
Paul Eggert
10ee3b3f17 Spelling fixes.
* automated/electric-tests.el: Fix spelling error in test name.
(whitespace-skipping-for-quotes-not-outside):
Rename from whitespace-skipping-for-quotes-not-ouside.
2014-04-10 12:12:34 -07:00
Feng Li
39764caa7f * lisp/progmodes/pascal.el (pascal-font-lock-keywords): Fix incorrect format
entry; use symbol boundaries to avoid mis-matches.
2014-04-10 09:56:28 -04:00
Daniel Colascione
3f63a9f7de Make up-list and backward-up-list get out of more spots 2014-04-09 09:58:08 -07:00
Glenn Morris
559836fbcc Merge from emacs-24; up to 2014-04-02T16:17:08Z!dmantipov@yandex.ru 2014-04-08 20:37:56 -07:00
Glenn Morris
50c9a9b8a8 Fix python-triple-quote-pairing test
* test/automated/python-tests.el (python-triple-quote-pairing):
Enable/disable electric-pair-mode as needed.
2014-04-08 21:50:29 -04:00
Glenn Morris
3b7fab2504 * electric-tests.el (electric-pair-backspace-1): Replace deleted function. 2014-04-08 21:34:16 -04:00
Glenn Morris
6f287c898a ChangeLog fixes
Merged entries get today's date.
May as well combine consecutive separate entries by same author into one.
Backported entries should not appear twice.
2014-04-07 17:19:31 -04:00
Glenn Morris
c17a8019bf ChangeLog fix (no need to merge to trunk) 2014-04-07 17:15:45 -04:00
Daniel Colascione
7e31acf6b8 Merge from emacs-24; up to 2014-04-01T20:18:12Z!eggert@cs.ucla.edu 2014-04-07 13:54:16 -07:00
João Távora
190f899aed Improve on previous quote autopairing change
Backported from trunk 2014-04-04T23:31:02Z!joaotavora@gmail.com

* lisp/elec-pair.el:
(electric-pair--syntax-ppss): When inside comments parse from
comment beginning.
(electric-pair--balance-info): Fix typo in comment.
(electric-pair--in-unterminated-string-p): Delete.
(electric-pair--unbalanced-strings-p): New function.
(electric-pair-string-bound-function): New var.
(electric-pair-inhibit-if-helps-balance): Decide quote pairing
according to `electric-pair--in-unterminated-string-p'

* test/automated/electric-tests.el (define-electric-pair-test): Don't
overtest..
(inhibit-in-mismatched-string-inside-ruby-comments): New test.
(inhibit-in-mismatched-string-inside-c-comments): New test.
2014-04-07 08:29:50 +01:00
João Távora
528c33b528 Inhibit quote autopairing more frequently
Backported from trunk 2014-04-02T09:59:06Z!joaotavora@gmail.com

* lisp/elec-pair.el (electric-pair-inhibit-if-helps-balance): Inhibit
quote pairing if point-max is inside an unterminated string.
(electric-pair--looking-at-unterminated-string-p):
Delete.
(electric-pair--in-unterminated-string-p): New function.

* test/automated/electric-tests.el (inhibit-if-strings-mismatched):
New test, change from `inhibit-only-of-next-is-mismatched'.
2014-04-07 08:24:03 +01:00
João Távora
7aecc2f6ca Fix triple-quoting electricity in python-mode
* lisp/progmodes/python.el (python-electric-pair-string-delimiter): Fix
triple-quoting electricity. 

* test/automated/python-tests.el (python-triple-quote-pairing): New test.
(python-syntax-after-python-backspace): New test.

Fixes: debbugs:17192
2014-04-07 00:23:45 +01:00
João Távora
89f20f76d8 Fix electric-pair-skip-whitespace with quotes in text-mode
* lisp/elec-pair.el (electric-pair-post-self-insert-function): Don't
skip whitespace for quote syntax when `electric-pair-text-pairs'
and `electric-pair-pairs' were used.

* test/automated/electric-tests.el (electric-pair-define-test-form):
More readable test docstrings.
(whitespace-skipping-for-quotes-not-ouside)
(whitespace-skipping-for-quotes-only-inside)
(whitespace-skipping-not-without-proper-syntax):

Fixes: debbugs:17183
2014-04-07 00:09:19 +01:00
João Távora
5cb0cc903f Improve on previous quote autopairing change
* lisp/elec-pair.el:
(electric-pair--syntax-ppss): When inside comments parse from
comment beginning.
(electric-pair--balance-info): Fix typo in comment.
(electric-pair--in-unterminated-string-p): Delete.
(electric-pair--unbalanced-strings-p): New function.
(electric-pair-string-bound-function): New var.
(electric-pair-inhibit-if-helps-balance): Decide quote pairing
according to `electric-pair--in-unterminated-string-p'

* test/automated/electric-tests.el (define-electric-pair-test): Don't
overtest..
(inhibit-in-mismatched-string-inside-ruby-comments): New test.
(inhibit-in-mismatched-string-inside-c-comments): New test.
2014-04-05 00:31:02 +01:00
Stefan Monnier
062e286b7c * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Handle $'
used as a variable.

Fixes: debbugs:17174
2014-04-02 20:41:09 -04:00
João Távora
200c532bd0 Inhibit quote autopairing more frequently
* lisp/elec-pair.el (electric-pair-inhibit-if-helps-balance): Inhibit
quote pairing if point-max is inside an unterminated string.
(electric-pair--looking-at-unterminated-string-p):
Delete.
(electric-pair--in-unterminated-string-p): New function.

* test/automated/electric-tests.el (inhibit-if-strings-mismatched):
New test, change from `inhibit-only-of-next-is-mismatched'.
2014-04-02 10:59:06 +01:00
Juanma Barranquero
1e757eb0a5 Merge from emacs-24; up to 2014-03-24T03:06:35Z!dancol@dancol.org 2014-03-27 18:34:22 +01:00
Dmitry Gutov
42ebc34ea8 Fix bug#17097
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function):
Don't propertize `?' or `!' as symbol constituent when after
colon.
2014-03-27 08:53:13 +02:00
Juanma Barranquero
16adf2e6eb Merge from emacs-24; up to 2014-03-23T23:14:52Z!yamaoka@jpl.org 2014-03-26 16:57:13 +01:00
Michael Albinus
c7d0e04c9d Fix last ChangeLog entry. 2014-03-25 08:34:30 +01:00
Barry O'Reilly
37ea8275f7 Undo in region after markers in undo history relocated
* simple.el (primitive-undo): Only process marker adjustments
validated against their corresponding (TEXT . POS).  Issue warning
for lone marker adjustments in undo history.  (Bug#16818)
(undo-make-selective-list): Add marker adjustments to selective
undo list based on whether their corresponding (TEXT . POS) is in
the region.  Remove variable adjusted-markers, which was unused
and only non nil during undo-make-selective-list.
(undo-elt-in-region): Return nil when passed a marker adjustment
and explain in function doc.

Have (MARKER . ADJUSTMENT) undo records always be immediately
after their corresponding (TEXT . POS) record in undo list.
(Bug#16818)
* lisp.h (record-delete): New arg record_markers.
(record_marker_adjustment): No longer needed outside undo.c.
* insdel.c (adjust_markers_for_delete): Move calculation of marker
adjustments to undo.c's record_marker_adjustments.  Note that
fileio.c's decide_coding_unwind is another caller to
adjust_markers_for_delete.  Because it has undo list bound to t,
it does not rely on adjust_markers_for_delete to record marker
adjustments.
(del_range_2): Swap call to record_delete and
adjust_markers_for_delete so as undo marker adjustments are
recorded before current deletion's adjustments, as before.
(adjust_after_replace):
(replace_range): Pass value for new record_markers arg to
delete_record.
* undo.c (record_marker_adjustment): Renamed to
record_marker_adjustments and made static.
(record_delete): Check record_markers arg and call
record_marker_adjustments.
(record_change): Pass value for new record_markers arg to
delete_record.
(record_point): at_boundary calculation no longer needs to account
for marker adjustments.

* undo-tests.el (undo-test-marker-adjustment-nominal):
(undo-test-region-t-marker): New tests of marker adjustments.
(undo-test-marker-adjustment-moved):
(undo-test-region-mark-adjustment): New tests to demonstrate
bug#16818, which fail without the fix.

* markers.texi (Moving Marker Positions): The 2014-03-02 doc
change mentioning undo's inability to handle relocated markers no
longer applies.  See bug#16818.
* text.texi (Undo): Expand documentation of (TEXT . POS) and
(MARKER . ADJUSTMENT) undo elements.
2014-03-24 22:47:39 -04:00