Part of #7245: when KeyboardInterrupt is raised while defining commands, restore the old commands instead of producing a traceback.
diff --git a/Misc/NEWS b/Misc/NEWS
index 2bfebd0..b7a5eda 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -475,6 +475,9 @@
 Library
 -------
 
+- In pdb, when Ctrl-C is entered while defining commands for a
+  breakpoint, the old commands are restored.
+
 - For traceback debugging, the pdb listing now also shows the locations
   where the exception was originally (re)raised, if it differs from the
   last line executed (e.g. in case of finally clauses).