6.2 The Source File Recording Facility
;;; Suppose the files "file-a.lisp" and "file-b.lisp" both ;;; contain definitions of the function DOIT.;; Loading "file-a" defines DOIT for the first time. > (load "file-a") ;;; Loading source file "file-a.lisp" #P"/u/kdo/file-a.lisp"
;; Now, loading "file-b", which also defines DOIT, produces a ;; warning. > (load "file-b") ;;; Loading source file "file-b.lisp" ;;; Warning: Redefining function DOIT which used to be defined in ;;; "/u/kdo/file-a.lisp" #P"/u/kdo/file-b.lisp"
;; Reloading the same file produces no warning. > (load "file-b") ;;; Load source file "file-b.lisp". #P"/u/kdo/file-b.lisp"
;; Get the pathname of the source file. > (get-source-file 'doit) #P"/u/kdo/file-b.lisp"
Generated with Harlequin WebMaker