summaryrefslogtreecommitdiff
path: root/lisp/newcomment.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2007-09-20 16:32:26 +0000
committerRichard M. Stallman <rms@gnu.org>2007-09-20 16:32:26 +0000
commit7f821b793827f75f08becb06ce90b3e8a5e9d4fe (patch)
tree2f26fd647f9337ba82191fe258856bc605bebbcc /lisp/newcomment.el
parentc801ad51b2a5de48bf6005305a7a3b11370d2f58 (diff)
downloademacs-7f821b793827f75f08becb06ce90b3e8a5e9d4fe.tar.gz
(comment-add): If EXTRA, double `comment-add' value.
Diffstat (limited to 'lisp/newcomment.el')
-rw-r--r--lisp/newcomment.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index abe97c9efbe..6b0589da43d 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -942,11 +942,11 @@ indentation to be kept as it was before narrowing."
;; Compute the number of extra semicolons to add to the comment starter
;; in Lisp mode, extra stars in C mode, etc.
;; If ARG is non-nil, just follow ARG.
-;; If the comment-starter is mult-char, just follow ARG.
-;; Otherwise obey comment-add, and add one more if EXTRA is non-nil.
+;; If the comment-starter is multi-char, just follow ARG.
+;; Otherwise obey comment-add, and double it if EXTRA is non-nil.
(defun comment-add (arg &optional extra)
(if (and (null arg) (= (string-match "[ \t]*\\'" comment-start) 1))
- (+ comment-add (if extra 1 0))
+ (* comment-add (if extra 2 1))
(1- (prefix-numeric-value arg))))
(defun comment-region-internal (beg end cs ce
@@ -1088,7 +1088,7 @@ The strings used as comment starts are built from
(t
;; Add an extra semicolon in Lisp and similar modes.
;; If STYLE doesn't specify indenting the comments,
- ;; then add yet one more semicolon.
+ ;; then double the value of `comment-add'.
(setq numarg (comment-add arg (null (nth 3 style))))
(comment-region-internal
beg end