emacs/lisp/emacs-lisp
Basil L. Contovounesios 9da2efb670 Audit some plist uses with new predicate argument
* doc/lispref/lists.texi (Plist Access): Improve description of
default predicate.
* lisp/emacs-lisp/cl-extra.el (cl-getf, cl--set-getf): Assume
plist-member always returns a cons.
* lisp/emacs-lisp/gv.el (plist-get): Support new optional predicate
argument (bug#47425#91).
* lisp/emacs-lisp/map.el: Bump minor version.
(map--dispatch): Remove now that bug#58563 is fixed.  Break two
remaining uses out into corresponding cl-defmethods.
(map--plist-p): Add docstring.
(map--plist-has-predicate, map--plist-member-1, map--plist-member)
(map--plist-put-1, map--plist-put): New definitions for supporting
predicate argument backward compatibly.
(map-elt): Fix generalized variable getter under a
predicate (bug#58531).  Use predicate when given a plist.
(map-put): Avoid gratuitous warnings when called without the hidden
predicate argument.  Improve obsoletion message.
(map-put!): Use predicate when given a plist.
(map-contains-key): Ditto.  Declare forgotten
advertised-calling-convention (bug#58531#19).
(map--put): Group definition in file together with that of map-put!.
* lisp/files-x.el (connection-local-normalize-criteria): Simplify
using mapcan + plist-get.
* lisp/net/eudc.el (eudc--plist-member): New convenience function.
(eudc-plist-member, eudc-plist-get, eudc-lax-plist-get): Use it
instead of open-coding plist-member.
* src/fns.c (Fplist_get, plist_get, Fplist_put, plist_put): Pass the
plist element as the first argument to the predicate, for
consistency with assoc + alist-get.
(Fplist_member, plist_member): Move from widget to plist section.
Open-code the EQ case in plist_member, and call it from
Fplist_member in that case, rather than the other way around.

* test/lisp/apropos-tests.el (apropos-tests-format-plist): Avoid
polluting obarray.
* test/lisp/emacs-lisp/cl-extra-tests.el (cl-getf): Extend test with
generalized variables, degenerate plists, and improper lists.
* test/lisp/emacs-lisp/gv-tests.el: Byte-compile file; in the
meantime bug#24402 seems to have been fixed or worked around.
(gv-setter-edebug): Inhibit printing messages.
(gv-plist-get): Avoid modifying constant literals.  Also test with a
predicate argument.
* test/lisp/emacs-lisp/map-tests.el (with-maps-do): Simplify
docstring.
(test-map-elt-testfn): Rename...
(test-map-elt-testfn-alist): ...to this.  Also test with a predicate
argument.
(test-map-elt-testfn-plist, test-map-elt-gv, test-map-elt-signature)
(test-map-put!-plist, test-map-put!-signature)
(test-map-contains-key-signature, test-map-plist-member)
(test-map-plist-put): New tests.
(test-map-contains-key-testfn): Also test with a predicate argument.
(test-map-setf-alist-overwrite-key, test-map-setf-plist-insert-key)
(test-map-setf-plist-overwrite-key): Avoid modifying constant
literals.
(test-hash-table-setf-insert-key)
(test-hash-table-setf-overwrite-key): Fix indentation.
(test-setf-map-with-function): Make test more precise.
* test/lisp/net/eudc-tests.el: New file.
* test/lisp/subr-tests.el (test-plistp): Extend test with circular
list.
* test/src/fns-tests.el (test-cycle-equal, test-cycle-nconc): Move
from plist section to circular list section.
(plist-put/odd-number-of-elements): Avoid modifying constant
literals.
(plist-member/improper-list): Simplify.
(test-plist): Move to plist section.  Also test with a predicate
argument.
2022-10-22 19:33:12 +03:00
..
advice.el (compiled-function-p): New function (bug#56648) 2022-08-14 12:30:05 -04:00
avl-tree.el
backquote.el
backtrace.el Don't bind `s' in the normal backtrace map 2022-09-09 19:29:21 +02:00
benchmark.el ; Silence byte-compiler in benchmark.el 2022-10-07 23:15:13 +02:00
bindat.el Bindat (src, strz): Operate on vectors too 2022-10-21 11:26:36 -04:00
byte-opt.el ; Fix typos (prefer American spelling) 2022-09-29 15:20:07 +02:00
byte-run.el cl-generic: Fix advertised-calling-convention declarations 2022-10-16 12:01:47 -04:00
bytecomp.el (byte-compile--first-symbol-with-pos): Fix bug#58601 2022-10-18 10:49:43 -04:00
cconv.el cconv.el: Fix interactive closure bug#51695 2022-09-23 16:36:16 -04:00
chart.el Make XEmacs compat alias face-background-pixmap obsolete 2022-08-23 16:51:31 +02:00
check-declare.el
checkdoc.el Don't use autoloaded functions for safe-local-variable 2022-09-16 12:36:15 +02:00
cl-extra.el Audit some plist uses with new predicate argument 2022-10-22 19:33:12 +03:00
cl-generic.el cl-generic: Fix advertised-calling-convention declarations 2022-10-16 12:01:47 -04:00
cl-indent.el Remove some useless eval-when-compile 2022-07-04 14:56:11 +02:00
cl-lib.el Delete many items obsolete since 24.3 2022-09-09 11:27:30 +02:00
cl-macs.el Improve check for misleading 'cl-case' cases (Bug#57915). 2022-09-19 13:34:51 +02:00
cl-preloaded.el ; Fix typos. 2022-07-02 10:20:23 +02:00
cl-print.el
cl-seq.el cl-reduce doc string improvement 2022-08-18 15:07:08 +02:00
comp-cstr.el * Rename `comp--typeof-builtin-types' 2022-08-18 23:41:39 +02:00
comp.el * Fix async native compilation (bug#58637) 2022-10-19 22:21:03 +02:00
copyright.el
crm.el Fix crm.el compilation warning 2022-07-11 13:34:35 +02:00
cursor-sensor.el
debug-early.el Make debug-early-backtrace more resilient 2022-06-24 11:04:51 +02:00
debug.el Obsolete unused variable in debug.el 2022-09-20 12:40:14 +02:00
derived.el ; Normalize some "Author" headers 2022-07-20 22:38:01 +02:00
disass.el
easy-mmode.el Fix define-minor-mode :keymap obsoletion warning 2022-09-02 14:58:30 +02:00
easymenu.el ; Minor doc fix in easy-menu-{add,remove} 2022-08-23 16:24:54 +02:00
edebug.el Abolish max-specpdl-size (bug#57911) 2022-09-19 19:30:03 +02:00
eieio-base.el * lisp/emacs-lisp/eieio-base.el (eieio-persistent-read): Simplify. 2022-07-31 12:04:17 +02:00
eieio-core.el Fix overly wide docstrings generated by eieio 2022-10-02 17:28:04 +02:00
eieio-custom.el Move EIEIO autoloads to the common loaddefs.el 2022-07-11 14:29:33 +02:00
eieio-datadebug.el
eieio-opt.el New function substitute-quotes 2022-09-10 07:37:36 +02:00
eieio-speedbar.el
eieio.el Fix more overly long docstrings in eieio 2022-10-03 00:04:23 +02:00
eldoc.el Improve and extend documentation of ElDoc 2022-10-21 16:10:08 +03:00
elint.el
elp.el ; Delete not-useful comments referring to Emacs 19. 2022-08-19 18:05:51 +02:00
ert-x.el ; Fix logic of $HOME adjustment for 'ert-remote-temporary-file-directory' 2022-10-03 17:42:37 -07:00
ert.el Simplify code using take, ntake and butlast 2022-08-14 15:43:12 +02:00
ewoc.el
faceup.el
find-func.el Add find-function-setup-keys bindings for find-library commands 2022-06-30 12:49:40 +02:00
float-sup.el
generate-lisp-file.el Inhibit nativecomp of loaddefs files 2022-09-03 14:23:26 +02:00
generator.el
generic.el
gv.el Audit some plist uses with new predicate argument 2022-10-22 19:33:12 +03:00
helper.el Don't show status message in Helper-describe-bindings 2022-08-11 14:35:23 +02:00
hierarchy.el
icons.el * lisp/emacs-lisp/icons.el (icons--create): Use default rotation 0 (bug#57813) 2022-09-24 20:17:28 +03:00
inline.el
let-alist.el
lisp-mnt.el
lisp-mode.el Get fewer false positives for :keyword and &options 2022-09-20 13:34:42 +02:00
lisp.el ; * lisp/emacs-lisp/lisp.el (end-of-defun-moves-to-eol): Doc fix. 2022-08-06 09:40:07 +03:00
loaddefs-gen.el Fix previous loaddefs-gen fix 2022-10-18 13:17:52 +02:00
macroexp.el * lisp/emacs-lisp/macroexp.el (macroexp--compiler-macro): Soften message 2022-09-03 11:03:32 -04:00
map-ynp.el
map.el Audit some plist uses with new predicate argument 2022-10-22 19:33:12 +03:00
memory-report.el Use file-size-human-readable in memory-report--format 2022-10-15 03:02:17 +02:00
multisession.el
nadvice.el Don't bug out in advice--make-docstring when there's not doc string 2022-10-04 12:50:17 +02:00
oclosure.el cconv.el: Fix interactive closure bug#51695 2022-09-23 16:36:16 -04:00
package-x.el
package.el package.el: Understand a few more variations in tarball formats 2022-10-08 12:19:40 -04:00
pcase.el (compiled-function-p): New function (bug#56648) 2022-08-14 12:30:05 -04:00
pp.el pp--insert-lisp: Don't bug out on certain forms at beginning of buffer 2022-05-28 18:39:43 +02:00
radix-tree.el
range.el
re-builder.el Fit the re-builder window to the buffer 2022-09-05 20:58:27 +02:00
regexp-opt.el Abolish max-specpdl-size (bug#57911) 2022-09-19 19:30:03 +02:00
regi.el ; * lisp/emacs-lisp/regi.el: Delete incorrect "last modified" comment. 2022-07-30 11:36:36 +02:00
ring.el * lisp/emacs-lisp/ring.el (ring): Define as a type 2022-08-14 12:30:06 -04:00
rmc.el Allow read-multiple-choice to do long-form answers 2022-06-24 11:04:51 +02:00
rx.el Reduce internal rx autoloads 2022-07-31 13:01:26 +02:00
seq.el Add 'seq-keep' 2022-10-04 21:44:52 +02:00
shadow.el string-equal-ignore-case: new function 2022-07-26 13:49:28 -04:00
shortdoc.el Mention seq-keep in shortdoc 2022-10-08 13:20:17 +02:00
shorthands.el Remove some useless eval-when-compile 2022-07-04 14:56:11 +02:00
smie.el
subr-x.el Autoload string-join 2022-09-17 12:31:24 +02:00
syntax.el (syntax-wholeline-max): New var 2022-06-30 13:20:33 -04:00
tabulated-list.el Prefer pos-bol and pos-eol in tabulated-list.el 2022-08-22 15:08:48 +02:00
tcover-ses.el
testcover.el Remove a nil cl-case case 2022-09-13 18:24:14 +02:00
text-property-search.el
thunk.el
timer-list.el Add quit-window entry to list-timers menu 2022-07-04 22:15:51 +02:00
timer.el time-convert): Deprecate calls without an explicit FORM arg 2022-08-05 18:46:31 -04:00
tq.el
trace.el ; Delete LCD Archive entries 2022-07-28 15:07:34 +02:00
unsafep.el
vtable.el Fix vtable-insert-object line insertion 2022-10-08 15:26:01 +02:00
warnings.el Fix variable types in warnings-suppress 2022-08-15 09:36:06 +02:00