From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Davin Pearson Newsgroups: gmane.emacs.help Subject: Symbol's value as variable is void: defun Date: Thu, 1 Feb 2018 18:54:16 -0800 (PST) Message-ID: <4d2444cf-cca2-49b6-9afa-524aa7d28569@googlegroups.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1517540023 29333 195.159.176.226 (2 Feb 2018 02:53:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 2 Feb 2018 02:53:43 +0000 (UTC) Injection-Date: Fri, 02 Feb 2018 02:54:17 +0000 User-Agent: G2/1.0 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 02 03:53:39 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ehRTr-00070p-Fr for geh-help-gnu-emacs@m.gmane.org; Fri, 02 Feb 2018 03:53:35 +0100 Original-Received: from localhost ([::1]:57236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehRVs-0001kD-BU for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Feb 2018 21:55:40 -0500 X-Received: by 10.55.162.15 with SMTP id l15mr24746689qke.6.1517540057136; Thu, 01 Feb 2018 18:54:17 -0800 (PST) X-Received: by 10.31.54.205 with SMTP id d196mr3776765vka.14.1517540056668; Thu, 01 Feb 2018 18:54:16 -0800 (PST) Original-Path: usenet.stanford.edu!i22no5738222qta.1!news-out.google.com!e39ni1873qtk.1!nntp.google.com!i22no5738219qta.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Complaints-To: groups-abuse@google.com Original-Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=115.189.98.106; posting-account=SVVH0AoAAABplEQzMkIR3gU7a0gK8IuF Original-NNTP-Posting-Host: 115.189.98.106 Original-Xref: usenet.stanford.edu gnu.emacs.help:221777 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:115894 Archived-At: ;; 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