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


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/newcomment.el
Date: Fri, 04 Jul 2003 18:45:27 -0400

Index: emacs/lisp/newcomment.el
diff -c emacs/lisp/newcomment.el:1.66 emacs/lisp/newcomment.el:1.67
*** emacs/lisp/newcomment.el:1.66       Fri May 30 16:06:40 2003
--- emacs/lisp/newcomment.el    Fri Jul  4 18:45:26 2003
***************
*** 669,674 ****
--- 669,675 ----
      (let* ((numarg (prefix-numeric-value arg))
             (ccs comment-continue)
             (srei (comment-padright ccs 're))
+            (csre (comment-padright comment-start 're))
             (sre (and srei (concat "^\\s-*?\\(" srei "\\)")))
             spt)
        (while (and (< (point) end)
***************
*** 697,704 ****
                           (> (- (point) (point-min) (length comment-start)) 7))
                       (> (count-lines (point-min) (point-max)) 2))
              (setq box t))
!           (when (looking-at (regexp-quote comment-padding))
!             (goto-char (match-end 0)))
            (when (and sre (looking-at (concat "\\s-*\n\\s-*" srei)))
              (goto-char (match-end 0)))
            (if (null arg) (delete-region (point-min) (point))
--- 698,708 ----
                           (> (- (point) (point-min) (length comment-start)) 7))
                       (> (count-lines (point-min) (point-max)) 2))
              (setq box t))
!           ;; Skip the padding.  Padding can come from comment-padding and/or
!           ;; from comment-start, so we first check comment-start.
!           (if (or (save-excursion (goto-char (point-min)) (looking-at csre))
!                   (looking-at (regexp-quote comment-padding)))
!               (goto-char (match-end 0)))
            (when (and sre (looking-at (concat "\\s-*\n\\s-*" srei)))
              (goto-char (match-end 0)))
            (if (null arg) (delete-region (point-min) (point))




reply via email to

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