Commit graph

122 commits

Author SHA1 Message Date
Stefan Kangas
9fe1bebd13 Add let-alist to alist shortdoc group
* lisp/emacs-lisp/shortdoc.el (alist): Add let-alist.
2023-08-02 21:49:19 +02:00
Mattias Engdegård
cda4396ade ; * lisp/emacs-lisp/shortdoc.el (list): Move misplaced remq entry 2023-08-02 11:21:37 +02:00
Eli Zaretskii
375dac936f Merge from origin/emacs-29
600b90ed56 Mark failing icalendar test as unstable (bug#56241)
f8a918c977 ; * src/coding.c (Fcoding_system_put): Improve doc string.
40f84e906f ; * doc/lispref/keymaps.texi (Key Binding Commands): Fix ...
502a780031 ; Improve documentation of 'vertical-motion' in ELisp manual
0d90873fa4 ; * src/indent.c (Fvertical_motion): Doc fix.
9b38773a20 ; * lisp/dired.el (dired-no-confirm): Doc fix.  (Bug#64493)
a30ebe7a55 ; Improve documentation of key-binding commands
c3fefb2b3a Improve natnump shortdoc
244d4c837a correct info documentation of benchmark-call
67def1f550 * lisp/progmodes/grep.el (rgrep): Fix docstring.
8da2091362 ; Fix documentation of minibuffer-completion commands
aa030698ce ; Fix typos in documented names of keymap-* functions
a9b46bb25d Include a help-echo for flymake's modeline counters
37ed3d15f3 Avoid errors in completion due to 'completion-regexp-list'
15ff876177 ; * lisp/register.el (register-val-describe): Doc fix.
fe7b909c16 ; Fix two typos in recent changes in the manual
7a74b8c327 C Mode: Don't fontify foo globally as type due to "struct...
823bf6bdb1 * lisp/rect.el (rectangle--duplicate-right): Fix rectangl...
e339d0080d ; * test/lisp/misc-tests.el (ert): require misc to avoid ...

# Conflicts:
#	lisp/rect.el
2023-07-08 05:46:10 -04:00
Robert Pluim
c3fefb2b3a Improve natnump shortdoc
* lisp/emacs-lisp/shortdoc.el (number): Make it clear that zero
satisfies 'natnump'.  Move 'natnump' next to 'cl-plusp' to highlight
the difference between them.
2023-07-04 17:44:43 +02:00
Eli Zaretskii
8e8667246a Merge from origin/emacs-29
d0147ff9e5 * lisp/emacs-lisp/shortdoc.el: More and better `substring...
fa06249a9f Fix "C-x RET r" when the new encoding is UTF
679e9d7c56 ; Mention MinGW64 GCC 13.1 problems in PROBLEMS
fdc1a12ed1 Fix "vc-print-log does not erase buffer" and associated p...
d507aa7336 Add selector_expression indentation rule
1f664a0af7 Add "nixd" LSP server to Eglot
e962cf4ba7 Fix building --with-native-compilation=aot from release t...
4ca371e9cc Fix bug#64152 (Minibuffer sometimes goes "modal")
a0ccf1859c Disable target-async by default in gdb-mi.el
2bad5829ff Revert "Fix parsing of dn line if WITHDN is non-nil"
7637e361d3 Don't truncate filenames with "emacs.el" in them
2591eb1190 Improve documentation of 'minibuffer-message'
6f211bc57b Eglot: again fix positions of coinciding inlay hint overl...
a24e9e3fee ; Update ChangeLog.4 and etc/AUTHORS.
2023-06-24 07:13:42 -04:00
Mattias Engdegård
d0147ff9e5 * lisp/emacs-lisp/shortdoc.el: More and better substring examples.
Suggested by Juri Linkov.
2023-06-24 12:27:08 +02:00
Mattias Engdegård
f8cdb9e050 Declare more mutating functions
* lisp/emacs-lisp/bytecomp.el (mutating-fns):
Add assoc-delete-all, assq-delete-all and rassq-delete-all.
* lisp/emacs-lisp/shortdoc.el (alist, list):
Don't mutate constants in examples illustrating use of
assoc-delete-all, assq-delete-all and rassq-delete-all.
2023-05-20 20:34:55 +02:00
Mattias Engdegård
bd6bba4780 Improved copy-tree documentation and test (bug#63509)
* etc/NEWS: Move entry since it's an incompatible change.
* lisp/emacs-lisp/shortdoc.el (vector): Make the example relevant.
* lisp/subr.el (copy-tree): Rename second argument,
since 'vector-like' is a term with a specific meaning in Emacs
but not the one intended here.
* doc/lispref/lists.texi (Building Lists): Rename second argument,
and make it clear that the input must be acyclic.
* doc/lispref/records.texi (Record Functions):
Be more precise: `copy-sequence` is used to copy records,
`copy-tree` copies trees made of records etc.
* test/lisp/subr-tests.el (subr--copy-tree): Extend and strengthen the
test considerably, using the print-circle trick to detect structure
sharing precisely.
2023-05-19 15:50:42 +02:00
Joseph Turner
3a1285caba Make 'copy-tree' work with records
* doc/lispref/lists.texi (Building Cons Cells and Lists): Document
new behavior of 'copy-tree'.
* doc/lispref/records.texi (Record Functions): Cross-reference to
lists.texi.
* etc/NEWS: Mention change.  (Bug#63509)
* lisp/emacs-lisp/shortdoc.el: Add 'copy-tree' example to vector
group.
* lisp/subr.el (copy-tree): Recurse into records as well as
vectors when optional second argument is non-nil. Rename second
argument from VECP to VECTOR-LIKE-P.
* test/lisp/subr-tests.el: Test new behavior.
2023-05-19 09:00:27 +03:00
Daniel Martín
d19416d15c Fix pluralization in shortdoc-help-fns-examples-function
* lisp/emacs-lisp/shortdoc.el (shortdoc-help-fns-examples-function):
Implement a better logic to pluralize "Example", by counting the
number of arrow characters in the example string. (Bug#61877)
* test/lisp/emacs-lisp/shortdoc-tests.el
(shortdoc-help-fns-examples-function-test): Add a test.
2023-03-12 15:22:38 +02:00
Eli Zaretskii
9191fd50d2 ; Fix last change
* lisp/emacs-lisp/shortdoc.el (shortdoc-help-fns-examples-function)
(shortdoc-function-examples): Fix compilation warning and add an
empty line before the examples.

* lisp/emacs-lisp/shortdoc.el (shortdoc--insert-group-in-buffer)
(shortdoc-function-examples)
(shortdoc-help-fns-examples-function):
* etc/NEWS:
* doc/lispref/help.texi (Documentation Groups):
* doc/emacs/help.texi (Name Help): Improve documentation of
the last change.  (Bug#61877)
2023-03-12 10:25:10 +02:00
Daniel Martín
29227e7c19 Add functions to query Emacs Lisp examples registered in shortdoc
* lisp/emacs-lisp/shortdoc.el (shortdoc--display-function): Add
a new shortdoc-example text property so that ELisp examples can
be searched for later.
(shortdoc--insert-group-in-buffer): New function extracted from
the buffer insertion code in 'shortdoc-display-group'.
(shortdoc-display-group): Implement in terms of
'shortdoc--insert-group-in-buffer'.
(shortdoc-function-examples): New function that returns an alist
of Emacs Lisp examples from shortdoc.
(shortdoc-help-fns-examples-function): New function to insert
Emacs Lisp function examples in *Help* buffers, if added to
'help-fns-describe-function-functions'.
*
test/lisp/emacs-lisp/shortdoc-tests.el (shortdoc-function-examples-test):
Test it.
* doc/emacs/help.texi (Name Help): Document in the user manual.
* doc/lispref/help.texi (Documentation Groups): Document it.
* etc/NEWS: Advertise it. (Bug#61877)
2023-03-12 09:54:06 +02:00
Robert Pluim
cf53e62a79 Add 'process-status' to process shortdoc
* lisp/emacs-lisp/shortdoc.el (process): Add 'process-status'.
2023-02-21 16:48:18 +01:00
Eli Zaretskii
cae528457c ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
Stefan Kangas
43c7e05a2a Fix misspelled functions in shortdoc groups
* lisp/emacs-lisp/shortdoc.el (file, list): Fix misspelled function
names: 'file-writable-p' and 'seq-reduce'.
* test/lisp/emacs-lisp/shortdoc-tests.el (subr-x): Require.
(shortdoc-all-functions-fboundp): New test.
2022-12-31 12:40:01 +01:00
Xi Lu
84888080ee Add more functions to "string" shortdoc
* lisp/emacs-lisp/shortdoc.el: Add 'string-or-null-p',
'char-or-string-p', 'char-uppercase-p'.  (Bug#60279)
2022-12-24 09:55:22 +02:00
Mattias Engdegård
2d96a18cd0 ; * lisp/emacs-lisp/shortdoc.el: fix mistakes in previous commit 2022-12-14 14:06:46 +01:00
Mattias Engdegård
0cc199f1a6 Better shortdoc examples
* lisp/emacs-lisp/shortdoc.el
(symbol, comparison): New.
(string, list, number): Remove or change examples that do not have
well-defined results, such as `eq` on strings or floats.
Edit other examples for better illustrating each respective operation.
2022-12-14 12:20:46 +01:00
Mattias Engdegård
931d97bf56 Shortdoc: read and evaluate strings after :eval
* lisp/emacs-lisp/shortdoc.el (shortdoc--display-function):
If the parameter of :eval is a string then read, evaluate and print
the result.  This was always the intention and is documented behaviour.
2022-12-14 12:16:28 +01:00
Juri Linkov
d9d8a2eba9 * lisp/outline.el (outline-search-function): New variable (bug#53981).
(outline-font-lock-keywords, outline-font-lock-face)
(outline-minor-mode-highlight-buffer, outline-next-preface)
(outline-next-heading, outline-previous-heading)
(outline-back-to-heading, outline-on-heading-p, outline-demote)
(outline-map-region, outline-next-visible-heading)
(outline-hide-sublevels, outline-up-heading): Use outline-search-function
when it's non-nil as an alternative to searching outline-regexp.
(outline-search-level, outline-search-text-property): New functions.

* lisp/apropos.el (apropos-mode): Set outline-search-function
instead of unreliable outline-regexp.
(apropos-print): Add text property outline-level.

* lisp/emacs-lisp/shortdoc.el (shortdoc-display-group):
Add text property outline-level on text separate from final newlines.
(shortdoc-display-group): Add a narrow newline to not show
text properties of the final line when the outline is hidden.
(shortdoc--display-function): Add text property outline-level.
(shortdoc-mode): Set buffer-local outline-search-function and outline-level.
2022-11-21 09:56:06 +02:00
Juanma Barranquero
61b9f2c317 * lisp/emacs-lisp/shortdoc.el (sequence): Don't use cl-lib (bug#59319) 2022-11-17 09:55:45 +01:00
Lars Ingebrigtsen
6b56099268 Mention seq-keep in shortdoc
* lisp/emacs-lisp/shortdoc.el (sequence): Mention seq-keep.
2022-10-08 13:20:17 +02:00
Eli Zaretskii
76b7a59367 ; Clarify wording of some doc strings in shortdoc.el
* lisp/emacs-lisp/shortdoc.el (shortdoc-next, shortdoc-previous)
(shortdoc-next-section, shortdoc-previous-section): Clarify
wording.
2022-09-25 22:49:32 +03:00
Stefan Kangas
489bca19b7 Improve shortdoc documentation
* doc/emacs/help.texi (Name Help):
* doc/lispref/help.texi (Documentation Groups): Refer to
'shortdoc' convenience alias instead of 'shortdoc-display-group'.
* lisp/emacs-lisp/shortdoc.el: Add Commentary.
(shortdoc-next, shortdoc-previous)
(shortdoc-next-section, shortdoc-previous-section): Doc fixes.
2022-09-25 14:35:10 +02:00
Stefan Kangas
971566e88a Fix shortdoc movement commands
* lisp/emacs-lisp/shortdoc.el (shortdoc--goto-section): Don't skip
over current function or section when searching.
2022-09-25 14:27:44 +02:00
Stefan Kangas
e589690781 Add new command 'shortdoc-copy-function-as-kill'
* lisp/emacs-lisp/shortdoc.el
(shortdoc-copy-function-as-kill): New command.
(shortdoc-mode-map): Bind above new command to "w".
2022-09-25 13:48:52 +02:00
Stefan Kangas
3af2f9cce3 Bind "N"/"P" to next/prev section in shortdoc
* lisp/emacs-lisp/shortdoc.el (shortdoc-mode-map): Bind "N" and
"P" to 'shortdoc-next-section' and 'shortdoc-previous-section'.
2022-09-25 13:38:22 +02:00
Lars Ingebrigtsen
bbd7059da4 Rename file-name-directory
* lisp/emacs-lisp/shortdoc.el (file-name):
* doc/lispref/files.texi (Directory Names): Adjust.
* lisp/files.el (file-name-parent-directory): Rename from
`file-name-directory' (bug#58039).
2022-09-24 12:44:44 +02:00
Stefan Kangas
8a224e5124 * lisp/emacs-lisp/shortdoc.el (file-name): Improve examples. 2022-09-24 11:26:06 +02:00
Damien Cassou
4751b51d5e Add new function `seq-positions'
* doc/lispref/sequences.texi (Sequence Functions): Document it.

* lisp/emacs-lisp/seq.el (seq-positions): New function.

* lisp/emacs-lisp/shortdoc.el (sequence): Mention it.

* test/lisp/emacs-lisp/seq-tests.el (test-seq-positions): Test it
(bug#57548).
2022-09-04 13:21:59 +02:00
Damien Cassou
2db8b0e12f Add new function `seq-remove-at-position'
* doc/lispref/sequences.texi (Sequence Functions): Document it.

* lisp/emacs-lisp/seq.el (seq-remove-at-position): New function.

* lisp/emacs-lisp/shortdoc.el (sequence): Mention it.

* test/lisp/emacs-lisp/seq-tests.el (test-seq-remove-at-position):
Test it.
2022-09-04 13:07:18 +02:00
Stefan Kangas
a7557f2483 ; * lisp/emacs-lisp/shortdoc.el (buffer): Improve sorting. 2022-08-22 15:08:48 +02:00
Lars Ingebrigtsen
958924a812 Mention delete-line in shortdoc
* lisp/emacs-lisp/shortdoc.el (buffer): Mention delete-line.
2022-08-21 18:17:56 +02:00
Mattias Engdegård
f57297c8b2 * lisp/emacs-lisp/shortdoc.el (buffer): Add missing functions
Add preceding-char and char-before because following-char and
char-after were already there.
2022-08-21 16:18:03 +02:00
Lars Ingebrigtsen
2614e53216 Rename newly-added eol/bol functions to pos-eol/pos-bol
* lisp/emacs-lisp/shortdoc.el (buffer):
* doc/lispref/positions.texi (Text Lines): Adjust.
* src/editfns.c (Fpos_bol): Rename from Fpos.
(Fpos_eol): Rename from Feol.
2022-08-21 14:04:52 +02:00
Lars Ingebrigtsen
f117b5df4d Add new functions eol and bol
* doc/lispref/positions.texi (Text Lines): Document them
* lisp/emacs-lisp/shortdoc.el: Mention them, and also the
buffer/line predicates.

* src/editfns.c (bol): New function.
(Fbol): New defun.
(Fline_beginning_position): Use `bol'.
(eol): New function.
(Feol): New defun.
(Fline_end_position): Use `eol'.
2022-08-19 15:22:36 +02:00
Paul Eggert
d634cb0954 Omit some (current-time) calls
* lisp/emacs-lisp/ert.el (ert-write-junit-test-summary-report):
* lisp/emacs-lisp/shortdoc.el (file):
* lisp/find-lisp.el (find-lisp-find-dired-insert-file):
* lisp/progmodes/hideif.el (hide-ifdefs):
* lisp/tar-mode.el (tar-subfile-save-buffer):
Prefer nil or omitted arg to (current-time) where this is better
or more-efficient.
2022-08-01 01:17:16 -07:00
Sam Steingold
70341cab3e string-equal-ignore-case: new function
* lisp/cedet/semantic/complete.el (semantic-collector-calculate-completions):
  Use `string-prefix-p' instead of explicit `compare-strings'.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns):
  Add `string-equal-ignore-case'.
* lisp/emacs-lisp/cl-extra.el (cl-equalp): Use `string-equal-ignore-case'.
* lisp/emacs-lisp/shadow.el (load-path-shadows-find): Likewise.
* lisp/emacs-lisp/shortdoc.el (string): Add `string-equal-ignore-case'.
* lisp/files.el (file-truename): Use `string-equal-ignore-case'.
(file-relative-name): Likewise.
* lisp/gnus/gnus-art.el (article-hide-boring-headers):
  Use `string-equal-ignore-case' instead of `gnus-string-equal'.
* lisp/gnus/gnus-util.el (gnus-string-equal):
  Remove, use `string-equal-ignore-case' instead.
* lisp/international/mule-cmds.el (describe-language-environment):
  Use `string-equal-ignore-case'.
(locale-charset-match-p): Likewise.
* lisp/man.el (Man-softhyphen-to-minus): Use `string-prefix-p'.
* lisp/minibuffer.el (completion--string-equal-p):
  Remove, use `string-equal-ignore-case' instead.
(completion--twq-all): Use `string-equal-ignore-case'.
(completion--do-completion): Likewise.
* lisp/net/browse-url.el (browse-url-default-windows-browser):
  Use `string-prefix-p' instead of explicit `compare-strings'.
* lisp/org/ob-core.el (org-babel-results-keyword):
  Use `string-equal-ignore-case' instead of explicit `compare-strings'.
(org-babel-insert-result): Likewise.
* lisp/org/org-compat.el (string-equal-ignore-case):
  Define unless defined already.
(org-mode-flyspell-verify): Use `string-equal-ignore-case'.
* lisp/org/org-lint.el (org-lint-duplicate-custom-id): Likewise.
* lisp/org/ox.el (org-export-resolve-radio-link): Use
  `string-equal-ignore-case' and `string-clean-whitespace'.
* lisp/progmodes/flymake-proc.el
  (flymake-proc--check-patch-master-file-buffer):
  Use `string-prefix-p' instead of explicit `compare-strings'.
* lisp/progmodes/idlwave.el (idlwave-class-or-superclass-with-tag):
  Use `string-equal-ignore-case' instead of explicit `compare-strings'.
* lisp/subr.el (member-ignore-case): Use `string-equal-ignore-case'.
(string-equal-ignore-case): Compare strings ignoring case.
* lisp/textmodes/bibtex.el (bibtex-string=): Remove.
(bibtex-format-entry, bibtex-font-lock-url, bibtex-autofill-entry)
(bibtex-print-help-message, bibtex-validate, bibtex-validate-globally)
(bibtex-clean-entry, bibtex-completion-at-point-function, (bibtex-url):
  Use `string-equal-ignore-case' instead of `bibtex-string='.
* lisp/textmodes/sgml-mode.el (sgml-get-context):
  Use `string-equal-ignore-case' instead of explicit `compare-strings'.
(sgml-calculate-indent): Likewise
* test/lisp/subr-tests.el (string-comparison-test):
  Add tests for `string-equal-ignore-case'.
2022-07-26 13:49:28 -04:00
Mattias Engdegård
b70a00d9bf Gently discourage use of lsh (bug#56641)
* lisp/subr.el (lsh): Note the general preference for `ash`.
* lisp/emacs-lisp/shortdoc.el (number): Remove entry for `lsh`.
It was identical to that for `ash` which is misleading.
Shortdoc is very helpful for finding the right function to use,
and `lsh` is just for compatibility at this point.
2022-07-20 13:51:55 +02:00
Mattias Engdegård
d62766305a Add take and ntake (bug#56521)
These are useful list primitives, complementary to `nthcdr`.

* src/fns.c (Ftake, Fntake): New.
(syms_of_fns): Defsubr them.
* doc/lispref/lists.texi (List Elements):
* lisp/emacs-lisp/shortdoc.el (list): Document.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns, pure-fns):
Declare `take` pure and side-effect-free.
* test/src/fns-tests.el (fns-tests--take-ref, fns--take-ntake):
New test.
* etc/NEWS: Announce.
2022-07-17 17:35:49 +02:00
Stefan Kangas
27c3a8b277 Remove some ineffectual calls to purecopy
* lisp/dired.el (dired-chown-program, dired-trivial-filenames):
* lisp/emacs-lisp/shortdoc.el (shortdoc--display-function):
* lisp/help-fns.el (help-fns--mention-shortdoc-groups):
* lisp/mail/mail-extr.el (mail-extr-full-name-prefixes)
(mail-extr-all-letters-but-separators, mail-extr-all-letters)
(mail-extr-first-letters, mail-extr-last-letters)
(mail-extr-bad-dot-pattern, mail-extr-full-name-suffix-pattern)
(mail-extr-alternative-address-pattern)
(mail-extr-trailing-comment-start-pattern)
(mail-extr-name-pattern, mail-extr-telephone-extension-pattern)
(mail-extr-ham-call-sign-pattern, mail-extr-normal-name-pattern)
(mail-extr-two-name-pattern)
(mail-extr-listserv-list-name-pattern)
(mail-extr-stupid-vms-date-stamp-pattern)
(mail-extr-hz-embedded-gb-encoded-chinese-pattern)
(mail-extr-x400-encoded-address-pattern)
(mail-extr-x400-encoded-address-field-pattern-format)
(mail-extr-x400-encoded-address-surname-pattern)
(mail-extr-x400-encoded-address-given-name-pattern)
(mail-extr-x400-encoded-address-full-name-pattern): Remove
ineffectual calls to purecopy.
2022-07-10 19:42:25 +02:00
Daanturo
1ac383bcb6 Add file-parent-directory function
* doc/lispref/files.texi: Document the function.
* etc/NEWS: Add its entry.
* lisp/emacs-lisp/shortdoc.el: Add it to 'file-name' group.
* lisp/files.el: implementation (bug#56355).
2022-07-04 13:07:51 +02:00
Lars Ingebrigtsen
b31680ef04 Add new function `seq-split'
* doc/lispref/sequences.texi (Sequence Functions): Document it.

* lisp/emacs-lisp/seq.el (seq-split): New function.

* lisp/emacs-lisp/shortdoc.el (sequence): Mention it.
2022-07-03 12:55:00 +02:00
Lars Ingebrigtsen
98c9105f05 Allow using define-short-documentation-group without loading shortdoc
* lisp/emacs-lisp/shortdoc.el (define-short-documentation-group):
Allow using without loading shortdoc.el (bug#56260).
2022-06-28 14:43:03 +02:00
Lars Ingebrigtsen
513acdc9b4 Allow plist-get/plist-put/plist-member to take a comparison function
* doc/lispref/lists.texi (Plist Access): Document it.

* lisp/filesets.el (filesets-reset-fileset)
(filesets-ingroup-cache-get):
(filesets-ingroup-cache-put):
(filesets-build-menu-now): Don't use lax-plist functions.

* lisp/simple.el (lax-plist-put, lax-plist-get): Moved here from
fns.c and make obsolete.

* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Don't mark
plist functions as side-effect-free or pure.

* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Adjust type.

* lisp/emacs-lisp/shortdoc.el (list): Don't document deprecated
functions.

* src/xdisp.c (build_desired_tool_bar_string):
(display_mode_element):
(store_mode_line_string):
(display_string):
(produce_stretch_glyph):
(note_mode_line_or_margin_highlight):
(note_mouse_highlight):
* src/w32.c (serial_configure):
* src/sysdep.c (serial_configure):
* src/sound.c (parse_sound):
* src/process.c (Fset_process_buffer):
(Fset_process_sentinel):
(Fprocess_contact):
(Fmake_process):
(Fmake_pipe_process):
(Fset_network_process_option):
(Fserial_process_configure):
(Fmake_serial_process):
(set_network_socket_coding_system):
(finish_after_tls_connection):
(connect_network_socket):
(Fmake_network_process):
(server_accept_connection):
* src/lread.c (ADDPARAM):
(hash_table_from_plist):
* src/keyboard.c (make_lispy_position):
* src/indent.c (check_display_width):
* src/image.c (postprocess_image):
* src/gnutls.c (gnutls_verify_boot):
(Fgnutls_boot):
(gnutls_symmetric):
(Fgnutls_hash_mac):
(Fgnutls_hash_digest):
* src/dired.c (filter):
* src/data.c (add_to_function_history):
* src/coding.c (Fcoding_system_put): Adjust callers from
Fplist_put (etc) to plist_put.

* src/fns.c (plist_get):
(plist_put):
(plist_member): New functions (without optional third parameter)
to be used in C code.

* src/fns.c (Fplist_get, Fplist_put, Fplist_member): Take an
optional predicate parameter (bug#47425).

* src/lisp.h: Declare new plist_put, plist_get and plist_member
functions.

* test/lisp/json-tests.el (test-json-add-to-plist): Use plist-get.

* test/src/fns-tests.el (test-cycle-lax-plist-get):
(test-cycle-lax-plist-put):
(lax-plist-get/odd-number-of-elements):
(test-plist): Remove lax-plist tests, since semantics have changed
(they no longer error out on cycles).
2022-06-27 12:22:05 +02:00
Lars Ingebrigtsen
d8924e179e Extend file-expand-wildcards to allow regexps
* doc/lispref/files.texi (Contents of Directories): Document it.
* lisp/files.el (file-expand-wildcards): Extend to allow regexps.

* lisp/emacs-lisp/shortdoc.el (file): Expand the
file-expand-wildcards example.
2022-06-05 14:08:31 +02:00
Lars Ingebrigtsen
d37d099ad7 Fix failing shortdoc test
* lisp/emacs-lisp/shortdoc.el (string): Each example section is
supposed to contain only examples of using the function in
question (as policed by the FAILED  shortdoc-examples test).
2022-06-04 14:04:49 +02:00
Michael Albinus
acf27496cb * lisp/emacs-lisp/shortdoc.el (string): Add `string-collate-lessp'. 2022-06-04 11:23:53 +02:00
Stefan Kangas
09674074b5 ; Fix typos 2022-05-15 11:15:06 +02:00
Lars Ingebrigtsen
1cda7cfb39 Respect help-window-keep-selected in shortdoc buttons
* lisp/help-fns.el (help-fns--mention-shortdoc-groups): Respect
help-window-keep-selected.

* lisp/emacs-lisp/shortdoc.el (shortdoc-display-group): Allow
reusing the window.
2022-05-06 16:21:07 +02:00