Skip to content

Commit e9baed2

Browse files
authored
Merge pull request #17 from Shen-Language/consider-lisp-prefix-sysfunc
Overwrote shen.sysfunc? to accept any symbols starting with 'lisp.'
2 parents f88086e + fdd4aa3 commit e9baed2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/backend.lsp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,8 @@
532532
(T (simple-error (cn "boolean expected: not ~A~%" X)))))
533533

534534
(DEFUN shen.lisp-prefixed? (Symbol)
535-
(AND (SYMBOLP Symbol)
535+
(AND (NOT (NULL Symbol))
536+
(SYMBOLP Symbol)
536537
(shen-cl.prefix? (str Symbol) "lisp.")))
537538

538539
(DEFUN shen.lisp-function-name (Symbol)

src/overwrite.lsp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2424
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2525

26+
(DEFVAR shen-cl.kernel-sysfunc? (FDEFINITION 'shen.sysfunc?))
27+
28+
(DEFUN shen.sysfunc? (Symbol)
29+
(or
30+
(APPLY shen-cl.kernel-sysfunc? (LIST Symbol))
31+
(IF (shen.lisp-prefixed? Symbol) 'true 'false)))
32+
2633
(DEFUN shen.pvar? (X)
2734
(IF (AND (ARRAYP X) (NOT (STRINGP X)) (EQ (SVREF X 0) 'shen.pvar))
2835
'true

0 commit comments

Comments
 (0)