Subject: [PATCH] Python: disable some unconditional messaging

From: Vitaliy Chepelev <[email-masked]>
Date: Sat, 11 Jan 2025 06:36:15 -0000

Severity: minor

This code disable function that used in one place and just do
 unconditional messaging about a indented block, I don't know for what.
 I guess, it was used for debuging
 python-info-dedenter-opening-block-position. This functions just call
 one function and message a result. Messaging happen when TAB key pressed
 as a part of python-indent-line-function.  I use master head to create
 this patch.

---
 lisp/progmodes/python.el | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 16c296a8f86..4fa62ef927f 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1897,8 +1897,7 @@ level."
                   (point)))))
     (save-excursion
       (indent-line-to
-       (python-indent-calculate-indentation previous))
-      (python-info-dedenter-opening-block-message))
+       (python-indent-calculate-indentation previous)))
     (when follow-indentation-p
       (back-to-indentation))))

@@ -6241,19 +6240,6 @@ likely an invalid python file."
           ;; sort by closer
           (nreverse opening-blocks))))))

-(define-obsolete-function-alias
-  'python-info-closing-block-message
-  #'python-info-dedenter-opening-block-message "24.4")
-
-(defun python-info-dedenter-opening-block-message  ()
-  "Message the first line of the block the current statement closes."
-  (let ((point (python-info-dedenter-opening-block-position)))
-    (when point
-        (message "Closes %s" (save-excursion
-                               (goto-char point)
-                               (buffer-substring
-                                (point) (line-end-position)))))))
-
 (defun python-info-dedenter-statement-p ()
   "Return point if current statement is a dedenter.
 Sets `match-data' to the keyword that starts the dedenter
--
2.45.2