aboutsummaryrefslogtreecommitdiffstats
path: root/test (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Use lexical-binding in paragraphs.el and add testsStefan Kangas2019-06-011-0/+165
| | | | | | | | | | | | | | | | | | * lisp/textmodes/paragraphs.el: Use lexical-binding. (repunctuate-sentences): Make it work non-interactively. * test/lisp/textmodes/paragraphs-tests.el: New file.
* | | Fix `cl-member' and `cl-assoc' for bignumsMattias Engdegård2019-06-011-0/+8
| | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-seq.el (cl-member, cl-assoc): Work with bignums. * test/lisp/emacs-lisp/cl-seq-tests.el (cl-seq-bignum-eql): New.
* | | Merge from origin/emacs-26Glenn Morris2019-06-012-6/+36
|\ \ \ | |/ / | | | | | | | | | | | | 134edc1 Warn about wrong number of args for subrs (Bug#35767) 5f01af6 Use plain symbols for eieio type descriptors (Bug#29220) 4b24b01 Pacify GCC 9 -Wredundant-decls
| * | Warn about wrong number of args for subrs (Bug#35767)Noam Postavsky2019-05-301-0/+14
| | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-callargs-warn): Don't assume byte-compile-fdefinition will return non-nil. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-warn-wrong-args) (bytecomp-warn-wrong-args-subr): New tests.
| * | Use plain symbols for eieio type descriptors (Bug#29220)Noam Postavsky2019-05-301-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Emacs 26, eieio objects use a class record (with circular references) as the type descriptor of the object record. This causes problems when reading back an object from a string, because the class record is not `eq' to the canonical one (which means that read objects don't satisfy the foo-p predicate). * lisp/emacs-lisp/eieio.el (make-instance): As a (partial) fix, set the record's type descriptor to a plain symbol for the type descriptor when eieio-backward-compatibility is non-nil (the default). * lisp/emacs-lisp/eieio-core.el (eieio--object-class): Call eieio--class-object on the type tag when eieio-backward-compatibility is non-nil. (eieio-object-p): Use eieio--object-class instead of eieio--object-class-tag. * test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el (eieio-test-persist-hash-and-vector) (eieio-test-persist-interior-lists): Make into functions. (eieio-persist-hash-and-vector-backward-compatibility) (eieio-persist-hash-and-vector-no-backward-compatibility) (eieio-test-persist-interior-lists-backward-compatibility) (eieio-test-persist-interior-lists-no-backward-compatibility): New tests which call them, eieio-backward-compatibility let-bound.
* | | Use lexical-binding in page.el and add testsSimen Heggestøyl2019-06-011-0/+86
| | | | | | | | | | | | | | | | | | | | | * lisp/textmodes/page.el: Use lexical-binding. (forward-page): Replace `(if x nil y)' with `(unless x y)'. * test/lisp/textmodes/page-tests.el: New file with tests for page.el.
* | | Use lexical-binding in timezone.el and add testsStefan Kangas2019-06-011-0/+169
| | | | | | | | | | | | | | | * lisp/timezone.el: Use lexical-binding. * test/lisp/timezone-tests.el: New file.
* | | Use lexical-binding in autoinsert.el and add testsSimen Heggestøyl2019-05-311-0/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/autoinsert.el: Use lexical-binding. Remove redundant :group args. (auto-insert): Simplify. * test/lisp/autoinsert-tests.el: New file with tests for autoinsert.el.
* | | Fix `memql' for bignumsMattias Engdegård2019-05-301-1/+2
| | | | | | | | | | | | | | | * src/fns.c (Fmemql): Make `memql' work for bignums. * test/src/fns-tests.el (test-bignum-eql): Also test `memql'.
* | | * lisp/subr.el (add-hook): Turn `append` into `depth` (bug#35508)Stefan Monnier2019-05-291-3/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to control the relative ordering of functions on hooks by specifying `depth` in the same was as was possible with `add-function`. * lisp/electric.el (electric--sort-post-self-insertion-hook): Delete function. (electric-indent-mode, electric-layout-mode, electric-quote-mode): * lisp/elec-pair.el (electric-pair-mode): Use new `depth` arg instead of electric--sort-post-self-insertion-hook. * lisp/emacs-lisp/syntax.el (syntax-propertize, syntax-ppss): Use new `depth` arg to make sure noone accidentally gets added after syntax-ppss-flush-cache. * doc/lispref/modes.texi (Setting Hooks): Document new `depth` arg. * test/lisp/subr-tests.el (subr-tests-add-hook-depth): New test.
* | | Use lexical-binding in makesum.el and add testsSimen Heggestøyl2019-05-291-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/makesum.el: Use lexical-binding. (make-command-summary): Replace `if..progn' with `when'. (double-column): Add docstring and apply trivial simplifications. * test/lisp/makesum-tests.el: New file with tests for makesum.el.
* | | * lisp/international/mule-cmds.el (encode-coding-char): Fix ASCII caseStefan Monnier2019-05-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't bother with string-as-multibyte since `string` already returns multibyte when needed. Don't forget to encode when the string is ASCII, e.g. for ebcdic case and to make sure we always return a unibyte string. * test/lisp/international/mule-tests.el (mule-cmds-tests--encode-ebcdic): New test.
* | | * test/lisp/autorevert-tests.el: Give on on remote hydra.nixos tests.Glenn Morris2019-05-271-3/+1
| | | | | | | | | | | | (auto-revert--test-enabled-remote): Disable on hydra.nixos.
* | | * test/lisp/autorevert-tests.el: Try to fix remote hydra.nixos tests.Glenn Morris2019-05-271-0/+3
| | |
* | | Correctly eliminate duplicate cases in switch compilationMattias Engdegård2019-05-271-1/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix code mistakes that prevented the correct elimination of duplicated cases when compiling a `cond' form to a switch bytecode, as in (cond ((eq x 'a) 1) ((eq x 'b) 2) ((eq x 'a) 3) ; should be elided ((eq x 'c) 4)) Sometimes, this caused the bytecode to use the wrong branch (bug#35770). * lisp/emacs-lisp/bytecomp.el (byte-compile-cond-vars): Return obj2 eval'ed. (byte-compile-cond-jump-table-info): Discard redundant condition. Use `obj2' as evaluated. Discard duplicated cases instead of failing the table generation. * test/lisp/emacs-lisp/bytecomp-tests.el (toplevel): Require subr-x. (byte-opt-testsuite-arith-data, bytecomp-test--switch-duplicates): Test.
* | | ; Fix read-multiple-choice testNoam Postavsky2019-05-261-1/+1
| | | | | | | | | | | | | | | | | | * test/lisp/emacs-lisp/rmc-tests.el (test-read-multiple-choice): Rebind read-event, read-multiple-choice uses that since 2019-05-26 "Avoid infloop in read-multiple-choice (Bug#32257)".
* | | Tweak recent additions in tabify-tests.elBasil L. Contovounesios2019-05-261-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/tabify-tests.el (tabify-tests--test-changes): Rename third argument to avoid "lexical argument shadows dynamic variable" warnings. Use mapconcat in place of mapcar+concat. (tabify-tests-untabify, tabify-tests-tabify): Quote function symbols as such.
* | | Use lexical-binding in paren.el and add testsSimen Heggestøyl2019-05-261-0/+121
| | | | | | | | | | | | | | | | | | | | | * lisp/paren.el: Use lexical-binding. (show-paren--default): Use imperative form in doc-string. * test/lisp/paren-tests.el: New file with tests for paren.el.
* | | Update author/maintainer infoPaul Eggert2019-05-2621-21/+21
| | | | | | | | | | | | | | | Update email addresses and fix spellings of some author and maintainer names.
* | | Remove Maintainer: when it duplicates Author:Paul Eggert2019-05-261-1/+0
| | | | | | | | | | | | | | | | | | | | | The convention is that a file with Author: but not Maintainer: means the author is a maintainer, which makes it confusing when a file lists the same person as author and maintainer. Avoid the confusion by removing the duplicate Maintainer: line.
* | | Use lexical-binding in tabify.el and add testsStefan Kangas2019-05-251-0/+79
| | | | | | | | | | | | | | | * lisp/tabify.el: Use lexical-binding. * test/lisp/tabify-tests.el: New file.
* | | Go back to "Maintainer: emacs-devel@gnu.org"Paul Eggert2019-05-2515-0/+20
| | | | | | | | | | | | | | | | | | Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is no special maintainer for a file. Although this wasn't documented it was common practice and removing the lines didn't have consensus.
* | | Add "Enter Auth" prompt handling for OpenVPN (Bug#35724)Matthew Bauer2019-05-241-0/+1
| | | | | | | | | | | | | | | * lisp/comint.el (comint-password-prompt-regexp): Allow "Enter Auth" at the beginning.
* | | * lisp/textmodes/sgml-mode.el: Fix lone `>` in sgml textStefan Monnier2019-05-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (sgml--syntax-propertize-ppss):New variable and function. (sgml-syntax-propertize-rules): Use it. Don't ignore quotes not followed by a matching quote or a '>' or '<'. (sgml-syntax-propertize): Set up sgml--syntax-propertize-ppss. * test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax): Add test for lone '>'.
* | | Use lexical-binding in tempo.el and add testsFederico Tedin2019-05-211-0/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For discussion, see the following thread: https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00395.html * lisp/tempo.el: Use lexical-binding. (tempo-define-template): Expand documentation to mention `tempo-user-elements'. (tempo-local-tags, tempo-collection, tempo-dirty-collection) (tempo-marks, tempo-match-finder): Define with defvar-local. (tempo-named-insertions, tempo-region-start, tempo-region-stop): Make them automatically buffer-local. * test/lisp/tempo-tests.el: Add tests for tempo.el.
* | | Allow zero-argument rx `or' and `seq' formsMattias Engdegård2019-05-201-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the rx `or' and `seq' forms accept zero arguments to produce a never-matching regexp and an empty string, respectively. * lisp/emacs-lisp/rx.el: Require cl-extra. (rx-constituents, rx-or): Permit zero args. (rx): Amend doc string for `or' and `seq'. * test/lisp/emacs-lisp/rx-tests.el (rx-or, rx-seq): Test the change. * etc/NEWS (Changes in Specialized Modes and Packages): Mention the change.
* | | Revert "Allow zero-argument rx `or' and `seq' forms"Mattias Engdegård2019-05-201-7/+1
| | | | | | | | | | | | | | | This reverts commit b552fc05c231ca6800330a318d3a74ddd0f5a13c. It caused a bootstrapping failure which I have yet to resolve - sorry.
* | | Use lexical-binding in delim-col.el and add testsStefan Kangas2019-05-201-0/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to Basil L. Contovounesios for additional cleanups. For discussion, see the following thread: https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00177.html * lisp/delim-col.el: Use lexical-binding. * test/lisp/delim-col-tests.el: New file. (delim-col-tests-delimit-colummns-before-after) (delim-col-tests-delimit-columns) (delim-col-tests-delimit-columns-format/nil) (delim-col-tests-delimit-columns-format/padding) (delim-col-tests-delimit-columns-format/separator) (delim-col-tests-delimit-columns-separator) (delim-col-tests-delimit-columns-str-before-after) (delim-col-tests-delimit-columns-str-separator) (delim-col-tests-delimit-rectangle): New unit tests.
* | | Allow zero-argument rx `or' and `seq' formsMattias Engdegård2019-05-201-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the rx `or' and `seq' forms accept zero arguments to produce a never-matching regexp and an empty string, respectively. * lisp/emacs-lisp/rx.el (rx-constituents, rx-or): Permit zero args. (rx): Amend doc string for `or' and `seq'. * test/lisp/emacs-lisp/rx-tests.el (rx-or, rx-seq): Test the change. * etc/NEWS (Changes in Specialized Modes and Packages): Mention the change.
* | | Avoid polling in global-auto-revert-mode (bug#35418)Mattias Engdegård2019-05-201-1/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make `auto-revert-avoid-polling' have effect in global-auto-revert-mode. Buffers actually handled by that mode are marked with a non-nil value of `auto-revert--global-mode'. When global-auto-revert-mode is entered, eligible buffers are marked in that way, and hooks are set up to mark new buffers and take care of buffers whose file names change. This way the existing poll-avoidance logic can be used, since the entire set of buffers in auto-revert is known. A new hook, `after-set-visited-file-name-hook', was added to handle the case when the file name of a tracked buffer changes. * lisp/autorevert.el (auto-revert-avoid-polling): Amend doc string. (auto-revert--global-mode): New buffer-local variable. (global-auto-revert-mode): Mark existing buffers and set up hooks when mode is entered; do the opposite when exited. (auto-revert--global-add-current-buffer) (auto-revert--global-adopt-current-buffer) (auto-revert--set-visited-file-name-advice): New functions. (auto-revert--polled-buffers, auto-revert--need-polling-p) (auto-revert-notify-handler) (auto-revert-active-p): Modify logic to cover global-auto-revert-mode. * lisp/files.el (after-set-visited-file-name-hook): New hook. (set-visited-file-name-hook): Call new hook. * test/lisp/autorevert-tests.el (top): Use lexical-binding. (auto-revert-test--write-file, auto-revert-test--buffer-string) (auto-revert-test--wait-for, auto-revert-test--wait-for-buffer-text) (auto-revert-test05-global-notify): New test. * doc/lispref/hooks.texi (Standard Hooks): Mention new hook (in a comment, since it's unclear whether it should actually be documented here) * etc/NEWS (Changes in Specialized Modes and Packages): Update entry.
* | | Fix problems in autorevert-testsMichael Albinus2019-05-201-2/+3
| | | | | | | | | | | | | | | | | | | | | * test/lisp/autorevert-tests.el (auto-revert--deftest-remote): Fix typo. (auto-revert-test02-auto-revert-deleted-file): On emba, there are no stopped events.
* | | Fixes for "Maintainer:" and related linesPaul Eggert2019-05-1915-20/+0
| | | | | | | | | | | | | | | | | | Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines, which are not that useful. It also cleans up and regularizes a few similar lines.
* | | ; Instrument autorevert-testsMichael Albinus2019-05-191-1/+3
| | |
* | | * test/lisp/autorevert-tests.el (auto-revert--deftest-remote):Michael Albinus2019-05-191-3/+1
| | | | | | | | | | | | Do not handle errors.
* | | For SVG, 8192 is the new 256Paul Eggert2019-05-181-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prefer librsvg for display of splash.svg When both librsvg and Imagemagick are available, Emacs should prefer librsvg to render SVG images. However, Emacs was using Imagemagick to render its own splash.svg file because image-type-from-file-header returned nil for that file. * lisp/image.el (image-type-from-buffer) (image-type-from-file-header): Look at the first 8192 bytes of the image, not just the first 256. For Emacs’s own splash.svg file, image-type-header-regexps needs to look at 939 bytes. 8192 bytes is a reasonable number nowadays given typical file system design. * test/lisp/image-tests.el (image-tests--emacs-images-directory): New contant. (image-type-from-file-header-test): New test.
* | | Suppress compiler warnings for older Emacsen in tramp-tests.elMichael Albinus2019-05-181-28/+36
| | | | | | | | | | | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test17-insert-directory): Add error name to test. (tramp-test30-make-process, tramp-test45-unload): Suppress compiler warnings from older Emacsen.
* | | * cl-macs-tests.el (cl-macs-test--symbol-macrolet): New testStefan Monnier2019-05-161-0/+17
| | |
* | | * lisp/textmodes/sgml-mode.el (sgml-syntax-propertize-rules): Fix typoStefan Monnier2019-05-151-0/+7
| | | | | | | | | | | | | | | * test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax): New corresponding test.
* | | Merge from origin/emacs-26Glenn Morris2019-05-142-1/+82
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 02bee78 Let dir locals for more specific modes override those from less b1235f9 Improve documentation of Hexl mode 32d1813 Fix description of (move-to-column <n> t) when column <n> is ... 0397b7c ; Fix smtpmail-stream-type docstring 7dab3ee Recognize single quote attribute values in nxml and sgml (Bug... e4cde42 Disable extra display of &#10; in nxml-mode (Bug#32897) ca14dd1 Fix nxml-get-inside (Bug#32003) e7ab351 Fix positioning client buffer as instructed by emacsclient # Conflicts: # lisp/files.el # lisp/textmodes/sgml-mode.el
| * | Recognize single quote attribute values in nxml and sgml (Bug#35381)Noam Postavsky2019-05-092-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/textmodes/sgml-mode.el (sgml-specials): Add single quote. (sgml-syntax-propertize-rules): Handle single quote. * test/lisp/nxml/nxml-mode-tests.el (nxml-mode-font-lock-quotes): New test. * test/lisp/textmodes/sgml-mode-tests.el (sgml-delete-tag-bug-8203-should-not-delete-apostrophe): Now passes.
| * | Fix nxml-get-inside (Bug#32003)Noam Postavsky2019-05-091-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change from 2016-01-16 "lisp/nxml: Use syntax-tables for comments" made nxml-get-inside return non-nil for any string or comment, including attribute strings. This caused incorrect and therefore indentation. * lisp/nxml/nxml-rap.el: Update commentary to reflect changes to nxml-mode parsing. (nxml-get-inside): Only return non-nil when inside comments and generic strings, not normal quote-delimited strings. * test/lisp/nxml/nxml-mode-tests.el: New tests.
* | | Stop splicing anonymous faces in font-lock-append-text-propertyKévin Le Gouguec2019-05-131-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the same fix as 2019-04-29 "Refrain from splicing anonymous faces in text properties", which was only applied to font-lock-prepend-text-property. * lisp/font-lock.el (font-lock-append-text-property): Distinguish list of faces from property list. * test/lisp/font-lock-tests.el: New test suite. (Bug#35476)
* | | * test/lisp/net/tramp-tests.el (cl-lib): Require instead of cl-seq.Michael Albinus2019-05-091-1/+1
| | |
* | | Merge from origin/emacs-26Glenn Morris2019-05-081-2/+54
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | 1c6484e (origin/emacs-26) Fix incorrect cloning of eieio-instance-inh... 37436fe Fix cloning of eieio-named objects (Bug#22840) fb65a36 Fix ibuffer-unmark-backward synopsis (bug#35572) f77bd2b ; * src/lisp.h (DEFSYM): Fix inaccurate comment. 3b86e0b Clarify handling of long options (Bug#24949) 04340a8 Improve documentation of the daemon and emacsclient 3e29de2 * etc/NEWS.24: Belatedly announce delete-consecutive-dups.
| * | Fix incorrect cloning of eieio-instance-inheritor objects (Bug#34840)Vitalie Spinu2019-05-081-0/+41
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/eieio-base.el (clone): Unbound slots of eieio-instance-inheritor objects as documented in the docs string and implemented in the original eieio implementation.
| * | Fix cloning of eieio-named objects (Bug#22840)Vitalie Spinu2019-05-071-2/+13
| | | | | | | | | | | | | | | * lisp/emacs-lisp/eieio-base.el (clone): Correctly set the name of the cloned objects from eieio-named instances.
* | | ; Instrument auto-revert--deftest-remoteMichael Albinus2019-05-081-1/+3
| | |
* | | Skip tramp-test10-write-region-file-precious-flag for Emacs < 27Michael Albinus2019-05-081-0/+3
| | | | | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test10-write-region-file-precious-flag): Skip for Emacs < 27.
* | | Don't rewrite buffer contents after saving by rename (Bug#35497)Jonathan Tomer2019-05-082-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/files.el (basic-save-buffer-2): Don't rewrite file contents after saving-by-renaming. (Bug#35497) * test/lisp/files-tests.el (files-tests-dont-rewrite-precious-files): * test/lisp/net/tramp-tests.el (tramp-test10-write-region-file-precious-flag): Regression tests for this change.
* | | Fix setting and resetting of scroll-with-deleteJohn Shahid2019-05-071-1/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The start and end lines of the scroll region must to be in the range [0,term-height). There are few placees that incorrectly set the end line of the scroll region to term-height which is outside the valid range. Combined with another off-by-one error in term-set-scroll-region's clamping logic, this would cause term-scroll-with-delete to be unnecessarily turned on. * lisp/term.el (term-scroll-start,term-scroll-end): Use defvar-local to define the variables and document the valid range of values that the variables can take. (term--last-line): New function to calculate the 0-based index of the last line. (term--reset-scroll-region): New function to reset the scroll region to the full height of the terminal. (term-mode,term-reset-size,term-reset-terminal): Call term--reset-scroll-region to reset the scroll region. (term-set-scroll-region): Fix the off-by-one error in the clamping logic which allowed term-scroll-end to have values outside the valid range [0,term-height).