Subject: bug#24555: [PATCH] Remove unused variable `command-debug-status'

From: Philippe Vaucher <[email-masked]>
Date: Mon, 3 Oct 2016 09:42:14 +0200

>
> Here are the new patches with your modifications.
>
> Also viewable at https://github.com/Silex/emacs/compare/emacs-25~2...
> Silex:emacs-25
>

And again new patches without a typo :-)

Philippe
From 16524476a21a09e0195d2db34e1ed4008b91d31c Mon Sep 17 00:00:00 2001
From: Philippe Vaucher <[email-masked]>
Date: Sat, 1 Oct 2016 13:11:13 +0200
Subject: [PATCH 1/2] Restore command-debug-status functionality

---
 src/callint.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/callint.c b/src/callint.c
index 053ee6c..4652151 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -837,7 +837,10 @@ invoke it.  If KEYS is omitted or nil, the return value of
   kset_last_command (current_kboard, save_last_command);
 
   {
-    Lisp_Object val = Ffuncall (nargs, args);
+    Lisp_Object val;
+    specbind (Vcommand_debug_status, Qnil);
+
+    val = Ffuncall (nargs, args);
     val = unbind_to (speccount, val);
     SAFE_FREE ();
     return val;
-- 
2.10.0

From 2ac525977746173c2dd3be552960ab0a099b4dc3 Mon Sep 17 00:00:00 2001
From: Philippe Vaucher <[email-masked]>
Date: Wed, 28 Sep 2016 12:14:28 +0200
Subject: [PATCH 2/2] Deprecate variable command-debug-status

---
 doc/lispref/debugging.texi | 2 ++
 lisp/subr.el               | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi
index 2f83b40..c88a2fa 100644
--- a/doc/lispref/debugging.texi
+++ b/doc/lispref/debugging.texi
@@ -654,6 +654,8 @@ invocation.
 The advantage of using this variable rather than an ordinary global
 variable is that the data will never carry over to a subsequent command
 invocation.
+
+This variable is obsolete and will be removed in future versions.
 @end defvar
 
 @defun backtrace-frame frame-number
diff --git a/lisp/subr.el b/lisp/subr.el
index e9e19d3..5a9543d 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1377,6 +1377,8 @@ is converted into a string by expressing it in decimal."
 (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")
+
 ;; Lisp manual only updated in 22.1.
 (define-obsolete-variable-alias 'executing-macro 'executing-kbd-macro
   "before 19.34")
-- 
2.10.0