help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

compile-defun of function in package.el has no effect


From: eric . scott
Subject: compile-defun of function in package.el has no effect
Date: Sun, 18 Oct 2015 09:48:25 -0700 (PDT)
User-agent: G2/1.0

I'm having some trouble getting a package (elpy) installed with the package 
manager, and thought I'd take this as an opportunity to learn a little bit 
about how package.el works. However, I'm finding it hard to add tracing 
statements because no changes I make in the code seem to be taking. 

For example I added the word 'the' to this expression in 
package.el/package-menu-execute():

      (if (yes-or-no-p
           (if (= (length install-list) 1)
               (format "Install the package `%s'? " (car install-list))
               ...))))

then executed M-x compile-defun on it. There were no complaints, but when I 
tried again to install the package, my edit did not appear i.e.: instead of 
"Install the package 'elpy'?" I got the old version 'Install package 'elpy'?

As I understand it, 'compile-defun should dynamically bind the byte-compiled 
new definition to the unique symbol 'package-menu-execute, but clearly it's not 
binding it, or the symbol is not unique, or something is coming along later and 
changing it back.

The value of M-x locate-library <package>
is 
/usr/share/emacs/24.3/lisp/emacs-lisp/package.elc

I tried byte-compiling the whole package.el file (as linked from the stack 
trace) and copying it to that position, and there is still no effect after 
restarting.

BTW, the error I'm getting when trying to install elpy is 'package emacs-24.1 
is unavailable'. I'm running v 24.3.

Any help would be appreciated.

Thanks,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]