Opened 10 years ago

Last modified 10 years ago

#658 new defect

gui::cocoa-edit fails badly when pathname doesn't exist

Reported by: rongarret Owned by:
Priority: minor Milestone:
Component: IDE Version: trunk
Keywords: Cc:


SLSIA. At best it dumps to the altconsole. At worst, it hangs CCL.

Change History (1)

comment:1 Changed 10 years ago by rongarret

Here's a fix:

(defun cocoa-edit (&optional arg)
  (cond ((or (null arg)
             (typep arg 'string)
             (typep arg 'pathname))
         (when arg
           (if (probe-file arg)
             (let ((lpath (merge-pathnames arg *.lisp-pathname*)))
               (when (probe-file lpath) (setq arg lpath)))
             (error "No such file: ~A" arg)))
         (execute-in-gui #'(lambda () (find-or-make-hemlock-view arg))))
        ((ccl::valid-function-name-p arg)
         (hemlock::edit-definition arg)
        (t (report-bad-arg arg '(or null string pathname (satisfies ccl::valid-function-name-p))))))
Note: See TracTickets for help on using tickets.