unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Richard Copley <rcopley@gmail.com>, 11780@debbugs.gnu.org
Subject: bug#11780: 24.1.50; vc-annotate fails for files in RCS. ("cl.el" `flet' problem?)
Date: Tue, 26 Jun 2012 18:41:51 -0400	[thread overview]
Message-ID: <nb395hn1ao.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <CAPM58oipJsVRMuJGiEHpHMdGqbTgdgBu6X_qmE4r1zq4-zcrNQ@mail.gmail.com> (Richard Copley's message of "Mon, 25 Jun 2012 20:03:02 +0100")


Here's what the expansion of

(flet ((sw () (skip-chars-forward " \t\n")))
  (sw))

looks like in 24.1:

(let*
    ((--cl-letf-bound--
      (fboundp 'sw))
     (--cl-letf-save--
      (and --cl-letf-bound--
         (symbol-function 'sw))))
  (unwind-protect
      (progn
      (fset 'sw
            (function*
                   (lambda nil
                            (block sw
                                      (skip-chars-forward "  \n")))))
                                      (sw))
    (if --cl-letf-bound--
    (fset 'sw --cl-letf-save--)
      (fmakunbound 'sw))))

whereas in the current trunk it looks like this:


(let*
    ((x
      (cl-function
       (lambda nil
        (cl-block sw
           (skip-chars-forward "    \n")))))
     (x
      (symbol-function 'sw)))
  (unwind-protect
      (progn
      (fset 'sw x)
      (sw))
    (fset 'sw x)))

So there's a couple of things wrong with the new version:
`x' used twice as a local variable.
(symbol-function 'sw) not guarded by an (fboundp 'sw) check.

The latter is the immediate source of the error AFAICS.





  reply	other threads:[~2012-06-26 22:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-25 17:24 bug#11780: 24.1.50; vc-annotate fails for files in RCS. ("cl.el" `flet' problem?) Richard Copley
2012-06-25 18:48 ` Eli Zaretskii
2012-06-25 19:03   ` Richard Copley
2012-06-26 22:41     ` Glenn Morris [this message]
2012-06-27  0:56       ` Stefan Monnier
2012-06-27  1:13         ` Glenn Morris
2012-06-27 14:26           ` Stefan Monnier
2012-06-27 23:14             ` Glenn Morris
2012-06-28  0:31               ` Stefan Monnier

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=nb395hn1ao.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=11780@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rcopley@gmail.com \
    /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).