From 6dcd3806b05327814f833772fd66984063e20f2b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 6 Jul 2000 13:24:28 +0000 Subject: [PATCH] (uncomment-region): Be more careful when skipping backwards over `=' not to bump into BOBP. --- lisp/newcomment.el | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lisp/newcomment.el b/lisp/newcomment.el index a09f9b1fbc9..a71a640ce29 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -6,7 +6,7 @@ ;; Maintainer: Stefan Monnier ;; Keywords: comment uncomment ;; Version: $Name: $ -;; Revision: $Id: newcomment.el,v 1.16 2000/06/04 22:02:11 monnier Exp $ +;; Revision: $Id: newcomment.el,v 1.17 2000/06/20 09:40:36 fx Exp $ ;; This file is part of GNU Emacs. @@ -589,10 +589,10 @@ comment markers." ;; Remove the end-comment (and leading padding and such). (goto-char (point-max)) (comment-enter-backward) ;; Check for special `=' used sometimes in comment-box. - (when (and (= (- (point-max) (point)) 1) (> (point) 7) - (save-excursion (backward-char 7) - (looking-at "=\\{7\\}"))) - (skip-chars-backward "=")) + (when (= (- (point-max) (point)) 1) + (let ((pos (point))) + ;; skip `=' but only if there are at least 7. + (when (> (skip-chars-backward "=") -7) (goto-char pos)))) (unless (looking-at "\\(\n\\|\\s-\\)*\\'") (when (and (bolp) (not (bobp))) (backward-char)) (if (null arg) (delete-region (point) (point-max)) @@ -961,6 +961,10 @@ unless optional argument SOFT is non-nil." ;;; Change Log: ;; $Log: newcomment.el,v $ +;; Revision 1.17 2000/06/20 09:40:36 fx +;; (comment) : Add :version. +;; (comment-multi-line): Doc fix. +;; ;; Revision 1.16 2000/06/04 22:02:11 monnier ;; (comment-indent): Ignore comment-indent-hook. ;; -- 2.39.2