I have this code in my ~/.emacs to automatically byte compile when I save the file.
(defun autocompile nil "compile itself if ~/.emacs" (interactive) (require 'bytecomp) (if (string= (buffer-file-name) (expand-file-name (concat default-directory ".emacs"))) (byte-compile-file (buffer-file-name)))) (add-hook 'after-save-hook 'autocompile) (defconst animate-n-steps 3) Now, when I try to start my function irc, defined: (defmacro de-erc-connect (command server port nick) "Create interactive command `command', for connecting to an IRC server. The command uses interactive mode if passed an argument." (fset command `(lambda (arg) (interactive "p") (if (not (= 1 arg)) (erc-select ,server ,port ,nick) (erc ,server ,port ,nick ,erc-user-full-name t))))) (autoload 'erc "erc" "" t) (autoload 'erc-select "erc" "" t) (de-erc-connect erc-fn "irc.gnu.org" 6667 "b0ef") (defun erc-autojoin-channels (server nick) (dolist (l erc-autojoin-channels-alist) (when (string-match (car l) server) (dolist (chan (cdr l)) (erc-send-command (concat "join " chan)))))) (add-hook 'erc-after-connect 'erc-autojoin-channels) (defun irc () "Start to waste time on IRC with ERC." (interactive) (call-interactively 'erc-fn)) I get, when trying to M-x irc: Debugger entered--Lisp error: (wrong-type-argument commandp erc-fn) call-interactively(erc-fn) irc() call-interactively(irc) execute-extended-command(nil) call-interactively(execute-extended-command) Now, everything works if I just take out the auto compile function or rm the ~/.emacs.elc file. Anyone have any pointers on what to look at? -- Esben Stien is [EMAIL PROTECTED] s a http://www. s t n m irc://irc. b - i . e/%23contact [sip|iax]: e e jid:b0ef@ n n _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs