lisp 2.8 KB

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