From: "Herbert Euler" <herberteuler@hotmail.com>
To: rms@gnu.org, lekktu@gmail.com, emacs-devel@gnu.org
Subject: Re: Error report on startup
Date: Mon, 05 Mar 2007 09:41:44 +0800 [thread overview]
Message-ID: <BAY112-F19D4D0D0D483A148866C97DA840@phx.gbl> (raw)
In-Reply-To: <E1HNHSL-0002Re-M1@fencepost.gnu.org>
>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/
next prev parent reply other threads:[~2007-03-05 1:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-01 13:48 Error report on startup Herbert Euler
2007-03-01 14:30 ` Juanma Barranquero
2007-03-01 15:04 ` Herbert Euler
2007-03-01 15:26 ` Juanma Barranquero
2007-03-02 1:23 ` Herbert Euler
2007-03-02 1:57 ` Juanma Barranquero
2007-03-02 8:26 ` Richard Stallman
2007-03-02 23:46 ` Richard Stallman
2007-03-05 1:41 ` Herbert Euler [this message]
2007-03-02 3:28 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BAY112-F19D4D0D0D483A148866C97DA840@phx.gbl \
--to=herberteuler@hotmail.com \
--cc=emacs-devel@gnu.org \
--cc=lekktu@gmail.com \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.