# HG changeset patch # User Karl Heuer # Date 879628461 0 # Node ID 37a6af24de93794b0c2cd526ffec0041bd0aeb6a # Parent 3b9b07f3eab56ea6dd2fa937c4d3841afad08855 (comment-padding): New var. (comment-region): Use it. diff -r 3b9b07f3eab5 -r 37a6af24de93 lisp/simple.el --- a/lisp/simple.el Sat Nov 15 21:04:47 1997 +0000 +++ b/lisp/simple.el Sat Nov 15 21:14:21 1997 +0000 @@ -2488,6 +2488,13 @@ (if arg (forward-line 1)) (setq count (1- count))))) +(defvar comment-padding 1 + "Number of spaces `comment-region' puts between comment chars and text. + +Extra spacing between the comment characters and the comment text +makes the comment easier to read. Default is 1. Nil means 0 and is +more efficient.") + (defun comment-region (beg end &optional arg) "Comment or uncomment each line in the region. With just C-u prefix arg, uncomment each line in region. @@ -2514,6 +2521,8 @@ (setq cs (concat cs comment-start) ce (concat ce comment-end)) (setq numarg (1- numarg)))) + (when comment-padding + (setq cs (concat cs (make-string comment-padding ? )))) ;; Loop over all lines from BEG to END. (narrow-to-region beg end) (goto-char beg)