From ef4c92bc0cebf36a21ab2074931b64701afc18e4 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 17 Jul 2020 03:52:35 +0200 Subject: [PATCH] Make old aliases to gnus-child* commands work before Gnus is loaded * lisp/gnus/gnus.el (gnus-slave-no-server, gnus-slave): Mark as obsolete in a way that still lets them be used as interactive commands before Gnus is loaded. * lisp/gnus/gnus-agent.el (gnus-slave-unplugged): Ditto (bug#42401). --- lisp/gnus/gnus-agent.el | 8 ++++++-- lisp/gnus/gnus.el | 14 ++++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index a617429de13..88873f47bd5 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -610,8 +610,12 @@ manipulated as follows: (gnus arg nil 'child)) ;;;###autoload -(define-obsolete-function-alias 'gnus-slave-unplugged #'gnus-child-unplugged - "28.1") +(defun gnus-slave-unplugged (&optional arg) + "Read news as a child unplugged." + (interactive "P") + (setq gnus-plugged nil) + (gnus arg nil 'child)) +(make-obsolete 'gnus-slave-unplugged 'gnus-child-unplugged "28.1") diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index f40ce0c7926..69f2bb27993 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -4040,8 +4040,11 @@ Allow completion over sensible values." (gnus-no-server arg t)) ;;;###autoload -(define-obsolete-function-alias 'gnus-slave-no-server #'gnus-child-no-server - "28.1") +(defun gnus-slave-no-server (&optional arg) + "Read network news as a child, without connecting to the local server." + (interactive "P") + (gnus-no-server arg t)) +(make-obsolete 'gnus-slave-no-server 'gnus-child-no-server "28.1") ;;;###autoload (defun gnus-no-server (&optional arg child) @@ -4062,8 +4065,11 @@ server." (gnus arg nil 'child)) ;;;###autoload -(define-obsolete-function-alias 'gnus-slave #'gnus-child "28.1") - +(defun gnus-slave (&optional arg) + "Read news as a child." + (interactive "P") + (gnus arg nil 'child)) +(make-obsolete 'gnus-slave 'gnus-child "28.1") (defun gnus-delete-gnus-frame () "Delete gnus frame unless it is the only one. -- 2.39.2