diff options
| author | Lars Ingebrigtsen | 2022-06-27 12:22:05 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-06-27 12:22:05 +0200 |
| commit | 513acdc9b4495c5273c55447c47d21534deffc7f (patch) | |
| tree | 8b11a15ace95d1f5ac334a01e4a1bdcd3fdf12a3 /src/process.c | |
| parent | 5b1bb1af030597aab7f7895b6e3da9b430f9438a (diff) | |
| download | emacs-513acdc9b4495c5273c55447c47d21534deffc7f.tar.gz 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/process.c')
| -rw-r--r-- | src/process.c | 164 |
1 files changed, 82 insertions, 82 deletions
diff --git a/src/process.c b/src/process.c index f9a32e0d6a0..af402c8edb3 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1281,7 +1281,7 @@ Return BUFFER. */) | |||
| 1281 | update_process_mark (p); | 1281 | update_process_mark (p); |
| 1282 | } | 1282 | } |
| 1283 | if (NETCONN1_P (p) || SERIALCONN1_P (p) || PIPECONN1_P (p)) | 1283 | if (NETCONN1_P (p) || SERIALCONN1_P (p) || PIPECONN1_P (p)) |
| 1284 | pset_childp (p, Fplist_put (p->childp, QCbuffer, buffer)); | 1284 | pset_childp (p, plist_put (p->childp, QCbuffer, buffer)); |
| 1285 | setup_process_coding_systems (process); | 1285 | setup_process_coding_systems (process); |
| 1286 | return buffer; | 1286 | return buffer; |
| 1287 | } | 1287 | } |
| @@ -1360,7 +1360,7 @@ The string argument is normally a multibyte string, except: | |||
| 1360 | pset_filter (p, filter); | 1360 | pset_filter (p, filter); |
| 1361 | 1361 | ||
| 1362 | if (NETCONN1_P (p) || SERIALCONN1_P (p) || PIPECONN1_P (p)) | 1362 | if (NETCONN1_P (p) || SERIALCONN1_P (p) || PIPECONN1_P (p)) |
| 1363 | pset_childp (p, Fplist_put (p->childp, QCfilter, filter)); | 1363 | pset_childp (p, plist_put (p->childp, QCfilter, filter)); |
| 1364 | setup_process_coding_systems (process); | 1364 | setup_process_coding_systems (process); |
| 1365 | return filter; | 1365 | return filter; |
| 1366 | } | 1366 | } |
| @@ -1392,7 +1392,7 @@ It gets two arguments: the process, and a string describing the change. */) | |||
| 1392 | 1392 | ||
| 1393 | pset_sentinel (p, sentinel); | 1393 | pset_sentinel (p, sentinel); |
| 1394 | if (NETCONN1_P (p) || SERIALCONN1_P (p) || PIPECONN1_P (p)) | 1394 | if (NETCONN1_P (p) || SERIALCONN1_P (p) || PIPECONN1_P (p)) |
| 1395 | pset_childp (p, Fplist_put (p->childp, QCsentinel, sentinel)); | 1395 | pset_childp (p, plist_put (p->childp, QCsentinel, sentinel)); |
| 1396 | return sentinel; | 1396 | return sentinel; |
| 1397 | } | 1397 | } |
| 1398 | 1398 | ||
| @@ -1553,25 +1553,25 @@ waiting for the process to be fully set up.*/) | |||
| 1553 | 1553 | ||
| 1554 | if (DATAGRAM_CONN_P (process) | 1554 | if (DATAGRAM_CONN_P (process) |
| 1555 | && (EQ (key, Qt) || EQ (key, QCremote))) | 1555 | && (EQ (key, Qt) || EQ (key, QCremote))) |
| 1556 | contact = Fplist_put (contact, QCremote, | 1556 | contact = plist_put (contact, QCremote, |
| 1557 | Fprocess_datagram_address (process)); | 1557 | Fprocess_datagram_address (process)); |
| 1558 | #endif | 1558 | #endif |
| 1559 | 1559 | ||
| 1560 | if ((!NETCONN_P (process) && !SERIALCONN_P (process) && !PIPECONN_P (process)) | 1560 | if ((!NETCONN_P (process) && !SERIALCONN_P (process) && !PIPECONN_P (process)) |
| 1561 | || EQ (key, Qt)) | 1561 | || EQ (key, Qt)) |
| 1562 | return contact; | 1562 | return contact; |
| 1563 | if (NILP (key) && NETCONN_P (process)) | 1563 | if (NILP (key) && NETCONN_P (process)) |
| 1564 | return list2 (Fplist_get (contact, QChost), | 1564 | return list2 (plist_get (contact, QChost), |
| 1565 | Fplist_get (contact, QCservice)); | 1565 | plist_get (contact, QCservice)); |
| 1566 | if (NILP (key) && SERIALCONN_P (process)) | 1566 | if (NILP (key) && SERIALCONN_P (process)) |
| 1567 | return list2 (Fplist_get (contact, QCport), | 1567 | return list2 (plist_get (contact, QCport), |
| 1568 | Fplist_get (contact, QCspeed)); | 1568 | plist_get (contact, QCspeed)); |
| 1569 | /* FIXME: Return a meaningful value (e.g., the child end of the pipe) | 1569 | /* FIXME: Return a meaningful value (e.g., the child end of the pipe) |
| 1570 | if the pipe process is useful for purposes other than receiving | 1570 | if the pipe process is useful for purposes other than receiving |
| 1571 | stderr. */ | 1571 | stderr. */ |
| 1572 | if (NILP (key) && PIPECONN_P (process)) | 1572 | if (NILP (key) && PIPECONN_P (process)) |
| 1573 | return Qt; | 1573 | return Qt; |
| 1574 | return Fplist_get (contact, key); | 1574 | return plist_get (contact, key); |
| 1575 | } | 1575 | } |
| 1576 | 1576 | ||
| 1577 | DEFUN ("process-plist", Fprocess_plist, Sprocess_plist, | 1577 | DEFUN ("process-plist", Fprocess_plist, Sprocess_plist, |
| @@ -1773,7 +1773,7 @@ usage: (make-process &rest ARGS) */) | |||
| 1773 | /* Save arguments for process-contact and clone-process. */ | 1773 | /* Save arguments for process-contact and clone-process. */ |
| 1774 | contact = Flist (nargs, args); | 1774 | contact = Flist (nargs, args); |
| 1775 | 1775 | ||
| 1776 | if (!NILP (Fplist_get (contact, QCfile_handler))) | 1776 | if (!NILP (plist_get (contact, QCfile_handler))) |
| 1777 | { | 1777 | { |
| 1778 | Lisp_Object file_handler | 1778 | Lisp_Object file_handler |
| 1779 | = Ffind_file_name_handler (BVAR (current_buffer, directory), | 1779 | = Ffind_file_name_handler (BVAR (current_buffer, directory), |
| @@ -1782,7 +1782,7 @@ usage: (make-process &rest ARGS) */) | |||
| 1782 | return CALLN (Fapply, file_handler, Qmake_process, contact); | 1782 | return CALLN (Fapply, file_handler, Qmake_process, contact); |
| 1783 | } | 1783 | } |
| 1784 | 1784 | ||
| 1785 | buffer = Fplist_get (contact, QCbuffer); | 1785 | buffer = plist_get (contact, QCbuffer); |
| 1786 | if (!NILP (buffer)) | 1786 | if (!NILP (buffer)) |
| 1787 | buffer = Fget_buffer_create (buffer, Qnil); | 1787 | buffer = Fget_buffer_create (buffer, Qnil); |
| 1788 | 1788 | ||
| @@ -1792,10 +1792,10 @@ usage: (make-process &rest ARGS) */) | |||
| 1792 | chdir, since it's in a vfork. */ | 1792 | chdir, since it's in a vfork. */ |
| 1793 | current_dir = get_current_directory (true); | 1793 | current_dir = get_current_directory (true); |
| 1794 | 1794 | ||
| 1795 | name = Fplist_get (contact, QCname); | 1795 | name = plist_get (contact, QCname); |
| 1796 | CHECK_STRING (name); | 1796 | CHECK_STRING (name); |
| 1797 | 1797 | ||
| 1798 | command = Fplist_get (contact, QCcommand); | 1798 | command = plist_get (contact, QCcommand); |
| 1799 | if (CONSP (command)) | 1799 | if (CONSP (command)) |
| 1800 | program = XCAR (command); | 1800 | program = XCAR (command); |
| 1801 | else | 1801 | else |
| @@ -1804,10 +1804,10 @@ usage: (make-process &rest ARGS) */) | |||
| 1804 | if (!NILP (program)) | 1804 | if (!NILP (program)) |
| 1805 | CHECK_STRING (program); | 1805 | CHECK_STRING (program); |
| 1806 | 1806 | ||
| 1807 | bool query_on_exit = NILP (Fplist_get (contact, QCnoquery)); | 1807 | bool query_on_exit = NILP (plist_get (contact, QCnoquery)); |
| 1808 | 1808 | ||
| 1809 | stderrproc = Qnil; | 1809 | stderrproc = Qnil; |
| 1810 | xstderr = Fplist_get (contact, QCstderr); | 1810 | xstderr = plist_get (contact, QCstderr); |
| 1811 | if (PROCESSP (xstderr)) | 1811 | if (PROCESSP (xstderr)) |
| 1812 | { | 1812 | { |
| 1813 | if (!PIPECONN_P (xstderr)) | 1813 | if (!PIPECONN_P (xstderr)) |
| @@ -1833,18 +1833,18 @@ usage: (make-process &rest ARGS) */) | |||
| 1833 | eassert (NILP (XPROCESS (proc)->plist)); | 1833 | eassert (NILP (XPROCESS (proc)->plist)); |
| 1834 | pset_type (XPROCESS (proc), Qreal); | 1834 | pset_type (XPROCESS (proc), Qreal); |
| 1835 | pset_buffer (XPROCESS (proc), buffer); | 1835 | pset_buffer (XPROCESS (proc), buffer); |
| 1836 | pset_sentinel (XPROCESS (proc), Fplist_get (contact, QCsentinel)); | 1836 | pset_sentinel (XPROCESS (proc), plist_get (contact, QCsentinel)); |
| 1837 | pset_filter (XPROCESS (proc), Fplist_get (contact, QCfilter)); | 1837 | pset_filter (XPROCESS (proc), plist_get (contact, QCfilter)); |
| 1838 | pset_command (XPROCESS (proc), Fcopy_sequence (command)); | 1838 | pset_command (XPROCESS (proc), Fcopy_sequence (command)); |
| 1839 | 1839 | ||
| 1840 | if (!query_on_exit) | 1840 | if (!query_on_exit) |
| 1841 | XPROCESS (proc)->kill_without_query = 1; | 1841 | XPROCESS (proc)->kill_without_query = 1; |
| 1842 | tem = Fplist_get (contact, QCstop); | 1842 | tem = plist_get (contact, QCstop); |
| 1843 | /* Normal processes can't be started in a stopped state, see | 1843 | /* Normal processes can't be started in a stopped state, see |
| 1844 | Bug#30460. */ | 1844 | Bug#30460. */ |
| 1845 | CHECK_TYPE (NILP (tem), Qnull, tem); | 1845 | CHECK_TYPE (NILP (tem), Qnull, tem); |
| 1846 | 1846 | ||
| 1847 | tem = Fplist_get (contact, QCconnection_type); | 1847 | tem = plist_get (contact, QCconnection_type); |
| 1848 | if (EQ (tem, Qpty)) | 1848 | if (EQ (tem, Qpty)) |
| 1849 | XPROCESS (proc)->pty_flag = true; | 1849 | XPROCESS (proc)->pty_flag = true; |
| 1850 | else if (EQ (tem, Qpipe)) | 1850 | else if (EQ (tem, Qpipe)) |
| @@ -1886,7 +1886,7 @@ usage: (make-process &rest ARGS) */) | |||
| 1886 | Lisp_Object coding_systems = Qt; | 1886 | Lisp_Object coding_systems = Qt; |
| 1887 | Lisp_Object val, *args2; | 1887 | Lisp_Object val, *args2; |
| 1888 | 1888 | ||
| 1889 | tem = Fplist_get (contact, QCcoding); | 1889 | tem = plist_get (contact, QCcoding); |
| 1890 | if (!NILP (tem)) | 1890 | if (!NILP (tem)) |
| 1891 | { | 1891 | { |
| 1892 | val = tem; | 1892 | val = tem; |
| @@ -2364,7 +2364,7 @@ usage: (make-pipe-process &rest ARGS) */) | |||
| 2364 | 2364 | ||
| 2365 | contact = Flist (nargs, args); | 2365 | contact = Flist (nargs, args); |
| 2366 | 2366 | ||
| 2367 | name = Fplist_get (contact, QCname); | 2367 | name = plist_get (contact, QCname); |
| 2368 | CHECK_STRING (name); | 2368 | CHECK_STRING (name); |
| 2369 | proc = make_process (name); | 2369 | proc = make_process (name); |
| 2370 | specpdl_ref specpdl_count = SPECPDL_INDEX (); | 2370 | specpdl_ref specpdl_count = SPECPDL_INDEX (); |
| @@ -2396,21 +2396,21 @@ usage: (make-pipe-process &rest ARGS) */) | |||
| 2396 | if (inchannel > max_desc) | 2396 | if (inchannel > max_desc) |
| 2397 | max_desc = inchannel; | 2397 | max_desc = inchannel; |
| 2398 | 2398 | ||
| 2399 | buffer = Fplist_get (contact, QCbuffer); | 2399 | buffer = plist_get (contact, QCbuffer); |
| 2400 | if (NILP (buffer)) | 2400 | if (NILP (buffer)) |
| 2401 | buffer = name; | 2401 | buffer = name; |
| 2402 | buffer = Fget_buffer_create (buffer, Qnil); | 2402 | buffer = Fget_buffer_create (buffer, Qnil); |
| 2403 | pset_buffer (p, buffer); | 2403 | pset_buffer (p, buffer); |
| 2404 | 2404 | ||
| 2405 | pset_childp (p, contact); | 2405 | pset_childp (p, contact); |
| 2406 | pset_plist (p, Fcopy_sequence (Fplist_get (contact, QCplist))); | 2406 | pset_plist (p, Fcopy_sequence (plist_get (contact, QCplist))); |
| 2407 | pset_type (p, Qpipe); | 2407 | pset_type (p, Qpipe); |
| 2408 | pset_sentinel (p, Fplist_get (contact, QCsentinel)); | 2408 | pset_sentinel (p, plist_get (contact, QCsentinel)); |
| 2409 | pset_filter (p, Fplist_get (contact, QCfilter)); | 2409 | pset_filter (p, plist_get (contact, QCfilter)); |
| 2410 | eassert (NILP (p->log)); | 2410 | eassert (NILP (p->log)); |
| 2411 | if (tem = Fplist_get (contact, QCnoquery), !NILP (tem)) | 2411 | if (tem = plist_get (contact, QCnoquery), !NILP (tem)) |
| 2412 | p->kill_without_query = 1; | 2412 | p->kill_without_query = 1; |
| 2413 | if (tem = Fplist_get (contact, QCstop), !NILP (tem)) | 2413 | if (tem = plist_get (contact, QCstop), !NILP (tem)) |
| 2414 | pset_command (p, Qt); | 2414 | pset_command (p, Qt); |
| 2415 | eassert (! p->pty_flag); | 2415 | eassert (! p->pty_flag); |
| 2416 | 2416 | ||
| @@ -2431,7 +2431,7 @@ usage: (make-pipe-process &rest ARGS) */) | |||
| 2431 | Lisp_Object coding_systems = Qt; | 2431 | Lisp_Object coding_systems = Qt; |
| 2432 | Lisp_Object val; | 2432 | Lisp_Object val; |
| 2433 | 2433 | ||
| 2434 | tem = Fplist_get (contact, QCcoding); | 2434 | tem = plist_get (contact, QCcoding); |
| 2435 | val = Qnil; | 2435 | val = Qnil; |
| 2436 | if (!NILP (tem)) | 2436 | if (!NILP (tem)) |
| 2437 | { | 2437 | { |
| @@ -2918,7 +2918,7 @@ set up yet, this function will block until socket setup has completed. */) | |||
| 2918 | 2918 | ||
| 2919 | if (set_socket_option (s, option, value)) | 2919 | if (set_socket_option (s, option, value)) |
| 2920 | { | 2920 | { |
| 2921 | pset_childp (p, Fplist_put (p->childp, option, value)); | 2921 | pset_childp (p, plist_put (p->childp, option, value)); |
| 2922 | return Qt; | 2922 | return Qt; |
| 2923 | } | 2923 | } |
| 2924 | 2924 | ||
| @@ -2996,19 +2996,19 @@ usage: (serial-process-configure &rest ARGS) */) | |||
| 2996 | 2996 | ||
| 2997 | contact = Flist (nargs, args); | 2997 | contact = Flist (nargs, args); |
| 2998 | 2998 | ||
| 2999 | proc = Fplist_get (contact, QCprocess); | 2999 | proc = plist_get (contact, QCprocess); |
| 3000 | if (NILP (proc)) | 3000 | if (NILP (proc)) |
| 3001 | proc = Fplist_get (contact, QCname); | 3001 | proc = plist_get (contact, QCname); |
| 3002 | if (NILP (proc)) | 3002 | if (NILP (proc)) |
| 3003 | proc = Fplist_get (contact, QCbuffer); | 3003 | proc = plist_get (contact, QCbuffer); |
| 3004 | if (NILP (proc)) | 3004 | if (NILP (proc)) |
| 3005 | proc = Fplist_get (contact, QCport); | 3005 | proc = plist_get (contact, QCport); |
| 3006 | proc = get_process (proc); | 3006 | proc = get_process (proc); |
| 3007 | p = XPROCESS (proc); | 3007 | p = XPROCESS (proc); |
| 3008 | if (!EQ (p->type, Qserial)) | 3008 | if (!EQ (p->type, Qserial)) |
| 3009 | error ("Not a serial process"); | 3009 | error ("Not a serial process"); |
| 3010 | 3010 | ||
| 3011 | if (NILP (Fplist_get (p->childp, QCspeed))) | 3011 | if (NILP (plist_get (p->childp, QCspeed))) |
| 3012 | return Qnil; | 3012 | return Qnil; |
| 3013 | 3013 | ||
| 3014 | serial_configure (p, contact); | 3014 | serial_configure (p, contact); |
| @@ -3101,17 +3101,17 @@ usage: (make-serial-process &rest ARGS) */) | |||
| 3101 | 3101 | ||
| 3102 | contact = Flist (nargs, args); | 3102 | contact = Flist (nargs, args); |
| 3103 | 3103 | ||
| 3104 | port = Fplist_get (contact, QCport); | 3104 | port = plist_get (contact, QCport); |
| 3105 | if (NILP (port)) | 3105 | if (NILP (port)) |
| 3106 | error ("No port specified"); | 3106 | error ("No port specified"); |
| 3107 | CHECK_STRING (port); | 3107 | CHECK_STRING (port); |
| 3108 | 3108 | ||
| 3109 | if (NILP (Fplist_member (contact, QCspeed))) | 3109 | if (NILP (plist_member (contact, QCspeed))) |
| 3110 | error (":speed not specified"); | 3110 | error (":speed not specified"); |
| 3111 | if (!NILP (Fplist_get (contact, QCspeed))) | 3111 | if (!NILP (plist_get (contact, QCspeed))) |
| 3112 | CHECK_FIXNUM (Fplist_get (contact, QCspeed)); | 3112 | CHECK_FIXNUM (plist_get (contact, QCspeed)); |
| 3113 | 3113 | ||
| 3114 | name = Fplist_get (contact, QCname); | 3114 | name = plist_get (contact, QCname); |
| 3115 | if (NILP (name)) | 3115 | if (NILP (name)) |
| 3116 | name = port; | 3116 | name = port; |
| 3117 | CHECK_STRING (name); | 3117 | CHECK_STRING (name); |
| @@ -3131,21 +3131,21 @@ usage: (make-serial-process &rest ARGS) */) | |||
| 3131 | eassert (0 <= fd && fd < FD_SETSIZE); | 3131 | eassert (0 <= fd && fd < FD_SETSIZE); |
| 3132 | chan_process[fd] = proc; | 3132 | chan_process[fd] = proc; |
| 3133 | 3133 | ||
| 3134 | buffer = Fplist_get (contact, QCbuffer); | 3134 | buffer = plist_get (contact, QCbuffer); |
| 3135 | if (NILP (buffer)) | 3135 | if (NILP (buffer)) |
| 3136 | buffer = name; | 3136 | buffer = name; |
| 3137 | buffer = Fget_buffer_create (buffer, Qnil); | 3137 | buffer = Fget_buffer_create (buffer, Qnil); |
| 3138 | pset_buffer (p, buffer); | 3138 | pset_buffer (p, buffer); |
| 3139 | 3139 | ||
| 3140 | pset_childp (p, contact); | 3140 | pset_childp (p, contact); |
| 3141 | pset_plist (p, Fcopy_sequence (Fplist_get (contact, QCplist))); | 3141 | pset_plist (p, Fcopy_sequence (plist_get (contact, QCplist))); |
| 3142 | pset_type (p, Qserial); | 3142 | pset_type (p, Qserial); |
| 3143 | pset_sentinel (p, Fplist_get (contact, QCsentinel)); | 3143 | pset_sentinel (p, plist_get (contact, QCsentinel)); |
| 3144 | pset_filter (p, Fplist_get (contact, QCfilter)); | 3144 | pset_filter (p, plist_get (contact, QCfilter)); |
| 3145 | eassert (NILP (p->log)); | 3145 | eassert (NILP (p->log)); |
| 3146 | if (tem = Fplist_get (contact, QCnoquery), !NILP (tem)) | 3146 | if (tem = plist_get (contact, QCnoquery), !NILP (tem)) |
| 3147 | p->kill_without_query = 1; | 3147 | p->kill_without_query = 1; |
| 3148 | if (tem = Fplist_get (contact, QCstop), !NILP (tem)) | 3148 | if (tem = plist_get (contact, QCstop), !NILP (tem)) |
| 3149 | pset_command (p, Qt); | 3149 | pset_command (p, Qt); |
| 3150 | eassert (! p->pty_flag); | 3150 | eassert (! p->pty_flag); |
| 3151 | 3151 | ||
| @@ -3155,7 +3155,7 @@ usage: (make-serial-process &rest ARGS) */) | |||
| 3155 | 3155 | ||
| 3156 | update_process_mark (p); | 3156 | update_process_mark (p); |
| 3157 | 3157 | ||
| 3158 | tem = Fplist_get (contact, QCcoding); | 3158 | tem = plist_get (contact, QCcoding); |
| 3159 | 3159 | ||
| 3160 | val = Qnil; | 3160 | val = Qnil; |
| 3161 | if (!NILP (tem)) | 3161 | if (!NILP (tem)) |
| @@ -3209,7 +3209,7 @@ set_network_socket_coding_system (Lisp_Object proc, Lisp_Object host, | |||
| 3209 | Lisp_Object coding_systems = Qt; | 3209 | Lisp_Object coding_systems = Qt; |
| 3210 | Lisp_Object val; | 3210 | Lisp_Object val; |
| 3211 | 3211 | ||
| 3212 | tem = Fplist_get (contact, QCcoding); | 3212 | tem = plist_get (contact, QCcoding); |
| 3213 | 3213 | ||
| 3214 | /* Setup coding systems for communicating with the network stream. */ | 3214 | /* Setup coding systems for communicating with the network stream. */ |
| 3215 | /* Qt denotes we have not yet called Ffind_operation_coding_system. */ | 3215 | /* Qt denotes we have not yet called Ffind_operation_coding_system. */ |
| @@ -3297,8 +3297,8 @@ finish_after_tls_connection (Lisp_Object proc) | |||
| 3297 | if (!NILP (Ffboundp (Qnsm_verify_connection))) | 3297 | if (!NILP (Ffboundp (Qnsm_verify_connection))) |
| 3298 | result = call3 (Qnsm_verify_connection, | 3298 | result = call3 (Qnsm_verify_connection, |
| 3299 | proc, | 3299 | proc, |
| 3300 | Fplist_get (contact, QChost), | 3300 | plist_get (contact, QChost), |
| 3301 | Fplist_get (contact, QCservice)); | 3301 | plist_get (contact, QCservice)); |
| 3302 | 3302 | ||
| 3303 | eassert (p->outfd < FD_SETSIZE); | 3303 | eassert (p->outfd < FD_SETSIZE); |
| 3304 | if (NILP (result)) | 3304 | if (NILP (result)) |
| @@ -3479,7 +3479,7 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos, | |||
| 3479 | if (getsockname (s, psa1, &len1) == 0) | 3479 | if (getsockname (s, psa1, &len1) == 0) |
| 3480 | { | 3480 | { |
| 3481 | Lisp_Object service = make_fixnum (ntohs (sa1.sin_port)); | 3481 | Lisp_Object service = make_fixnum (ntohs (sa1.sin_port)); |
| 3482 | contact = Fplist_put (contact, QCservice, service); | 3482 | contact = plist_put (contact, QCservice, service); |
| 3483 | /* Save the port number so that we can stash it in | 3483 | /* Save the port number so that we can stash it in |
| 3484 | the process object later. */ | 3484 | the process object later. */ |
| 3485 | DECLARE_POINTER_ALIAS (psa, struct sockaddr_in, sa); | 3485 | DECLARE_POINTER_ALIAS (psa, struct sockaddr_in, sa); |
| @@ -3570,7 +3570,7 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos, | |||
| 3570 | { | 3570 | { |
| 3571 | Lisp_Object remote; | 3571 | Lisp_Object remote; |
| 3572 | memset (datagram_address[s].sa, 0, addrlen); | 3572 | memset (datagram_address[s].sa, 0, addrlen); |
| 3573 | if (remote = Fplist_get (contact, QCremote), !NILP (remote)) | 3573 | if (remote = plist_get (contact, QCremote), !NILP (remote)) |
| 3574 | { | 3574 | { |
| 3575 | int rfamily; | 3575 | int rfamily; |
| 3576 | ptrdiff_t rlen = get_lisp_to_sockaddr_size (remote, &rfamily); | 3576 | ptrdiff_t rlen = get_lisp_to_sockaddr_size (remote, &rfamily); |
| @@ -3585,8 +3585,8 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos, | |||
| 3585 | } | 3585 | } |
| 3586 | #endif | 3586 | #endif |
| 3587 | 3587 | ||
| 3588 | contact = Fplist_put (contact, p->is_server? QClocal: QCremote, | 3588 | contact = plist_put (contact, p->is_server? QClocal: QCremote, |
| 3589 | conv_sockaddr_to_lisp (sa, addrlen)); | 3589 | conv_sockaddr_to_lisp (sa, addrlen)); |
| 3590 | #ifdef HAVE_GETSOCKNAME | 3590 | #ifdef HAVE_GETSOCKNAME |
| 3591 | if (!p->is_server) | 3591 | if (!p->is_server) |
| 3592 | { | 3592 | { |
| @@ -3594,8 +3594,8 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos, | |||
| 3594 | socklen_t len1 = sizeof (sa1); | 3594 | socklen_t len1 = sizeof (sa1); |
| 3595 | DECLARE_POINTER_ALIAS (psa1, struct sockaddr, &sa1); | 3595 | DECLARE_POINTER_ALIAS (psa1, struct sockaddr, &sa1); |
| 3596 | if (getsockname (s, psa1, &len1) == 0) | 3596 | if (getsockname (s, psa1, &len1) == 0) |
| 3597 | contact = Fplist_put (contact, QClocal, | 3597 | contact = plist_put (contact, QClocal, |
| 3598 | conv_sockaddr_to_lisp (psa1, len1)); | 3598 | conv_sockaddr_to_lisp (psa1, len1)); |
| 3599 | } | 3599 | } |
| 3600 | #endif | 3600 | #endif |
| 3601 | } | 3601 | } |
| @@ -3908,7 +3908,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3908 | #endif | 3908 | #endif |
| 3909 | 3909 | ||
| 3910 | /* :type TYPE (nil: stream, datagram */ | 3910 | /* :type TYPE (nil: stream, datagram */ |
| 3911 | tem = Fplist_get (contact, QCtype); | 3911 | tem = plist_get (contact, QCtype); |
| 3912 | if (NILP (tem)) | 3912 | if (NILP (tem)) |
| 3913 | socktype = SOCK_STREAM; | 3913 | socktype = SOCK_STREAM; |
| 3914 | #ifdef DATAGRAM_SOCKETS | 3914 | #ifdef DATAGRAM_SOCKETS |
| @@ -3922,13 +3922,13 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3922 | else | 3922 | else |
| 3923 | error ("Unsupported connection type"); | 3923 | error ("Unsupported connection type"); |
| 3924 | 3924 | ||
| 3925 | name = Fplist_get (contact, QCname); | 3925 | name = plist_get (contact, QCname); |
| 3926 | buffer = Fplist_get (contact, QCbuffer); | 3926 | buffer = plist_get (contact, QCbuffer); |
| 3927 | filter = Fplist_get (contact, QCfilter); | 3927 | filter = plist_get (contact, QCfilter); |
| 3928 | sentinel = Fplist_get (contact, QCsentinel); | 3928 | sentinel = plist_get (contact, QCsentinel); |
| 3929 | use_external_socket_p = Fplist_get (contact, QCuse_external_socket); | 3929 | use_external_socket_p = plist_get (contact, QCuse_external_socket); |
| 3930 | Lisp_Object server = Fplist_get (contact, QCserver); | 3930 | Lisp_Object server = plist_get (contact, QCserver); |
| 3931 | bool nowait = !NILP (Fplist_get (contact, QCnowait)); | 3931 | bool nowait = !NILP (plist_get (contact, QCnowait)); |
| 3932 | 3932 | ||
| 3933 | if (!NILP (server) && nowait) | 3933 | if (!NILP (server) && nowait) |
| 3934 | error ("`:server' is incompatible with `:nowait'"); | 3934 | error ("`:server' is incompatible with `:nowait'"); |
| @@ -3936,9 +3936,9 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3936 | 3936 | ||
| 3937 | /* :local ADDRESS or :remote ADDRESS */ | 3937 | /* :local ADDRESS or :remote ADDRESS */ |
| 3938 | if (NILP (server)) | 3938 | if (NILP (server)) |
| 3939 | address = Fplist_get (contact, QCremote); | 3939 | address = plist_get (contact, QCremote); |
| 3940 | else | 3940 | else |
| 3941 | address = Fplist_get (contact, QClocal); | 3941 | address = plist_get (contact, QClocal); |
| 3942 | if (!NILP (address)) | 3942 | if (!NILP (address)) |
| 3943 | { | 3943 | { |
| 3944 | host = service = Qnil; | 3944 | host = service = Qnil; |
| @@ -3951,7 +3951,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3951 | } | 3951 | } |
| 3952 | 3952 | ||
| 3953 | /* :family FAMILY -- nil (for Inet), local, or integer. */ | 3953 | /* :family FAMILY -- nil (for Inet), local, or integer. */ |
| 3954 | tem = Fplist_get (contact, QCfamily); | 3954 | tem = plist_get (contact, QCfamily); |
| 3955 | if (NILP (tem)) | 3955 | if (NILP (tem)) |
| 3956 | { | 3956 | { |
| 3957 | #ifdef AF_INET6 | 3957 | #ifdef AF_INET6 |
| @@ -3976,10 +3976,10 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3976 | error ("Unknown address family"); | 3976 | error ("Unknown address family"); |
| 3977 | 3977 | ||
| 3978 | /* :service SERVICE -- string, integer (port number), or t (random port). */ | 3978 | /* :service SERVICE -- string, integer (port number), or t (random port). */ |
| 3979 | service = Fplist_get (contact, QCservice); | 3979 | service = plist_get (contact, QCservice); |
| 3980 | 3980 | ||
| 3981 | /* :host HOST -- hostname, ip address, or 'local for localhost. */ | 3981 | /* :host HOST -- hostname, ip address, or 'local for localhost. */ |
| 3982 | host = Fplist_get (contact, QChost); | 3982 | host = plist_get (contact, QChost); |
| 3983 | if (NILP (host)) | 3983 | if (NILP (host)) |
| 3984 | { | 3984 | { |
| 3985 | /* The "connection" function gets it bind info from the address we're | 3985 | /* The "connection" function gets it bind info from the address we're |
| @@ -4018,7 +4018,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 4018 | if (!NILP (host)) | 4018 | if (!NILP (host)) |
| 4019 | { | 4019 | { |
| 4020 | message (":family local ignores the :host property"); | 4020 | message (":family local ignores the :host property"); |
| 4021 | contact = Fplist_put (contact, QChost, Qnil); | 4021 | contact = plist_put (contact, QChost, Qnil); |
| 4022 | host = Qnil; | 4022 | host = Qnil; |
| 4023 | } | 4023 | } |
| 4024 | CHECK_STRING (service); | 4024 | CHECK_STRING (service); |
| @@ -4172,16 +4172,16 @@ usage: (make-network-process &rest ARGS) */) | |||
| 4172 | record_unwind_protect (remove_process, proc); | 4172 | record_unwind_protect (remove_process, proc); |
| 4173 | p = XPROCESS (proc); | 4173 | p = XPROCESS (proc); |
| 4174 | pset_childp (p, contact); | 4174 | pset_childp (p, contact); |
| 4175 | pset_plist (p, Fcopy_sequence (Fplist_get (contact, QCplist))); | 4175 | pset_plist (p, Fcopy_sequence (plist_get (contact, QCplist))); |
| 4176 | pset_type (p, Qnetwork); | 4176 | pset_type (p, Qnetwork); |
| 4177 | 4177 | ||
| 4178 | pset_buffer (p, buffer); | 4178 | pset_buffer (p, buffer); |
| 4179 | pset_sentinel (p, sentinel); | 4179 | pset_sentinel (p, sentinel); |
| 4180 | pset_filter (p, filter); | 4180 | pset_filter (p, filter); |
| 4181 | pset_log (p, Fplist_get (contact, QClog)); | 4181 | pset_log (p, plist_get (contact, QClog)); |
| 4182 | if (tem = Fplist_get (contact, QCnoquery), !NILP (tem)) | 4182 | if (tem = plist_get (contact, QCnoquery), !NILP (tem)) |
| 4183 | p->kill_without_query = 1; | 4183 | p->kill_without_query = 1; |
| 4184 | if ((tem = Fplist_get (contact, QCstop), !NILP (tem))) | 4184 | if ((tem = plist_get (contact, QCstop), !NILP (tem))) |
| 4185 | pset_command (p, Qt); | 4185 | pset_command (p, Qt); |
| 4186 | eassert (p->pid == 0); | 4186 | eassert (p->pid == 0); |
| 4187 | p->backlog = 5; | 4187 | p->backlog = 5; |
| @@ -4193,7 +4193,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 4193 | eassert (! p->dns_request); | 4193 | eassert (! p->dns_request); |
| 4194 | #endif | 4194 | #endif |
| 4195 | #ifdef HAVE_GNUTLS | 4195 | #ifdef HAVE_GNUTLS |
| 4196 | tem = Fplist_get (contact, QCtls_parameters); | 4196 | tem = plist_get (contact, QCtls_parameters); |
| 4197 | CHECK_LIST (tem); | 4197 | CHECK_LIST (tem); |
| 4198 | p->gnutls_boot_parameters = tem; | 4198 | p->gnutls_boot_parameters = tem; |
| 4199 | #endif | 4199 | #endif |
| @@ -4969,17 +4969,17 @@ server_accept_connection (Lisp_Object server, int channel) | |||
| 4969 | 4969 | ||
| 4970 | /* Build new contact information for this setup. */ | 4970 | /* Build new contact information for this setup. */ |
| 4971 | contact = Fcopy_sequence (ps->childp); | 4971 | contact = Fcopy_sequence (ps->childp); |
| 4972 | contact = Fplist_put (contact, QCserver, Qnil); | 4972 | contact = plist_put (contact, QCserver, Qnil); |
| 4973 | contact = Fplist_put (contact, QChost, host); | 4973 | contact = plist_put (contact, QChost, host); |
| 4974 | if (!NILP (service)) | 4974 | if (!NILP (service)) |
| 4975 | contact = Fplist_put (contact, QCservice, service); | 4975 | contact = plist_put (contact, QCservice, service); |
| 4976 | contact = Fplist_put (contact, QCremote, | 4976 | contact = plist_put (contact, QCremote, |
| 4977 | conv_sockaddr_to_lisp (&saddr.sa, len)); | 4977 | conv_sockaddr_to_lisp (&saddr.sa, len)); |
| 4978 | #ifdef HAVE_GETSOCKNAME | 4978 | #ifdef HAVE_GETSOCKNAME |
| 4979 | len = sizeof saddr; | 4979 | len = sizeof saddr; |
| 4980 | if (getsockname (s, &saddr.sa, &len) == 0) | 4980 | if (getsockname (s, &saddr.sa, &len) == 0) |
| 4981 | contact = Fplist_put (contact, QClocal, | 4981 | contact = plist_put (contact, QClocal, |
| 4982 | conv_sockaddr_to_lisp (&saddr.sa, len)); | 4982 | conv_sockaddr_to_lisp (&saddr.sa, len)); |
| 4983 | #endif | 4983 | #endif |
| 4984 | 4984 | ||
| 4985 | pset_childp (p, contact); | 4985 | pset_childp (p, contact); |