From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Herbert Euler" Newsgroups: gmane.emacs.devel Subject: RE: Not appropriate message for mismatched parens Date: Wed, 25 Apr 2007 19:13:33 +0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: sea.gmane.org 1177499634 13794 80.91.229.12 (25 Apr 2007 11:13:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 Apr 2007 11:13:54 +0000 (UTC) To: herberteuler@hotmail.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 25 13:13:49 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HgfRR-00023s-PO for ged-emacs-devel@m.gmane.org; Wed, 25 Apr 2007 13:13:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HgfX3-0000FQ-LW for ged-emacs-devel@m.gmane.org; Wed, 25 Apr 2007 07:19:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HgfX0-0000FK-UX for emacs-devel@gnu.org; Wed, 25 Apr 2007 07:19:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HgfWy-0000F8-SA for emacs-devel@gnu.org; Wed, 25 Apr 2007 07:19:30 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HgfWy-0000F5-LM for emacs-devel@gnu.org; Wed, 25 Apr 2007 07:19:28 -0400 Original-Received: from bay0-omc1-s22.bay0.hotmail.com ([65.54.246.94]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HgfRL-00020s-Tr for emacs-devel@gnu.org; Wed, 25 Apr 2007 07:13:40 -0400 Original-Received: from hotmail.com ([65.55.154.108]) by bay0-omc1-s22.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Wed, 25 Apr 2007 04:13:39 -0700 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 25 Apr 2007 04:13:39 -0700 Original-Received: from 65.55.154.123 by by143fd.bay143.hotmail.msn.com with HTTP; Wed, 25 Apr 2007 11:13:33 GMT X-Originating-IP: [216.145.54.158] X-Originating-Email: [herberteuler@hotmail.com] X-Sender: herberteuler@hotmail.com In-Reply-To: X-OriginalArrivalTime: 25 Apr 2007 11:13:39.0155 (UTC) FILETIME=[C6791A30:01C7872A] X-detected-kernel: Windows 2000 SP4, XP SP1+ X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:70088 Archived-At: I am sorry but the following patch is better, because it emphasises on the situation when setting `open-paren-may-be-outside': *** simple.el~ Wed Apr 25 18:25:55 2007 --- simple.el Wed Apr 25 19:05:09 2007 *************** (defun blink-matching-open () *** 4483,4495 **** blinkpos message-log-max ; Don't log messages about paren matching. matching-paren ! open-paren-line-string) (save-excursion (save-restriction ! (if blink-matching-paren-distance ! (narrow-to-region (max (minibuffer-prompt-end) ! (- (point) blink-matching-paren-distance)) ! oldpos)) (condition-case () (let ((parse-sexp-ignore-comments (and parse-sexp-ignore-comments --- 4483,4500 ---- blinkpos message-log-max ; Don't log messages about paren matching. matching-paren ! open-paren-line-string ! open-paren-may-be-outside) (save-excursion (save-restriction ! (when blink-matching-paren-distance ! (setq open-paren-may-be-outside ! (< (minibuffer-prompt-end) ! (- (point) blink-matching-paren-distance))) ! (if blink-matching-paren-distance ! (narrow-to-region (max (minibuffer-prompt-end) ! (- (point) blink-matching-paren-distance)) ! oldpos))) (condition-case () (let ((parse-sexp-ignore-comments (and parse-sexp-ignore-comments *************** (defun blink-matching-open () *** 4510,4519 **** ;; a matching-char info, in which case the two CDRs ;; should match. (eq matching-paren (cdr (syntax-after (1- oldpos)))))) ! (message "Mismatched parentheses")) ((not blinkpos) (if (not blink-matching-paren-distance) ! (message "Unmatched parenthesis"))) ((pos-visible-in-window-p blinkpos) ;; Matching open within window, temporarily move to blinkpos but only ;; if `blink-matching-paren-on-screen' is non-nil. --- 4515,4530 ---- ;; a matching-char info, in which case the two CDRs ;; should match. (eq matching-paren (cdr (syntax-after (1- oldpos)))))) ! (if open-paren-may-be-outside ! (message (concat "Open parenthesis is not found in the region " ! "restricted by `blink-matching-paren-distance'")) ! (message "Mismatched parentheses"))) ((not blinkpos) (if (not blink-matching-paren-distance) ! (message "Unmatched parenthesis") ! (if open-paren-may-be-outside ! (message (concat "Open parenthesis is not found in the region " ! "restricted by `blink-matching-parent-distance'"))))) ((pos-visible-in-window-p blinkpos) ;; Matching open within window, temporarily move to blinkpos but only ;; if `blink-matching-paren-on-screen' is non-nil. Regards, Guanpeng Xu _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/