unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Schmidt <christopher@ch.ristopher.com>
To: 13023@debbugs.gnu.org
Subject: bug#13023: 24.3.50; lexical binding does not work within defadvice
Date: Wed, 28 Nov 2012 16:17:17 +0000 (GMT)	[thread overview]
Message-ID: <87zk213do1@ch.ristopher.com> (raw)

    ;; -*- lexical-binding: t -*-

    (funcall (let ((rms "works"))
               (lambda ()
                 (message "lex-bind %s" rms))))

    (defun asdf (b) (funcall b))

    (defadvice asdf (before rms (b) activate)
      (setf b (let ((abc 1) (b b)) (lambda () (print abc) (funcall b)))))

    (asdf 'ding)

I think this code should work fine.  It doesn't work with trunk and
emacs-24, though:

    Load test.elc? (y or n)  y
    Loading test.elc...
    lex-bind works
    Load error for test.elc:
    (void-variable abc)

        Christopher





             reply	other threads:[~2012-11-28 16:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-28 16:17 Christopher Schmidt [this message]
2012-11-29  4:32 ` bug#13023: 24.3.50; lexical binding does not work within defadvice Stefan Monnier
2012-11-29 22:50   ` Richard Stallman
2012-11-30  3:45     ` Stefan Monnier
2012-11-30 20:11       ` Richard Stallman
2012-12-01  4:23         ` Stefan Monnier
2012-12-02  0:00           ` Juanma Barranquero
2012-12-02  4:15           ` Richard Stallman
2012-12-03  0:01             ` Richard Stallman
2016-02-02 18:35 ` Marcin Borkowski
2016-02-02 19:42   ` 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=87zk213do1@ch.ristopher.com \
    --to=christopher@ch.ristopher.com \
    --cc=13023@debbugs.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).