GNU bug report logs - #13023
24.3.50; lexical binding does not work within defadvice

Previous Next

Package: emacs;

Reported by: Christopher Schmidt <christopher <at> ch.ristopher.com>

Date: Wed, 28 Nov 2012 16:20:02 UTC

Severity: normal

Tags: wontfix

Found in version 24.3.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Christopher Schmidt <christopher <at> ch.ristopher.com>
To: 13023 <at> 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)
    ;; -*- 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




This bug report was last modified 5 years and 318 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.