all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Symbol's value as variable is void: defun
@ 2018-02-02  2:54 Davin Pearson
  2018-02-02  3:27 ` Emanuel Berg
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Davin Pearson @ 2018-02-02  2:54 UTC (permalink / raw)
  To: help-gnu-emacs

;; 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. 

Here is the contents of the offending file:

http://davinpearson.com/binaries/c++2lisp++-stage-1-purge-comments.elc



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-02-05  6:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-02  2:54 Symbol's value as variable is void: defun Davin Pearson
2018-02-02  3:27 ` Emanuel Berg
2018-02-02  7:50   ` tomas
2018-02-02  8:22   ` Emanuel Berg
2018-02-02  7:48 ` tomas
2018-02-02 11:39 ` Ben Bacarisse
2018-02-02 18:10 ` John Mastro
2018-02-05  2:59 ` Davin Pearson
2018-02-05  3:04   ` Emanuel Berg
2018-02-05  6:39     ` Davin Pearson

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.