summaryrefslogtreecommitdiff
path: root/test/lisp
Commit message (Collapse)AuthorAgeFilesLines
* Add 'seq-keep'Lars Ingebrigtsen2022-10-041-0/+6
| | | | | * doc/lispref/sequences.texi (Sequence Functions): Document it. * lisp/emacs-lisp/seq.el (seq-keep): New function (bug#58278).
* ; Fix two wallpaper testsStefan Kangas2022-10-011-4/+4
| | | | | | * test/lisp/image/wallpaper-tests.el (wallpaper--find-command/return-string) (wallpaper--find-command-args/return-list): Fix tests.
* Rename osc.el to ansi-osc.el (bug#58200)Matthias Meulien2022-10-011-6/+6
| | | | | | | * lisp/osc.el: Move from here... * lisp/ansi-osc.el: ...to here. * test/lisp/osc-tests.el: Move from here... * test/lisp/ansi-osc-tests.el: ...to here.
* Make format-spec accept function substitutionsStefan Kangas2022-09-291-0/+11
| | | | | | | | | * lisp/format-spec.el (format-spec): Accept a function producing the substitution for a character. * doc/lispref/strings.texi (Custom Format Strings): Document the above change. * test/lisp/format-spec-tests.el (format-spec/function): New test. Ref. https://lists.gnu.org/r/emacs-devel/2022-09/msg01875.html
* ; Fix typos (prefer American spelling)Stefan Kangas2022-09-291-1/+1
|
* ; Fix typosStefan Kangas2022-09-281-1/+1
|
* ; image-dired: Fix last changeStefan Kangas2022-09-281-2/+2
| | | | | | | * test/lisp/image/image-dired-util-tests.el (image-dired-thumb-name/per-directory): * lisp/image/image-dired-util.el (image-dired-thumb-name): Fix last change.
* image-dired: End thumbnail file names with ".jpg"Stefan Kangas2022-09-281-2/+5
| | | | | | | | | | * lisp/image/image-dired-util.el (image-dired-thumb-name): Always end thumbnail name in ".jpg" and simplify naming to just use the SHA-1 hash. (Bug#57961) * test/lisp/image/image-dired-util-tests.el (image-dired-thumb-name/image-dired): Adjust test for the above change. * etc/NEWS: Announce the above change.
* ; whitespace: Add test case for read-only buffers (bug#58082)Richard Hansen2022-09-271-2/+19
|
* Fix setting the wallpaper in XFCEStefan Kangas2022-09-261-0/+29
| | | | | | | | | | | | | | | * lisp/image/wallpaper.el (wallpaper-command-args) (wallpaper-default-set-function): Support new format specifiers %S for screen, %W for workspace, and %M for monitor. (wallpaper--default-setters): Use above new specifiers for XFCE. (wallpaper--format-arg): New defun broken out from... (wallpaper-default-set-function): ...here. (wallpaper--get-height-or-width): Support noninteractive use. * test/lisp/image/wallpaper-tests.el (wallpaper--format-arg/filename) (wallpaper--format-arg/filename-hex) (wallpaper--format-arg/width, wallpaper--format-arg/screen) (wallpaper--format-arg/monitor, wallpaper--format-arg/workspace): New tests.
* Rewrite wallpaper.el to use a cl-defstructStefan Kangas2022-09-261-0/+11
| | | | | | | | | | | | | | | | | | * lisp/image/wallpaper.el (wallpaper--default-commands): Delete variable. (wallpaper-setter): New cl-defstruct. (wallpaper--default-methods-create): New macro. (wallpaper--default-setters): (wallpaper--current-setter): New variables. (wallpaper--find-setter): New defun to pick a wallpaper-setter. (wallpaper--find-command, wallpaper--find-command-args): Use 'wallpaper--find-setter'. (wallpaper-command): Doc fix. * test/lisp/image/wallpaper-tests.el (wallpaper--find-command/return-string) (wallpaper--find-command-args/return-list) (wallpaper--image-file-regexp/return-string): New tests.
* Add reasonable default to wallpaper-setStefan Kangas2022-09-251-0/+46
| | | | | | | | * lisp/image/wallpaper.el (wallpaper-default-file-name-regexp): New variable. (wallpaper--get-default-file): New function. (wallpaper-set): Use above new function to set a default. * test/lisp/image/wallpaper-tests.el: New file.
* Make image-dired-thumb-name more portableStefan Kangas2022-09-251-0/+14
| | | | | | | | | * lisp/image/image-dired-util.el (image-dired-thumb-name): Create file names in a portable manner. * test/lisp/image/image-dired-util-tests.el (image-dired-thumb-name/standard) (image-dired-thumb-name/image-dired) (image-dired-thumb-name/per-directory): Expand tests.
* hideshow.el: Improve hs-toggle-hiding behaviorkobarity2022-09-241-0/+106
| | | | | | | | | | | | | | | | | * lisp/progmodes/hideshow.el (hs-find-block-beginning-match): New function to be used in `hs-already-hidden-p'. (hs-already-hidden-p): Add check if beginning of line is inside a block. (hs-toggle-hiding): Don't change to selected-window's buffer when event arg is absent. * test/lisp/progmodes/hideshow-tests.el (hideshow-tests-with-temp-buffer-selected): New helper macro. (hideshow-tests-make-event-at): New helper function. (hideshow-already-hidden-p-1): New test. (hideshow-toggle-hiding-1): New test. (hideshow-mouse-toggle-hiding-1): New test (bug#52092).
* Move thumbs.el to lisp/obsoleteStefan Kangas2022-09-241-0/+0
| | | | | | | * lisp/thumbs.el: * test/lisp/thumbs-tests.el: Move from here... * lisp/obsolete/thumbs.el: * test/lisp/obsolete/thumbs-tests.el: ...to here. (Bug#57779)
* cconv.el: Fix interactive closure bug#51695Stefan Monnier2022-09-231-0/+10
| | | | | | | | | | | | | | | | | | | | Make cconv.el detect when a closure's interactive form needs to capture variables from the context and tweak the code accordingly if so. * lisp/emacs-lisp/cconv.el (cconv--interactive-form-funs): New var. (cconv-convert): Handle the case where the interactive form captures vars from the surrounding context. Remove left over handling of `declare` which was already removed from the cconv-analyze` phase. (cconv-analyze-form): Adjust analysis of interactive forms accordingly. * lisp/emacs-lisp/oclosure.el (cconv--interactive-helper): New type and function. * lisp/simple.el (function-documentation, oclosure-interactive-form): Add methods for it. * test/lisp/emacs-lisp/cconv-tests.el (cconv-tests-interactive-closure-bug51695): New test.
* Fix syntax check in python-info-looking-at-beginning-of-defunkobarity2022-09-231-0/+48
| | | | | | | | | * lisp/progmodes/python.el (python-info-looking-at-beginning-of-defun): Check syntax after moving to the beginning of line. * test/lisp/progmodes/python-tests.el (python-nav-beginning-of-defun-6) (python-end-of-defun-1, python-info-looking-at-beginning-of-defun-3): New tests (bug#58023).
* Don't rewrite `set` to `setq` of lexical variablesMattias Engdegård2022-09-222-6/+12
| | | | | | | | | | | | | | | Only perform the rewrite (set 'VAR X) -> (setq VAR X) for dynamic variables, as `set` isn't supposed to affect lexical vars (and never does so when interpreted). * lisp/emacs-lisp/byte-opt.el (byte-optimize-set): * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--xx): New. (bytecomp-tests--test-cases): Add test cases. * test/lisp/emacs-lisp/bytecomp-resources/warn-variable-set-nonvariable.el: Remove obsolete test.
* Fix failing image-dired testStefan Kangas2022-09-221-8/+22
| | | | | | | | * test/lisp/image/image-dired-util-tests.el (ert-x, xdg): Require. (image-dired-thumb-name/): Delete test. (image-dired-thumb-name/standard) (image-dired-thumb-name/image-dired) (image-dired-thumb-name/per-directory): New tests.
* * test/lisp/image/image-dired-util-tests.el: New file.Stefan Kangas2022-09-211-0/+40
|
* Merge from origin/emacs-28Stefan Kangas2022-09-211-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | 478b786d5a ; * doc/lispref/windows.texi (Window Hooks): Fix a typo (b... 5085351645 * lisp/text-modes/tex-mode.el (tex-mode): Fix AUCTeX regre... ee6f8598ca Add vc-annotate-switches to manual 616dcf27e5 ; Fix typos in Lisp symbols 5405852541 Remove mention of non-existent `annotate-switches' 191505b8a3 Mention that src/macuvs.h sometimes needs committing 10373c4b68 ; More comment fixes in font.h (bug#57935) c2595b8dcc ; * src/font.h (struct font_driver): Comment fix. 97b928ce09 MacOS ld warning from native compilation (bug#57849)
| * ; Fix typos in Lisp symbolsStefan Kangas2022-09-201-1/+1
| |
| * Sync with Tramp 2.5.3.2. Don't merge with masterMichael Albinus2022-09-171-21/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Android shell setup): Rework. (Frequently Asked Questions): Improve recommendations for speeding up. * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.5.4-pre". * lisp/net/tramp-adb.el (tramp-methods): Use "%d". (tramp-adb-handle-directory-files-and-attributes): Fix "." and ".." in listing. (tramp-adb-handle-file-attributes) (tramp-adb-handle-directory-files-and-attributes) (tramp-adb-handle-file-name-all-completions): Pipe "ls" output through "cat", in order to avoid quoting special characters. (tramp-adb-maybe-open-connection): Compute args from `tramp-login-args'. * lisp/net/tramp-compat.el (tramp-compat-replace-regexp-in-region): New defalias. * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): Adapt check for proper remote command. * lisp/net/tramp.el (tramp-methods): Adapt docstring. (tramp-handle-make-process): Check for adb device if indicated. (tramp-get-remote-tmpdir): Cache result in temporary connection property. * test/lisp/net/tramp-tests.el (tramp-test17-insert-directory) (tramp-test22-file-times, tramp--test-utf8): Adapt tests. (tramp--test-shell-file-name): Do not depend on `tramp--test-adb-p'. (tramp-test46-unload): Ignore autoload functions in `tramp-file-name' structure tests, since `tramp-file-name-handler' is also autoloaded in Emacs 29.
* | Fix substitute-command-keys for global binding lookupRobert Pluim2022-09-211-1/+5
| | | | | | | | | | | | | | | | | | | | | | The previous change forgot to account for the (rare) case of doing a lookup for a global binding when a specific keymap is in force. * lisp/help.el (substitute-command-keys): Redo lookup in global map if lookup in specific map fails. * test/lisp/help-tests.el (help-tests-substitute-command-keys/keymap-change): Add testcase for specific map overriding advertised-binding.
* | Recognize the backslash operator in perl-modeMauro Aranda2022-09-202-0/+38
| | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Add new rule to detect a backslash operator. (Bug#11996) * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-11996): New test. * test/lisp/progmodes/cperl-mode-resources/cperl-bug-11996.pl: New file.
* | Bury new ERC buffers by defaultF. Jason Park2022-09-191-22/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc.el (erc-join-buffer): Change default value to `bury'. (erc-setup-buffer): Make `window-noselect' behave more like its description and abstain from ever replacing the current buffer. * test/lisp/erc/erc-scenarios-base-reconnect.el (erc-scenarios-common-base-reconnect-options): Update helper to handle new default value for option `erc-join-buffer'. (erc-scenarios-base-reconnect-options--buffer): Update and rename function `erc-scenarios-base-reconnect-options--default'. (erc-scenarios-base-reconnect-options--default): Update and rename function `erc-scenarios-base-reconnect-options--bury'. * etc/ERC-NEWS: Update existing display-buffers section for 5.5. (Bug#51753)
* | Offer to regexp-quote new items in erc-match commandsF. Jason Park2022-09-191-0/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc-match.el (erc-match-quote-when-adding) Add new option to quote new items added to match lists. (erc-add-entry-to-list): Add optional `alt' parameter indicating whether to flip the behavior indicated by `erc-match-quote-when-adding'. (erc-add-pal, erc-add-fool, erc-add-keyword, erc-add-dangerous-host): Pass universal arg to `erc-add-entry-to-list' as `alt' argument. (erc-match-pal-p, erc-match-fool-p, erc-match-keyword-p, erc-match-dangerous-host-p): Don't bother matching when list is nil. * lisp/erc/erc.el (erc-list-match (lst str): Join input list as regexp union instead of looping over items. * etc/ERC-NEWS: Update misc-UX section for 5.5. * test/lisp/erc/erc-match-tests.el: New file. (Bug#56450)
* | Stabilize channels variant of erc-reuse-buffers testF. Jason Park2022-09-192-21/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc-networks.el (erc-networks--id-sort-buffers): Use `buffer-local-value' instead of `with-current-buffer'. * test/lisp/erc/erc-scenarios-base-reuse-buffers.el (erc-scenarios-common--base-reuse-buffers-channel-buffers): Wait for buffers to be created by server-initiated JOINs. (erc-scenarios-base-reuse-buffers-channel-buffers--disabled): Remove `:unstable' tag. * test/lisp/erc-tests.el (erc-ring-previous-command): Remove unnecessary `goto-char'.
* | ; Tag some ERC test-server tests as being :unstableF. Jason Park2022-09-196-8/+8
| | | | | | | | | | | | | | | | | | | | | | * test/lisp/erc/resources/base/assoc/samenet/chester.eld: Relax timeout. * test/lisp/erc/resources/base/assoc/samenet/tester.eld: Relax timeout. * test/lisp/erc/resources/base/assoc/samenet/tester2.eld: Relax timeout. * test/lisp/erc/resources/base/netid/samenet/chester.eld: Relax timeout. * test/lisp/erc/resources/base/netid/samenet/tester.eld: Relax timeout. * test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d-run-linger, erc-d-run-linger-fail, erc-d-run-linger-direct): Mark some tests as being unstable.
* | Merge branch 'master' of git.sv.gnu.org:/srv/git/emacsMichael Albinus2022-09-192-0/+23
|\ \
| * | perl-mode: / is a regexp match if there's nothing before itMauro Aranda2022-09-191-0/+12
| | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): A "/" that starts the first statement is a regexp match. (Bug#997) * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-997): New test.
| * | Improve check for misleading 'cl-case' cases (Bug#57915).Philipp Stephani2022-09-191-0/+11
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-case): Check that the case is of the form (quote FOO), not just (quote). * test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-no-warning): New unit test.
* | | Revert change in Tramp inotifywaitMichael Albinus2022-09-191-7/+6
|/ / | | | | | | | | | | | | * lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch): Revert use of "-P", it doesn't exist in older inotifywait versions. * test/lisp/filenotify-tests.el: Deactivate instrumentation.
* | Extract support of OSC escape sequences from comintMatthias Meulien2022-09-181-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/comint.el (osc): Now requires osc.el. (comint-osc-directory-tracker): Alias to osc-directory-tracker. (comint-osc-hyperlink-handler): Alias to osc-hyperlink-handler. (comint-osc-hyperlink-map): Alias to osc-hyperlink-map. (comint-osc-handlers): Alias to osc-handlers. (comint-osc-hyperlink): Alias to osc-hyperlink. (comint-osc-process-output): Rewritten to call osc-apply-on-region. * lisp/osc.el (osc-handlers): Clone comint-osc-handlers. (osc--marker): Clone comint-osc--marker. (osc-apply-on-region): Implementation taken from comint-osc-process-output. (osc-directory-tracker): Clone from comint-osc-directory-tracker. (osc-hyperlink-map): Clone from comint-osc-hyperlink-map. (osc-hyperlink): Clone from comint-osc-hyperlink. (osc-hyperlink--state): Clone from comint-osc-hyperlink--state. (osc-hyperlink-handler): Clone from comint-osc-hyperlink-handler. * test/lisp/osc-tests.el (osc): Test osc-apply-region (bug#57821).
* | ; Instrument filenotify-testsMichael Albinus2022-09-181-1/+1
| | | | | | | | Author:
* | ; Instrument filenotify-testsMichael Albinus2022-09-181-1/+7
| |
* | Fix recent filenotify-tests changesMichael Albinus2022-09-171-4/+25
| | | | | | | | | | | | | | | | * lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch): Use "-P". * test/lisp/filenotify-tests.el (file-notify-test11-symlinks): Adapt test.
* | Update Unicode support to Unicode version 15.0.0 (bug#57846)समीर सिंह Sameer Singh2022-09-171-34/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * admin/unidata/BidiBrackets.txt * admin/unidata/BidiMirroring.txt * admin/unidata/Blocks.txt * admin/unidata/IVD_Sequences.txt * admin/unidata/IdnaMappingTable.txt * admin/unidata/NormalizationTest.txt * admin/unidata/PropertyValueAliases.txt * admin/unidata/ScriptExtensions.txt * admin/unidata/Scripts.txt * admin/unidata/SpecialCasing.txt * admin/unidata/UnicodeData.txt * admin/unidata/confusables.txt * admin/unidata/copyright.html * admin/unidata/emoji-data.txt * admin/unidata/emoji-sequences.txt * admin/unidata/emoji-test.txt * admin/unidata/emoji-zwj-sequences.txt * test/manual/BidiCharacterTest.txt: Updated files from Unicode 15.0. * admin/unidata/unidata-gen.el (unidata-file-alist): Add new ranges. * lisp/international/fontset.el (script-representative-chars): Add new scripts. (otf-script-alist): Update from latest version. (setup-default-fontset): Add new scripts. * lisp/international/characters.el: Update syntax and category tables for new characters and scripts. (char-width-table): Update for changes in Unicode 15.0. * test/lisp/international/ucs-normalize-tests.el (ucs-normalize-tests--failing-lines-part1) (ucs-normalize-tests--failing-lines-part2): Update per the test results. * doc/lispref/nonascii.texi (Character Properties): Update Unicode version number. * etc/NEWS: Announce support for Unicode 15.0.
* | Accept more wide function signatures in docstringsStefan Kangas2022-09-162-0/+8
| | | | | | | | | | | | | | | | | | * test/lisp/emacs-lisp/bytecomp-tests.el ("warn-wide-docstring-ignore-function-signature.el"): New test. * lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p): Make regexp more allowing to silence warning. * test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore-function-signature.el: New file.
* | Enable `dont-follow' for inotify file notificationsMichael Albinus2022-09-161-0/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/os.texi (File Notifications): Symlinks aren't followed. * lisp/filenotify.el (file-notify--add-watch-inotify): Add `dont-follow' flag. * lisp/net/tramp.el (tramp-handle-file-notify-rm-watch): Suppress errors when reading process output. * test/lisp/filenotify-tests.el (file-notify-test11-symlinks) (file-notify-test11-symlinks-remote): New tests.
* | Faster and more robust list-of-strings-pMattias Engdegård2022-09-161-1/+2
| | | | | | | | | | | | * lisp/subr.el (list-of-strings-p): Speed up by a factor 4 (approx.) and don't crash on dotted lists. * test/lisp/subr-tests.el (test-list-of-strings-p): Extend test.
* | Fix cperl list indentation problemLars Ingebrigtsen2022-09-162-0/+29
| | | | | | | | | | * lisp/progmodes/cperl-mode.el (cperl-calculate-indent): Indent foo:bar() in lists correctly (bug#57829).
* | Add new predicate list-of-strings-pLars Ingebrigtsen2022-09-161-0/+7
| | | | | | | | * lisp/subr.el (list-of-strings-p): New function.
* | Allow using a symbol as an index into an alist in EshellJim Porter2022-09-141-4/+8
| | | | | | | | | | | | | | | | | | * lisp/eshell/esh-var.el (eshell-index-value): If INDEX is a symbol, use 'assoc' for indexing. * test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-var-assoc) (esh-var-test/quoted-interp-var-assoc): Add checks for indexing via symbol (bug#57787).
* | pcomplete: Generate completions from --help messagesAugusto Stoffel2022-09-141-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/pcomplete.el (pcomplete-from-help): New function (and hash table) to get pcomplete candidates from help messages. (pcomplete-here-using-help): Helper function to define pcomplete for simple commands (pcomplete-completions-at-point): Provide annotation-function and company-docsig properties. * lisp/pcmpl-git.el: New file, provides pcomplete for Git. * lisp/pcmpl-gnu.el: Add pcomplete for awk, gpg and gdb, emacs and emacsclient. * lisp/pcmpl-linux.el: Add pcomplete for systemctl and journalctl. * lisp/pcmpl-rpm.el: Add pcomplete for dnf. * lisp/pcmpl-unix.el: Add pcomplete for sudo and most commands found in GNU Coreutils. * lisp/pcmpl-x.el: Add pcomplete for tex, pdftex, latex, pdflatex, rigrep and rclone. * test/lisp/pcomplete-tests.el (pcomplete-test-parse-gpg-help, pcomplete-test-parse-git-help): Tests for the new functions.
* | Fix more misleading cl-case quoting in testsBasil L. Contovounesios2022-09-142-11/+11
| | | | | | | | | | | | | | * test/lisp/dnd-tests.el (x-begin-drag): * test/lisp/so-long-tests/so-long-tests-helpers.el (so-long-tests-assert-active, so-long-tests-assert-reverted): Remove misleading quoting in cl-case clauses (bug#51368).
* | Add new function xdg-current-desktop to xdg.elStefan Kangas2022-09-141-0/+10
| | | | | | | | | | * lisp/xdg.el (xdg-current-desktop): New function. * test/lisp/xdg-tests.el (xdg-current-desktop): New test.
* | Fix recently-added cl-macs testsLars Ingebrigtsen2022-09-141-32/+34
| | | | | | | | | | * test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-error) (cl-case-warning): Fix warning matches.
* | Have 'cl-case' warn about suspicious casesPhilipp Stephani2022-09-131-0/+32
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-case): Warn if the user passes a nil key list (which would never match). Warn about quoted symbols that should probably be unquoted. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-warning): New unit test (bug#51368).
* | Signal an error if a fallback cl-case is misplacedPhilipp Stephani2022-09-131-0/+11
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-case): Warn if the user passes a nil key list (which would never match). Warn about quoted symbols that should probably be unquoted. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-warning): New unit test (bug#51368).