From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Leo <sdl.web@gmail.com>
Cc: 10946@debbugs.gnu.org
Subject: bug#10946: 24.0.94; eval-after-load incompatible change
Date: Mon, 05 Mar 2012 16:33:33 -0500 [thread overview]
Message-ID: <jwvbooa7myb.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m1k42zdnvy.fsf@gmail.com> (Leo's message of "Tue, 06 Mar 2012 00:16:17 +0800")
>> Can you provide some details about how/why there's no load-file-name
>> (which I guess just means it's nil).
> See: https://github.com/pinard/Pymacs
> `pymacs-load' loads python module and creates elisp functions that call
> those python functions.
> (defun pymacs-load (module &optional prefix noerror)
> (interactive
> (let* ((module (read-string "Python module? "))
> (default (concat (car (last (split-string module "\\."))) "-"))
> (prefix (read-string (format "Prefix? [%s] " default)
> nil nil default)))
> (list module prefix)))
> (message "Pymacs loading %s..." module)
> (let ((lisp-code (pymacs-call "pymacs_load_helper" module prefix)))
> (cond (lisp-code (let ((result (eval lisp-code)))
> (message "Pymacs loading %s...done" module)
> result))
> (noerror (message "Pymacs loading %s...failed" module) nil)
> (t (pymacs-report-error "Pymacs loading %s...failed" module)))))
> It uses eval so no load-file-name is defined, i.e. if lisp-code contains
> a form (provide 'whatever), it no longer eval the matching form in
> after-load-alist.
Wouldn't a better fix be to make Pymacs set load-file-name, then?
Stefan
next prev parent reply other threads:[~2012-03-05 21:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-05 10:57 bug#10946: 24.0.94; eval-after-load incompatible change Leo
2012-03-05 15:05 ` Stefan Monnier
2012-03-05 16:16 ` Leo
2012-03-05 21:33 ` Stefan Monnier [this message]
2012-03-06 15:29 ` Leo
2012-03-06 20:57 ` Stefan Monnier
2012-03-06 23:49 ` Leo
2012-03-07 17:06 ` Stefan Monnier
2012-03-07 20:28 ` Stefan Monnier
2012-03-08 3:21 ` Leo
2012-03-09 18:14 ` Glenn Morris
2012-03-10 2:40 ` Stefan Monnier
2012-03-16 1:29 ` Glenn Morris
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvbooa7myb.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=10946@debbugs.gnu.org \
--cc=sdl.web@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.