unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: save-excursion again
Date: Fri, 18 Jun 2010 16:02:41 +0200	[thread overview]
Message-ID: <87k4pwphfi.fsf@lola.goethe.zz> (raw)
In-Reply-To: jwvvd9g8nmz.fsf-monnier+emacs@gnu.org

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> So, every time we want to please the byte compiler, we need to prove
>> a little theorem to the effect that the code X doesn't enter the
>> buffer A?  (No doubt some of these theorems will be obvious.)
>
> Indeed.  The problem being that the precise semantics of such a
> construction is pretty subtle, so the byte-compiler can't do the proof
> for you.  In some cases the proof is easy (e.g. there's no movement at
> all in that piece of code), but often it's very difficult (tho my
> experience might be made worse since I usually make such changes to
> code with which I'm not familiar).  My approach is to basically
> replace all such code with just `with-current-buffer', then let users
> find the counter examples.

I don't see how this process is supposed to terminate if users find
counterexamples.  Presumably the original code is then reinstated, and
the whole procedure starts from the beginning.  It would not appear that
there is a way to _intentionally_ use that construct without you
eventually replacing it.

-- 
David Kastrup




  reply	other threads:[~2010-06-18 14:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-18  7:42 save-excursion again Uday S Reddy
2010-06-18 13:51 ` Stefan Monnier
2010-06-18 14:02   ` David Kastrup [this message]
2010-06-18 15:29     ` Stefan Monnier
2010-06-18 17:16   ` Uday S Reddy
2010-06-18 18:37     ` Stefan Monnier
2010-06-19 14:50     ` Stephen J. Turnbull
2010-06-19 14:56       ` Lennart Borgman
2010-06-19 14:58         ` Lennart Borgman
2010-06-19 17:23           ` Stephen J. Turnbull
2010-06-19 17:30             ` Lennart Borgman
2010-06-25 21:20             ` Stefan Monnier
2010-06-26  0:40               ` Stephen J. Turnbull
2010-07-01  0:26                 ` Stefan Monnier
2010-07-01  4:34                   ` Stephen J. Turnbull
2010-07-04 17:07                     ` Stefan Monnier
2010-06-26 11:03               ` Uday S Reddy
2010-07-01  0:30                 ` Stefan Monnier
2010-07-01  1:54                   ` Lennart Borgman
2010-07-04 17:08                     ` Stefan Monnier
2010-06-19 16:22       ` Uday S Reddy
2010-06-18 15:04 ` Davis Herring

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k4pwphfi.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).