aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2002-03-04 01:10:55 +0000
committerStefan Monnier2002-03-04 01:10:55 +0000
commit0f38a885d5f669a6fc70ddb44aa797f64051ee80 (patch)
treed2657838e73225f4806c695d4f0f10dfb2d8d3bf
parentbedf0b73d1c40a944c9ebf96a6b07f07c0722425 (diff)
downloademacs-0f38a885d5f669a6fc70ddb44aa797f64051ee80.tar.gz
emacs-0f38a885d5f669a6fc70ddb44aa797f64051ee80.zip
(comment-forward): Use forward-comment to skip
over whitespace (or comments) even when comment-use-syntax is nil.
-rw-r--r--lisp/newcomment.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 91ad7e64f35..0b4e662620d 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -5,7 +5,7 @@
5;; Author: code extracted from Emacs-20's simple.el 5;; Author: code extracted from Emacs-20's simple.el
6;; Maintainer: Stefan Monnier <monnier@cs.yale.edu> 6;; Maintainer: Stefan Monnier <monnier@cs.yale.edu>
7;; Keywords: comment uncomment 7;; Keywords: comment uncomment
8;; Revision: $Id: newcomment.el,v 1.43 2001/12/14 21:53:29 monnier Exp $ 8;; Revision: $Id: newcomment.el,v 1.44 2002/01/13 09:59:39 pj Exp $
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11 11
@@ -389,11 +389,11 @@ and can use regexps instead of syntax."
389 (if (< n 0) (error "No comment-backward") 389 (if (< n 0) (error "No comment-backward")
390 (if comment-use-syntax (forward-comment n) 390 (if comment-use-syntax (forward-comment n)
391 (while (> n 0) 391 (while (> n 0)
392 (skip-syntax-forward " ")
393 (setq n 392 (setq n
394 (if (and (looking-at comment-start-skip) 393 (if (or (forward-comment 1)
395 (goto-char (match-end 0)) 394 (and (looking-at comment-start-skip)
396 (re-search-forward comment-end-skip nil 'move)) 395 (goto-char (match-end 0))
396 (re-search-forward comment-end-skip nil 'move)))
397 (1- n) -1))) 397 (1- n) -1)))
398 (= n 0)))) 398 (= n 0))))
399 399