diff options
| author | Nicolas Petton | 2017-07-07 21:21:55 +0200 |
|---|---|---|
| committer | Nicolas Petton | 2017-07-11 10:07:16 +0200 |
| commit | 0bece6c6815cc59e181817a2765a4ea752f34f56 (patch) | |
| tree | 856363b2defed20c97a25c29a7739bce9a6bd9cb /src/coding.c | |
| parent | 689c5c20d1174e95be50e674d05632545eb4b9c5 (diff) | |
| download | emacs-0bece6c6815cc59e181817a2765a4ea752f34f56.tar.gz emacs-0bece6c6815cc59e181817a2765a4ea752f34f56.zip | |
Add an optional testfn parameter to assoc
* src/fns.c (assoc): New optional testfn parameter used for comparison
when provided.
* test/src/fns-tests.el (test-assoc-testfn): Add tests for the new
'testfn' parameter.
* src/buffer.c:
* src/coding.c:
* src/dbusbind.c:
* src/font.c:
* src/fontset.c:
* src/gfilenotify.c:
* src/image.c:
* src/keymap.c:
* src/process.c:
* src/w32fns.c:
* src/w32font.c:
* src/w32notify.c:
* src/w32term.c:
* src/xdisp.c:
* src/xfont.c: Add a third argument to Fassoc calls.
* etc/NEWS:
* doc/lispref/lists.texi: Document the new 'testfn' parameter.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/coding.c b/src/coding.c index 5682fc015ad..50ad206be69 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -10539,7 +10539,7 @@ usage: (define-coding-system-internal ...) */) | |||
| 10539 | ASET (this_spec, 2, this_eol_type); | 10539 | ASET (this_spec, 2, this_eol_type); |
| 10540 | Fputhash (this_name, this_spec, Vcoding_system_hash_table); | 10540 | Fputhash (this_name, this_spec, Vcoding_system_hash_table); |
| 10541 | Vcoding_system_list = Fcons (this_name, Vcoding_system_list); | 10541 | Vcoding_system_list = Fcons (this_name, Vcoding_system_list); |
| 10542 | val = Fassoc (Fsymbol_name (this_name), Vcoding_system_alist); | 10542 | val = Fassoc (Fsymbol_name (this_name), Vcoding_system_alist, Qnil); |
| 10543 | if (NILP (val)) | 10543 | if (NILP (val)) |
| 10544 | Vcoding_system_alist | 10544 | Vcoding_system_alist |
| 10545 | = Fcons (Fcons (Fsymbol_name (this_name), Qnil), | 10545 | = Fcons (Fcons (Fsymbol_name (this_name), Qnil), |
| @@ -10554,7 +10554,7 @@ usage: (define-coding-system-internal ...) */) | |||
| 10554 | 10554 | ||
| 10555 | Fputhash (name, spec_vec, Vcoding_system_hash_table); | 10555 | Fputhash (name, spec_vec, Vcoding_system_hash_table); |
| 10556 | Vcoding_system_list = Fcons (name, Vcoding_system_list); | 10556 | Vcoding_system_list = Fcons (name, Vcoding_system_list); |
| 10557 | val = Fassoc (Fsymbol_name (name), Vcoding_system_alist); | 10557 | val = Fassoc (Fsymbol_name (name), Vcoding_system_alist, Qnil); |
| 10558 | if (NILP (val)) | 10558 | if (NILP (val)) |
| 10559 | Vcoding_system_alist = Fcons (Fcons (Fsymbol_name (name), Qnil), | 10559 | Vcoding_system_alist = Fcons (Fcons (Fsymbol_name (name), Qnil), |
| 10560 | Vcoding_system_alist); | 10560 | Vcoding_system_alist); |
| @@ -10662,7 +10662,7 @@ DEFUN ("define-coding-system-alias", Fdefine_coding_system_alias, | |||
| 10662 | 10662 | ||
| 10663 | Fputhash (alias, spec, Vcoding_system_hash_table); | 10663 | Fputhash (alias, spec, Vcoding_system_hash_table); |
| 10664 | Vcoding_system_list = Fcons (alias, Vcoding_system_list); | 10664 | Vcoding_system_list = Fcons (alias, Vcoding_system_list); |
| 10665 | val = Fassoc (Fsymbol_name (alias), Vcoding_system_alist); | 10665 | val = Fassoc (Fsymbol_name (alias), Vcoding_system_alist, Qnil); |
| 10666 | if (NILP (val)) | 10666 | if (NILP (val)) |
| 10667 | Vcoding_system_alist = Fcons (Fcons (Fsymbol_name (alias), Qnil), | 10667 | Vcoding_system_alist = Fcons (Fcons (Fsymbol_name (alias), Qnil), |
| 10668 | Vcoding_system_alist); | 10668 | Vcoding_system_alist); |