# HG changeset patch # User Stefan Monnier # Date 1132510149 0 # Node ID b8c0eb74d77e9def1c05fc1ab6002b13e55ef5aa # Parent ac8622e9be6dab1da4b608cadc6507d316fd90e7 *** empty log message *** diff -r ac8622e9be6d -r b8c0eb74d77e lisp/ChangeLog --- a/lisp/ChangeLog Sun Nov 20 18:08:55 2005 +0000 +++ b/lisp/ChangeLog Sun Nov 20 18:09:09 2005 +0000 @@ -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 -r ac8622e9be6d -r b8c0eb74d77e lisp/newcomment.el --- a/lisp/newcomment.el Sun Nov 20 18:08:55 2005 +0000 +++ b/lisp/newcomment.el Sun Nov 20 18:09:09 2005 +0000 @@ -478,19 +478,22 @@ (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