emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/newcomment.el,v


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/newcomment.el,v
Date: Thu, 20 Sep 2007 16:31:36 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Richard M. Stallman <rms>       07/09/20 16:31:35

Index: newcomment.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/newcomment.el,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -b -r1.104 -r1.105
--- newcomment.el       17 Sep 2007 16:40:26 -0000      1.104
+++ newcomment.el       20 Sep 2007 16:31:35 -0000      1.105
@@ -942,11 +942,11 @@
 ;; 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 @@
      (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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]