Changeset 8054


Ignore:
Timestamp:
Jan 11, 2008, 4:43:56 PM (12 years ago)
Author:
gz
Message:

Fix for crashing when modeline package is bogus (have to return a
value even when ignoring package).
While in there, add support for the "package: (arch :use cl)" case.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/event-ide/ccl/cocoa-ide/hemlock/src/listener.lisp

    r7929 r8054  
    3535    :buffer buffer
    3636    :value
    37     (let* ((eof (list nil))
    38            (thing (read-from-string value nil eof)))
    39       (when (eq thing eof) (error "Bad package file option value."))
     37    (let ((thing (handler-case (read-from-string value t)
     38                   (error () (editor-error "Bad package file option value")))))
    4039      (cond
    41        ((stringp thing)
    42         thing)
    43        ((symbolp thing)
    44         (symbol-name thing))
    45        ((characterp thing)
     40       ((or (stringp thing) (symbolp thing))
    4641        (string thing))
     42       ((and (consp thing) ;; e.g. Package: (foo :use bar)
     43             (or (stringp (car thing)) (symbolp (car thing))))
     44        (string (car thing)))
    4745       (t
    48         (message
    49          "Ignoring \"package\" file option -- cannot convert to a string."))))
     46        (message "Ignoring \"package:\" file option ~a" thing)
     47        nil)))
    5048    :hooks (list 'package-name-change-hook)))
    5149
Note: See TracChangeset for help on using the changeset viewer.