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: Sun, 20 Nov 2005 13:06:07 -0500

Index: emacs/lisp/newcomment.el
diff -c emacs/lisp/newcomment.el:1.88 emacs/lisp/newcomment.el:1.89
*** emacs/lisp/newcomment.el:1.88       Fri Nov  4 22:20:12 2005
--- emacs/lisp/newcomment.el    Sun Nov 20 18:06:05 2005
***************
*** 478,496 ****
    (if (bolp)
        ;; comment-end = ""
        (progn (backward-char) (skip-syntax-backward " "))
!     (let ((end (point)))
!       (beginning-of-line)
!       (save-restriction
!       (narrow-to-region (point) end)
!       (if (re-search-forward (concat comment-end-skip "\\'") nil t)
!           (goto-char (match-beginning 0))
!         ;; comment-end-skip not found probably because it was not set right.
!         ;; Since \\s> should catch the single-char case, we'll blindly
!         ;; assume we're at the end of a two-char comment-end.
!         (goto-char (point-max))
!         (backward-char 2)
!         (skip-chars-backward (string (char-after)))
!         (skip-syntax-backward " "))))))
  
  ;;;;
  ;;;; Commands
--- 478,499 ----
    (if (bolp)
        ;; comment-end = ""
        (progn (backward-char) (skip-syntax-backward " "))
!     (cond
!      ((save-restriction
!         (beginning-of-line)
!         (narrow-to-region (point) end)
!         (re-search-forward (concat comment-end-skip "\\'") nil t))
!       (goto-char (match-beginning 0)))
!      ;; comment-end-skip not found.  Maybe we're at EOB which implicitly
!      ;; closes the comment.
!      ((eobp) (skip-syntax-backward " "))
!      (t
!       ;; else comment-end-skip was not found probably because it was not
!       ;; set right.  Since \\s> should catch the single-char case, we'll
!       ;; blindly assume we're at the end of a two-char comment-end.
!       (backward-char 2)
!       (skip-chars-backward (string (char-after)))
!       (skip-syntax-backward " ")))))
  
  ;;;;
  ;;;; Commands




reply via email to

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