We changed our privacy policy. Read more.

Questions tagged [byte-compilation]

is for the Emacs Lisp compiler in Emacs that compiles lisp code to byte-code for faster execution compared to uncompiled lisp code. Byte-compiled code is read by the byte-code interpreter.

16 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
0answers
113 views

How to build Emacs without byte-compiling Lisp files

Q:  Is there an option to build Emacs without byte-compiling the Lisp files? BACKGROUND:  The length of time needed to build Emacs makes debugging / developing an extremely slow process. For example,...
4
votes
0answers
123 views

Which Lisp objects are byte-compiled?

A compiled program and a source code can be interpreted differently at runtime. The issue is that some Lisp objects should not be modified because of the byte-compilation. Emacs Lisp manual: 2.7 ...
4
votes
0answers
1k views

byte-compile much slower in X (vs. -nw)

Setup Windows 10 host with X server (VcXsrv) Linux guest (Arch) in virtual machine (VMware) Benchmark (defmacro measure-time (&rest body) "Measure the time it takes to evaluate BODY." `(let ...
4
votes
0answers
47 views

A workflow for managing compiled elisp packages with different versions of emacs

I am using different versions of emacs, on different computers. On some of those (work computers) I don't really have a choice to update, whereas for my personal computers, I like to run the latest ...
4
votes
0answers
250 views

Is there an ELISP decompiler?

I'm thinking of writing one so that when I get those horrible tracebacks from bytecode files, I can better see where I was at. Is there one already? Are there any other tools for showing an error ...
3
votes
0answers
368 views

Byte-compiling a file loads macros with `(eval-and-compile)` but not `(eval-when-compile)`

I created a buffer, test1.el: (eval-when-compile (defmacro dummy-macro (_) nil) (dummy-macro s)) Trying to compile this file, I get the following errors: In toplevel form: test1.el:3:16:Warning:...
2
votes
0answers
79 views

byte-compiling in presence of pcase patterns

TIL that trying to compile anything with pcase matching in it may lead to an explosion of code generated during expansion. Even the most innocent looking patterns may generate hundreds of branches and ...
1
vote
0answers
316 views

byte-recompilation of files under a directory

As I move all my emacs.d between my machines using Git, and, obviously, I don’t version control byte-compiled files (*.elc), I sometimes get into a situation when my .el files are newer then the ...
1
vote
0answers
217 views

Compiled configuration cannot find package

I am trying to have configuration byte-compiled to improve performances further. The original code works with no issue. However, adding the optional compile argument: (require 'ob-tangle) (org-babel-...
0
votes
0answers
19 views

How to compile 3rd party packages ahread of time with native compilation?

Currently Emacs compiles packages on demand (native compilation, creating *.eln files). How can I scan my locally installed packages and compile them ahead of time, so this is a one time operation ...
0
votes
0answers
21 views

How to properly advise macros used by functions if earlier byte-compilation is present?

I am trying to customize the looks of org-agenda and, in order to do so, I would like to advice the macro org-agenda--insert-overriding-header; this macro appears to be used in several functions. ...
0
votes
0answers
24 views

Is there a way to change the unibyte string bytecode output of `byte-compile` to hex?

Given a byte-compiled function: (byte-compile (defun factorial (integer) "Compute factorial of an integer." (if (= 1 integer) 1 (* integer (...
0
votes
0answers
31 views

Mutually recursive bytecode function throws an error when I try to eval

The following workflow contains the steps needed to reproduce the error: ;; Byte-compile the function. (byte-compile '(defun flatten (x) (cl-labels ((rec (x acc) ...
0
votes
0answers
44 views

Fixing "Warning: Unknown slot " emitted when a slot referenced by its :initarg name

The code below works but compiles with: foobar.el:9:9:Warning: Unknown slot ‘:baz’ (require 'eieio) (defclass foo-bar () ((baz :initarg :baz :initform t :type boolean))) (defmethod ...
0
votes
0answers
169 views

How to manually byte-compile a package?

Looking at the package installed under elpa directory I see that it have been byte compiled and the structure is different from the source. Consider the following example https://github.com/hlissner/...
0
votes
0answers
81 views

Byte Compiling Functions Using `defalias` for `progn`

The following code: (defalias 'new-progn 'progn) (defun foo () (new-progn "foo")) (byte-compile 'foo) (foo) gives this error: Debugger entered--Lisp error: (invalid-function #<subr progn>) ...