From 043ae1f53a29d69f2573356715861ec54d626b56 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 19 Aug 2022 17:17:41 +0200 Subject: [PATCH] Delete two functions obsolete since Emacs 23 These were announced as removed in Emacs 28.1 NEWS, but apparently never actually deleted: only their obsoletion warning was removed. So the warnings were reintroduced in Emacs 28.2, and we now actually delete them here instead. * src/process.c (Fset_process_filter_multibyte) (Fprocess_filter_multibyte_p): Delete functions obsolete since Emacs 23. (syms_of_process): Delete corresponding defsubrs. * lisp/subr.el (process-filter-multibyte-p) (set-process-filter-multibyte): Delete obsoletion. * lisp/erc/erc-dcc.el (erc-dcc-server): Don't use obsolete functions. --- etc/NEWS | 3 ++- lisp/erc/erc-dcc.el | 5 +---- lisp/subr.el | 2 -- src/process.c | 42 ------------------------------------------ 4 files changed, 3 insertions(+), 49 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index e5260e4e7e3..0274e3b1535 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2544,7 +2544,8 @@ but switching to `ash` is generally much preferable. --- ** Some functions and variables obsolete since Emacs 23 have been removed: 'find-emacs-lisp-shadows', 'newsticker-cache-filename', -'redisplay-end-trigger-functions', 'set-window-redisplay-end-trigger', +'process-filter-multibyte-p', 'redisplay-end-trigger-functions', +'set-process-filter-multibyte', 'set-window-redisplay-end-trigger', 'unify-8859-on-decoding-mode', 'unify-8859-on-encoding-mode', 'vc-arch-command', 'window-redisplay-end-trigger', 'x-selection'. diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el index 977080a4de1..dd70bfb7b70 100644 --- a/lisp/erc/erc-dcc.el +++ b/lisp/erc/erc-dcc.el @@ -357,10 +357,7 @@ Returns the newly created subprocess, or nil." :server t)) (when (processp process) (when (fboundp 'set-process-coding-system) - (set-process-coding-system process 'binary 'binary)) - (when (fboundp 'set-process-filter-multibyte) - (with-no-warnings ; obsolete since 23.1 - (set-process-filter-multibyte process nil))))) + (set-process-coding-system process 'binary 'binary)))) (file-error (unless (and (string= "Cannot bind server socket" (nth 1 err)) (string= "address already in use" (downcase (nth 2 err)))) diff --git a/lisp/subr.el b/lisp/subr.el index de8a0f70864..cd6a9be099c 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1866,8 +1866,6 @@ be a list of the form returned by `event-start' and `event-end'." (make-obsolete-variable 'inhibit-changing-match-data 'save-match-data "29.1") (make-obsolete 'run-window-configuration-change-hook nil "27.1") -(make-obsolete 'process-filter-multibyte-p nil "23.1") -(make-obsolete 'set-process-filter-multibyte nil "23.1") (make-obsolete-variable 'command-debug-status "expect it to be removed in a future version." "25.2") diff --git a/src/process.c b/src/process.c index 697249a461b..7a133cda00f 100644 --- a/src/process.c +++ b/src/process.c @@ -7773,46 +7773,6 @@ DEFUN ("process-coding-system", XPROCESS (process)->encode_coding_system); } -DEFUN ("set-process-filter-multibyte", Fset_process_filter_multibyte, - Sset_process_filter_multibyte, 2, 2, 0, - doc: /* Set multibyteness of the strings given to PROCESS's filter. -If FLAG is non-nil, the filter is given multibyte strings. -If FLAG is nil, the filter is given unibyte strings. In this case, -all character code conversion except for end-of-line conversion is -suppressed. */) - (Lisp_Object process, Lisp_Object flag) -{ - CHECK_PROCESS (process); - - struct Lisp_Process *p = XPROCESS (process); - if (NILP (flag)) - pset_decode_coding_system - (p, raw_text_coding_system (p->decode_coding_system)); - - /* If the sockets haven't been set up yet, the final setup part of - this will be called asynchronously. */ - if (p->infd < 0 || p->outfd < 0) - return Qnil; - - setup_process_coding_systems (process); - - return Qnil; -} - -DEFUN ("process-filter-multibyte-p", Fprocess_filter_multibyte_p, - Sprocess_filter_multibyte_p, 1, 1, 0, - doc: /* Return t if a multibyte string is given to PROCESS's filter.*/) - (Lisp_Object process) -{ - CHECK_PROCESS (process); - struct Lisp_Process *p = XPROCESS (process); - if (p->infd < 0) - return Qnil; - eassert (p->infd < FD_SETSIZE); - struct coding_system *coding = proc_decode_coding_system[p->infd]; - return (CODING_FOR_UNIBYTE (coding) ? Qnil : Qt); -} - @@ -8808,8 +8768,6 @@ sentinel or a process filter function has an error. */); defsubr (&Sinternal_default_process_filter); defsubr (&Sset_process_coding_system); defsubr (&Sprocess_coding_system); - defsubr (&Sset_process_filter_multibyte); - defsubr (&Sprocess_filter_multibyte_p); { Lisp_Object subfeatures = Qnil; -- 2.39.5