From: Stefan Monnier Date: Sun, 20 Nov 2005 18:09:09 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: emacs-pretest-22.0.90~5738 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3cc4b07630a868e42c3ca30aec47e0654989a978;p=emacs.git *** empty log message *** --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 06406e15f00..c5bbf08564f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-11-20 Stefan Monnier + + * simple.el (blink-matching-open): + * paren.el (show-paren-function): Allow new paren-class info. + 2005-11-20 Chong Yidong * faces.el: Revert 2005-11-17 change. :ignore-defface is now diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 938cd5fe141..7716a704359 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -478,19 +478,22 @@ Point is assumed to be just at the end of a comment." (if (bolp) ;; comment-end = "" (progn (backward-char) (skip-syntax-backward " ")) - (let ((end (point))) - (beginning-of-line) - (save-restriction - (narrow-to-region (point) end) - (if (re-search-forward (concat comment-end-skip "\\'") nil t) - (goto-char (match-beginning 0)) - ;; comment-end-skip not found probably because it was not set right. - ;; Since \\s> should catch the single-char case, we'll blindly - ;; assume we're at the end of a two-char comment-end. - (goto-char (point-max)) - (backward-char 2) - (skip-chars-backward (string (char-after))) - (skip-syntax-backward " ")))))) + (cond + ((save-restriction + (beginning-of-line) + (narrow-to-region (point) end) + (re-search-forward (concat comment-end-skip "\\'") nil t)) + (goto-char (match-beginning 0))) + ;; comment-end-skip not found. Maybe we're at EOB which implicitly + ;; closes the comment. + ((eobp) (skip-syntax-backward " ")) + (t + ;; else comment-end-skip was not found probably because it was not + ;; set right. Since \\s> should catch the single-char case, we'll + ;; blindly assume we're at the end of a two-char comment-end. + (backward-char 2) + (skip-chars-backward (string (char-after))) + (skip-syntax-backward " "))))) ;;;; ;;;; Commands