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, 14 Dec 2001 16:53:29 -0500

Index: emacs/lisp/newcomment.el
diff -c emacs/lisp/newcomment.el:1.42 emacs/lisp/newcomment.el:1.43
*** emacs/lisp/newcomment.el:1.42       Sat Dec  1 23:19:32 2001
--- emacs/lisp/newcomment.el    Fri Dec 14 16:53:29 2001
***************
*** 5,11 ****
  ;; Author: code extracted from Emacs-20's simple.el
  ;; Maintainer: Stefan Monnier <address@hidden>
  ;; Keywords: comment uncomment
! ;; Revision: $Id: newcomment.el,v 1.42 2001/12/02 04:19:32 monnier Exp $
  
  ;; This file is part of GNU Emacs.
  
--- 5,11 ----
  ;; Author: code extracted from Emacs-20's simple.el
  ;; Maintainer: Stefan Monnier <address@hidden>
  ;; Keywords: comment uncomment
! ;; Revision: $Id: newcomment.el,v 1.43 2001/12/14 21:53:29 monnier Exp $
  
  ;; This file is part of GNU Emacs.
  
***************
*** 30,36 ****
  
  ;;; Bugs:
  
- ;; - comment-indent on /*  */ jumps to /*  ><*/ instead of /* >< */.
  ;; - nested comments in sgml-mode are not properly quoted.
  ;; - single-char nestable comment-start can only do the "\\s<+" stuff
  ;;   if the corresponding closing marker happens to be right.
--- 30,35 ----
***************
*** 450,456 ****
           (begpos (comment-search-forward eolpos t))
           cpos indent)
        ;; An existing comment?
!       (if begpos (setq cpos (point-marker))
          ;; If none, insert one.
          (save-excursion
            ;; Some comment-indent-function insist on not moving comments that
--- 449,463 ----
           (begpos (comment-search-forward eolpos t))
           cpos indent)
        ;; An existing comment?
!       (if begpos
!         (progn
!           (if (and (not (looking-at "[\t\n ]"))
!                    (looking-at comment-end-skip))
!               ;; The comment is empty and we have skipped all its space
!               ;; and landed right before the comment-ender:
!               ;; Go back to the middle of the space.
!               (forward-char (/ (skip-chars-backward " \t") -2)))
!           (setq cpos (point-marker)))
          ;; If none, insert one.
          (save-excursion
            ;; Some comment-indent-function insist on not moving comments that



reply via email to

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