lisp-mode.elc 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. (defvar lisp-mode-syntax-table nil "\
  2. ")
  3. (defvar lisp-mode-abbrev-table nil "\
  4. ")
  5. (if (not lisp-mode-syntax-table) (let ((i 0)) (setq lisp-mode-syntax-table (make-syntax-table)) (while (< i 48) (modify-syntax-entry i "_ " lisp-mode-syntax-table) (setq i (1+ i))) (setq i (1+ 57)) (while (< i 65) (modify-syntax-entry i "_ " lisp-mode-syntax-table) (setq i (1+ i))) (setq i (1+ 90)) (while (< i 97) (modify-syntax-entry i "_ " lisp-mode-syntax-table) (setq i (1+ i))) (setq i (1+ 122)) (while (< i 128) (modify-syntax-entry i "_ " lisp-mode-syntax-table) (setq i (1+ i))) (modify-syntax-entry 32 " " lisp-mode-syntax-table) (modify-syntax-entry 9 " " lisp-mode-syntax-table) (modify-syntax-entry 10 "> " lisp-mode-syntax-table) (modify-syntax-entry 12 "> " lisp-mode-syntax-table) (modify-syntax-entry 59 "< " lisp-mode-syntax-table) (modify-syntax-entry 96 "' " lisp-mode-syntax-table) (modify-syntax-entry 39 "' " lisp-mode-syntax-table) (modify-syntax-entry 44 "' " lisp-mode-syntax-table) (modify-syntax-entry 46 "' " lisp-mode-syntax-table) (modify-syntax-entry 35 "' " lisp-mode-syntax-table) (modify-syntax-entry 34 "\" " lisp-mode-syntax-table) (modify-syntax-entry 124 "\" " lisp-mode-syntax-table) (modify-syntax-entry 92 "\\ " lisp-mode-syntax-table) (modify-syntax-entry 40 "() " lisp-mode-syntax-table) (modify-syntax-entry 41 ")( " lisp-mode-syntax-table)))
  6. (define-abbrev-table (quote lisp-mode-abbrev-table) nil)
  7. (defun lisp-mode-variables nil (byte-code "Ë!ˆ
  8. ‰ˆÌÃ!ˆÍ P‰ˆÌÅ!ˆ ‰ˆÌÆ!ˆÎ‰ˆÌÇ!ˆÏ‰ˆÌÈ!ˆÐ‰ˆÌÉ!ˆÑ‰ ˆÌÊ!ˆÒ‰
  9. ‡" [lisp-mode-syntax-table local-abbrev-table lisp-mode-abbrev-table paragraph-start page-delimiter paragraph-separate indent-line-function comment-start comment-start-skip comment-column comment-indent-hook set-syntax-table make-local-variable "^$\\|" lisp-indent-line ";" ";+ *" 40 lisp-comment-indent] 10))
  10. (defun lisp-mode-commands (map) (byte-code "ÁÂÃ#ˆÁÄÅ#ˆÁÆÇ#‡" [map define-key "" indent-sexp "" backward-delete-char-untabify " " lisp-indent-line] 6))
  11. (defvar emacs-lisp-mode-map nil "\
  12. ")
  13. (if emacs-lisp-mode-map nil (setq emacs-lisp-mode-map (make-sparse-keymap)) (define-key emacs-lisp-mode-map "" (quote eval-defun)) (lisp-mode-commands emacs-lisp-mode-map))
  14. (defun emacs-lisp-mode nil "\
  15. Major mode for editing Lisp code to run in Emacs.
  16. Commands:
  17. Delete converts tabs to spaces as it moves back.
  18. Blank lines separate paragraphs. Semicolons start comments.
  19. \\{emacs-lisp-mode-map}
  20. Entry to this mode calls the value of emacs-lisp-mode-hook
  21. if that value is non-nil." (interactive) (byte-code "ÃˆÄ ˆÅ!ˆÆ‰ˆÇ‰ˆÈ ˆÉÊ!‡" [emacs-lisp-mode-map major-mode mode-name nil kill-all-local-variables use-local-map emacs-lisp-mode "Emacs-Lisp" lisp-mode-variables run-hooks emacs-lisp-mode-hook] 5))
  22. (defvar lisp-mode-map nil)
  23. (if lisp-mode-map nil (setq lisp-mode-map (make-sparse-keymap)) (define-key lisp-mode-map "" (quote lisp-send-defun)) (lisp-mode-commands lisp-mode-map))
  24. (defun lisp-mode nil "\
  25. Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.
  26. Commands:
  27. Delete converts tabs to spaces as it moves back.
  28. Blank lines separate paragraphs. Semicolons start comments.
  29. \\{lisp-mode-map}
  30. Entry to this mode calls the value of lisp-mode-hook
  31. if that value is non-nil." (interactive) (byte-code "ÃˆÄ ˆÅ!ˆÆ‰ˆÇ‰ˆÈ ˆÉÊ!‡" [lisp-mode-map major-mode mode-name nil kill-all-local-variables use-local-map lisp-mode "Lisp" lisp-mode-variables run-hooks lisp-mode-hook] 5))
  32. (defun lisp-send-defun nil "\
  33. Send the current defun to the Lisp process made by M-x run-lisp." (interactive) (byte-code "ÀˆÁÂ!‡" [nil error "Process lisp does not exist"] 2))
  34. (defvar lisp-interaction-mode-map nil)
  35. (if lisp-interaction-mode-map nil (setq lisp-interaction-mode-map (make-sparse-keymap)) (lisp-mode-commands lisp-interaction-mode-map) (define-key lisp-interaction-mode-map "" (quote eval-defun)) (define-key lisp-interaction-mode-map "
  36. " (quote eval-print-last-sexp)))
  37. (defun lisp-interaction-mode nil "\
  38. Major mode for typing and evaluating Lisp forms.
  39. Like Lisp mode except that \\[eval-print-last-sexp] evals the Lisp expression
  40. before point, and prints its value into the buffer, advancing point.
  41. Commands:
  42. Delete converts tabs to spaces as it moves back.
  43. Paragraphs are separated only by blank lines. Semicolons start comments.
  44. \\{lisp-interaction-mode-map}
  45. Entry to this mode calls the value of lisp-interaction-mode-hook
  46. if that value is non-nil." (interactive) (byte-code "ÃˆÄ ˆÅ!ˆÆ‰ˆÇ‰ˆÈ ˆÉÊ!‡" [lisp-interaction-mode-map major-mode mode-name nil kill-all-local-variables use-local-map lisp-interaction-mode "Lisp Interaction" lisp-mode-variables run-hooks lisp-interaction-mode-hook] 5))
  47. (defun eval-print-last-sexp (arg) "\
  48. Evaluate sexp before point; print value into current buffer." (interactive "P") (byte-code "ˆÃÄ ÅŽŠÆ !ˆÇÈ!ˆ`)))`p#‡" [stab lisp-mode-syntax-table nil eval-region syntax-table ((byte-code "Á!‡" [stab set-syntax-table] 2)) set-syntax-table forward-sexp -1] 7))
  49. (defun eval-last-sexp (arg) "\
  50. Evaluate sexp before point; print value in minibuffer.
  51. With argument, print output into current buffer." (interactive "P") (byte-code "ÄˆÅÆ ÇŽŠÈ !ˆÉÊ!ˆ`)))`
  52. ƒp‚Ã#‡" [stab lisp-mode-syntax-table arg t nil eval-region syntax-table ((byte-code "Á!‡" [stab set-syntax-table] 2)) set-syntax-table forward-sexp -1] 7))
  53. (defun eval-defun (arg) "\
  54. Evaluate defun that point is in or before.
  55. Print value in minibuffer.
  56. With argument, insert value in current buffer after the defun." (interactive "P") (byte-code "ÈŠÄ ˆ`Å ˆÆ` ƒp‚Â#))‡" [end arg t nil end-of-defun beginning-of-defun eval-region] 6))
  57. (defun lisp-comment-indent nil (byte-code "ÂÃ!ƒ
  58. i‚2ÂÄ!ƒ\"Å <ƒ@‚)‚2ÆÇ!ˆnƒ.È‚0iT ]‡" [tem comment-column looking-at ";;;" ";;" calculate-lisp-indent skip-chars-backward " " 0] 6))
  59. (defconst lisp-indent-offset nil "\
  60. ")
  61. (defconst lisp-indent-hook (quote lisp-indent-hook) "\
  62. ")
  63. (defun lisp-indent-line (&optional whole-exp) "\
  64. Indent current line as Lisp code.
  65. With argument, indent any additional lines of the same expression
  66. rigidly along with this one." (interactive "P") (byte-code "ÅˆÇ ÅÅÅd`ZÈ ˆ`‰ˆÉÊ!ˆËÌ!ƒ$Å‚‚<…-@‰ˆiZ‰ˆÍ !ƒ>Å‚EÎ
  67. `\"ˆjˆd Z`V…Rd Zbˆ…‚Í !?…‚Š
  68. bˆÏÐ!ˆ`‰ˆ
  69. bˆÑÐ!ˆ`‰ˆ
  70. V)…‚Ò
  71. #-‡" [indent shift-amt beg end pos nil whole-exp calculate-lisp-indent beginning-of-line skip-chars-forward " " looking-at "[ ]*;;;" zerop delete-region forward-sexp 1 forward-line indent-code-rigidly] 13))
  72. (defun calculate-lisp-indent (&optional parse-start) "\
  73. Return appropriate indentation for current line as Lisp code.
  74. In usual case returns an integer: the column to indent to.
  75. Can instead return a list, whose car is the column to indent to.
  76. This means that following lines at the same level of indentation
  77. should not necessarily be indented the same way.
  78. The second element of the list is the buffer position
  79. of the start of the containing expression." (byte-code "ŠÍ ˆ`ÉÉÉÅÉɃb‚!Î ˆ`W…3Ï`Ð#‰ˆ‚\"ˆ …B @‰…B
  80. ÐV… ɉˆÑ 8‰ˆ A@‰ˆTbˆ…e`V…~ÏÐ#
  81. 
  82. A@‰…}
  83. ‰)ˆ ?…Tbˆ?ƒ•i‰‚Ï`ÐÅ$ˆÒÓ!ƒÉŠÔÕ!ˆ`)V?…¿bˆÍ ˆÏ`ÐÅ$ˆÖ ˆi‰‚ŠÔÕ!ˆ`)Vƒ÷Ï`ÐÅ$ˆ×`\"…ñØÕ!ˆÏ`ÐÅ$ˆÖ ‚bˆÍ ˆÏ`ÐÅ$ˆÖ ˆ‚4ˆÙÚ \"@ƒ\"bˆÛÜ!ˆi‰‚^Ý !…+ƒ;bˆ i\\‰‚^ †WÞÌ!…W …W ?…Wß  #‰?…^i‰ˆ .)‡" [indent-point state paren-depth desired-indent retry t last-sexp containing-sexp parse-start nil peek lisp-indent-offset lisp-indent-hook beginning-of-line beginning-of-defun parse-partial-sexp 0 2 looking-at "\\s(" forward-line 1 backward-prefix-chars /= forward-sexp nthcdr 3 skip-chars-forward " " integerp boundp funcall] 27))
  84. (defun lisp-indent-hook (indent-point state) (byte-code "iŠ A@TbˆÅÆ!ˆÇ` A@\"…hÈÉÊ!ˆ`ËÌ!ˆ`\"ÍÎ
  85. !ÏN‰ˆ Ð=†F ?…F
  86. GÑV…FÒ
  87. ÓÑOÔ\"ƒPÕ \"‚gÖ !ƒ^× #‚g …gØ #*))‡" [normal-indent state function method indent-point re-search-forward "\\sw\\|\\s_" /= buffer-substring forward-char -1 forward-sexp 1 nil intern-soft lisp-indent-hook defun 3 string-equal 0 "def" lisp-indent-defform integerp lisp-indent-specform funcall] 14))
  88. (defconst lisp-body-indent 2 "\
  89. ")
  90. (defun lisp-indent-specform (count state indent-point) (byte-code " A@ ÊÊbˆi‰ˆ \\‰ˆËÌ!ˆÍÌ!ˆÎ`ÌÈ$ˆ`W…3ÊÏÐ�…;ʈ‚(ˆ ÑVƒ]
  91. ZÌXƒV ÒÓ\"\\D‚Z D‚|
  92. ÑU…f ÑU†s ÑU…s  Xƒz ‚| ,‡" [containing-form-start state i count body-indent containing-form-column lisp-body-indent indent-point t normal-indent nil forward-char 1 forward-sexp parse-partial-sexp (byte-code "S‰ˆÃÄ!ˆÅ` ÄÂ$‡" [count indent-point t forward-sexp 1 parse-partial-sexp] 6) ((error (byte-code "À‡" [nil] 1))) 0 * 2] 7))
  93. (defun lisp-indent-defform (state indent-point) (byte-code "A@bˆÂÃ!ˆ`AA@V…A@bˆ i\\‡" [state lisp-body-indent forward-line 1] 3))
  94. (put (quote lambda) (quote lisp-indent-hook) (quote defun))
  95. (put (quote progn) (quote lisp-indent-hook) 0)
  96. (put (quote prog1) (quote lisp-indent-hook) 1)
  97. (put (quote save-excursion) (quote lisp-indent-hook) 0)
  98. (put (quote save-window-excursion) (quote lisp-indent-hook) 0)
  99. (put (quote save-restriction) (quote lisp-indent-hook) 0)
  100. (put (quote let) (quote lisp-indent-hook) 1)
  101. (put (quote let*) (quote lisp-indent-hook) 1)
  102. (put (quote while) (quote lisp-indent-hook) 1)
  103. (put (quote if) (quote lisp-indent-hook) 2)
  104. (put (quote catch) (quote lisp-indent-hook) 1)
  105. (put (quote condition-case) (quote lisp-indent-hook) 2)
  106. (put (quote unwind-protect) (quote lisp-indent-hook) 1)
  107. (put (quote with-output-to-temp-buffer) (quote lisp-indent-hook) 1)
  108. (defun indent-sexp nil "\
  109. Indent each line of the list starting just after point." (interactive) (byte-code "ÁˆÁCÌÁÁÁÁÁŠÍÎ!)ˆŠÁ‰ˆ ?….
  110. Á‰ ˆ ?…5m‰?……Ï`Ð ˆ`ÁÁ%‰ˆ@‰ˆÑÒ\"@…dÓ ˆÐ ˆÔÑÒ\"Á\"ˆÑÕ\"@ƒ}ÖÎ!ˆÔÑ×\"Á\"‚�ʉ ˆ‚+ˆ
  111. ÌX‰ƒ’Á‚*
  112. V…¦AS‰ˆ‚’ˆ
  113. W…¼ÁBT‰ˆ‚§ˆÖÎ!ˆ`‰ˆØÙ!ˆm†ÐÚÛ!ƒ×Á‚*@…à@ÌYƒë@‰‚Ü@…ô@[! Ý !ƒ Ô ‰\"‚Ô A@[\"ˆ @‰)ˆÞi\"…*ß `\"ˆjˆ‚).‡" [indent-stack nil next-depth bol outer-loop-done inner-loop-done state this-indent last-depth innerloop-done t val 0 forward-sexp 1 parse-partial-sexp end-of-line nthcdr 4 indent-for-comment setcar 3 forward-line 5 skip-chars-forward " " looking-at "[;
  114. ]" calculate-lisp-indent integerp /= delete-region] 24))
  115. (defun indent-code-rigidly (start end arg &optional nochange-regexp) "\
  116. Indent all lines of code, starting in the region, sideways by ARG columns.
  117. Does not affect lines starting inside comments or strings,
  118. assuming that the start of the region is not inside them.
  119. Called from a program, takes args START, END, COLUMNS and NOCHANGE-REGEXP.
  120. The last is a regexp which, if matched at the beginning of a line,
  121. means don't indent that line." (interactive "r
  122. p") (byte-code "ÈÊ bˆÇ ‰ˆ
  123. bˆn†!È`ÉÊ!ˆ`ÃÃ%‰ˆ` W…fËÌ\"@†T …7Í !†TÎ Ï`ÐÑ!ˆ`\"ˆl†SÒÓ \\]Ó\")ˆÈ`ÉÊ!ˆ`ÃÃ%‰ˆ‚\"))‡" [state end start nil nochange-regexp indent arg point-marker parse-partial-sexp forward-line 1 nthcdr 3 looking-at current-indentation delete-region skip-chars-forward " " indent-to 0] 17))