aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp/help-tests.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2026 to copyright years.Sean Whitton2026-01-011-1/+1
|
* (help-function-arglist): Fix bug#79128Stefan Monnier2025-08-071-0/+3
| | | | | | | | * lisp/help.el (help-function-arglist): Fix use of `documentation`, to obey the `function-documentation` property. * test/lisp/help-tests.el (help-tests--use-docstring-arglist-79128): New test.
* Update copyright year to 2025Paul Eggert2025-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Merge from savannah/emacs-29Po Lu2024-01-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dc4e6b13296 ; Update copyright years in more files 64b37776318 ; Run set-copyright from admin.el 8e1c56ae467 ; Add 2024 to copyright years # Conflicts: # doc/misc/modus-themes.org # doc/misc/texinfo.tex # etc/NEWS # etc/refcards/ru-refcard.tex # etc/themes/modus-operandi-theme.el # etc/themes/modus-themes.el # etc/themes/modus-vivendi-theme.el # lib/alloca.in.h # lib/binary-io.h # lib/c-ctype.h # lib/c-strcasecmp.c # lib/c-strncasecmp.c # lib/careadlinkat.c # lib/cloexec.c # lib/close-stream.c # lib/diffseq.h # lib/dup2.c # lib/filemode.h # lib/fpending.c # lib/fpending.h # lib/fsusage.c # lib/getgroups.c # lib/getloadavg.c # lib/gettext.h # lib/gettime.c # lib/gettimeofday.c # lib/group-member.c # lib/malloc.c # lib/md5-stream.c # lib/md5.c # lib/md5.h # lib/memmem.c # lib/memrchr.c # lib/nanosleep.c # lib/save-cwd.h # lib/sha1.c # lib/sig2str.c # lib/stdlib.in.h # lib/strtoimax.c # lib/strtol.c # lib/strtoll.c # lib/time_r.c # lib/xalloc-oversized.h # lisp/auth-source-pass.el # lisp/emacs-lisp/lisp-mnt.el # lisp/emacs-lisp/timer.el # lisp/info-look.el # lisp/jit-lock.el # lisp/loadhist.el # lisp/mail/rmail.el # lisp/net/ntlm.el # lisp/net/webjump.el # lisp/progmodes/asm-mode.el # lisp/progmodes/project.el # lisp/progmodes/sh-script.el # lisp/textmodes/flyspell.el # lisp/textmodes/reftex-toc.el # lisp/textmodes/reftex.el # lisp/textmodes/tex-mode.el # lisp/url/url-gw.el # m4/alloca.m4 # m4/clock_time.m4 # m4/d-type.m4 # m4/dirent_h.m4 # m4/dup2.m4 # m4/euidaccess.m4 # m4/fchmodat.m4 # m4/filemode.m4 # m4/fsusage.m4 # m4/getgroups.m4 # m4/getloadavg.m4 # m4/getrandom.m4 # m4/gettime.m4 # m4/gettimeofday.m4 # m4/gnulib-common.m4 # m4/group-member.m4 # m4/inttypes.m4 # m4/malloc.m4 # m4/manywarnings.m4 # m4/mempcpy.m4 # m4/memrchr.m4 # m4/mkostemp.m4 # m4/mktime.m4 # m4/nproc.m4 # m4/nstrftime.m4 # m4/pathmax.m4 # m4/pipe2.m4 # m4/pselect.m4 # m4/pthread_sigmask.m4 # m4/readlink.m4 # m4/realloc.m4 # m4/sig2str.m4 # m4/ssize_t.m4 # m4/stat-time.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/stdio_h.m4 # m4/stdlib_h.m4 # m4/stpcpy.m4 # m4/strnlen.m4 # m4/strtoimax.m4 # m4/strtoll.m4 # m4/time_h.m4 # m4/timegm.m4 # m4/timer_time.m4 # m4/timespec.m4 # m4/unistd_h.m4 # m4/warnings.m4 # nt/configure.bat # nt/preprep.c # test/lisp/register-tests.el
| * ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
| |
* | Rename describe-map-tree to help--describe-map-treeStefan Kangas2023-09-171-6/+6
|/ | | | | | | This function should have been made internal in the first place. * lisp/help.el (help--describe-map-tree): Rename from 'describe-map-tree'. Keep old name as an obsolete alias, and update all callers.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* 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.
* New function substitute-quotesStefan Kangas2022-09-101-16/+36
| | | | | | | | | | | | | | | | | | | * lisp/help.el (substitute-quotes): New function. (Bug#51040) * doc/lispref/help.texi (Keys in Documentation): Document substitute-quotes. * test/lisp/help-tests.el (help-tests-substitute-quotes): New test. * lisp/cedet/srecode/srt-mode.el (srecode-macro-help): * lisp/cus-theme.el (describe-theme-1): * lisp/emacs-lisp/cl-extra.el (cl--describe-class): * lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor): * lisp/emacs-lisp/package.el (describe-package-1): * lisp/help-fns.el (help-fns--parent-mode, help-fns--var-risky) (help-fns--var-file-local, help-fns--var-bufferlocal) (describe-face): * lisp/help.el (substitute-command-keys): * lisp/progmodes/octave.el (octave-help): Use the new function instead of 'substitute-command-keys'.
* Fix return value of help--key-description-fontifiedStefan Kangas2022-08-191-6/+12
| | | | | | | | | | | | This fixes a bug with warning about obsolete commands in `command-execute', where we incorrectly showed empty parenthesis instead of the empty string when there was no keybinding for the new command. * lisp/help.el (help--key-description-fontified): Return nil instead of the empty string if KEYS argument is nil. * test/lisp/help-tests.el (help--key-description-fontified): New test. (with-substitute-command-keys-test): Fix indentation.
* Add face to mouse buttons in command substitutionsStefan Kangas2022-08-031-1/+3
| | | | | | | | * lisp/help.el (substitute-command-keys): Add help-key-binding face to mouse buttons in literal key substitutions. * test/lisp/help-tests.el (help-tests-substitute-command-keys/literal-key-sequence): Expand test for above change.
* Don't error out on invalid literal key substitutionsStefan Kangas2022-06-251-4/+6
| | | | | | | | | | | | | | | | | | | | It would be backwards-incompatible to error out on invalid literal key substitutions. Consider this docstring fragment, where "\\`" should have been escaped but wasn't: "Example value: \"\\(?:\\`[#.]\\)\\|\\(?:[#~]\\'\\)\"." If we error out, we can't display this docstring at all. However, it is clearly better to display something in such cases, even if suboptimal, than refusing to display anything at all. * lisp/help.el (substitute-command-keys): Don't error out on invalid literal key substitutions: just ignore them instead. * test/lisp/help-tests.el (help-tests-substitute-command-keys/literal-key-sequence-errors): Delete test. (help-tests-substitute-command-keys/literal-key-sequence-ignore-invalid): New test.
* Respect no-face argument in literal key substitutionsStefan Kangas2022-06-181-5/+13
| | | | | | | | | * lisp/help.el (substitute-command-keys): Respect 'no-face' argument also in literal key substitutions. * test/lisp/help-tests.el (help-tests-substitute-key-bindings/help-key-binding-face): Rename from help-tests-substitute-key-bindings/face-help-key-binding. (help-tests-substitute-key-bindings/help-key-binding-no-face): New test.
* Make more ranges sort properly in describe-keymapLars Ingebrigtsen2022-01-311-2/+2
| | | | | * lisp/subr.el (keymap-canonicalize): Don't consider two-character ranges as a range (bug#11325).
* Merge from origin/emacs-28Eli Zaretskii2022-01-011-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
| |
* | Use defvar-keymap in testsStefan Kangas2021-12-261-26/+23
| | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/button-tests.el (button-tests--map): * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-keymap): * test/lisp/help-tests.el (help-tests-remap-map) (help-tests-major-mode-map, help-tests-minor-mode-map): * test/lisp/kmacro-tests.el (kmacro-tests-keymap): * test/lisp/repeat-tests.el (repeat-tests-map) (repeat-tests-repeat-map): * test/src/keymap-tests.el (keymap-tests-minor-mode-map) (keymap-tests-major-mode-map): Use defvar-keymap.
* | Make substitute-command-keys test less brittleStefan Kangas2021-12-221-4/+26
| | | | | | | | | | | | | | * test/lisp/help-tests.el (help-tests--test-keymap): New keymap variable. (help-tests-substitute-command-keys/keymaps): Make test less brittle by using above new keymap.
* | Adjust test after recent help.el changeLars Ingebrigtsen2021-12-221-0/+1
| |
* | Add new format for literal key sequences to substitute-command-keysStefan Kangas2021-11-221-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/help.el (substitute-command-keys): Add new format "\\`f'" for literal key sequences. (Bug#50804) * doc/lispref/help.texi (Keys in Documentation): Document the above new substitution. * test/lisp/help-tests.el (help-tests-substitute-command-keys/literal-key-sequence): (help-tests-substitute-command-keys/literal-key-sequence-errors): New tests. (help-tests-substitute-key-bindings/face-help-key-binding): Extend test.
* | Eliminate ERT test name clashes (bug#51941)Mattias EngdegÄrd2021-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/electric-tests.el (js-mode-braces-with-layout-and-indent): * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-test-fifth): * test/lisp/thingatpt-tests.el (test-symbol-thing-2): Remove duplicated tests. * test/lisp/emacs-lisp/generator-tests.el (cps-loop): * test/lisp/emacs-lisp/ring-tests.el (ring-tests-insert): * test/lisp/help-tests.el (help-tests-substitute-command-keys/no-change): * test/lisp/net/netrc-tests.el (test-netrc-credentials): * test/lisp/progmodes/elisp-mode-tests.el (elisp-completes-functions-after-let-bindings): * test/lisp/thingatpt-tests.el (test-symbol-thing-3): * test/src/buffer-tests.el (deftest-overlayp-1, buffer-tests--*): * test/src/buffer-tests.el (test-buffer-swap-text-1): * test/src/data-tests.el (binding-test-set-constant-nil) (data-tests-logcount): Rename clashing tests.
* | Make substitute-command-keys regexp tests more strictStefan Kangas2021-11-061-1/+1
| | | | | | | | | | * test/lisp/help-tests.el (with-substitute-command-keys-test): Make regexp tests more strict.
* | ; * test/lisp/help-tests.el: Fix failing tests after recent change.Stefan Kangas2021-11-061-33/+33
| |
* | Update help-tests after separator line changesLars Ingebrigtsen2021-11-061-10/+10
| |
* | Make `C-h b' indentation more regular (and avoid continuation lines)Lars Ingebrigtsen2021-11-021-1/+1
| | | | | | | | | | | | | | | | * lisp/help.el (help--describe-command): Don't do any indentation. (describe-map): Store data about each section. (describe-map--align-section): New function to do indentation on a per-block basis. (describe-map--fill-columns): Helper function.
* | Don't output prefix keys in `C-h b', and output more data on objectsLars Ingebrigtsen2021-11-011-7/+0
| | | | | | | | | | | | * lisp/help.el (help--describe-command): Output [closure/lambda/byte-code] for those types of objects. (describe-map): Don't output prefix keys.
* | Say "Key/Binding" instead of "key/binding" in `C-h b'Lars Ingebrigtsen2021-11-011-10/+10
| | | | | | | | * lisp/help.el (describe-map-tree): Capitalize the heading.
* | Don't print empty keymaps in `C-h b'Lars Ingebrigtsen2021-11-011-40/+26
|/ | | | | | * lisp/help.el (describe-map-tree): Don't print the heading if the keymap is empty (bug#22334). Tweak the look to compress it more vertically.
* Update help-tests.el after minibuffer map changeLars Ingebrigtsen2021-05-251-0/+5
|
* Add new face 'help-key-binding' for keybindings in helpStefan Kangas2021-03-081-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/faces.el (help-key-binding): New face. * lisp/help.el (help-for-help): Rename from 'help-for-help-internal'. Use 'substitute-command-keys' syntax. (help): Make into alias for 'help-for-help'. (help-for-help-internal): Make into obsolete alias for 'help-for-help'. (help--key-description-fontified): New function to add the 'help-key-binding' face. (help-key-description, substitute-command-keys) (describe-map-tree, help--describe-command) (help--describe-translation, describe-map): * lisp/help-fns.el (help-fns--key-bindings, describe-mode): Use above new function. * lisp/isearch.el (isearch-help-for-help-internal): Use `substitute-command-keys' syntax. * lisp/help-macro.el (make-help-screen): Use 'substitute-command-keys' and 'help--key-description-fontified'. Simplify. * src/keymap.c (describe_key_maybe_fontify): New function to add the 'help-key-binding' face to keybindings. (describe_vector): Use above new keybinding. (syms_of_keymap) <Qfont_lock_face, Qhelp_key_binding>: New DEFSYMs. (fontify_key_properties): New static variable. * lisp/tooltip.el (tooltip-show): Avoid overriding faces in specified tooltip text. * test/lisp/help-tests.el (with-substitute-command-keys-test): Don't test for text properties. (help-tests-substitute-command-keys/add-key-face) (help-tests-substitute-command-keys/add-key-face-listing): New tests.
* Update substitute-command-keys tests, againGlenn Morris2021-01-121-2/+2
| | | | | | * test/lisp/help-tests.el (help-tests-substitute-command-keys/keymaps) (help-tests-substitute-command-keys/keymap-change): Update following recent minibuffer changes.
* Update a substitute-command-keys testGlenn Morris2021-01-061-1/+1
| | | | | * test/lisp/help-tests.el (help-tests-substitute-command-keys/keymaps): Update for "Pretty-print keys without <> around modifiers" change.
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Test that substitute-command-keys preserves text propertiesStefan Kangas2020-11-171-0/+6
| | | | | | * test/lisp/help-tests.el (help-substitute-command-keys/preserves-text-properties): New test. (Bug#17052)
* Add test for substitute-command-keys with command remapStefan Kangas2020-11-091-2/+13
| | | | | | | * test/lisp/help-tests.el (help-tests-remap-map): New variable. (help-tests-substitute-command-keys/remap): New test. (help-tests-substitute-command-keys/keymaps) (help-tests-substitute-command-keys/undefined-map): Fix indentation.
* Don't bind standard-output in substitute-command-keysStefan Kangas2020-11-011-0/+20
| | | | | | | | | | | | This fixes a regression with regards to the old C version of substitute-command-keys. * lisp/help.el (substitute-command-keys): Don't bind standard-output. See Bug#39149. * test/lisp/help-tests.el (help-tests--was-in-buffer): New variable. (help-substitute-command-keys/menu-filter-in-correct-buffer): New test.
* Remove C version of substitute-command-keysStefan Kangas2020-10-181-34/+3
| | | | | | | | | | | | | * src/doc.c (Fsubstitute_command_keys_old): Remove. (syms_of_doc): Remove defsubr for Fsubstitute_command_keys_old. * src/keymap.c (describe_map, describe_map_tree) (describe_map_compare, describe_map_elt): Remove. * src/keymap.h: Remove 'describe_map_tree'. * test/lisp/help-tests.el (with-substitute-command-keys-test) (help-tests-substitute-command-keys/compare) (help-tests-substitute-command-keys/compare-all): Don't test the C version of 'substitute-command-keys' removed above.
* Translate describe_map to LispStefan Kangas2020-10-181-2/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Third step in converting substitute-command-keys to Lisp. * lisp/help.el (describe-map): New Lisp version of describe_map. (help--describe-map-compare, help--describe-translation) (help--describe-command, help--shadow-lookup): New helper functions for describe-map. (help--keymaps-seen, help--previous-description-column): New variables. * src/keymap.c (Fkeymap__get_keyelt): New defun to expose get_keyelt to Lisp. (Fdescribe_map_tree_old, Fdescribe_map): Remove defuns. (Fdescribe_vector_internal): New defun to expose describe_vector to Lisp in a way usable by describe-map. (syms_of_keymap): New defsubrs for Fkeymap__get_keyelt and Fdescribe_vector_internal. Remove defsubrs for Fdescribe_map_tree_old and Fdescribe_map. Remove 'help--keymaps-seen'. * test/lisp/help-tests.el (help-tests-substitute-command-keys/shadow): Extend test. (help-tests-substitute-command-keys/test-mode) (help-tests-substitute-command-keys/compare-all) (help-tests-describe-map-tree/no-menu-t) (help-tests-describe-map-tree/no-menu-nil) (help-tests-describe-map-tree/mention-shadow-t) (help-tests-describe-map-tree/mention-shadow-nil) (help-tests-describe-map-tree/partial-t) (help-tests-describe-map-tree/partial-nil): New tests.
* Add new Lisp implementation of substitute-command-keysStefan Kangas2020-10-181-0/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is only the first step towards a full Lisp implementation, and does not remove the old C code. On the contrary, it is partly based on using the old C code, which is to be replaced in steps. This also makes it easy to test that it produces the same output as the old. * src/doc.c (Fsubstitute_command_keys_old): Rename from Fsubstitute_command_keys. (Fget_quoting_style): New defun to expose text_quoting_style to Lisp. (syms_of_doc): Expose above symbols. * lisp/help.el (substitute-command-keys): New Lisp version of substitute-command-keys. (Bug#8951) * src/keymap.c (Fdescribe_map_tree): New defun to expose describe_map_tree to Lisp. (syms_of_keymap): New defsubr for Fdescribe_map_tree. * src/keyboard.c (help_echo_substitute_command_keys): * src/doc.c (Fdocumentation, Fdocumentation_property): * src/print.c (print_error_message): * src/syntax.c (Finternal_describe_syntax_value): Fix calls to use new Lisp implementation of substitute-command-keys. * test/src/doc-tests.el: Remove file. * test/lisp/help-tests.el: Add tests for substitute-command-keys copied from above file.
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Make help-split-fundoc more flexible about what returnsJuanma Barranquero2019-11-231-0/+56
* lisp/help.el (help-split-fundoc): New arg SECTION to return only the usage or doc parts of the docstring, or both even if there is no usage. * test/lisp/help-tests.el: New file.