?
Current Path : /usr/share/emacs/24.3/lisp/progmodes/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : //usr/share/emacs/24.3/lisp/progmodes/dcl-mode.elc |
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:09:22 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/progmodes/dcl-mode.el ;;; in Emacs version 24.3.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'tempo) #@116 Font lock keyword specification for DCL mode. Presently this includes some syntax, .OP.erators, and "f$" lexicals. (defvar dcl-font-lock-keywords '(("\\<\\(if\\|then\\|else\\|endif\\)\\>" 1 font-lock-keyword-face) ("\\<f[$][a-z_]+\\>" 0 font-lock-builtin-face) ("[.]\\(eq\\|not\\|or\\|and\\|lt\\|gt\\|le\\|ge\\|eqs\\|nes\\)[.]" 0 font-lock-builtin-face)) (#$ . 579)) #@39 Font lock specification for DCL mode. (defvar dcl-font-lock-defaults '(dcl-font-lock-keywords nil) (#$ . 952)) (byte-code "\300\301\302\303\304\305\306\307&\210\310\311\312\313\314\315\306\301&\210\310\316\317\320\314\315\306\301&\210\310\321\322\323\314\315\306\301&\210\310\324\325\326\314\315\306\301&\210\310\327\330\331\314\332\306\301&\210\310\333\334\335\314\332\306\301&\210\310\336\337\340\314\332\306\301&\210\310\341\302\342\314\343\306\301&\210\310\344\345\346\314\347\306\301&\210\310\350\351\352\314\353\306\301&\210\310\354\351\355\314\353\306\301&\210\310\356\357\360\314\361\306\301&\210\310\362\363\364\314\361\306\301&\210\310\365\366\367\314\361\306\301&\210\310\370\371\372\314\361\306\301&\210\310\373\374\375\314\361\306\301&\210\310\376\377\201@ \314\361\306\301&\210\310\201A \201B \201C \314\361\306\301&\210\310\201D \201E \201F \314\201G \306\301&\210\310\201H \302\201I \314\201J \306\301&\207" [custom-declare-group dcl nil "Major mode for editing DCL command files." :link (custom-group-link :tag "Font Lock Faces group" font-lock-faces) :group languages custom-declare-variable dcl-basic-offset 4 "Number of columns to indent a block in DCL.\nA block is the commands between THEN-ELSE-ENDIF and between the commands\ndcl-block-begin-regexp and dcl-block-end-regexp.\n\nThe meaning of this variable may be changed if\ndcl-calc-command-indent-function is set to a function." :type integer dcl-continuation-offset 6 "Number of columns to indent a continuation line in DCL.\nA continuation line is a line that follows a line ending with `-'.\n\nThe meaning of this variable may be changed if\ndcl-calc-cont-indent-function is set to a function." dcl-margin-offset 8 "Indentation for the first command line in DCL.\nThe first command line in a file or after a SUBROUTINE statement is indented\nthis much. Other command lines are indented the same number of columns as\nthe preceding command line.\nA command line is a line that starts with `$'." dcl-margin-label-offset 2 "Number of columns to indent a margin label in DCL.\nA margin label is a label that doesn't begin or end a block, i.e. it\ndoesn't match dcl-block-begin-regexp or dcl-block-end-regexp." dcl-comment-line-regexp "^\\$!" "Regexp describing the start of a comment line in DCL.\nComment lines are not indented." regexp dcl-block-begin-regexp "loop[0-9]*:" "Regexp describing a command that begins an indented block in DCL.\nSet to nil to only indent at THEN-ELSE-ENDIF." dcl-block-end-regexp "endloop[0-9]*:" "Regexp describing a command that ends an indented block in DCL.\nSet to nil to only indent at THEN-ELSE-ENDIF." dcl-calc-command-indent-function "Function to calculate indentation for a command line in DCL.\nIf this variable is non-nil it is called as a function:\n\n(func INDENT-TYPE CUR-INDENT EXTRA-INDENT LAST-POINT THIS-POINT)\n\nThe function must return the number of columns to indent the current line or\nnil to get the default indentation.\n\nINDENT-TYPE is a symbol indicating what kind of indentation should be done.\nIt can have the following values:\n indent the indentation should be increased, e.g., after THEN.\n outdent the indentation should be decreased, e.g., a line with ENDIF.\n first-line indentation for the first line in a buffer or SUBROUTINE.\nCUR-INDENT is the indentation of the preceding command line.\nEXTRA-INDENT is the default change in indentation for this line\n(a negative number for 'outdent).\nLAST-POINT is the buffer position of the first significant word on the\nprevious line or nil if the current line is the first line.\nTHIS-POINT is the buffer position of the first significant word on the\ncurrent line.\n\nIf this variable is nil, the indentation is calculated as\nCUR-INDENT + EXTRA-INDENT.\n\nThis package includes two functions suitable for this:\n dcl-calc-command-indent-multiple\n dcl-calc-command-indent-hang" (choice (const nil) function) dcl-calc-cont-indent-function 'dcl-calc-cont-indent-relative "Function to calculate indentation for a continuation line.\nIf this variable is non-nil it is called as a function:\n\n(func CUR-INDENT EXTRA-INDENT)\n\nThe function must return the number of columns to indent the current line or\nnil to get the default indentation.\n\nIf this variable is nil, the indentation is calculated as\nCUR-INDENT + EXTRA-INDENT.\n\nThis package includes one function suitable for this:\n dcl-calc-cont-indent-relative" function dcl-tab-always-indent t "Controls the operation of the TAB key in DCL mode.\nIf t, pressing TAB always indents the current line.\nIf nil, pressing TAB indents the current line if point is at the left margin.\nData lines (i.e. lines not part of a command line or continuation line) are\nnever indented." boolean dcl-electric-characters "Non-nil means reindent immediately when a label, ELSE or ENDIF is inserted." dcl-tempo-comma ", " "Text to insert when a comma is needed in a template, in DCL mode." string dcl-tempo-left-paren "(" "Text to insert when a left parenthesis is needed in a template in DCL." dcl-tempo-right-paren ")" "Text to insert when a right parenthesis is needed in a template in DCL." dcl-imenu-label-labels "Labels" "Imenu menu title for sub-listing with label names." dcl-imenu-label-goto "GOTO" "Imenu menu title for sub-listing with GOTO statements." dcl-imenu-label-gosub "GOSUB" "Imenu menu title for sub-listing with GOSUB statements." dcl-imenu-label-call "CALL" "Imenu menu title for sub-listing with CALL statements." dcl-imenu-generic-expression `((nil "^\\$[ ]*\\([A-Za-z0-9_$]+\\):[ ]+SUBROUTINE\\b" 1) (,dcl-imenu-label-labels "^\\$[ ]*\\([A-Za-z0-9_$]+\\):\\([ ]\\|$\\)" 1) (,dcl-imenu-label-goto "\\s-GOTO[ ]+\\([A-Za-z0-9_$]+\\)" 1) (,dcl-imenu-label-gosub "\\s-GOSUB[ ]+\\([A-Za-z0-9_$]+\\)" 1) (,dcl-imenu-label-call "\\s-CALL[ ]+\\([A-Za-z0-9_$]+\\)" 1)) "Default imenu generic expression for DCL.\n\nThe default includes SUBROUTINE labels in the main listing and\nsub-listings for other labels, CALL, GOTO and GOSUB statements.\nSee `imenu-generic-expression' for details." (repeat (sexp :tag "Imenu Expression")) dcl-mode-hook "Hook called by `dcl-mode'." hook] 8) #@35 Syntax table used in DCL-buffers. (defvar dcl-mode-syntax-table nil (#$ . 7129)) (byte-code "\204% \301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\312#\210\302\313\314#\210\301\207" [dcl-mode-syntax-table make-syntax-table modify-syntax-entry 33 "<" 10 ">" 60 "(>" 62 ")<" 92 "_"] 4) #@34 Keymap used in DCL-mode buffers. (defvar dcl-mode-map (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\312#\210\302\313\314#\210\302\315\316#\210\302\317\320#\210\302\321\322#\210\302\323\324#\210\302\325\324#\210\302\326\324#\210\302\327\324#\210\302\330\324#\210\302\331\332#\210\302\333\334#\210\302\335\336#\210\302\337\301 #\210\302\340\341\301\341!B#\210\302\342\343#\210\302\344\345#\210\302\346\347#\210\302\350\351#\210\302\352\353#\210\302\354\355#\210\302\356\357#\210\302\360\361#\210\302\362\363#\210\302\364\365#\210\302\366\367#\210\302\370\371#\210\302\372\373#\210\302\374\375#\210\302\376\377#\210\201@ \201A !\203\354 \302\201B \201C #\210\302\201D \201E #\210)\207" [map make-sparse-keymap define-key "\n" dcl-split-line " " tempo-complete-tag "^" dcl-delete-indentation "m" dcl-back-to-indentation "e" dcl-forward-command "a" dcl-backward-command "" dcl-indent-command " " dcl-tab ":" dcl-electric-character "F" "f" "E" "e" "" dcl-set-option "" tempo-forward-mark "" tempo-backward-mark [menu-bar] [menu-bar dcl] "DCL" [menu-bar dcl tempo-backward-mark] ("Previous template mark" . tempo-backward-mark) [menu-bar dcl tempo-forward-mark] ("Next template mark" . tempo-forward-mark) [menu-bar dcl tempo-complete-tag] ("Complete template tag" . tempo-complete-tag) [menu-bar dcl dcl-separator-tempo] ("--") [menu-bar dcl dcl-save-all-options] ("Save all options" . dcl-save-all-options) [menu-bar dcl dcl-save-nondefault-options] ("Save changed options" . dcl-save-nondefault-options) [menu-bar dcl dcl-set-option] ("Set option" . dcl-set-option) [menu-bar dcl dcl-separator-option] ("--") [menu-bar dcl dcl-delete-indentation] ("Delete indentation" . dcl-delete-indentation) [menu-bar dcl dcl-split-line] ("Split line" . dcl-split-line) [menu-bar dcl dcl-indent-command] ("Indent command" . dcl-indent-command) [menu-bar dcl dcl-tab] ("Indent line/insert tab" . dcl-tab) [menu-bar dcl dcl-back-to-indentation] ("Back to indentation" . dcl-back-to-indentation) [menu-bar dcl dcl-forward-command] ("End of statement" . dcl-forward-command) [menu-bar dcl dcl-backward-command] ("Beginning of statement" . dcl-backward-command) boundp imenu-generic-expression [menu-bar dcl dcl-separator-movement] ("--") [menu-bar dcl imenu] ("Buffer index menu" . imenu)] 6) (#$ . 7443)) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\305\306\307&\210\300\313\314\315\304\305\306\307&\210\300\316\317\320\304\305\306\307&\210\300\321\322\323\304\324\306\307&\207" [custom-declare-variable dcl-ws-r "\\([ ]*-[ ]*\\(!.*\\)*\n\\)*[ ]*" "Regular expression describing white space in a DCL command line.\nWhite space is any number of continued lines with only space,tab,endcomment\nfollowed by space or tab." :type regexp :group dcl dcl-label-r "[a-zA-Z0-9_$]*:\\([ !]\\|$\\)" "Regular expression describing a label.\nA label is a name followed by a colon followed by white-space or end-of-line." dcl-cmd-r "^\\$\\(.*-[ ]*\\(!.*\\)*\n\\)*[^!\"\n]*\\(\".*\\(\"\".*\\)*\"\\)*[^!\"\n]*" "Regular expression describing a DCL command line up to a trailing comment.\nA line starting with $, optionally followed by continuation lines,\nfollowed by the end of the command line.\nA continuation line is any characters followed by `-',\noptionally followed by a comment, followed by a newline." dcl-command-regexp "^\\$\\(.*-[ ]*\\(!.*\\)*\n\\)*.*\\(\".*\\(\"\".*\\)*\"\\)*" "Regular expression describing a DCL command line.\nA line starting with $, optionally followed by continuation lines,\nfollowed by the end of the command line.\nA continuation line is any characters followed by `-',\noptionally followed by a comment, followed by a newline." dcl-electric-reindent-regexps (list "endif" "else" dcl-label-r) "Regexps that can trigger an electric reindent.\nA list of regexps that will trigger a reindent if the last letter\nis defined as dcl-electric-character.\n\nE.g.: if this list contains `endif', the key `f' is defined as\ndcl-electric-character and you have just typed the `f' in\n`endif', the line will be reindented." (repeat regexp)] 8) #@254 Options and default values for dcl-set-option. An alist with option variables and functions or keywords to get a default value for the option. The keywords are: curval the current value toggle the opposite of the current value (for t/nil) (defvar dcl-option-alist '((dcl-basic-offset dcl-option-value-basic) (dcl-continuation-offset curval) (dcl-margin-offset dcl-option-value-margin-offset) (dcl-margin-label-offset dcl-option-value-offset) (dcl-comment-line-regexp dcl-option-value-comment-line) (dcl-block-begin-regexp curval) (dcl-block-end-regexp curval) (dcl-tab-always-indent toggle) (dcl-electric-characters toggle) (dcl-electric-reindent-regexps curval) (dcl-tempo-comma curval) (dcl-tempo-left-paren curval) (dcl-tempo-right-paren curval) (dcl-calc-command-indent-function curval) (dcl-calc-cont-indent-function curval) (comment-start curval) (comment-start-skip curval)) (#$ . 11602)) #@98 The history list for dcl-set-option. Preloaded with all known option names from dcl-option-alist (defvar dcl-option-history (mapcar #[(option-assoc) "\301\302@\"\207" [option-assoc format "%s"] 3] dcl-option-alist) (#$ . 12518)) (byte-code "\300\301N\204 \302\300\301\303\304!#\210\305\306!\204 \302\306\307\310#\210\300\207" [dcl-mode-hook variable-documentation put purecopy "Hook run when entering DCL mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp dcl-mode-map definition-name dcl-mode] 5) (defvar dcl-mode-map (make-sparse-keymap)) (byte-code "\300\301N\204 \302\300\301\303\304!#\210\305\306!\204 \302\306\307\310#\210\300\207" [dcl-mode-map variable-documentation put purecopy "Keymap for `dcl-mode'." boundp dcl-mode-syntax-table definition-name dcl-mode] 5) (defvar dcl-mode-syntax-table (make-syntax-table)) (byte-code "\300\301N\204 \302\300\301\303\304!#\210\302\305\306\307#\207" [dcl-mode-syntax-table variable-documentation put purecopy "Syntax table for `dcl-mode'." dcl-mode-abbrev-table definition-name dcl-mode] 5) (defvar dcl-mode-abbrev-table (progn (define-abbrev-table 'dcl-mode-abbrev-table nil) dcl-mode-abbrev-table)) (byte-code "\300\301N\204 \302\300\301\303\304!#\210\302\305\306\307#\207" [dcl-mode-abbrev-table variable-documentation put purecopy "Abbrev table for `dcl-mode'." dcl-mode derived-mode-parent prog-mode] 5) #@3953 Major mode for editing DCL-files. This mode indents command lines in blocks. (A block is commands between THEN-ELSE-ENDIF and between lines matching dcl-block-begin-regexp and dcl-block-end-regexp.) Labels are indented to a fixed position unless they begin or end a block. Whole-line comments (matching dcl-comment-line-regexp) are not indented. Data lines are not indented. Key bindings: \{dcl-mode-map} Commands not usually bound to keys: \[dcl-save-nondefault-options] Save changed options \[dcl-save-all-options] Save all options \[dcl-save-option] Save any option \[dcl-save-mode] Save buffer mode Variables controlling indentation style and extra features: dcl-basic-offset Extra indentation within blocks. dcl-continuation-offset Extra indentation for continued lines. dcl-margin-offset Indentation for the first command line in a file or SUBROUTINE. dcl-margin-label-offset Indentation for a label. dcl-comment-line-regexp Lines matching this regexp will not be indented. dcl-block-begin-regexp dcl-block-end-regexp Regexps that match command lines that begin and end, respectively, a block of command lines that will be given extra indentation. Command lines between THEN-ELSE-ENDIF are always indented; these variables make it possible to define other places to indent. Set to nil to disable this feature. dcl-calc-command-indent-function Can be set to a function that customizes indentation for command lines. Two such functions are included in the package: dcl-calc-command-indent-multiple dcl-calc-command-indent-hang dcl-calc-cont-indent-function Can be set to a function that customizes indentation for continued lines. One such function is included in the package: dcl-calc-cont-indent-relative (set by default) dcl-tab-always-indent If t, pressing TAB always indents the current line. If nil, pressing TAB indents the current line if point is at the left margin. dcl-electric-characters Non-nil causes lines to be indented at once when a label, ELSE or ENDIF is typed. dcl-electric-reindent-regexps Use this variable and function dcl-electric-character to customize which words trigger electric indentation. dcl-tempo-comma dcl-tempo-left-paren dcl-tempo-right-paren These variables control the look of expanded templates. dcl-imenu-generic-expression Default value for imenu-generic-expression. The default includes SUBROUTINE labels in the main listing and sub-listings for other labels, CALL, GOTO and GOSUB statements. dcl-imenu-label-labels dcl-imenu-label-goto dcl-imenu-label-gosub dcl-imenu-label-call Change the text that is used as sub-listing labels in imenu. Loading this package calls the value of the variable `dcl-mode-load-hook' with no args, if that value is non-nil. Turning on DCL mode calls the value of the variable `dcl-mode-hook' with no args, if that value is non-nil. The following example uses the default values for all variables: $! This is a comment line that is not indented (it matches $! dcl-comment-line-regexp) $! Next follows the first command line. It is indented dcl-margin-offset. $ i = 1 $ ! Other comments are indented like command lines. $ ! A margin label indented dcl-margin-label-offset: $ label: $ if i.eq.1 $ then $ ! Lines between THEN-ELSE and ELSE-ENDIF are $ ! indented dcl-basic-offset $ loop1: ! This matches dcl-block-begin-regexp... $ ! ...so this line is indented dcl-basic-offset $ text = "This " + - ! is a continued line "lined up with the command line" $ type sys$input Data lines are not indented at all. $ endloop1: ! This matches dcl-block-end-regexp $ endif $ There is some minimal font-lock support (see vars `dcl-font-lock-defaults' and `dcl-font-lock-keywords'). (defalias 'dcl-mode #[nil "\306\300!\210\307\310 \210\311\312\310\313N\203 \314\311\313\310\313N#\210\315!\204' \316\317 \"\210\320\f!\211\2036 \321 =\203<