2 #------------------------------------------------------------------------------
3 # $File: lisp,v 1.24 2015/11/30 20:54:26 christos Exp $
4 # lisp: file(1) magic for lisp programs
6 # various lisp types, from Daniel Quinlan (quinlan@yggdrasil.com)
8 # updated by Joerg Jenderek
9 # GRR: This lot is too weak
11 # windows INF files often begin with semicolon and use CRLF as line end
12 # lisp files are mainly created on unix system with LF as line end
13 #>2 search/4096 !\r Lisp/Scheme program text
14 #>2 search/4096 \r Windows INF file
16 0 search/4096 (setq\ Lisp/Scheme program text
18 0 search/4096 (defvar\ Lisp/Scheme program text
20 0 search/4096 (defparam\ Lisp/Scheme program text
22 0 search/4096 (defun\ Lisp/Scheme program text
24 0 search/4096 (autoload\ Lisp/Scheme program text
26 0 search/4096 (custom-set-variables\ Lisp/Scheme program text
29 # URL: https://en.wikipedia.org/wiki/Emacs_Lisp
30 # Reference: http://ftp.gnu.org/old-gnu/emacs/elisp-manual-18-1.03.tar.gz
31 # Update: Joerg Jenderek
32 # Emacs 18 - this is always correct, but not very magical.
34 # look for emacs lisp keywords
35 # GRR: split regex because it is too long or get error like
36 # lisp, 36: Warning: cannot get string from `^(defun|defvar|defconst|defmacro|setq|fset|put|provide|require|'
37 >&0 regex \^(defun|defvar|defconst|defmacro|setq|fset) Emacs v18 byte-compiled Lisp data
38 !:mime application/x-elc
39 # https://searchcode.com/codesearch/view/2173420/
40 # not really pure text
44 >&0 regex \^(put|provide|require|random) Emacs v18 byte-compiled Lisp data
45 !:mime application/x-elc
48 # missed cl.elc dbx.elc simple.elc look like normal lisp starting with ;;;
50 # Emacs 19+ - ver. recognition added by Ian Springer
51 # Also applies to XEmacs 19+ .elc files; could tell them apart with regexs
52 # - Chris Chittleborough <cchittleborough@yahoo.com.au>
53 # Update: Joerg Jenderek
56 >4 byte >18 Emacs/XEmacs v%d byte-compiled Lisp data
57 # why less than 32 ? does not make sense to me. GNU Emacs version is 24.5 at April 2015
58 #>4 byte <32 Emacs/XEmacs v%d byte-compiled Lisp data
59 !:mime application/x-elc
63 # Files produced by CLISP Common Lisp From: Bruno Haible <haible@ilog.fr>
64 0 string (SYSTEM::VERSION\040' CLISP byte-compiled Lisp program (pre 2004-03-27)
65 0 string (|SYSTEM|::|VERSION|\040' CLISP byte-compiled Lisp program text
67 0 long 0x70768BD2 CLISP memory image data
68 0 long 0xD28B7670 CLISP memory image data, other endian
70 #.com and .bin for MIT scheme
71 0 string \372\372\372\372 MIT scheme (library?)
73 # From: David Allouche <david@allouche.net>
74 0 search/1 \<TeXmacs| TeXmacs document text