Question

Thank you very much in advance for the help.

I'm trying to byte-compile my init.le file. The problem I have is that the resulting init.lec file is empty! After some test I realised that any content inside foldings (that would be ;;{{{ ;;}}}) is deleted.

Anyone has any idea how to prevent this, apart from stop using foldings :-D (folding.el to be more precise).

I also tried to change the foldings syntax. It wasn't easy, but when I got it work, Emacs deleted the content of the foldings with the new syntax! Crazy eh?

Cheers!

UPDATE:

This is my init.el file (sorry for the typo above)

I use folding.le to keep everything tidy.

Basically, what it does is contract and expand the content inside the ;;{{{ ;;}}} tags

So when everything is folded, my init.el file looks like this:

(message "Loading Emacs!")

;;{{{ FIRST...
;;{{{ DIRECTORIES...
;;{{{ PACKAGES...
;;{{{ INTERFACE...
;;{{{ EDITOR...
;;{{{ FUNCTIONS...
;;{{{ HOOKS...
;;{{{ PACKAGES...
;;{{{ LAST...

(message "Emacs Loaded!")

After byte compile, this the resulting init.elc file:

ELC
;;; Compiled by rafaelgp@RAFAELGP-PC on Thu Apr 19 17:37:20 2012
;;; from file c:/Users/rafaelgp/AppData/Roaming/.emacs.d/init.el
;;; in Emacs version 24.0.92.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\300\302!\207" [message "Loading Emacs!" "Emacs Loaded!"] 2)

Cheers

Was it helpful?

Solution

Hmm. It seems to work for me, but I had to comment out some things which I didn't have installed, like viper. I use a modified version of this fold mode and haven't had any problems. At the very least you can add advice around byte compilation to turn off folding, like

(defadvice byte-compile-file (around turn-off-folding activate)
  (turn-off-folding-mode)
  ad-do-it
  (turn-on-folding-mode))

Hopefully that will solve your problem. Nevertheless I might try a different folding mode.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top