comparison lisp/newcomment.el @ 36271:ee3fcc29254e

(comment-forward): Skip the comment-start before searching for the comment-end.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 22 Feb 2001 01:47:40 +0000
parents 45a589a4c480
children e40c1ae4f04b
comparison
equal deleted inserted replaced
36270:6d6e72abff79 36271:ee3fcc29254e
3 ;; Copyright (C) 1999, 2000 Free Software Foundation Inc. 3 ;; Copyright (C) 1999, 2000 Free Software Foundation Inc.
4 4
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.28 2000/12/11 21:41:35 monnier Exp $ 8 ;; Revision: $Id: newcomment.el,v 1.29 2000/12/18 03:17:31 monnier Exp $
9 9
10 ;; This file is part of GNU Emacs. 10 ;; This file is part of GNU Emacs.
11 11
12 ;; GNU Emacs is free software; you can redistribute it and/or modify 12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by 13 ;; it under the terms of the GNU General Public License as published by
365 (if comment-use-syntax (forward-comment n) 365 (if comment-use-syntax (forward-comment n)
366 (while (> n 0) 366 (while (> n 0)
367 (skip-syntax-forward " ") 367 (skip-syntax-forward " ")
368 (setq n 368 (setq n
369 (if (and (looking-at comment-start-skip) 369 (if (and (looking-at comment-start-skip)
370 (goto-char (match-end 0))
370 (re-search-forward comment-end-skip nil 'move)) 371 (re-search-forward comment-end-skip nil 'move))
371 (1- n) -1))) 372 (1- n) -1)))
372 (= n 0)))) 373 (= n 0))))
373 374
374 (defun comment-enter-backward () 375 (defun comment-enter-backward ()