diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-06-27 12:22:05 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-06-27 12:22:05 +0200 |
commit | 513acdc9b4495c5273c55447c47d21534deffc7f (patch) | |
tree | 8b11a15ace95d1f5ac334a01e4a1bdcd3fdf12a3 /src/indent.c | |
parent | 5b1bb1af030597aab7f7895b6e3da9b430f9438a (diff) | |
download | emacs-513acdc9b4495c5273c55447c47d21534deffc7f.tar.gz emacs-513acdc9b4495c5273c55447c47d21534deffc7f.tar.bz2 emacs-513acdc9b4495c5273c55447c47d21534deffc7f.zip |
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).
Diffstat (limited to 'src/indent.c')
-rw-r--r-- | src/indent.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/indent.c b/src/indent.c index c3d78518c43..d4ef075f001 100644 --- a/src/indent.c +++ b/src/indent.c @@ -484,15 +484,15 @@ check_display_width (ptrdiff_t pos, ptrdiff_t col, ptrdiff_t *endpos) : MOST_POSITIVE_FIXNUM); plist = XCDR (val); - if ((prop = Fplist_get (plist, QCwidth), + if ((prop = plist_get (plist, QCwidth), RANGED_FIXNUMP (0, prop, INT_MAX)) - || (prop = Fplist_get (plist, QCrelative_width), + || (prop = plist_get (plist, QCrelative_width), RANGED_FIXNUMP (0, prop, INT_MAX))) width = XFIXNUM (prop); else if (FLOATP (prop) && 0 <= XFLOAT_DATA (prop) && XFLOAT_DATA (prop) <= INT_MAX) width = (int)(XFLOAT_DATA (prop) + 0.5); - else if ((prop = Fplist_get (plist, QCalign_to), + else if ((prop = plist_get (plist, QCalign_to), RANGED_FIXNUMP (col, prop, align_to_max))) width = XFIXNUM (prop) - col; else if (FLOATP (prop) && col <= XFLOAT_DATA (prop) @@ -514,7 +514,7 @@ check_display_width (ptrdiff_t pos, ptrdiff_t col, ptrdiff_t *endpos) /* For :relative-width, we need to multiply by the column width of the character at POS, if it is greater than 1. */ if (!NILP (plist) - && !NILP (Fplist_get (plist, QCrelative_width)) + && !NILP (plist_get (plist, QCrelative_width)) && !NILP (BVAR (current_buffer, enable_multibyte_characters))) { int b, wd; |