mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
Do not search for package on non existant source
This commit is contained in:
parent
91ed486d8b
commit
434bb77077
1 changed files with 8 additions and 7 deletions
|
|
@ -244,13 +244,14 @@ var endRange = ~:*~A.session.doc.indexToPosition(endIndex);
|
|||
|
||||
(defun get-package-from-string (c)
|
||||
"Determine the currect package based on src contained in string C"
|
||||
(with-input-from-string (ins c)
|
||||
(loop
|
||||
(let ((form (read ins nil)))
|
||||
(unless form (return "clog-user"))
|
||||
(unless (consp form) (return "clog-user"))
|
||||
(when (eq (car form) 'in-package)
|
||||
(return (string-downcase (second form))))))))
|
||||
(when (typep c 'string)
|
||||
(with-input-from-string (ins c)
|
||||
(loop
|
||||
(let ((form (read ins nil)))
|
||||
(unless form (return "clog-user"))
|
||||
(unless (consp form) (return "clog-user"))
|
||||
(when (eq (car form) 'in-package)
|
||||
(return (string-downcase (second form)))))))))
|
||||
|
||||
;; Expand region
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue