;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. #@68 *Quote for character constants. "'" for OCaml, "`" for Caml-Light. (defvar caml-quote-char "'" (#$ . -87)) #@24 *Enable Imenu support. (defvar caml-imenu-enable nil (#$ . -200)) #@37 *Used for \[caml-unindent-command]. (defvar caml-mode-indentation 2 (#$ . -272)) #@55 *How far to look back for syntax things in caml mode. (defvar caml-lookback-limit 5000 (#$ . -359)) #@446 *Bounds priority of operators permitted to affect caml indentation. Priorities are assigned to `interesting' caml operators as follows: all keywords 0 to 7 8 type, val, ... + 0 7 :: ^ 6 @ 5 := <- 4 if 3 fun, let, match ... 2 module 1 opening keywords 0. (defvar caml-max-indent-priority 8 (#$ . -466)) #@73 *How many spaces to add to indentation for an application in caml mode. (defvar caml-apply-extra-indent 2 (#$ . -965)) (make-variable-buffer-local 'caml-apply-extra-indent) #@65 *How many spaces to indent from a "begin" keyword in caml mode. (defvar caml-begin-indent 2 (#$ . -1144)) (make-variable-buffer-local 'caml-begin-indent) #@65 *How many spaces to indent from a "class" keyword in caml mode. (defvar caml-class-indent 2 (#$ . -1304)) (make-variable-buffer-local 'caml-class-indent) #@70 *How many spaces to indent from an "exception" keyword in caml mode. (defvar caml-exception-indent 2 (#$ . -1464)) (make-variable-buffer-local 'caml-exception-indent) #@63 *How many spaces to indent from a "for" keyword in caml mode. (defvar caml-for-indent 2 (#$ . -1637)) (make-variable-buffer-local 'caml-for-indent) #@63 *How many spaces to indent from a "fun" keyword in caml mode. (defvar caml-fun-indent 2 (#$ . -1791)) (make-variable-buffer-local 'caml-fun-indent) #@68 *How many spaces to indent from a "function" keyword in caml mode. (defvar caml-function-indent 4 (#$ . -1945)) (make-variable-buffer-local 'caml-function-indent) #@63 *How many spaces to indent from an "if" keyword in caml mode. (defvar caml-if-indent 2 (#$ . -2114)) (make-variable-buffer-local 'caml-if-indent) #@68 *How many spaces to indent from an "if .. else" line in caml mode. (defvar caml-if-else-indent 0 (#$ . -2266)) (make-variable-buffer-local 'caml-if-else-indent) #@68 *How many spaces to indent from an "inherit" keyword in caml mode. (defvar caml-inherit-indent 2 (#$ . -2433)) (make-variable-buffer-local 'caml-inherit-indent) #@72 *How many spaces to indent from an "initializer" keyword in caml mode. (defvar caml-initializer-indent 2 (#$ . -2600)) (make-variable-buffer-local 'caml-initializer-indent) #@68 *How many spaces to indent from an "include" keyword in caml mode. (defvar caml-include-indent 2 (#$ . -2779)) (make-variable-buffer-local 'caml-include-indent) #@63 *How many spaces to indent from a "let" keyword in caml mode. (defvar caml-let-indent 2 (#$ . -2946)) (make-variable-buffer-local 'caml-let-indent) #@69 *How many spaces to indent from a "let .. in" keyword in caml mode. (defvar caml-let-in-indent 0 (#$ . -3100)) (make-variable-buffer-local 'caml-let-in-indent) #@65 *How many spaces to indent from a "match" keyword in caml mode. (defvar caml-match-indent 2 (#$ . -3266)) (make-variable-buffer-local 'caml-match-indent) #@66 *How many spaces to indent from a "method" keyword in caml mode. (defvar caml-method-indent 2 (#$ . -3426)) (make-variable-buffer-local 'caml-method-indent) #@66 *How many spaces to indent from a "module" keyword in caml mode. (defvar caml-module-indent 2 (#$ . -3589)) (make-variable-buffer-local 'caml-module-indent) #@67 *How many spaces to indent from an "object" keyword in caml mode. (defvar caml-object-indent 2 (#$ . -3752)) (make-variable-buffer-local 'caml-object-indent) #@63 *How many spaces to indent from an "of" keyword in caml mode. (defvar caml-of-indent 2 (#$ . -3916)) (make-variable-buffer-local 'caml-of-indent) #@66 *How many spaces to indent from a "parser" keyword in caml mode. (defvar caml-parser-indent 4 (#$ . -4068)) (make-variable-buffer-local 'caml-parser-indent) #@63 *How many spaces to indent from a "sig" keyword in caml mode. (defvar caml-sig-indent 2 (#$ . -4231)) (make-variable-buffer-local 'caml-sig-indent) #@66 *How many spaces to indent from a "struct" keyword in caml mode. (defvar caml-struct-indent 2 (#$ . -4385)) (make-variable-buffer-local 'caml-struct-indent) #@63 *How many spaces to indent from a "try" keyword in caml mode. (defvar caml-try-indent 2 (#$ . -4548)) (make-variable-buffer-local 'caml-try-indent) #@64 *How many spaces to indent from a "type" keyword in caml mode. (defvar caml-type-indent 4 (#$ . -4702)) (make-variable-buffer-local 'caml-type-indent) #@63 *How many spaces to indent from a "val" keyword in caml mode. (defvar caml-val-indent 2 (#$ . -4859)) (make-variable-buffer-local 'caml-val-indent) #@65 *How many spaces to indent from a "while" keyword in caml mode. (defvar caml-while-indent 2 (#$ . -5013)) (make-variable-buffer-local 'caml-while-indent) #@63 *How many spaces to indent from a "::" operator in caml mode. (defvar caml-::-indent 2 (#$ . -5173)) (make-variable-buffer-local 'caml-::-indent) #@62 *How many spaces to indent from a "@" operator in caml mode. (defvar caml-@-indent 2 (#$ . -5325)) (make-variable-buffer-local 'caml-@-indent) #@63 *How many spaces to indent from a ":=" operator in caml mode. (defvar caml-:=-indent 2 (#$ . -5474)) (make-variable-buffer-local 'caml-:=-indent) #@63 *How many spaces to indent from a "<-" operator in caml mode. (defvar caml-<--indent 2 (#$ . -5626)) (make-variable-buffer-local 'caml-<--indent) #@63 *How many spaces to indent from a "->" operator in caml mode. (defvar caml-->-indent 2 (#$ . -5778)) (make-variable-buffer-local 'caml-->-indent) #@62 *How many spaces to indent from a "[" operator in caml mode. (defvar caml-lb-indent 2 (#$ . -5930)) (make-variable-buffer-local 'caml-lb-indent) #@62 *How many spaces to indent from a "{" operator in caml mode. (defvar caml-lc-indent 2 (#$ . -6081)) (make-variable-buffer-local 'caml-lc-indent) #@62 *How many spaces to indent from a "(" operator in caml mode. (defvar caml-lp-indent 1 (#$ . -6232)) (make-variable-buffer-local 'caml-lp-indent) #@105 *Extra indent for caml lines starting with the "and" keyword. Usually negative. nil is align on master. (defvar caml-and-extra-indent nil (#$ . -6384)) (make-variable-buffer-local 'caml-and-extra-indent) #@104 *Extra indent for caml lines starting with the "do" keyword. Usually negative. nil is align on master. (defvar caml-do-extra-indent nil (#$ . -6595)) (make-variable-buffer-local 'caml-do-extra-indent) #@106 *Extra indent for caml lines starting with the "done" keyword. Usually negative. nil is align on master. (defvar caml-done-extra-indent nil (#$ . -6803)) (make-variable-buffer-local 'caml-done-extra-indent) #@106 *Extra indent for caml lines starting with the "else" keyword. Usually negative. nil is align on master. (defvar caml-else-extra-indent nil (#$ . -7017)) (make-variable-buffer-local 'caml-else-extra-indent) #@105 *Extra indent for caml lines starting with the "end" keyword. Usually negative. nil is align on master. (defvar caml-end-extra-indent nil (#$ . -7231)) (make-variable-buffer-local 'caml-end-extra-indent) #@104 *Extra indent for caml lines starting with the "in" keyword. Usually negative. nil is align on master. (defvar caml-in-extra-indent nil (#$ . -7442)) (make-variable-buffer-local 'caml-in-extra-indent) #@106 *Extra indent for caml lines starting with the "then" keyword. Usually negative. nil is align on master. (defvar caml-then-extra-indent nil (#$ . -7650)) (make-variable-buffer-local 'caml-then-extra-indent) #@104 *Extra indent for caml lines starting with the "to" keyword. Usually negative. nil is align on master. (defvar caml-to-extra-indent -1 (#$ . -7864)) (make-variable-buffer-local 'caml-to-extra-indent) #@106 *Extra indent for caml lines starting with the "with" keyword. Usually negative. nil is align on master. (defvar caml-with-extra-indent nil (#$ . -8071)) (make-variable-buffer-local 'caml-with-extra-indent) #@26 *Indent inside comments. (defvar caml-comment-indent 3 (#$ . -8284)) (make-variable-buffer-local 'caml-comment-indent) #@102 *Extra indent for caml lines starting with the | operator. Usually negative. nil is align on master. (defvar caml-|-extra-indent -2 (#$ . -8410)) (make-variable-buffer-local 'caml-|-extra-indent) #@89 *Extra indent for caml lines starting with ]. Usually negative. nil is align on master. (defvar caml-rb-extra-indent -2 (#$ . -8612)) #@89 *Extra indent for caml lines starting with }. Usually negative. nil is align on master. (defvar caml-rc-extra-indent -2 (#$ . -8752)) #@89 *Extra indent for caml lines starting with ). Usually negative. nil is align on master. (defvar caml-rp-extra-indent -1 (#$ . -8892)) #@151 *Non-nil means electrically indent lines starting with |, ] or }. Many people find electric keys irritating, so you can disable them if you are one. (defvar caml-electric-indent t (#$ . -9033)) #@246 *Non-nil means electrically insert a | before a vector-closing ]. Many people find electric keys irritating, so you can disable them if you are one. You should probably have this on, though, if you also have caml-electric-indent on, which see. (defvar caml-electric-close-vector t (#$ . -9235)) (byte-code "\300\301!\203\f\300\302!\204\303\304!\210\300\207" [fboundp indent-line-to buffer-substring-no-properties require caml-compat] 2) #@37 Non nil when a subshell is running. (defvar caml-shell-active nil (#$ . 9682)) #@27 Keymap used in Caml mode. (defvar caml-mode-map nil (#$ . 9767)) (byte-code "\204/\303 \304\305\306#\210\304\307\306#\210\304\310\311#\210\304\312\313#\210\304\314\315#\210\304\316\317#\210\304\320\321#\210\304\322\323#\210\304\324\325#\210\304\326\327#\210\304\330\331#\210\304\332\333#\210\304\334\335#\210\304\336\337#\210\304\340\341#\210\304\342\343#\210\304\344\345#\210\304\346\347#\210\304\350\351#\210\304\352\353#\210\304\354\355#\210\304\356\357#\210\304\360\361#\210\304\362\363#\210\304\364\365#\210\304\366\367#\210\304\370\371#\210\304\372\373#\210\304\374\375#\210\304\376\377#\210\304\201@\201A#\210\304\201B\201C#\210\304\201D\375#\210\304\201E\367#\210\303\201F!\303\201G!\304\201H\201I#\210\304\201J\303 #\210\304\201K\201F\nB#\210\304\n\201L\201M#\210\304\n\201N\201O#\210\304\n\201P\201Q#\210\304\n\201R\201S#\210\304\n\201T\201U#\210\304\n\201V\201W#\210\304\n\201X\201Y#\210\304\n\201Z\201[#\210\304\n\201\\\201]#\210\304\n\201^\201_#\210\304\n\201`\201a#\210\304\n\201b\201c#\210\304\n\201d\201e#\210\304\n\201f\201G B#\210\304\n\201g\201h#\210\201i\201I\201j\201k#\210\304\n\201l\201m#\210\201i\201A\201j\201n#\210\304\n\201o\201p#\210\201i\367\201j\201n#\210\304\n\201q\201r#\210\304 \201s\201t#\210\304 \201u\201v#\210\304 \201w\201x#\210\304 \201y\201z#\210\304 \201{\201|#\210\304 \201}\201~#\210\304 \201\201\200#\210*\303\207" [caml-mode-map forms map make-sparse-keymap define-key "|" caml-electric-pipe "}" "]" caml-electric-rb " " caml-indent-command [backtab] caml-unindent-command "" backward-delete-char-untabify [3 20] caml-types-show-type [3 6] caml-types-show-call [3 12] caml-types-show-ident [3 down-mouse-1] caml-types-explore [3 105] ocaml-add-path [3 93] ocaml-close-module [3 91] ocaml-open-module [3 8] caml-help [3 9] caml-complete "b" caml-insert-begin-form "f" caml-insert-for-form "i" caml-insert-if-form "l" caml-insert-let-form "m" caml-insert-match-form "t" caml-insert-try-form "w" caml-insert-while-form "`" caml-goto-phrase-error "" caml-find-alternate-file "" compile "" caml-eval-phrase "" caml-backward-to-less-indent "" caml-forward-to-less-indent "" caml-indent-phrase "" caml-eval-region "" caml-show-subshell "\210" caml-mark-phrase "\221" "\230" "Caml" "Forms" "" caml-show-imenu [menu-bar] [menu-bar caml] [open] ("Open add path" . ocaml-add-path) [close] ("Close module for help" . ocaml-close-module) [open] ("Open module for help" . ocaml-open-module) [help] ("Help for identifier" . caml-help) [complete] ("Complete identifier" . caml-complete) [separator-help] ("---") [show-type] ("Show type at point" . caml-types-show-type) [separator-types] ("---") [camldebug] ("Call debugger..." . camldebug) [run-caml] ("Start subshell..." . run-caml) [compile] ("Compile..." . compile) [switch-view] ("Switch view" . caml-find-alternate-file) [separator-format] ("--") [forms] [show-imenu] ("Show index" . caml-show-imenu) put menu-enable (not caml-imenu-shown) [show-subshell] ("Show subshell" . caml-show-subshell) caml-shell-active [eval-phrase] ("Eval phrase" . caml-eval-phrase) [indent-phrase] ("Indent phrase" . caml-indent-phrase) [while] ("while .. do .. done" . caml-insert-while-form) [try] ("try .. with .." . caml-insert-try-form) [match] ("match .. with .." . caml-insert-match-form) [let] ("let .. in .." . caml-insert-let-form) [if] ("if .. then .. else .." . caml-insert-if-form) [begin] ("for .. do .. done" . caml-insert-for-form) [begin] ("begin .. end" . caml-insert-begin-form)] 5) #@48 Menu to add to the menubar when running Xemacs (defvar caml-mode-xemacs-menu nil (#$ . 13384)) #@43 Syntax table in use in Caml mode buffers. (defvar caml-mode-syntax-table nil (#$ . 13485)) (byte-code "\204G\303\304 \305\306\307#\210\305\310\311 P#\210\305\312\313 P#\210\305\314\315#\210\305\316\317#\210\305\320\317#\210\321\211\322W\203F\305\n\317#\210\nT\211\2024*\304\207" [caml-mode-syntax-table n i "n" make-syntax-table modify-syntax-entry 92 "\\" 40 "()1" 42 ". 23" 41 ")(4" 39 "w" 95 160 256] 5) #@42 Abbrev table used for Caml mode buffers. (defvar caml-mode-abbrev-table nil (#$ . 13913)) (byte-code "\204\f\301\300\302\303\304\"\"\210\301\207" [caml-mode-abbrev-table define-abbrev-table mapcar #[(keyword) "\211\301BB\207" [keyword (caml-abbrev-hook nil t)] 3] ("and" "do" "done" "else" "end" "in" "then" "with")] 5) #@67 Caches last buffer position determined not inside a caml comment. (defvar caml-last-noncomment-pos nil (#$ . 14242)) (make-variable-buffer-local 'caml-last-noncomment-pos) #@54 A marker caching last determined caml comment start. (defvar caml-last-comment-start nil (#$ . 14420)) (make-variable-buffer-local 'caml-last-comment-start) #@52 A marker caching last determined caml comment end. (defvar caml-last-comment-end nil (#$ . 14583)) (byte-code "\300\301!\210\300\302!\207" [make-variable-buffer-local caml-last-comment-end before-change-function] 2) #@43 True if we have computed definition list. (defvar caml-imenu-shown nil (#$ . 14805)) (make-variable-buffer-local 'caml-imenu-shown) (defconst caml-imenu-search-regexp "\\\\|^[ ]*\\(let\\|class\\|type\\|m\\(odule\\|ethod\\)\\|functor\\|and\\|val\\)[ ]+\\(\\('[a-zA-Z0-9]+\\|([^)]+)\\|mutable\\|private\\|rec\\|type\\)[ ]+\\)?\\([a-zA-Z][a-zA-Z0-9_']*\\)") #@20 Hook for caml-mode (defvar caml-mode-hook nil (#$ . 15175)) #@54 Major mode for editing OCaml code. \{caml-mode-map} (defalias 'caml-mode #[nil "\306 \210\307\310\311\n!\210\312 !\210\f\313\314!\210\315*P\f\313\316!\210\f\313\317!\210\320\313\321!\210\320\313\322!\210\323\313\324!\210\325\313\326!\210\327\313\330!\210\331\313\332!\210\333\313\334!\210\335\313\336!\210\337\340+\333,\341 -\341 .\333/\313\342!\210\343\"\313\344!\2100$1\203\221\345 \346W\203\221\347 \210\350\351!\207" [major-mode mode-name caml-mode-map caml-mode-syntax-table caml-mode-abbrev-table local-abbrev-table kill-all-local-variables caml-mode "caml" use-local-map set-syntax-table make-local-variable paragraph-start "^$\\|" paragraph-separate paragraph-ignore-fill-prefix t require-final-newline comment-start "(*" comment-end "*)" comment-column 40 comment-start-skip "(\\*+ *" parse-sexp-ignore-comments nil indent-line-function caml-indent-command add-log-current-defun-function caml-current-defun caml-before-change-function make-marker imenu-create-index-function caml-create-index-function imenu-generic-expression buffer-size 10000 caml-show-imenu run-hooks caml-mode-hook page-delimiter before-change-function caml-last-noncomment-pos caml-last-comment-start caml-last-comment-end case-fold-search caml-imenu-search-regexp caml-imenu-enable] 2 (#$ . 15241) nil]) (defalias 'caml-find-alternate-file #[nil "\301 \302\303\"\205\304\305\306\"\305\307\"\310\230\203\311\202\312P!)\207" [name buffer-file-name string-match "^\\(.*\\)\\.\\(ml\\|mli\\)$" find-file caml-match-string 1 2 "ml" ".mli" ".ml"] 5 nil nil]) #@56 Send the current region to the inferior OCaml process. (defalias 'caml-eval-region #[(start end) "\302\303!\210\304 \"\207" [start end require inf-caml inferior-caml-eval-region] 3 (#$ . 16829) "r"]) #@505 Send the phrase containing the point to the CAML process. With prefix-arg send as many phrases as its numeric value, If an error occurs during evaluation, stop at this phrase and report the error. Return nil if noerror and position of error if any. If arg's numeric value is zero or negative, evaluate the current phrase or as many as prefix arg, ignoring evaluation errors. This allows to jump other erroneous phrases. Optional arguments min max defines a region within which the phrase should lies. (defalias 'caml-eval-phrase #[(arg &optional min max) "\303\304!\210\305 \n#\207" [arg min max require inf-caml inferior-caml-eval-phrase] 4 (#$ . 17037) "p"]) #@154 Evaluate the buffer from the beginning to the phrase under the point. With prefix arg, evaluate past the whole buffer, no stopping at the current point. (defalias 'caml-eval-buffer #[(arg) "`\303eb\210\304\305e\n\203d\202 #\211\203\306!\210 b*\207" [err here arg nil caml-eval-phrase 500 set-mark] 5 (#$ . 17709) "p"]) (defalias 'caml-show-subshell #[nil "\300\301!\210\302 \207" [require inf-caml inferior-caml-show-subshell] 2 nil nil]) (defalias 'caml-show-imenu #[nil "\301\302!\210\303p!\210\304\305!\210\306\211\207" [caml-imenu-shown require imenu switch-to-buffer imenu-add-to-menubar "Defs" t] 2 nil nil]) (defalias 'caml-prev-index-position-function #[nil "\303\211\304\n\303\305#\211\203&\306 \307 \204\310 \204\311\312!\203&\313 \204\314!\210 *\207" [data found caml-imenu-search-regexp nil re-search-backward move match-data caml-in-literal-p caml-in-comment-p looking-at "in" caml-find-in-match set-match-data] 4]) (defalias 'caml-create-index-function #[nil "\306\211\211\211\211\211\211\211d\306 b\210\307 \203\236\310\311!`B\211 B\312\313!\2037\fB\202\312\314!\203K\315\f\"B\306\202\312\316!\203_\315\f\"B\306\202\312\317!\203s\315\f\"B\306\202\312\320!\203\202B\202\312\321!\203\217 B\202\312\322!\203B\202\323\324\325\"\210 \203\255\326 B\nB\n.\n\207" [index prev-pos menu-alist all-alist and-alist module-alist nil caml-prev-index-position-function caml-match-string 5 looking-at "[ ]*and" "[ ]*let" append "[ ]*type" "[ ]*class" "[ ]*val" "[ ]*\\(module\\|functor\\)" "[ ]*method" mapc #[(pair) "AJ\205@\302AJ\303\"B B\211\207" [pair menu-alist sort imenu--sort-by-name] 4] (("Values" . value-alist) ("Types" . type-alist) ("Modules" . module-alist) ("Methods" . method-alist) ("Classes" . class-alist)) "Index" method-alist class-alist type-alist value-alist] 11]) #@78 Tests whether all characters between beginning of line and point are blanks. (defalias 'caml-in-indentation #[nil "\212\300\301x\210n)\207" [" " nil] 2 (#$ . 19612)]) #@146 Indent the current line in Caml mode. Compute new indentation based on caml syntax. If prefixed, indent the line all the way to where point is. (defalias 'caml-indent-command #[(&optional p) "\203\301V\203\302i!\207\303 \203\302\304 !\207\212\302\304 !)\207" [p 1 indent-line-to caml-in-indentation caml-compute-final-indent] 2 (#$ . 19787) "*p"]) #@275 Decrease indentation by one level in Caml mode. Works only if the point is at the beginning of an indented line (i.e. all characters between beginning of line and point are blanks). Does nothing otherwise. The unindent size is given by the variable caml-mode-indentation. (defalias 'caml-unindent-command #[nil "\212\303 \210`)`Z\211\nY\205\304 \205\305\n!*\207" [begline current-offset caml-mode-indentation beginning-of-line caml-in-indentation backward-delete-char-untabify] 3 (#$ . 20151) "*"]) (byte-code "\300\301!\204\302\303\304\"\210\202\302\305\306\"\210\302\303\307\"\210\310\311!\207" [fboundp char-bytes defalias forward-byte forward-char caml-char-bytes #[(ch) "\302!\211\303V\203 S\202 )\207" [ch l char-bytes 1] 3] #[(count) "\302V\203&\302V\205G\303f\211\204\302\202\"\304\303f!Z\303u\210)\202\302W\205G\303f\211\2048\302\202C\304`Sf!\\\305u\210)\202&\207" [count char 0 nil caml-char-bytes -1] 4] require compile] 3) #@67 Regular expression matching the error messages produced by camlc. (defconst caml-error-regexp "^[ A-\377]+ \"\\([^\"\n]+\\)\", [A-\377]+ \\([0-9]+\\)[-,:]" (#$ . 21133)) #@77 Regular expression matching the error messages produced by ocamlc/ocamlopt. (defconst caml-error-regexp-newstyle "^[ A-\377]+ \"\\([^\"\n]+\\)\", line \\([0-9]+\\),char \\([0-9]+\\) to line \\([0-9]+\\), char \\([0-9]+\\):" (#$ . 21309)) #@77 Regular expression matching the error messages produced by ocamlc/ocamlopt. (defconst caml-error-regexp-new-newstyle "^[ A-\377]+ \"\\([^\"\n]+\\)\", line \\([0-9]+\\), characters \\([0-9]+\\)-\\([0-9]+\\):" (#$ . 21553)) (byte-code "\304\301!\2032\305 \"\204\306\307E B\305\n \"\204#\n\306\310\311F B\305 \"\2042 \306\307\312F B\304\207" [caml-error-regexp compilation-error-regexp-alist caml-error-regexp-newstyle caml-error-regexp-new-newstyle boundp assoc 1 2 (2 . 4) (3 . 5) (3 . 4)] 4) #@94 Regular expression extracting the character numbers from an error message produced by camlc. (defconst caml-error-chars-regexp ".*, .*, [A-\377]+ \\([0-9]+\\)-\\([0-9]+\\):?" (#$ . 22062)) (defvar caml-error-overlay nil) (defvar caml-next-error-skip-warnings-flag nil) (byte-code "\300\301!\203\302\303\301\"\210\202\302\303\304\"\210\305\306\307\310\311$\210\312\306\311\"\207" [fboundp string-to-number defalias caml-string-to-int string-to-int ad-add-advice next-error (caml-next-error nil t (advice lambda nil "Reads the extra positional information provided by the OCaml compiler.\n\nPuts the point and the mark exactly around the erroneous program\nfragment. The erroneous fragment is also temporarily highlighted if\npossible." (if (eq major-mode 'caml-mode) (let (skip bol beg end) (save-excursion (with-current-buffer (if (boundp 'compilation-last-buffer) compilation-last-buffer "*compilation*") (save-excursion (goto-char (window-point (get-buffer-window (current-buffer)))) (if (looking-at caml-error-chars-regexp) (setq beg (caml-string-to-int (buffer-substring (match-beginning 1) (match-end 1))) end (caml-string-to-int (buffer-substring (match-beginning 2) (match-end 2))))) (forward-line 1) (beginning-of-line) (if (and (looking-at "Warning") caml-next-error-skip-warnings-flag) (setq skip 't))))) (cond (skip (next-error)) (beg (setq end (- end beg)) (beginning-of-line) (forward-byte beg) (setq beg (point)) (forward-byte end) (setq end (point)) (goto-char beg) (push-mark end t) (cond ((fboundp 'make-overlay) (if caml-error-overlay nil (setq caml-error-overlay (make-overlay 1 1)) (overlay-put caml-error-overlay 'face 'region)) (unwind-protect (progn (move-overlay caml-error-overlay beg end (current-buffer)) (sit-for 60)) (delete-overlay caml-error-overlay)))))))))) after nil ad-activate] 5) (defalias 'caml-next-error-skip-warnings #[(&rest args) "\303\216\304\305\306\n\"*\207" [caml-next-error-skip-warnings-flag old-flag args #[nil "\211\207" [old-flag caml-next-error-skip-warnings-flag] 2] t apply next-error] 3]) #@282 Return string of text matched by last search, without properties. NUM specifies which parenthesized expression in the last regexp. Value is nil if NUMth pair didn't match, or there were less than NUM pairs. Zero means the entire text matched by the whole regexp or whole string. (defalias 'caml-match-string #[(num &optional string) "\305 \306 _8\306 _T8\f\203\f\n O\202\307\n \"+\207" [data num begin end string match-data 2 buffer-substring-no-properties] 3 (#$ . 24123)]) #@50 Find the error location in current OCaml phrase. (defalias 'caml-goto-phrase-error #[nil "\301\302!\210\212\303 )\304@A\")\207" [bounds require inf-caml caml-mark-phrase inferior-caml-goto-error] 3 (#$ . 24615) nil]) #@36 Keywords starting phrases in files (defconst caml-phrase-start-keywords "\\<\\(class\\|ex\\(ternal\\|ception\\)\\|functor\\|let\\|module\\|open\\|type\\|val\\)\\>" (#$ . 24841)) (defalias 'caml-at-phrase-start-p #[nil "n\205 \301\302!\206 \301!\207" [caml-phrase-start-keywords looking-at "#"] 2]) (defalias 'caml-skip-comments-forward #[nil "\302\303w\210\304!\204\305 \205&g\306U\203\303u\210\202\307 !\210\302\303w\210\202\207" [comment-start-skip comment-end " \n " nil looking-at caml-in-comment-p 41 search-forward] 2]) (defalias 'caml-skip-comments-backward #[nil "\301\302x\210h\303=\205)`\304Zf\305=\205)\306u\210\307 \203\"\310!\210\202\301\302x\210\202\207" [comment-start " \n " nil 41 2 42 -1 caml-in-comment-p search-backward] 2]) (defconst caml-phrase-sep-keywords (concat ";;\\|" caml-phrase-start-keywords)) #@124 Find the CAML phrase containing the point. Return the position of the beginning of the phrase, and move point to the end.  (defalias 'caml-find-phrase #[(&optional min-pos max-pos) "\204e \204\fd\306\211\211\211\307 \210\310 \203\306u\210\311 \312#\203F\313\224b\210n\2046\314\315!\203@\316 \204@\317 \203F\306u\210\202`\314\315!\203Q\320\202R\313\\\321\"\211\203h\n\315\230\204hn\203T\n\315\230\203q\320u\210\n\204xb\210\307 \210`\211\fY\203\207\322\323!\210\fb\210\307 \210 ,\207" [min-pos max-pos kwop use-semi end beg nil caml-skip-comments-forward caml-at-phrase-start-p re-search-forward move 0 looking-at ";;" caml-in-comment-p caml-in-literal-p 2 caml-find-kwop error "no phrase before point" caml-phrase-sep-keywords] 5 (#$ . 25694) nil]) #@60 Put mark at end of this OCaml phrase, point at beginning.  (defalias 'caml-mark-phrase #[(&optional min-pos max-pos) "\304 \"`\305 \210\nb\210\n *B\207" [min-pos max-pos beg end caml-find-phrase push-mark] 3 (#$ . 26484) nil]) (defalias 'caml-current-defun #[nil "\212\302 \210\303!\205K\304!\210\305 \204C\303\306!\203!\307\310!\210\202\311g\312\"\203/\313\314!\210\202\311g\315\"\203=\307\316!\210\202\317\211\203)\304\320!\210\321\322!)\207" [caml-phrase-start-keywords done caml-mark-phrase looking-at re-search-forward nil "\\s " skip-syntax-forward " " char-equal 40 forward-sexp 1 39 "w_" t "\\(\\sw\\|\\s_\\)+" match-string 0] 4]) (defalias 'caml-overlap #[(b1 e1 b2 e2) " ]\n ^X\207" [b1 b2 e1 e2] 3]) (defalias 'caml-before-change-function #[(begin end) "\203\f V\203\f\306\307\n!\203+\307 !\203+\310 \f\n $\203+\n\306\211\223\210 \306\211\223\210\311\312!\211\2057 \f\")\207" [caml-last-noncomment-pos begin caml-last-comment-start caml-last-comment-end end orig-function nil marker-position caml-overlap default-value before-change-function] 6]) #@52 Returns non-nil if point is inside a caml literal. (defalias 'caml-in-literal-p #[nil "\306\307Q\310P`\311\210`\312\211\313\311!\210 \204\212\314 \f\315#\203\212` X\203\212\316\317!\320\230\203i\315\203^ \204^\314\321\f\315#\203^` V\203O\315\316\317!\320\230\2036\312\211\204;\203\315\211\202\322\n!\203 \317\224Y\203\203 \317\225W\203\203\315\211\202\317\225b\210\202 b\210 .\207" [caml-quote-char start-literal char-literal pos eol state "[\"" "]" "\\([^\\]\\|\\\\\\.\\|\\\\[0-9][0-9][0-9]\\)" 1 nil beginning-of-line re-search-forward t caml-match-string 0 "\"" "\"\\|\\\\\"" looking-at in-str] 5 (#$ . 27580)]) #@39 Skip one (eventually nested) comment. (defalias 'caml-forward-comment #[nil "\303\304 \305V\2035\306\307\304\310#\204\311\211\202\312\305!\313 \204\n\230\203. T\211\202 S\211\202 \305U*\207" [match count comment-start 1 nil 0 re-search-forward "(\\*\\|\\*)" move -1 caml-match-string caml-in-literal-p] 5 (#$ . 28245)]) #@39 Skip one (eventually nested) comment. (defalias 'caml-backward-comment #[nil "\303\304 \305V\2035\306\307\304\310#\204\311\211\202\312\305!\313 \204\n\230\203. S\211\202 T\211\202 \305U*\207" [match count comment-start 1 nil 0 re-search-backward "(\\*\\|\\*)" move -1 caml-match-string caml-in-literal-p] 5 (#$ . 28590)]) #@103 Returns non-nil if point is inside a caml comment. Returns nil for the parenthesis opening a comment. (defalias 'caml-in-comment-p #[nil "\205%\212 \306!\306\f! \203' \203' `W\203'` W\203'\307\202$\n\2035\n`U\2035\310\202$\n\203\263\n`V\203\263\311\n`Z!W\203\263\310\211`\nb\210`V\203\210\312S\313#\203p\314\225\211\202t\310\211\203|\315 \204]\203V\316 \202V\203\227`U\203\227\310\204\242\202\255`\310\223\210\f\310\223\210+\202$\310\211`\n\203\304\n\202\310`Zb\210`W\203\374\317T\313#\203\344\314\224\211\202\350\310\211\203\360\315 \204\321\203\312\320 \202\312\203 `U\203 \310\204\202!\310\223\210\f`\310\223\210+,\207" [caml-last-comment-start caml-last-noncomment-pos cached-pos cached-begin caml-last-comment-end cached-end marker-position t nil abs search-backward move 0 caml-in-literal-p caml-backward-comment search-forward caml-forward-comment caml-lookback-limit here found end comment-end begin comment-start] 4 (#$ . 28938)]) #@112 Keywords that may appear immediately before an expression. Used to distinguish it from toplevel let construct. (defconst caml-before-expr-prefix "\\<\\(asr\\|begin\\|class\\|do\\(wnto\\)?\\|else\\|i\\(f\\|n\\(herit\\|itializer\\)?\\)\\|f\\(or\\|un\\(ct\\(ion\\|or\\)\\)?\\)\\|l\\(and\\|or\\|s[lr]\\|xor\\)\\|m\\(atch\\|od\\)\\|o[fr]\\|parser\\|s\\(ig\\|truct\\)\\|t\\(hen\\|o\\|ry\\)\\|w\\(h\\(en\\|ile\\)\\|ith\\)\\)\\>\\|:begin\\>\\|[=<>@^|&+-*/$%][!$%*+-./:<=>?@^|~]*\\|:[:=]\\|[[({,;]" (#$ . 30004)) #@64 Regexp used in caml mode for skipping back over nested blocks. (defconst caml-matching-kw-regexp "\\<\\(and\\|do\\(ne\\|wnto\\)?\\|e\\(lse\\|nd\\)\\|in\\|t\\(hen\\|o\\)\\|with\\)\\>\\|[^[|]|" (#$ . 30514)) #@74 Association list used in caml mode for skipping back over nested blocks. (defconst caml-matching-kw-alist '(("|" . caml-find-pipe-match) (";" . caml-find-semi-match) ("," . caml-find-comma-match) ("end" . caml-find-end-match) ("done" . caml-find-done-match) ("in" . caml-find-in-match) ("with" . caml-find-with-match) ("else" . caml-find-else-match) ("then" . caml-find-then-match) ("to" . caml-find-done-match) ("downto" . caml-find-done-match) ("do" . caml-find-done-match) ("and" . caml-find-and-match)) (#$ . 30726)) #@70 Array of regexps representing caml keywords of different priorities. (defconst caml-kwop-regexps (make-vector 9 nil) (#$ . 31253)) (defalias 'caml-in-shebang-line #[nil "\212\300 \210`\301U\205 \302\303!)\207" [beginning-of-line 1 looking-at "#!"] 2]) (defalias 'caml-in-expr-p #[nil "`\306\307\n\310 \310\f H\260!\210\311 \203\312\202``\313V\2031h\314U\2031g\314U\2031\312\202`\315\n!\203`\315\316!\204A\317\225b\210\320\312w\210\315\316!\203X\312u\210\321 \210\320\312w\210\202E `X\203`\312 b\210*\207" [in-expr pos caml-before-expr-prefix caml-matching-kw-regexp caml-kwop-regexps caml-max-indent-priority t caml-find-kwop "\\|" caml-in-shebang-line nil 1 59 looking-at "(\\*" 0 " \n" caml-forward-comment] 7]) (defalias 'caml-at-sexp-close-p #[nil "\300\301g\"\206\300\302g\"\206\300\303g\"\207" [char-equal 41 93 125] 3]) #@385 Look back for a caml keyword or operator matching KWOP-REGEXP. Second optional argument MIN-POS bounds the search. Ignore occurrences inside literals. If found, return a list of two values: the actual text of the keyword or operator, and a boolean indicating whether the keyword was one we looked for explicitly {non-nil}, or on the other hand one of the block-terminating keywords. (defalias 'caml-find-kwop #[(kwop-regexp &optional min-pos) "\306\307Q\310\211`\311V\203X\n\204X\312\f \313#\203X\314\315!\316\317!\2031`\311V\203 \320u\210\202 \321 \203?\322\323 \313#\210\202 \316 !\204 \324 \203S\312 \313#\210\202 \325\202 \n\205k\326\327 \"\204g \202k\311u\210\330+\207" [caml-quote-char kwop found start-literal kwop-regexp min-pos "[\"" "]" nil 1 re-search-backward move caml-match-string 0 looking-at "(\\*" -1 caml-in-comment-p search-backward "(" caml-in-literal-p t string-match "\\`[^|[]|[^]|]?\\'" "|"] 4 (#$ . 32112)]) (defconst caml-no-indent 0) #@383 Association list of indentation values based on governing keywords. Each element is of the form (KEYWORD OP-TYPE PRIO INDENT). OP-TYPE is non-nil for operator-type nodes, which affect indentation in a different way from keywords: subsequent lines are indented to the actual occurrence of an operator, but relative to the indentation of the line where the governing keyword occurs. (defconst caml-kwop-alist '(("begin" nil 6 caml-begin-indent) (":begin" nil 6 caml-begin-indent) ("class" nil 0 caml-class-indent) ("constraint" nil 0 caml-val-indent) ("sig" nil 1 caml-sig-indent) ("struct" nil 1 caml-struct-indent) ("exception" nil 0 caml-exception-indent) ("for" nil 6 caml-for-indent) ("fun" nil 3 caml-fun-indent) ("function" nil 3 caml-function-indent) ("if" nil 6 caml-if-indent) ("if-else" nil 6 caml-if-else-indent) ("include" nil 0 caml-include-indent) ("inherit" nil 0 caml-inherit-indent) ("initializer" nil 0 caml-initializer-indent) ("let" nil 6 caml-let-indent) ("let-in" nil 6 caml-let-in-indent) ("match" nil 6 caml-match-indent) ("method" nil 0 caml-method-indent) ("module" nil 0 caml-module-indent) ("object" nil 6 caml-object-indent) ("of" nil 7 caml-of-indent) ("open" nil 0 caml-no-indent) ("parser" nil 3 caml-parser-indent) ("try" nil 6 caml-try-indent) ("type" nil 0 caml-type-indent) ("val" nil 0 caml-val-indent) ("when" nil 2 caml-if-indent) ("while" nil 6 caml-while-indent) ("::" t 5 caml-::-indent) ("@" t 4 caml-@-indent) ("^" t 4 caml-@-indent) (":=" nil 3 caml-:=-indent) ("<-" nil 3 caml-<--indent) ("->" nil 2 caml-->-indent) ("[" t 8 caml-lb-indent) ("{" t 8 caml-lc-indent) ("(" t 8 caml-lp-indent) ("|" nil 2 caml-no-indent) (";;" nil 0 caml-no-indent)) (#$ . 33102)) (byte-code "\301\302I\210\303\301H\304PI\210\305\303H\306PI\210\307\305H\310PI\210\311\307H\312PI\210\313\311H\314PI\210\315\313H\316PI\210\317\301H\320PI\210\321\315H\322PI\207" [caml-kwop-regexps 0 "\\<\\(begin\\|object\\|for\\|s\\(ig\\|truct\\)\\|while\\)\\>\\|:begin\\>\\|[[({]\\|;;" 1 "\\|\\<\\(class\\|module\\)\\>" 2 "\\|\\<\\(fun\\(ction\\)?\\|initializer\\|let\\|m\\(atch\\|ethod\\)\\|parser\\|try\\|val\\)\\>\\|->" 3 "\\|\\" 4 "\\|:=\\|<-" 5 "\\|@" 6 "\\|::\\|\\^" 7 "\\|\\<\\(constraint\\|exception\\|in\\(herit\\|clude\\)\\|o\\(f\\|pen\\)\\|type\\|val\\)\\>" 8 "\\|\\<\\(constraint\\|exception\\|in\\(herit\\|clude\\)\\|o\\(f\\|pen\\)\\|type\\)\\>"] 4) (defalias 'caml-find-done-match #[nil "\302\303 \304U\204*\203*\305\306!\211\203\307\230\203# T\211\202 S\211\202*\207" [kwop unbalanced 1 t 0 caml-find-kwop "\\<\\(done\\|for\\|while\\)\\>" "done"] 3]) (defalias 'caml-find-end-match #[nil "\302\303 \304U\2048\2038\305\306!\211\203\307\230\203$\310\302y\210\202\311\230\2031 T\211\202 S\211\202\312\230\203B\313\202C*\207" [kwop unbalanced 1 t 0 caml-find-kwop "\\<\\(end\\|begin\\|object\\|s\\(ig\\|truct\\)\\)\\>\\|:begin\\>\\|;;" ";;" nil "end" ":begin" "begin"] 3]) (defalias 'caml-find-in-match #[nil "\302\303 \304U\2046\2036\305\306!\211\203\307\230\203\"\310 \210\202\311\230\203/ T\211\202 S\211\202*\207" [kwop unbalanced 1 t 0 caml-find-kwop "\\<\\(in\\|let\\|end\\)\\>" "end" caml-find-end-match "in"] 3]) (defalias 'caml-find-with-match #[nil "\302\303 \304U\204T\203T\305\306!\211\203\307 \203\"\310g!\210\202\311\230\203/ T\211\202\312\230\204G\313\230\204G\314\230\204G\315\230\203M\304\211\202 S\211\202*\207" [kwop unbalanced 1 t 0 caml-find-kwop "\\<\\(with\\|try\\|m\\(atch\\|odule\\)\\|functor\\)\\>\\|[{}()]" caml-at-sexp-close-p caml-find-paren-match "with" "module" "functor" "{" "("] 3]) (defalias 'caml-find-paren-match #[(close) "\303\304U\203 \305\202\306U\203\307\202\310U\205\311\211\312V\205>\313 !\205>gU\2037\nT\211\202\nS\211\202*\207" [close regexp unbalanced 1 41 "[()]" 93 "[][]" 125 "[{}]" 0 caml-find-kwop] 4]) (defalias 'caml-find-then-match #[(&optional from-else) "\205\n\212\306 \210`)\307\211\211\n\204[\310\311!\211\204#\312\211\202\313 \203/\314g!\210\202 \315\230\203;\312\211\202 \316\230\203K\204\317 \202\320 \"\243\211\203 \202\f\203i`\fY\203i\321\202j ,\207" [from-else matching-fun done kwop bol caml-matching-kw-alist beginning-of-line nil caml-find-kwop "\\<\\(e\\(nd\\|lse\\)\\|done\\|then\\|if\\|with\\)\\>\\|[])};]" t caml-at-sexp-close-p caml-find-paren-match "if" "then" caml-find-then-match assoc "if-else"] 5]) (defalias 'caml-find-pipe-match #[nil "\303\211\304\n\204\240\305!\211\204\306\211\202\307\310!\203*\311\224b\210\312\306\211\202\313 \2036\314g!\210\202 \315\230\203E\316 \306\211\202 \317\230\203^\320\321`\322Z\306#\203X\316 \306\211\202 \323\230\203j\324 \210\202 \325\230\203v\326 \210\202 \327\230\203\202\330 \210\202 \331\230\203\216\332 \210\202 \333\230\203\232\334 \210\202\306\211\203\n +\207" [re kwop done nil "\\<\\(try\\|match\\|with\\|function\\|parser\\|type\\|e\\(nd\\|lse\\)\\|done\\|then\\|in\\)\\>\\|[^[|]|\\|[])}]" caml-find-kwop t looking-at "[^[|]\\(|\\)" 1 "|" caml-at-sexp-close-p caml-find-paren-match "with" caml-find-with-match "parser" re-search-backward "\\" 5 "done" caml-find-done-match "end" caml-find-end-match "then" caml-find-then-match "else" caml-find-else-match "in" caml-find-in-match] 5]) (defalias 'caml-find-and-match #[nil "\302\211 \2044\303\304!\211\204\305\211\202\306\230\203\"\307 \210\202\310\230\203.\311 \210\202\305\211\203*\207" [kwop done nil caml-find-kwop "\\<\\(object\\|exception\\|let\\|type\\|end\\|in\\)\\>" t "end" caml-find-end-match "in" caml-find-in-match] 3]) (defalias 'caml-find-else-match #[nil "\300\301!\207" [caml-find-then-match t] 2]) (defalias 'caml-find-semi-match #[nil "\300\301!\207" [caml-find-kwop-skipping-blocks 2] 2]) (defalias 'caml-find-comma-match #[nil "\300\301!\207" [caml-find-kwop-skipping-blocks 3] 2]) #@87 Look back for a caml keyword matching caml-kwop-regexps [PRIO]. Skip nested blocks. (defalias 'caml-find-kwop-skipping-blocks #[(prio) "\306\211\211 H \204\307& \310V\203\311\202& \312V\203%\313\202&\314\nQ!\211\2044\315\211\202 \316 \203@\317g!\210\202\n\f\320\230\204R\f\321\230\203]h\322U\203]\323y\210\320\315\211\202 \312Y\203o\f\324\230\203o\315\211\202 \f\325\230\203{\326 \210\202\n\f\327\230\203\207\330 \210\202\n\f\331\230\203\240\332 \203\n \312Y\203\n\333\315\211\202 \f\334\230\203\277 \312Y\203\277\335\336`\337Z\315#\203\277\340 \315\211\202 \341\f'\"\243\211\203\331 \342\n!\203\n\315\211\202 \341\f(\"\211)A@\205\374`\306*+\343 \210`*+b\210*+W*\211,\203\342\344\f!\345P!\203\312)8H\202\315*\202\n\f,\207" [caml-kwop-regexps prio kwop-list matching-fun kwop done nil caml-find-kwop 3 "\\|[])},;]\\|" 2 "\\|[])};]\\|" "\\|[])}]\\|" t caml-at-sexp-close-p caml-find-paren-match ";;" ";" 59 1 "|" "end" caml-find-end-match "done" caml-find-done-match "in" caml-find-in-match "let-in" "parser" re-search-backward "\\" 5 caml-find-with-match assoc looking-at back-to-indentation regexp-quote "|?[ ]*\\(\n\\|(\\*\\)" caml-matching-kw-regexp caml-matching-kw-alist caml-kwop-alist kwop-info bti pos is-op] 6 (#$ . 39063)]) #@255 Compute indent of current caml line, ignoring leading keywords. Find the `governing node' for current line. Compute desired indentation based on the node and the indentation alists. Assumes point is exactly at line indentation. Does not preserve point. (defalias 'caml-compute-basic-indent #[(prio) "\306\307\310!\203\311\312!\202\225\307\313!\203\314 \202\225\307 !\203)\315 \203)\316 \202\225\307\n!\203C\317\320\321! \"\203C\317\320\321! \"\243 \202\225\307\f H!\203\203\320\321!\317\"\211\203c\3228\202d \307\f\321H!\203{\307\323!\204{\315 \203{\324\325!+\202\225 U\203\221\315 \203\221\324\325!\317\"\211\204\253\311\312!\210\321\202\340\307\326!\203\270\320\321!G\202\340A@\203\307\3278J\202\340`\330 \210\3278J\307\331!\203\335\202\336\321Z) \203\353!\202\354\321\" \"\\i\\-\207" [in-expr caml-phrase-start-keywords caml-matching-kw-regexp caml-matching-kw-alist caml-kwop-regexps caml-max-indent-priority nil looking-at ";;" beginning-of-line 1 "|\\([^]|]\\|\\'\\)" caml-find-pipe-match caml-in-expr-p caml-find-end-match assoc caml-match-string 0 2 "object" t caml-find-kwop-skipping-blocks "[[({][|<]?[ ]*" 3 back-to-indentation "|" kwop caml-kwop-alist kwop-info prio pos caml-|-extra-indent indent-diff caml-apply-extra-indent extra] 4 (#$ . 40389)]) #@63 Regexp matching caml keywords which need special indentation. (defconst caml-leading-kwops-regexp "\\<\\(and\\|do\\(ne\\|wnto\\)?\\|e\\(lse\\|nd\\)\\|in\\|t\\(hen\\|o\\)\\|with\\)\\>\\|[]|})]" (#$ . 41736)) #@308 Association list of special caml keyword indent values. Each member is of the form (KEYWORD EXTRA-INDENT PRIO) where EXTRA-INDENT is the variable holding extra indentation amount for KEYWORD (usually negative) and PRIO is upper bound on priority of matching nodes to determine KEYWORD's final indentation. (defconst caml-leading-kwops-alist '(("and" caml-and-extra-indent 2) ("do" caml-do-extra-indent 0) ("done" caml-done-extra-indent 0) ("else" caml-else-extra-indent 3) ("end" caml-end-extra-indent 0) ("in" caml-in-extra-indent 2) ("then" caml-then-extra-indent 3) ("to" caml-to-extra-indent 0) ("downto" caml-to-extra-indent 0) ("with" caml-with-extra-indent 2) ("|" caml-|-extra-indent 2) ("]" caml-rb-extra-indent 0) ("}" caml-rc-extra-indent 0) (")" caml-rp-extra-indent 0)) (#$ . 41950)) (defalias 'caml-compute-final-indent #[nil "\212\306 \210n\203\307!\203i\202\206\310 \203A\307\311!\307\312!\313 \210\307!\210i\n\203/\314\202< \2037\314\202<\315\225\315\224Z\\*\202\206\307 !\211\205O\316\317\315! \"\f\203]A@J\202^\315\f\203k\3208\202m\321!\315\203\203\\\202\204i]-)\207" [comment-start-skip comment-mark closing caml-leading-kwops-regexp leading caml-leading-kwops-alist back-to-indentation looking-at caml-in-comment-p "\\*)" "\\*" caml-backward-comment 1 0 assoc caml-match-string 2 caml-compute-basic-indent assoc-val extra caml-max-indent-priority prio basic] 4]) #@64 Called whenever a line is broken inside a caml string literal. (defalias 'caml-split-string #[nil "\300\301!\210\302u\207" [insert-before-markers "\"^\"" -1] 2 (#$ . 43386)]) (byte-code "\300\301\302\303\304$\210\305\301\304\"\210\300\306\307\303\304$\210\305\306\304\"\207" [ad-add-advice indent-new-comment-line (caml-indent-new-comment-line nil t (advice lambda nil "Handle multi-line strings in caml mode." (let ((hooked (and (eq major-mode 'caml-mode) (caml-in-literal-p))) (split-mark)) (if (not hooked) nil (setq split-mark (set-marker (make-marker) (point))) (caml-split-string)) ad-do-it (if (not hooked) nil (goto-char split-mark) (set-marker split-mark nil))))) around nil ad-activate newline-and-indent (caml-newline-and-indent nil t (advice lambda nil "Handle multi-line strings in caml mode." (let ((hooked (and (eq major-mode 'caml-mode) (caml-in-literal-p))) (split-mark)) (if (not hooked) nil (setq split-mark (set-marker (make-marker) (point))) (caml-split-string)) ad-do-it (if (not hooked) nil (goto-char split-mark) (set-marker split-mark nil)))))] 5) #@349 If inserting a | or } operator at beginning of line, reindent the line. Unfortunately there is a situation where this mechanism gets confused. It's when | is the first character of a |] sequence. This is a misfeature of caml syntax and cannot be fixed, however, as a workaround, the electric ] inserts | itself if the matching [ is followed by |. (defalias 'caml-electric-pipe #[nil "\205\f\302 \205\f\303 ?\304\305!\210 \205\212\306 ))\207" [caml-electric-indent electric caml-in-indentation caml-in-comment-p self-insert-command 1 caml-indent-command] 2 (#$ . 44466) "*"]) #@157 If inserting a ] operator at beginning of line, reindent the line. Also, if the matching [ is followed by a | and this ] is not preceded by |, insert one. (defalias 'caml-electric-rb #[nil "h \205\305 ?\205\306 ?\205\247?\206\307\310\"? \205*\311 \205*\305 ?\312\313!\210\f\2038\212\314 \210)\n\205Y\212\3151L\316\313!\210\317\320!0\202N\210\321)\205Y\212\322u\210\323c)+\207" [prec caml-electric-close-vector use-pipe caml-electric-indent electric caml-in-comment-p caml-in-literal-p char-equal 124 caml-in-indentation self-insert-command 1 caml-indent-command (error) backward-list looking-at "\\[|" "" -1 "|"] 3 (#$ . 45055) "*"]) #@73 If inserting a leading keyword at beginning of line, reindent the line. (defalias 'caml-abbrev-hook #[nil "\306 ?\205O\307U?\205O\212\310 \210`)\212\311\312 \313#\205 \314\315!)\211\205N\212\315\224b\210\316 \210i)\317U\203:\315\202;\320\211\321\n \"A@J\206I\320Z Zj**\207" [last-command-event bol kw abbrev-correct indent caml-leading-kwops-alist caml-in-comment-p 95 beginning-of-line re-search-backward "^[ ]*\\(\\sw+\\)\\=" t caml-match-string 1 caml-indent-command 32 0 assoc] 5 (#$ . 45716)]) (defalias 'caml-skip-blank-forward #[nil "\300\301!\205 \302\225b\207" [looking-at "[ \n]*\\((\\*\\([^*]\\|[^(]\\*[^)]\\)*\\*)[ \n]*\\)*" 0] 2]) #@99 Indent current phrase with prefix arg, indent that many phrases starting with the current phrase. (defalias 'caml-indent-phrase #[(arg) "\212\302  S\211\303V\203\302 \210\202\304`\305#*\207" [beg arg caml-find-phrase 0 indent-region nil] 5 (#$ . 46383) "p"]) (defalias 'caml-indent-buffer #[nil "\300ed\301#\207" [indent-region nil] 4 nil nil]) #@58 Move cursor back N lines with less or same indentation. (defalias 'caml-backward-to-less-indent #[(&optional n) "\303\304!\210\305W\203\306[!\210\202A\305V\203A\307 \310y\210\307 V\2043\311 \2043\312\313\n\314Q!\2039\310y\210\202)S\211\202\315 \207" [n i comment-start-skip beginning-of-line 1 0 caml-forward-to-less-indent current-indentation -1 caml-in-comment-p looking-at "[ ]*\\(\n\\|" "\\)" back-to-indentation] 5 (#$ . 46741) "p"]) #@57 Move cursor back N lines with less or same indentation. (defalias 'caml-forward-to-less-indent #[(&optional n) "\303\304!\210\305W\203\306[!\210\202A\305V\203A\307 \304y\210\307 V\2043\310 \2043\311\312\n\313Q!\2039\304y\210\202)S\211\202\314 \207" [n i comment-start-skip beginning-of-line 1 0 caml-backward-to-less-indent current-indentation caml-in-comment-p looking-at "[ ]*\\(\n\\|" "\\)" back-to-indentation] 5 (#$ . 47206) "p"]) #@70 Inserts a nicely formatted begin-end form, leaving a mark after end. (defalias 'caml-insert-begin-form #[nil "h\211\247\203\304\305z\"\204\306c\210)\307 \n \\\310c\210\311 \210\312 !\210\313y\210\312 !*\207" [prec c caml-begin-indent i char-equal 32 " " current-indentation "begin\n\nend" push-mark indent-line-to -1] 4 (#$ . 47667) "*"]) #@75 Inserts a nicely formatted for-do-done form, leaving a mark after do(ne). (defalias 'caml-insert-for-form #[nil "h\211\247\203\304\305z\"\204\306c\210)\307 \n \\\310c\210\311 \210\312 !\210\313y\210\312 !\210\311 \210\314\315!\210\316u*\207" [prec c caml-for-indent i char-equal 32 " " current-indentation "for do\n\ndone" push-mark indent-line-to -1 beginning-of-line 1 -4] 4 (#$ . 48020) "*"]) #@74 Insert nicely formatted if-then-else form leaving mark after then, else. (defalias 'caml-insert-if-form #[nil "h\211\247\203\304\305z\"\204\306c\210)\307 \n \\\310c\210\311 !\210\312 \210\313y\210\311 !\210\313y\210\311 !\210\312 \210\313y\210\311 !\210\313y\210\311 !*\207" [prec c caml-if-indent i char-equal 32 " " current-indentation "if\n\nthen\n\nelse\n" indent-line-to push-mark -1] 4 (#$ . 48431) "*"]) #@66 Insert nicely formatted match-with form leaving mark after with. (defalias 'caml-insert-match-form #[nil "h\211\247\203\304\305z\"\204\306c\210)\307 \n \\\310c\210\311 !\210\312 \210\313y\210\311 !\210\313y\210\311 !*\207" [prec c caml-match-indent i char-equal 32 " " current-indentation "match\n\nwith\n" indent-line-to push-mark -1] 4 (#$ . 48856) "*"]) #@60 Insert nicely formatted let-in form leaving mark after in. (defalias 'caml-insert-let-form #[nil "h\211\247\203\302\303z\"\204\304c\210)\305 \306c\210\307 !\210\310 \210\311y\210 \312\\u)\207" [prec c char-equal 32 " " current-indentation "let in\n" indent-line-to push-mark -1 4] 4 (#$ . 49227) "*"]) #@64 Insert nicely formatted try-with form leaving mark after with. (defalias 'caml-insert-try-form #[nil "h\211\247\203\304\305z\"\204\306c\210)\307 \n \\\310c\210\311 !\210\312 \210\313y\210\311 !\210\313y\210\311 !*\207" [prec c caml-try-indent i char-equal 32 " " current-indentation "try\n\nwith\n" indent-line-to push-mark -1] 4 (#$ . 49543) "*"]) #@73 Insert nicely formatted while-do-done form leaving mark after do, done. (defalias 'caml-insert-while-form #[nil "h\211\247\203\304\305z\"\204\306c\210)\307 \n \\\310c\210\311 \210\312 !\210\313y\210\312 !\210\311 \210\314\315!\210\316u*\207" [prec c caml-if-indent i char-equal 32 " " current-indentation "while do\n\ndone" push-mark indent-line-to -1 beginning-of-line 1 -4] 4 (#$ . 49906) "*"]) #@32 Run an inferior OCaml process. (autoload 'run-caml "inf-caml" '(#$ . 50318) t) #@50 Show the type of expression or pattern at point. (autoload 'caml-types-show-type "caml-types" '(#$ . 50403) t) #@45 Explore type annotations by mouse dragging. (autoload 'caml-types-explore "caml-types" '(#$ . 50520) t) #@52 Show documentation for qualified OCaml identifier. (autoload 'caml-help "caml-help" '(#$ . 50630) t) #@60 Does completion for documented qualified OCaml identifier. (autoload 'caml-complete "caml-help" '(#$ . 50737) t) #@42 Add module in documentation search path. (autoload 'ocaml-open-module "caml-help" '(#$ . 50856) t) #@47 Remove module from documentation search path. (autoload 'ocaml-close-module "caml-help" '(#$ . 50961) t) #@36 Add search path for documentation. (autoload 'ocaml-add-path "caml-help" '(#$ . 51072) t) (provide 'caml)