unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#13023: 24.3.50; lexical binding does not work within defadvice
@ 2012-11-28 16:17 Christopher Schmidt
  2012-11-29  4:32 ` Stefan Monnier
  2016-02-02 18:35 ` Marcin Borkowski
  0 siblings, 2 replies; 11+ messages in thread
From: Christopher Schmidt @ 2012-11-28 16:17 UTC (permalink / raw)
  To: 13023

    ;; -*- 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





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-02-02 19:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-28 16:17 bug#13023: 24.3.50; lexical binding does not work within defadvice Christopher Schmidt
2012-11-29  4:32 ` 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

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).