From: Stefan Monnier Date: Mon, 4 Mar 2002 01:17:27 +0000 (+0000) Subject: (comment-forward): Use forward-comment to skip X-Git-Tag: emacs-21.2~39 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7fa207b9d7ac00f47eed299986fc85b93a489449;p=emacs.git (comment-forward): Use forward-comment to skip over whitespace (or comments) even when comment-use-syntax is nil. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3dde0bec4bb..17fae7a7fc9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-03-03 Stefan Monnier + + * newcomment.el (comment-forward): Use forward-comment to skip + over whitespace (or comments) even when comment-use-syntax is nil. + 2002-03-02 Pavel Jan,Bm(Bk * textmodes/tildify.el (tildify-string-alist): Entry for xml-mode diff --git a/lisp/newcomment.el b/lisp/newcomment.el index c8ed9df29e8..d2104b26b9f 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -5,7 +5,7 @@ ;; Author: code extracted from Emacs-20's simple.el ;; Maintainer: Stefan Monnier ;; Keywords: comment uncomment -;; Revision: $Id: newcomment.el,v 1.35.4.2 2001/11/19 04:59:10 monnier Exp $ +;; Revision: $Id: newcomment.el,v 1.35.4.3 2001/11/19 20:35:04 monnier Exp $ ;; This file is part of GNU Emacs. @@ -387,11 +387,11 @@ and can use regexps instead of syntax." (if (< n 0) (error "No comment-backward") (if comment-use-syntax (forward-comment n) (while (> n 0) - (skip-syntax-forward " ") (setq n - (if (and (looking-at comment-start-skip) - (goto-char (match-end 0)) - (re-search-forward comment-end-skip nil 'move)) + (if (or (forward-comment 1) + (and (looking-at comment-start-skip) + (goto-char (match-end 0)) + (re-search-forward comment-end-skip nil 'move))) (1- n) -1))) (= n 0))))