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: Error report on startup Date: Mon, 05 Mar 2007 09:41:44 +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 1173058933 8137 80.91.229.12 (5 Mar 2007 01:42:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 5 Mar 2007 01:42:13 +0000 (UTC) To: rms@gnu.org, lekktu@gmail.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 05 02:42:07 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 1HO2DG-0003xL-SN for ged-emacs-devel@m.gmane.org; Mon, 05 Mar 2007 02:42:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HO2DG-00042r-BX for ged-emacs-devel@m.gmane.org; Sun, 04 Mar 2007 20:42:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HO2D4-00040M-Ng for emacs-devel@gnu.org; Sun, 04 Mar 2007 20:41:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HO2D3-0003yF-P7 for emacs-devel@gnu.org; Sun, 04 Mar 2007 20:41:54 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HO2D3-0003y1-LE for emacs-devel@gnu.org; Sun, 04 Mar 2007 20:41:53 -0500 Original-Received: from bay0-omc3-s20.bay0.hotmail.com ([65.54.246.220]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HO2D0-0001XX-P7; Sun, 04 Mar 2007 20:41:51 -0500 Original-Received: from hotmail.com ([64.4.26.29]) by bay0-omc3-s20.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Sun, 4 Mar 2007 17:41:49 -0800 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sun, 4 Mar 2007 17:41:49 -0800 Original-Received: from 64.4.26.200 by by112fd.bay112.hotmail.msn.com with HTTP; Mon, 05 Mar 2007 01:41:44 GMT X-Originating-IP: [202.165.107.100] X-Originating-Email: [herberteuler@hotmail.com] X-Sender: herberteuler@hotmail.com In-Reply-To: X-OriginalArrivalTime: 05 Mar 2007 01:41:49.0392 (UTC) FILETIME=[71317D00:01C75EC7] 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:67328 Archived-At: >Does this patch give acceptable results? > >*** type-break.el 30 Jan 2007 18:46:39 -0500 1.44 >--- type-break.el 02 Mar 2007 14:33:25 -0500 >*************** >*** 562,570 **** > (if file > (timep ;; returns expected format, else nil > (with-current-buffer (find-file-noselect file 'nowarn) >! (save-excursion >! (goto-char (point-min)) >! (read (current-buffer)))))))) > > (defun type-break-get-previous-count () > "Get previous keystroke count from `type-break-file-name'. >--- 562,573 ---- > (if file > (timep ;; returns expected format, else nil > (with-current-buffer (find-file-noselect file 'nowarn) >! (condition-case nil >! (save-excursion >! (goto-char (point-min)) >! (read (current-buffer))) >! (end-of-file >! (error "End of file in `%s'" file)))))))) > > (defun type-break-get-previous-count () > "Get previous keystroke count from `type-break-file-name'. Sorry for the delay. I could not use computer these days. Yes, it gives acceptable results. However, there are actually two `read's. So the patch should be *** type-break.el.orignal Mon Mar 5 09:38:20 2007 --- type-break.el Mon Mar 5 09:21:33 2007 *************** *** 562,570 **** (if file (timep ;; returns expected format, else nil (with-current-buffer (find-file-noselect file 'nowarn) ! (save-excursion ! (goto-char (point-min)) ! (read (current-buffer)))))))) (defun type-break-get-previous-count () "Get previous keystroke count from `type-break-file-name'. --- 562,573 ---- (if file (timep ;; returns expected format, else nil (with-current-buffer (find-file-noselect file 'nowarn) ! (condition-case nil ! (save-excursion ! (goto-char (point-min)) ! (read (current-buffer))) ! (end-of-file ! (error "End of file in `%s'" file)))))))) (defun type-break-get-previous-count () "Get previous keystroke count from `type-break-file-name'. *************** *** 576,585 **** (setq file (with-current-buffer (find-file-noselect file 'nowarn) ! (save-excursion ! (goto-char (point-min)) ! (forward-line 1) ! (read (current-buffer))))))) file 0))) --- 579,591 ---- (setq file (with-current-buffer (find-file-noselect file 'nowarn) ! (condition-case nil ! (save-excursion ! (goto-char (point-min)) ! (forward-line 1) ! (read (current-buffer))) ! (end-of-file ! (error "End of file in `%s'" file))))))) file 0))) Thank you very much. Best regards, Guanpeng Xu _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/