mim-mode.elc 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. (provide (quote mim-mode))
  2. (autoload (quote fast-syntax-check-mim) "mim-syntax" "\
  3. Checks Mim syntax quickly.
  4. Answers correct or incorrect, cannot point out the error context." t)
  5. (autoload (quote slow-syntax-check-mim) "mim-syntax" "\
  6. Check Mim syntax slowly.
  7. Points out the context of the error, if the syntax is incorrect." t)
  8. (defvar mim-mode-hysterical-bindings t "\
  9. *Non-nil means bind list manipulation commands to Meta keys as well as
  10. Control-Meta keys for historical reasons. Otherwise, only the latter keys
  11. are bound.")
  12. (defvar mim-mode-map nil)
  13. (defvar mim-mode-syntax-table nil)
  14. (if mim-mode-syntax-table nil (let ((i -1)) (setq mim-mode-syntax-table (make-syntax-table)) (while (< i 32) (modify-syntax-entry (setq i (1+ i)) " " mim-mode-syntax-table)) (while (< i 127) (modify-syntax-entry (setq i (1+ i)) "_ " mim-mode-syntax-table)) (setq i (1- 97)) (while (< i 122) (modify-syntax-entry (setq i (1+ i)) "w " mim-mode-syntax-table)) (setq i (1- 65)) (while (< i 90) (modify-syntax-entry (setq i (1+ i)) "w " mim-mode-syntax-table)) (setq i (1- 48)) (while (< i 57) (modify-syntax-entry (setq i (1+ i)) "w " mim-mode-syntax-table)) (modify-syntax-entry 58 " " mim-mode-syntax-table) (modify-syntax-entry 44 "' " mim-mode-syntax-table) (modify-syntax-entry 46 "' " mim-mode-syntax-table) (modify-syntax-entry 39 "' " mim-mode-syntax-table) (modify-syntax-entry 96 "' " mim-mode-syntax-table) (modify-syntax-entry 126 "' " mim-mode-syntax-table) (modify-syntax-entry 59 "' " mim-mode-syntax-table) (modify-syntax-entry 35 "' " mim-mode-syntax-table) (modify-syntax-entry 37 "' " mim-mode-syntax-table) (modify-syntax-entry 33 "' " mim-mode-syntax-table) (modify-syntax-entry 34 "\" " mim-mode-syntax-table) (modify-syntax-entry 92 "\\ " mim-mode-syntax-table) (modify-syntax-entry 40 "() " mim-mode-syntax-table) (modify-syntax-entry 60 "(> " mim-mode-syntax-table) (modify-syntax-entry 123 "(} " mim-mode-syntax-table) (modify-syntax-entry 91 "(] " mim-mode-syntax-table) (modify-syntax-entry 41 ")( " mim-mode-syntax-table) (modify-syntax-entry 62 ")< " mim-mode-syntax-table) (modify-syntax-entry 125 "){ " mim-mode-syntax-table) (modify-syntax-entry 93 ")[ " mim-mode-syntax-table)))
  15. (defconst mim-whitespace "- ")
  16. (defvar mim-mode-hook nil "\
  17. *User function run after mim mode initialization. Usage:
  18. (setq mim-mode-hook '(lambda () ... your init forms ...)).")
  19. (define-abbrev-table (quote mim-mode-abbrev-table) nil)
  20. (defconst indent-mim-hook (quote indent-mim-hook) "\
  21. Controls (via properties) indenting of special forms.
  22. (put 'FOO 'indent-mim-hook n), integer n, means lines inside
  23. <FOO ...> will be indented n spaces from start of form.
  24. (put 'FOO 'indent-mim-hook 'DEFINE) is like above but means use
  25. value of mim-body-indent as offset from start of form.
  26. (put 'FOO 'indent-mim-hook <cons>) where <cons> is a list or pointted list
  27. of integers, means indent each form in <FOO ...> by the amount specified
  28. in <cons>. When <cons> is exhausted, indent remaining forms by
  29. mim-body-indent unless <cons> is a pointted list, in which case the last
  30. cdr is used. Confused? Here is an example:
  31. (put 'FROBIT 'indent-mim-hook '(4 2 . 1))
  32. <FROBIT
  33. <CHOMP-IT>
  34. <CHOMP-SOME-MORE>
  35. <DIGEST>
  36. <BELCH>
  37. ...>
  38. Finally, the property can be a function name (read the code).")
  39. (defvar indent-mim-comment t "\
  40. *Non-nil means indent string comments.")
  41. (defvar mim-body-indent 2 "\
  42. *Amount to indent in special forms which have DEFINE property on
  43. indent-mim-hook.")
  44. (defvar indent-mim-arglist t "\
  45. *nil means indent arglists like ordinary lists.
  46. t means strings stack under start of arglist and variables stack to
  47. right of them. Otherwise, strings stack under last string (or start
  48. of arglist if none) and variables stack to right of them.
  49. Examples (for values 'stack, t, nil):
  50. (FOO \"OPT\" BAR (FOO \"OPT\" BAR (FOO \"OPT\" BAR
  51. BAZ MUMBLE BAZ MUMBLE BAZ MUMBLE
  52. \"AUX\" \"AUX\" \"AUX\"
  53. BLETCH ... BLETCH ... BLETCH ...")
  54. (put (quote DEFINE) (quote indent-mim-hook) (quote DEFINE))
  55. (put (quote DEFMAC) (quote indent-mim-hook) (quote DEFINE))
  56. (put (quote BIND) (quote indent-mim-hook) (quote DEFINE))
  57. (put (quote PROG) (quote indent-mim-hook) (quote DEFINE))
  58. (put (quote REPEAT) (quote indent-mim-hook) (quote DEFINE))
  59. (put (quote CASE) (quote indent-mim-hook) (quote DEFINE))
  60. (put (quote FUNCTION) (quote indent-mim-hook) (quote DEFINE))
  61. (put (quote MAPF) (quote indent-mim-hook) (quote DEFINE))
  62. (put (quote MAPR) (quote indent-mim-hook) (quote DEFINE))
  63. (put (quote UNWIND) (quote indent-mim-hook) (cons (* 2 mim-body-indent) mim-body-indent))
  64. (defvar mim-down-parens-only t "\
  65. *nil means treat ADECLs and ATOM trailers like structures when
  66. moving down a level of structure.")
  67. (defvar mim-stop-for-slop t "\
  68. *Non-nil means {next previous}-mim-object consider any
  69. non-whitespace character in column 0 to be a toplevel object, otherwise
  70. only open paren syntax characters will be considered.")
  71. (fset (quote mdl-mode) (quote mim-mode))
  72. (defun mim-mode nil "\
  73. Major mode for editing Mim (MDL in MDL) code.
  74. Commands:
  75. If value of mim-mode-hysterical-bindings is non-nil, then following
  76. commands are assigned to escape keys as well (e.g. M-f = M-C-f).
  77. The default action is bind the escape keys.
  78. Tab Indents the current line as MDL code.
  79. Delete Converts tabs to spaces as it moves back.
  80. M-C-f Move forward over next mim object.
  81. M-C-b Move backward over previous mim object.
  82. M-C-p Move to beginning of previous toplevel mim object.
  83. M-C-n Move to the beginning of the next toplevel mim object.
  84. M-C-a Move to the top of surrounding toplevel mim form.
  85. M-C-e Move to the end of surrounding toplevel mim form.
  86. M-C-u Move up a level of mim structure backwards.
  87. M-C-d Move down a level of mim structure forwards.
  88. M-C-t Transpose mim objects on either side of point.
  89. M-C-k Kill next mim object.
  90. M-C-h Place mark at end of next mim object.
  91. M-C-o Insert a newline before current line and indent.
  92. M-Delete Kill previous mim object.
  93. M-^ Join current line to previous line.
  94. M-\\ Delete whitespace around point.
  95. M-; Move to existing comment or insert empty comment if none.
  96. M-Tab Indent following mim object and all contained lines.
  97. Other Commands:
  98. Use \\[describe-function] to obtain documentation.
  99. replace-in-mim-object find-mim-definition fast-syntax-check-mim
  100. slow-syntax-check-mim backward-down-mim-object forward-up-mim-object
  101. Variables:
  102. Use \\[describe-variable] to obtain documentation.
  103. mim-mode-hook indent-mim-comment indent-mim-arglist indent-mim-hook
  104. mim-body-indent mim-down-parens-only mim-stop-for-slop
  105. mim-mode-hysterical-bindings
  106. Entry to this mode calls the value of mim-mode-hook if non-nil." (interactive) (byte-code "ÂˆÔ ˆ?ƒúÕ ‰ˆÖר#ˆÖÙÚ#ˆÖÛÜ#ˆÖÝÞ#ˆÖßà#ˆÖáâ#ˆÖãä#ˆÖåæ#ˆÖçè#ˆÖéê#ˆÖëì#ˆÖíî#ˆÖïð#ˆÖñò#ˆÖóô#ˆÖõö#ˆÖ÷ø#ˆÖùú#ˆÖûü#ˆÖýþ#ˆÖÿÚ#ˆ ?ƒ–‚÷Ö�@�A#ˆÖ�BØ#ˆÖ�CÜ#ˆÖ�DÞ#ˆÖ�Eà#ˆÖ�Fâ#ˆÖ�Gä#ˆÖ�Hæ#ˆÖ�Iè#ˆÖ�Jì#ˆÖ�Kî#ˆÖ�Lð#‚ûˆ�M!ˆ�N !ˆ�OÄ!ˆ�P P‰ˆ�OÆ!ˆ ‰ˆ�OÇ!ˆ�Q‰ˆ�OÈ!ˆ�Q‰ˆ�OÉ!ˆ�R‰ ˆ�OÊ!ˆ�S‰
  107. ˆ�OË!ˆ�T‰ ˆ�OÌ!ˆþ‰ ˆ�OÍ!ˆÂ‰ ˆ�OÎ!ˆÏ‰ˆ‰ˆ�U‰ˆ�V‰ˆ�W�X!‡" [mim-mode-map mim-mode-hysterical-bindings nil mim-mode-syntax-table paragraph-start page-delimiter paragraph-separate comment-start comment-start-skip comment-end comment-column comment-indent-hook indent-line-function blink-matching-paren-distance indent-tabs-mode t local-abbrev-table mim-mode-abbrev-table major-mode mode-name kill-all-local-variables make-sparse-keymap define-key "" open-mim-line "" indent-mim-object "" previous-mim-object "" next-mim-object "" beginning-of-DEFINE "" end-of-DEFINE "" transpose-mim-objects "" backward-up-mim-object "" forward-down-mim-object "" mark-mim-object " " forward-kill-mim-object "" forward-mim-object "" backward-mim-object "^" raise-mim-line "\\" fixup-whitespace "" backward-delete-char-untabify "" backward-kill-mim-object "
  108. " newline-and-mim-indent ";" begin-mim-comment " " indent-mim-line " " "!" line-to-top-of-window "o" "p" "n" "a" "e" "t" "u" "d" "k" "f" "b" use-local-map set-syntax-table make-local-variable "^$\\|" ";\"" "\"" 40 indent-mim-comment mim-mode "Mim" run-hooks mim-mode-hook] 49))
  109. (defun line-to-top-of-window nil "\
  110. Move current line to top of window." (interactive) (byte-code "ÀˆÁÂ!‡" [nil recenter 0] 2))
  111. (defun forward-mim-object (arg) "\
  112. Move forward across Mim object.
  113. With ARG, move forward that many objects." (interactive "p") (byte-code "ˆÃ!ÄUƒÅ ƒÆ!‚ÇÁ\"‚Ç!‡" [arg t nil abs 1 inside-atom-p forward-sexp forward-mim-objects] 6))
  114. (defun inside-atom-p nil (byte-code "hgÂ!ÃU†Â!ÄU†ÅU…- !ÃU†- !ÄU†- ÅU*‡" [c1 c2 char-syntax 119 95 33] 6))
  115. (defun forward-mim-objects (arg &optional skip-bracket-p) (byte-code "Ä !ÂÅÆ�ˆ`Ç!UƒÈ[!‚É)‡" [direction arg conditions skip-bracket-p sign (byte-code "ÂÃ\"…Ä !ˆÅ !?ƒ Z‰‚ƈ‚‡" [arg direction /= 0 forward-sexp inside-adecl-or-trailer-p nil] 6) ((error (byte-code "?ƒ ÃÄ A\"‚Å
  116. !ˆ`
  117. \\b‡" [skip-bracket-p conditions direction signal error skip-mim-whitespace] 4))) buffer-end skip-mim-whitespace nil] 4))
  118. (defun backward-mim-object (&optional arg) "\
  119. Move backward across Mim object.
  120. With ARG, move backward that many objects." (interactive "p") (byte-code "ÁˆÂƒ [‚ Ã!‡" [arg nil forward-mim-object -1] 2))
  121. (defun mark-mim-object (&optional arg) "\
  122. Mark following Mim object.
  123. With ARG, mark that many following (preceding, ARG < 0) objects." (interactive "p") (byte-code "ÁˆÂŠÃ†
  124. Ä!ˆ`)!‡" [arg nil push-mark forward-mim-object 1] 3))
  125. (defun forward-kill-mim-object (&optional arg) "\
  126. Kill following Mim object.
  127. With ARG, kill that many objects." (interactive "*p") (byte-code "ÁˆÂ`Æ
  128. Ä!ˆ`\"‡" [arg nil kill-region forward-mim-object 1] 4))
  129. (defun backward-kill-mim-object (&optional arg) "\
  130. Kill preceding Mim object.
  131. With ARG, kill that many objects." (interactive "*p") (byte-code "ÁˆÂ†Ã[!‡" [arg nil forward-kill-mim-object 1] 2))
  132. (defun raise-mim-line (&optional arg) "\
  133. Raise following line, fixing up whitespace at join.
  134. With ARG raise that many following lines.
  135. A negative ARG will raise current line and previous lines." (interactive "*p") (byte-code "ÃˆÄ †
  136. ʼn! ÆVƒÅ‚ÆŠÇ Æ\"…6È
  137. !ˆÉ``S\"ˆÊ ˆ Z‰ˆ‚)*‡" [increment arg direction nil sign 1 0 /= forward-line delete-region fixup-whitespace] 8))
  138. (defun forward-down-mim-object (&optional arg) "\
  139. Move down a level of Mim structure forwards.
  140. With ARG, move down that many levels forwards (backwards, ARG < 0)." (interactive "p") (byte-code "ĈІ
  141. Ɖ!Ç !ÆU…
  142. ?ƒcŠÈ!ˆÉVƒ*ÊË!‚+ĈÌ!Í !ÎU†=Í !ÏU)…PÐ!ˆÑ!ƒO`‚PĆ^Ò`Ó#†^Ô!)b‚€Õ É\"…€Ò`Ó#†uÔ!bˆ Z‰ˆ‚c)‡" [direction arg mim-down-parens-only c nil sign 1 abs skip-mim-whitespace 0 re-search-forward "\\s'*" next-char char-syntax 95 119 forward-sexp inside-adecl-or-trailer-p scan-lists -1 buffer-end /=] 17))
  143. (defun backward-down-mim-object (&optional arg) "\
  144. Move down a level of Mim structure backwards.
  145. With ARG, move down that many levels backwards (forwards, ARG < 0)." (interactive "p") (byte-code "ÁˆÂƒ [‚ Ã!‡" [arg nil forward-down-mim-object -1] 2))
  146. (defun forward-up-mim-object (&optional arg) "\
  147. Move up a level of Mim structure forwards
  148. With ARG, move up that many levels forwards (backwards, ARG < 0)." (interactive "p") (byte-code "ˆà †
  149. ĉ!Å Æ\"…)Ç`Ä#†È !bˆ Z‰ˆ‚ ˆÆWƒ5É ‚6Â)‡" [direction arg nil sign 1 /= 0 scan-lists buffer-end backward-prefix-chars] 7))
  150. (defun backward-up-mim-object (&optional arg) "\
  151. Move up a level of Mim structure backwards
  152. With ARG, move up that many levels backwards (forwards, ARG > 0)." (interactive "p") (byte-code "ÁˆÂƒ [‚ Ã!‡" [arg nil forward-up-mim-object -1] 2))
  153. (defun replace-in-mim-object (old new) "\
  154. Replace string in following Mim object." (interactive "*sReplace in object:
  155. sReplace %s with: ") (byte-code "ˆŒÃ`ŠÄÅ!ˆ`)\"ˆÆ \")‡" [old new nil narrow-to-region forward-mim-object 1 replace-string] 5))
  156. (defun transpose-mim-objects (&optional arg) "\
  157. Transpose Mim objects around point.
  158. With ARG, transpose preceding object that many times with following objects.
  159. A negative ARG will transpose backwards." (interactive "*p") (byte-code "ÁˆÂÆ Ä\"‡" [arg nil transpose-subr forward-mim-object 1] 3))
  160. (defun beginning-of-DEFINE (&optional arg move) "\
  161. Move backward to beginning of surrounding or previous toplevel Mim form.
  162. With ARG, do it that many times. Stops at last toplevel form seen if buffer
  163. end is reached." (interactive "p") (byte-code "ĈІ
  164. Ɖ!
  165. ?ƒÉ‚ĈÇWƒ%`Tb‚&ÄˆÈ Ç\"…4ÉÊÄ
  166. $…@ Z‰ˆ‚'ˆÇWƒM`Sb‚NÄ)‡" [direction arg move t nil sign 1 0 /= re-search-backward "^<"] 7))
  167. (defun end-of-DEFINE (&optional arg) "\
  168. Move forward to end of surrounding or next toplevel mim form.
  169. With ARG, do it that many times. Stops at end of last toplevel form seen
  170. if buffer end is reached." (interactive "p") (byte-code "Áˆ?ƒ ‰‚ÁˆÃWƒÄS[!‚6ÅÆ!?ƒ+T‰‚,ÁˆÄ[Ç\"ˆÄÂ!ˆÈÂ!ˆÉÂ!‡" [arg nil 1 0 beginning-of-DEFINE looking-at "^<" move forward-mim-object forward-line] 7))
  171. (defun next-mim-object (&optional arg) "\
  172. Move to beginning of next toplevel Mim object.
  173. With ARG, do it that many times. Stops at last object seen if buffer end
  174. is reached." (interactive "p") (byte-code "Ĉ ƒ
  175. Æ‚ ÇÈ †ɉ!
  176. ÊVƒ\"`Tb‚#ÄˆË Ê\"…1ÌÄÅ
  177. $…=
  178. Z‰ˆ‚$ˆ
  179. ÊVƒJ`Sb‚KĈ
  180. ÊW†[ŠÍÉ!ˆÎ`!)?ƒeÏÊ!‚fÄ*‡" [search-string mim-stop-for-slop direction arg nil t "^\\S " "^\\s(" sign 1 0 /= re-search-forward forward-mim-object pos-visible-in-window-p recenter] 7))
  181. (defun previous-mim-object (&optional arg) "\
  182. Move to beginning of previous toplevel Mim object.
  183. With ARG do it that many times. Stops at last object seen if buffer end
  184. is reached." (interactive "p") (byte-code "ÁˆÂ†Ã[!‡" [arg nil next-mim-object 1] 2))
  185. (defun calculate-mim-indent (&optional parse-start) "\
  186. Calculate indentation for Mim line. Returns column." (byte-code "ŠÓ ˆ`ÌÌÌÌÌÌÌÌÌ 
  187. ƒ'
  188. b‚*ÔÕ�ˆ`W…<Ö`×#‰ˆ‚+ˆË‰ˆ …Q
  189. @‰ …Q ×V…@̉ˆØÙ
  190. \"@‰ˆ
  191. A@‰ˆ Tbˆ …q `Vƒ‘Ö ×#‰ˆA@‰ƒ�‰‚ŽÌ‚’̈ ƒ›Ì‚< T‰ˆbˆ ?ƒ°i‰‚<hÚUƒÛÜ!ˆ` VƒÆb‚ŠÝÜ!ˆ`) VƒÝÞß!ˆ`‰‚ bˆÓ ˆÖ` ×Ë$ˆ` U†úŠÖ` ×#@×U)ƒà ˆ`‰‚Ë…b‚<…IháU…IŠ×‰ˆâã!ˆT‰äW…5Ìåæ�…=̈‚&ˆäW…Hçè!)ƒì×Ì` W…²Þ \"ˆ`‰Vƒ^‰ˆé ˆ`‰ˆb‚€̈gêUƒ«`‰ˆÛÜ!ˆ Uƒž ‰‚¨Þ \"ˆ`‰‚®ÛÜ!ˆ‚RˆbˆÞßd\"ˆgêUƒß…ÌëË\"?ƒ×‰‚Ü T‰‚àÌ*ˆbˆi‰‚<Ë…<ŠÝÜ!ˆ`) VƒÞß!ˆ`‰‚8 bˆÓ ˆÖ` ×Ë$ˆ` U†$ŠÖ` ×#@×U)ƒ1à ˆ`‰‚8Ë…8bˆi‰ˆ‚AˆØì
  192. \"@ƒ” ƒ^ bˆÛÜ!ˆíî!ˆâã!‚hbˆïð!ˆâÜ!ˆ`‰ˆñß!ˆà ˆçò!…}ƒ‡Tb‚�bˆÞß!ˆi‰‚•̈ †²…¬ ?…¬ó
  193. #‰†²i‰ˆbˆ .
  194. )‡" [indent-point retry state containing-sexp last-sexp desired-indent start peek where paren-depth parse-start t nil mim-whitespace indent-mim-arglist eol last-string indent-mim-comment indent-mim-hook beginning-of-line from-the-top (byte-code "Á‰ˆ…4ÂÅÆ�ˆÇÈ!ƒ$ bˆÉÊÂËÌ$ˆÍÎÂ\"‚%ˆ….ÏiÐ\"‰ˆ‚ˆÑ !ˆo?ƒDÒÓ!‚EÂˆÔ ‡" [retry t nil indent-point mim-whitespace (byte-code "ÀÁ!‡" [forward-sexp -1] 2) ((error (byte-code "Á‰‡" [retry nil] 2))) looking-at ".?[ ]*\"" re-search-backward "^\\s(" move 1 throw from-the-top /= 0 skip-chars-backward forward-char -1 backward-prefix-chars] 8) parse-partial-sexp 0 nthcdr 2 60 forward-sexp 1 forward-line skip-chars-forward " " backward-prefix-chars 40 forward-char -1 6 (byte-code "ÁÂ!ˆÀ‡" [t forward-sexp -1] 2) ((error (byte-code "À‡" [nil] 1))) looking-at "DEFINE\\|DEFMAC\\|FUNCTION" end-of-line 34 equal 3 search-forward "\"" re-search-backward "[^\\]\"" skip-chars-backward ";[ ]*\"" funcall] 40))
  195. (defun indent-mim-hook (state indent-point) "\
  196. Compute indentation for Mim special forms. Returns column or nil." (byte-code " A@`ŠTbˆÈ ˆÉÊ!ƒ~iËÌ`ÍÎ!ˆ`\"! ÏNÐ Ñ\"ƒ3‰‚4Ò†:Ó !ƒUÔÎ!ˆ`ÕÖ \"@VƒQ \\‚RÒ‚z
  197. bˆ :ƒe× \"‚z 9…mØ !ƒyÙ #‚zÒ+‚Ò)*‡" [containing-sexp state current-indent start function method mim-body-indent indent-point backward-prefix-chars looking-at "\\sw\\|\\s_" intern-soft buffer-substring forward-sexp 1 indent-mim-hook equal DEFINE nil integerp forward-line nthcdr 2 indent-mim-offset fboundp funcall] 15))
  198. (defun indent-mim-offset (state indent-point) (byte-code "
  199. ÊN A@ËÌ \"@È Tbˆ`W…\"ÈÍÎ�…TÏÐ!ˆÑ ˆgÒUƒ6È‚P @‰ˆÓ A‰!ƒO ‰ˆÈ‰‚PȈ‚ˆ Tbˆi†`\\-‡" [mim-body-indent indentations function containing-sexp state last-sexp indentation indent-point nil t indent-mim-hook nthcdr 2 (byte-code "ÂÃ!ˆÄ`ÃÁ$‡" [indent-point t forward-sexp 1 parse-partial-sexp] 6) ((error (byte-code "À‡" [nil] 1))) skip-chars-backward " " backward-prefix-chars 59 integerp] 7))
  200. (defun indent-mim-comment (&optional start) "\
  201. Indent a one line (string) Mim comment following object, if any." (byte-code "`Ç ˆ`ÄÄÈ ˆÉÊ�ˆb,‡" [old-point eol state last-sexp nil t comment-column end-of-line beginning-of-line no-comment (byte-code "Æ` \"‰ˆÇÈ\"@‰?†ÇÉ\"@ƒ!ÊËÃ\"‚\"ÃˆÌ ˆÆ` ÍÄ$ˆ`
  202. Uƒ:ÊËÄ\"‚;È
  203. bˆÎÏ!ˆÐ ˆÑÒ!?ƒTÊËÃ\"‚UÃˆÓ ˆi Wƒd j‚fÔ ‡" [state eol last-sexp nil t comment-column parse-partial-sexp nthcdr 2 3 throw no-comment beginning-of-line 0 skip-chars-backward " " backward-prefix-chars looking-at ";[ ]*\"" delete-horizontal-space tab-to-tab-stop] 14)] 4))
  204. (defun indent-mim-line nil "\
  205. Indent line of Mim code." (interactive "*") (byte-code "Èd`ZÄ ˆ`Å ÆÇ!ˆÈi
  206. \"ƒ#É `\"ˆ
  207. j‚$ÈdZ`Vƒ4dZb‚5Ã+‡" [position bol indent nil beginning-of-line calculate-mim-indent skip-chars-forward " " /= delete-region] 7))
  208. (defun newline-and-mim-indent nil "\
  209. Insert newline at point and indent." (interactive "*") (byte-code "ÀˆÁ ˆÂ ‡" [nil newline indent-mim-line] 3))
  210. (defun open-mim-line (&optional lines) "\
  211. Insert newline before point and indent.
  212. With ARG insert that many newlines." (interactive "*p") (byte-code "ˆà ˆÄ  ÅV… Æ ˆÇÈ!ˆjˆ S‰ˆ‚)‡" [indent lines nil beginning-of-line calculate-mim-indent 0 newline forward-line -1] 7))
  213. (defun indent-mim-object (&optional dont-indent-first-line) "\
  214. Indent object following point and all lines contained inside it.
  215. With ARG, idents only contained lines (skips first line)." (interactive "*P") (byte-code "LjÇÇÇÇŠÈ`dÉÄ$ˆ`‰ˆÊË!ˆd`Z‰)ˆŠ ?ƒ,Ì ‚-LjÍË!ˆd`ZV…jÎ !‰ˆ`‰ˆÏÐ!ˆÑ
  216. i\"ƒYÒ `\"ˆ
  217. j‚ZLjƒeÆ ‚fLj‚.),‡" [end bol indent start t dont-indent-first-line indent-mim-comment nil parse-partial-sexp 0 forward-sexp 1 indent-mim-line forward-line calculate-mim-indent skip-chars-forward " " /= delete-region] 11))
  218. (defun find-mim-definition (name) "\
  219. Search for definition of function, macro, or gfcn.
  220. You need type only enough of the name to be unambiguous." (interactive "sName: ") (byte-code "ÁˆÁŠebˆÁÃÄ�)ˆƒ!Å ˆbˆÆ ˆÇÈ!‚\"Á)‡" [where nil name (byte-code "ÂÃP!ˆ`‰‡" [name where re-search-forward "^<\\(DEFINE\\|\\DEFMAC\\|FCN\\|GFCN\\)\\([ ]*\\)"] 3) ((error (byte-code "ÁÂ\"‡" [name error "Can't find %s"] 3))) push-mark beginning-of-line recenter 0] 4))
  221. (defun begin-mim-comment nil "\
  222. Move to existing comment or insert empty comment." (interactive "*") (byte-code "ÇˆË ˆ`Ì ˆ`ÍÎÂ#ƒ+ ƒ'd`Zà ˆd Zb)‚(Ç‚•ÇÇ bˆÏÐ`Ñ#‰@Ñ\"…FÒÓ \"@…UÒÓ \"@‰ˆ‚3ˆÒÔ \"@ƒbÇ‚”Õ`\"ˆ?…rÏ @Ñ\"ƒ{Ö j‚ŠiVƒ‡× ‚Šjˆ cˆŠ
  223. c)**‡" [eol bol t indent-mim-comment where state last-sexp nil comment-column comment-start comment-end end-of-line beginning-of-line re-search-forward ";[ ]*\"" equal parse-partial-sexp 0 nthcdr 2 3 delete-region calculate-mim-indent tab-to-tab-stop] 14))
  224. (defun skip-mim-whitespace (direction) (byte-code "ÂYƒ Ã d\"‚Ä e\"‡" [direction mim-whitespace 0 skip-chars-forward skip-chars-backward] 4))
  225. (defun inside-adecl-or-trailer-p (direction) (byte-code "ÁYƒ ÂÃ!‚hÄU†ÂÅ!‡" [direction 0 looking-at ":\\|!-" 58 "!-"] 3))
  226. (defun sign (n) "\
  227. Returns -1 if N < 0, else 1." (byte-code "ÁYƒ
  228. ‚ Ç" [n 0 1 -1] 2))
  229. (defun abs (n) "\
  230. Returns the absolute value of N." (byte-code "ÁYƒ
  231. ‚ [‡" [n 0] 2))
  232. (defun next-char (direction) "\
  233. Returns preceding-char if DIRECTION < 0, otherwise following-char." (byte-code "ÁYƒ
  234. g‚ h‡" [direction 0] 2))