#199 setup_autoload bugs

closed
Lisp Core (471)
5
2012-12-04
2002-12-17
No

1 Bug: setup_autoload doesn't apply file_search to the
file name.
Unless a full path is give or if the file is in the
working directory,
Maxima won't find the file.

Proposed fix: Change $setup_autoload [suprv1.lisp] from
#+cl
(DEFun $SETUP_AUTOLOAD (filename &rest functions)
(LET ((FILE (string-trim "&$" filename)))
(DOLIST (FUNC functions)
(NONSYMCHK FUNC '$SETUP_AUTOLOAD)
(PUTPROP (SETQ FUNC (DOLLARIFY-NAME FUNC)) FILE
'AUTOLOAD)
(ADD2LNC FUNC $PROPS)))
'$DONE)

to

#+cl
(DEFun $SETUP_AUTOLOAD (filename &rest functions)
(LET ((FILE ($file_search filename)))
(DOLIST (FUNC functions)
(NONSYMCHK FUNC '$SETUP_AUTOLOAD)
(PUTPROP (SETQ FUNC (DOLLARIFY-NAME FUNC)) FILE
'AUTOLOAD)
(ADD2LNC FUNC $PROPS)))
'$DONE)

2 Bug: generic_autoload doesn't recognize x86f as a
compiled Lisp file

Proposed fix:

Change generic-autoload from

#+cl
(defun generic-autoload (file &aux type)
(setq file (pathname (cdr file)))
(setq type (pathname-type file))
(cond ((MEMBER type
'(nil "BIN" "O" "o" "XFASL" "QFASL" "LISP" "LSP")
:test 'equalp)
(load file))
(t ($batchload file))))

to (borrowed from init-cl.lisp) What did I miss?

#+cl
(defun generic-autoload (file &aux type)
(setq file (pathname (cdr file)))
(setq type (pathname-type file))
(let ((bin-ext #+gcl "o"
#+cmu (c::backend-fasl-file-type c::*target-backend*)
#+clisp "fas"
#+allegro "fasl"
#-(or gcl cmu clisp allegro) ""))
(if (member type (list bin-ext "lisp" "lsp") :test
'equalp)
(load file) ($batchload file))))

3. Bug

Two # characters aren't escaped in suprv1.lisp; this
fools the
code highlighter in (X)emacs.

Proposed Fix

Escape the characters. Fix in the diff file.

4. Bug

After making the proposed fixes, the $setup_autoload
statement
in init-cl.lisp hangs compilation. I don't know why,
but I suspect
that at this point, file_search_lisp & friends has not
yet been
assigned?

Proposed Fix: Unknown -- maybe a comprehensive
collection of set_autoload
statements should be placed in a new file? For now I
commented out
the setup_autoload command.

------------start of diff file for
suprv1.lisp-------------------
13d12
<
99c98
< (|!| |$!|) (|#| |$#|) (|'| |$'|) (|;| |$;|)))
---
> (|!| |$!|) (|\#| |$\#|) (|'| |$'|) (|;| |$;|)))
328,331c327,334
< (cond ((MEMBER type
< '(nil "BIN" "O" "o" "XFASL" "QFASL" "LISP" "LSP")
:test 'equalp)
< (load file))
< (t ($batchload file))))
---
> (let ((bin-ext #+gcl "o"
> #+cmu (c::backend-fasl-file-type c::*target-backend*)
> #+clisp "fas"
> #+allegro "fasl"
> #-(or gcl cmu clisp allegro) ""))
> (if (member type (list bin-ext "lisp" "lsp")
:test 'equalp)
> (load file) ($batchload file))))
>
366c369
< (LET ((FILE (string-trim "&$" filename)))
---
> (LET ((FILE ($file_search filename)))
----------------end---------------------------------------------------

Discussion

  • Robert Dodier

    Robert Dodier - 2006-06-30

    Logged In: YES
    user_id=501686

    Seems likely at least some of this stuff has been fixed
    already. Marking it for followup.

     
  • Robert Dodier

    Robert Dodier - 2006-06-30
    • labels: --> Lisp Core
    • milestone: --> To_be_reviewed
    • assigned_to: nobody --> robert_dodier
    • summary: setup_autload bugs --> setup_autoload bugs
     
  • Robert Dodier

    Robert Dodier - 2006-09-09

    Logged In: YES
    user_id=501686

    Closing this report as fixed. About the 4 items mentioned in
    the original report:

    (1) setup_autoload applies file_search as suggested (change
    made some time ago)

    (2) GENERIC-AUTOLOAD revised as suggested (change made some
    time ago)

    (3) Unescaped # characters -- change not made, won't fix.
    Today I don't feel like tinkering to compensate for Xemacs.

    (4) Not an issue anymore -- call to setup_autoload was cut
    out of src/init-cl.lisp in r1.43.

     
  • Robert Dodier

    Robert Dodier - 2006-09-09
    • status: open --> closed
     

Log in to post a comment.