;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\207" [require cl-lib mmm-region mmm-vars mmm-mode] 2) #@246 *Major mode for editing code chunks. This is set to FUNDAMENTAL-MODE by default, but you might want to change this in the Local Variables section of your file to something more appropriate, like C-MODE, FORTRAN-MODE, or even INDENTED-TEXT-MODE. (defvar mmm-noweb-code-mode 'fundamental-mode (#$ . -203)) #@119 *Major mode for quoted code chunks within documentation chunks. If nil, defaults to `mmm-noweb-code-mode', which see. (defvar mmm-noweb-quote-mode nil (#$ . -514)) #@79 *String used to form quoted code submode region names. See `mmm-noweb-quote'. (defvar mmm-noweb-quote-string "quote" (#$ . -684)) #@78 *Starting value appended to `mmm-noweb-quote-string'. See `mmm-noweb-quote'. (defvar mmm-noweb-quote-number 0 (#$ . -820)) #@51 *Narrow the region to the current pair of chunks. (defvar mmm-noweb-narrowing nil (#$ . -949)) #@224 Return the noweb code mode chosen by the user. If the next 100 characters of the buffer contain a string of the form "-*- MODE -*-", then return MODE as the chosen mode, otherwise return the value of `mmm-noweb-code-mode'. (defalias 'mmm-noweb-chunk #[(_form) "\303\304`\305\\\306#\203D\307\310\224\205'\211\203!\311\224\225#\266\202\202)\312\224\225\"\266\202\313\314\315\"\2036\2029\316P!\317 !\206B\n*\207\n\207" [string modestr mmm-noweb-code-mode re-search-forward "-\\*-\\s +\\(\\S-+\\)\\s +-\\*-" 120 t 1 nil substring-no-properties buffer-substring-no-properties intern string-match "mode\\'" "-mode" mmm-ensure-modename] 6 (#$ . 1051)]) #@77 Create a unique name for a quoted code region within a documentation chunk. (defalias 'mmm-noweb-quote #[(_form) "\206 \207" [mmm-noweb-quote-mode mmm-noweb-code-mode] 1 (#$ . 1721)]) #@77 Create a unique name for a quoted code region within a documentation chunk. (defalias 'mmm-noweb-quote-name #[(_form) "T \302\303!Q\207" [mmm-noweb-quote-number mmm-noweb-quote-string "-" number-to-string] 4 (#$ . 1914)]) #@37 Get the chunk name from FRONT-FORM. (defalias 'mmm-noweb-chunk-name #[(form) "\301\302\"\210\303\224\205\211\203\304\224\225#\207\305\224\225\"\207" [form string-match "<<\\(.*\\)>>=" 1 substring-no-properties buffer-substring-no-properties] 6 (#$ . 2145)]) (mmm-add-group 'noweb '((noweb-chunk :match-submode mmm-noweb-chunk :case-fold-search nil :front "^<<\\(.*\\)>>=" :match-name "~1" :save-name 1 :front-offset (end-of-line 1) :back "^@\\( \\|$\\|\\( %def .*$\\)\\)" :insert ((99 noweb-code "Code Chunk Name: " "\n" @ "<<" str ">>=" @ "\n" _ "\n" @ "@ " @ "\n")) :skel-name t) (noweb-quote :match-submode mmm-noweb-quote :face mmm-special-submode-face :front "\\[\\[" :back "\\]\\]" :insert ((113 noweb-quote nil @ "[[" @ _ @ "]]" @))))) #@92 Return a liat of regions of the form (NAME BEG END) that exclude names which match REGEXP. (defalias 'mmm-noweb-regions #[(start stop regexp) "\304\305\306\307 \n\"\"\310\304 \"\211*\207" [remove-next start stop regions nil cl-maplist #[(pos-list) "A\2052 \203 \305\211\207\306@\307\"\206\310\n!\f\203*\311\f \"\203*\312\305\2021 @A@E)\207" [pos-list remove-next mmm-primary-mode name regexp nil mmm-name-at beg symbol-name string-match t] 3] mmm-submode-changes-in delq] 5 (#$ . 2906)]) #@189 Narrow to the current doc chunk. The current chunk includes all quoted code chunks (i.e., [[...]]). This function is only valid when called with point in a doc chunk or quoted code chunk. (defalias 'mmm-noweb-narrow-to-doc-chunk #[nil "\303`!\211\203\304\305\"\205D`eU\203`\202#\306\307e`\305#!@A@`dU\203-`\202>\212\307`d\305#A@A@b\210\310y\210`)\211 }*)\207" [name next prev mmm-name-at string-match "^quote" last mmm-noweb-regions -1] 6 (#$ . 3418) nil]) #@121 Fill the current chunk according to mode. Run `fill-region' on documentation chunks and `indent-region' on code chunks. (defalias 'mmm-noweb-fill-chunk #[(&optional justify) "\214\306`!\211\2030\307\310\"\2040 \204\n\203(\311 \210\312\313 !\314 !\315#\210\2027\316\317\f\"\210\2027\320 \210\321 !\210\322 *\207" [name indent-region-function indent-line-function mmm-current-overlay major-mode justify mmm-name-at string-match "^quote" mmm-space-other-regions indent-region overlay-start overlay-end nil error "No indentation functions defined in %s!" mmm-word-other-regions fill-paragraph mmm-undo-syntax-other-regions] 5 (#$ . 3894) "P"]) #@40 Fill a paragraph in the current chunk. (defalias 'mmm-noweb-fill-paragraph-chunk #[(&optional justify) "\214\302`!\211\203\303\304\"\204\305 \210\306 !\210\202!\307 \210\306 !\210\310 *\207" [name justify mmm-name-at string-match "^quote" mmm-space-other-regions fill-paragraph mmm-word-other-regions mmm-undo-syntax-other-regions] 4 (#$ . 4549) "P"]) #@45 Fill the region containing the named chunk. (defalias 'mmm-noweb-fill-named-chunk #[(&optional _justify) "\214\303 \206 \304!\305 \306ed\"\"A \304!\230\204\"\307\310 \"\203+\311 \210\312 \210\202;\313 \210\314\n@@\315\n!@A@\316#\210\317 +\207" [mmm-primary-mode name list mmm-name-at symbol-name assoc mmm-names-alist string-match "^quote" mmm-word-other-regions do-auto-fill mmm-space-other-regions indent-region last nil mmm-undo-syntax-other-regions] 5 (#$ . 4914) "P"]) #@33 Replacement for `do-auto-fill'. (defalias 'mmm-noweb-auto-fill-doc-chunk #[nil "\214\300 \210\301 \210\302 \210\303 )\207" [mmm-noweb-narrow-to-doc-chunk mmm-word-other-regions do-auto-fill mmm-undo-syntax-other-regions] 1 (#$ . 5402)]) #@57 Install the improved auto fill function, iff necessary. (defalias 'mmm-noweb-auto-fill-doc-mode #[nil "\205\301\211\207" [auto-fill-function mmm-noweb-auto-fill-doc-chunk] 2 (#$ . 5645)]) #@56 Install the default auto fill function, iff necessary. (defalias 'mmm-noweb-auto-fill-code-mode #[nil "\205\301\211\207" [auto-fill-function do-auto-fill] 2 (#$ . 5843)]) #@33 Try to complete the chunk name. (defalias 'mmm-noweb-complete-chunk #[nil "`\212\306\307\212\310 \210`)\311#\205\312\225)\203\230 {\313ed\"\314\n \"\211\311=\206\224\f\204:\315\316\n\"\210\317 \202\224\n\f\230\204S |\210\fc\210\320\321!?\205\224\321c\202\224\315\322!\210  r\323\324!q\210p\325 \210 \326\211!\"\311\211#\311$%\327 \210\330\331!\210+\211&'\332\333\n \"!\210\334&!\210+\315\335\336\"+\202\233\315\337!*\207" [beg end pattern alist completion default-directory re-search-backward "<<" beginning-of-line t 0 mmm-names-alist try-completion message "Can't find completion for \"%s\"" ding looking-at ">>" "Making completion list..." get-buffer-create "*Completions*" kill-all-local-variables nil erase-buffer run-hooks temp-buffer-setup-hook display-completion-list all-completions internal-temp-output-buffer-show "Making completion list...%s" "done" "Not at chunk name..." #1=#:old-dir buffer-read-only buffer-file-name buffer-undo-list inhibit-modification-hooks inhibit-read-only #2=#:buf standard-output] 6 (#$ . 6024) nil]) #@37 History for `mmm-noweb-goto-chunk'. (defvar mmm-noweb-chunk-history nil (#$ . 7099)) #@23 Goto the named chunk. (defalias 'mmm-noweb-goto-chunk #[nil "~\210\304\305ed\"\306\307 \310\304\311`!\n&\312 \"A@@b+\207" [completion-ignore-case alist mmm-noweb-chunk-history chunk t mmm-names-alist completing-read "Chunk: " nil mmm-name-at assoc] 7 (#$ . 7190) nil]) #@45 Goto the continuation of the current chunk. (defalias 'mmm-noweb-goto-next #[(&optional cnt) "~\210\304`!\211\205!\305\306\307 !d\"\"A\211\205 S\n\233@@b))\207" [name mmm-current-overlay list cnt mmm-name-at assoc mmm-names-alist overlay-end] 6 (#$ . 7470) "p"]) #@45 Goto the continuation of the current chunk. (defalias 'mmm-noweb-goto-previous #[(&optional cnt) "~\210\304`!\211\205#\305\306\307e\310 !\"\"A!\211\205\" \n\233@A@b))\207" [name mmm-current-overlay list cnt mmm-name-at reverse assoc mmm-names-alist overlay-start] 8 (#$ . 7745) "p"]) (defvar mmm-noweb-map (make-sparse-keymap)) (defvar mmm-noweb-prefix-map (make-sparse-keymap)) (byte-code "\303 \n#\210\304\305\306\n#\210\304\307\310\n#\210\304\311\312\n#\210\304\313\314\n#\210\304\315\316\n#\210\303\n\317\320#\207" [mmm-noweb-map mmm-mode-prefix-key mmm-noweb-prefix-map define-key mmm-define-key 100 mmm-noweb-narrow-to-doc-chunk 110 mmm-noweb-goto-next 112 mmm-noweb-goto-previous 113 mmm-noweb-fill-chunk 115 mmm-noweb-goto-chunk " " mmm-noweb-complete-chunk] 4) (defalias 'mmm-noweb-bind-keys #[nil "\214~\210\302ed\303\211\304%\305\306 #*\207" [ovl mmm-noweb-map make-overlay nil t overlay-put keymap] 6]) (add-hook 'mmm-noweb-class-hook 'mmm-noweb-bind-keys) #@210 Apply SYNTAX to a list of REGIONS of the form (BEG END). If SYNTAX is not nil, set the syntax-table property of each region. If SYNTAX is nil, remove the region syntax-table property. See `mmm-syntax-region'. (defalias 'mmm-syntax-region-list #[(syntax regions) "\301\302\"\207" [regions mapcar #[(reg) "\302@A@ #\207" [reg syntax mmm-syntax-region] 4]] 3 (#$ . 8729)]) #@154 Apply SYNTAX cell to other regions. Regions are separated by name, using either `mmm-name-at' or the optional NAME to determine the current region name. (defalias 'mmm-syntax-other-regions #[(syntax &optional name) "\204 \302 \206\f\303 !\304\305\306ed\"\"\207" [name mmm-primary-mode mmm-name-at symbol-name mapcar #[(reg) "@ \230?\205 \303\nA\"\207" [reg name syntax mmm-syntax-region-list] 3] mmm-names-alist] 5 (#$ . 9109)]) #@37 Give all other regions word syntax. (defalias 'mmm-word-other-regions #[nil "\301\302!\210\303\211\207" [parse-sexp-lookup-properties mmm-syntax-other-regions (2 . 0) t] 2 (#$ . 9551) nil]) #@38 Give all other regions space syntax. (defalias 'mmm-space-other-regions #[nil "\301\302!\210\303\211\207" [parse-sexp-lookup-properties mmm-syntax-other-regions (0 . 0) t] 2 (#$ . 9748) nil]) #@50 Remove syntax-table property from other regions. (defalias 'mmm-undo-syntax-other-regions #[nil "\301\302!\210\302\211\207" [parse-sexp-lookup-properties mmm-syntax-other-regions nil] 2 (#$ . 9947) nil]) (provide 'mmm-noweb)