[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Symbol's value as variable is void: defun
From: |
tomas |
Subject: |
Re: Symbol's value as variable is void: defun |
Date: |
Fri, 2 Feb 2018 08:48:20 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, Feb 01, 2018 at 06:54:16PM -0800, Davin Pearson wrote:
> ;; With the following defun in effect:
>
> (defun load-file-most-recent (file)
> ;;(setq file (concat (car load-path) "/" file))
> (assert (string-match "\\.el$" file))
> (setq other (substring file 0 (match-beginning 0)))
> (setq other (concat other ".elc"))
> (cond
> ((and (file-exists-p file) (file-exists-p other))
> (setq date-modified-file (nth 5 (file-attributes file)))
> (setq date-modified-other (nth 5 (file-attributes other)))
> (setq file-older-than-other-p
> (if (>= (nth 0 date-modified-file) (nth 0 date-modified-other))
> (if (>= (nth 1 date-modified-file) (nth 1 date-modified-other))
> (if (>= (nth 2 date-modified-file) (nth 2
> date-modified-other))
> t
> nil)
> nil)
> nil))
> (if file-older-than-other-p
> (progn
> (message "loading file %s" file)
> (load-file file))
> (message "loading file %s" other)
> (load-file other))
> )
> ((file-exists-p file)
> (load-file file)
> )
> ((file-exists-p other)
> (load-file other)
> )
> (t
> (assert (not (file-exists-p file)))
> (assert (not (file-exists-p other)))
> (error "Should never happen, file=%s, other=%s" file other))
> )
> )
>
> (load-file-most-recent
> "~/lisp++-projects/c++2lisp++-stage-1-purge-comments.el")
>
> ;; gives the following diagnostic: Symbol's value as variable is void:
> ;; defun.
I don't quite understand: the problem seems to be in the file
loaded, i.e. in "c++2lisp++-stage-1-purge-comments.el", right?
Can we see that?
> Here is the contents of the offending file:
>
> http://davinpearson.com/binaries/c++2lisp++-stage-1-purge-comments.elc
Hm. I can't read .elc too well :-) do you have an uncompiled
version?
Cheers
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlp0F8QACgkQBcgs9XrR2kbSBQCfUeZJmM/fPGWBVyIADq7h297Z
cKIAn2q60X1Q+HaRIoZaqrovTPmCf5Ul
=LMp9
-----END PGP SIGNATURE-----