aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2000-07-06 13:24:28 +0000
committerStefan Monnier2000-07-06 13:24:28 +0000
commit6dcd3806b05327814f833772fd66984063e20f2b (patch)
treedd2a9c936af540583bd9e2a3d08a0a5198a5016e
parentd396e5218f3fc00543852284be85bc3c1db28663 (diff)
downloademacs-6dcd3806b05327814f833772fd66984063e20f2b.tar.gz
emacs-6dcd3806b05327814f833772fd66984063e20f2b.zip
(uncomment-region): Be more careful when skipping
backwards over `=' not to bump into BOBP.
-rw-r--r--lisp/newcomment.el14
1 files 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 @@
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;; Version: $Name: $ 8;; Version: $Name: $
9;; Revision: $Id: newcomment.el,v 1.16 2000/06/04 22:02:11 monnier Exp $ 9;; Revision: $Id: newcomment.el,v 1.17 2000/06/20 09:40:36 fx Exp $
10 10
11;; This file is part of GNU Emacs. 11;; This file is part of GNU Emacs.
12 12
@@ -589,10 +589,10 @@ comment markers."
589 ;; Remove the end-comment (and leading padding and such). 589 ;; Remove the end-comment (and leading padding and such).
590 (goto-char (point-max)) (comment-enter-backward) 590 (goto-char (point-max)) (comment-enter-backward)
591 ;; Check for special `=' used sometimes in comment-box. 591 ;; Check for special `=' used sometimes in comment-box.
592 (when (and (= (- (point-max) (point)) 1) (> (point) 7) 592 (when (= (- (point-max) (point)) 1)
593 (save-excursion (backward-char 7) 593 (let ((pos (point)))
594 (looking-at "=\\{7\\}"))) 594 ;; skip `=' but only if there are at least 7.
595 (skip-chars-backward "=")) 595 (when (> (skip-chars-backward "=") -7) (goto-char pos))))
596 (unless (looking-at "\\(\n\\|\\s-\\)*\\'") 596 (unless (looking-at "\\(\n\\|\\s-\\)*\\'")
597 (when (and (bolp) (not (bobp))) (backward-char)) 597 (when (and (bolp) (not (bobp))) (backward-char))
598 (if (null arg) (delete-region (point) (point-max)) 598 (if (null arg) (delete-region (point) (point-max))
@@ -961,6 +961,10 @@ unless optional argument SOFT is non-nil."
961 961
962;;; Change Log: 962;;; Change Log:
963;; $Log: newcomment.el,v $ 963;; $Log: newcomment.el,v $
964;; Revision 1.17 2000/06/20 09:40:36 fx
965;; (comment) <defgroup>: Add :version.
966;; (comment-multi-line): Doc fix.
967;;
964;; Revision 1.16 2000/06/04 22:02:11 monnier 968;; Revision 1.16 2000/06/04 22:02:11 monnier
965;; (comment-indent): Ignore comment-indent-hook. 969;; (comment-indent): Ignore comment-indent-hook.
966;; 970;;