Author Topic: AutoLoad/Demandload for Lisp Files  (Read 9080 times)

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: AutoLoad/Demandload for Lisp Files
« Reply #15 on: September 29, 2010, 05:02:35 AM »
These issues are to be (sort of) expected when modifying old code and not testing all branches fully.
Thanks for having a look.

No worries, just giving you the heads up  :-)

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: AutoLoad/Demandload for Lisp Files
« Reply #16 on: September 29, 2010, 05:00:17 PM »
Code  and Attachment in first post Revised 2010.09.30 [Build:2010.09.29-2]

Modified as noted in threads

Main stub evaluator is now :
Code: [Select]
            (eval
              (list
                'defun
                CommandName
                (append Args '(/ qfn))
                (list  'if (list 'setq 'qfn
                    (list 'kdub:Auto-LispLoad_FindQualifiedFile (read FileName))
                  )
                  (list 'progn
                        '(princ "\nInitializing...\n")
                        (list 'setq CommandName 'nil)
                        (list 'load 'qfn)
                  )
                  ;; stub else
                  (list 'progn
                        (list 'kdub:Auto-LispLoad_NoFile FileName)
                        (list 'setq CommandName 'nil)
                  )
                )
                (list 'if
                      CommandName
                      (list 'eval (cons CommandName Args))
                      ;; stub else
                      (list 'prompt
                            (list 'strcat
                                  "\nError : Unable to evaluate "
                                  (vl-prin1-to-string CommandName)
                                  "\n"
                            )
                      )
                )
              )
            )

which generates a stub similar to my previous  code post.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.