From 9c1b56cb070e7018b8799374fe0c43ea9ba01b20 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Tue, 22 Apr 2025 20:45:34 +0800 Subject: [PATCH] Delete unused block-comment-start and block-comment-end * lisp/newcomment.el (block-comment-start) (block-comment-end): Delete. (comment-indent): * lisp/cedet/semantic/doc.el (semantic-doc-snarf-comment-for-tag): Remove use of the now-deleted variables. (cherry picked from commit b2a77b6e01ba190d7b8e0943d8e64c97ed55947d) --- lisp/newcomment.el | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 945187e863f..23fcbc05372 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -56,7 +56,6 @@ ;; - spill auto-fill of comments onto the end of the next line. ;; - uncomment-region with a consp (for blocks) or somehow make the ;; deletion of continuation markers less dangerous. -;; - drop block-comment- unless it's really used. ;; - uncomment-region on a subpart of a comment. ;; - support gnu-style "multi-line with space in continue". ;; - somehow allow comment-dwim to use the region even if transient-mark-mode @@ -183,10 +182,6 @@ guaranteed to be correctly ordered. It is called within `save-excursion'. Applicable at least in modes for languages like fixed-format Fortran where comments always start in column zero.") -;; ?? never set -(defvar block-comment-start nil) -(defvar block-comment-end nil) - (defvar comment-quote-nested t "Non-nil if nested comments should be quoted. This should be locally set by each major mode if needed.") @@ -718,12 +713,10 @@ Point is expected to be at the start of the comment." If CONTINUE is non-nil, use the `comment-continue' markers if any." (interactive "*") (comment-normalize-vars) - (let* ((empty (save-excursion (beginning-of-line) - (looking-at "[ \t]*$"))) - (starter (or (and continue comment-continue) - (and empty block-comment-start) comment-start)) - (ender (or (and continue comment-continue "") - (and empty block-comment-end) comment-end))) + (let ((starter (or (and continue comment-continue) + comment-start)) + (ender (or (and continue comment-continue "") + comment-end))) (unless starter (error "No comment syntax defined")) (beginning-of-line) (let* ((eolpos (line-end-position)) -- 2.39.5