?
Current Path : /usr/share/emacs/24.3/lisp/textmodes/ |
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/textmodes/conf-mode.elc |
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:11:47 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/textmodes/conf-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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\302\303\304\305\306\307\310\311&\210\312\313\314\315\316\317\306\303&\210\312\320\321\322\316\317\306\303&\210\312\323\324\322\316\317\306\303&\210\312\325\326\327\316\330\306\303&\210\312\331\304\332\316\330\306\303&\207" [require newcomment custom-declare-group conf nil "Configuration files." :group data :version "22.1" custom-declare-variable conf-assignment-column 24 "Align assignments to this column by default with \\[conf-align-assignments].\nIf this number is negative, the `=' comes before the whitespace. Use 0 to\nnot align (only setting space according to `conf-assignment-space')." :type integer conf-javaprop-assignment-column 32 "Value for `conf-assignment-column' in Java properties buffers." conf-colon-assignment-column (- (abs conf-assignment-column)) conf-assignment-space t "Put at least one space around assignments when aligning." boolean conf-colon-assignment-space "Value for `conf-assignment-space' in colon style Conf mode buffers."] 8) #@39 Local keymap for `conf-mode' buffers. (defvar conf-mode-map (byte-code "\302 \302 \303 \304\305#\210\303 \306\307#\210\303 \310\311#\210\303 \312\313#\210\303 \314\313#\210\303 \315\316#\210\303 \317\316#\210\303 \320\321#\210\303 \322\323#\210\303 \324\325#\210\303 \326\325#\210\303 \327\325#\210\303 \330\331#\210\303 \332\333B#\210\303\334\335#\210\303\336\337#\210\303\340\341#\210\303\342\343#\210\303\344\345#\210\303\346\347#\210\303\350\351#\210\303\352\353#\210\303\354\355#\210\303\356\357#\210 *\207" [menu-map map make-sparse-keymap define-key "" conf-unix-mode "" conf-windows-mode "\n" conf-javaprop-mode "" conf-space-keywords " " "" conf-colon-mode ":" "" conf-xdefaults-mode "" conf-ppd-mode "" conf-quote-normal "\"" "'" "" conf-align-assignments [menu-bar sh-script] "Conf" [conf-windows-mode] (menu-item "Windows mode" conf-windows-mode :help "Conf Mode starter for Windows style Conf files" :button (:radio eq major-mode 'conf-windows-mode)) [conf-javaprop-mode] (menu-item "Java properties mode" conf-javaprop-mode :help "Conf Mode starter for Java properties files" :button (:radio eq major-mode 'conf-javaprop-mode)) [conf-space-keywords] (menu-item "Space keywords mode..." conf-space-keywords :help "Enter Conf Space mode using regexp KEYWORDS to match the keywords" :button (:radio eq major-mode 'conf-space-keywords)) [conf-ppd-mode] (menu-item "PPD mode" conf-ppd-mode :help "Conf Mode starter for Adobe/CUPS PPD files" :button (:radio eq major-mode 'conf-ppd-mode)) [conf-colon-mode] (menu-item "Colon mode" conf-colon-mode :help "Conf Mode starter for Colon files" :button (:radio eq major-mode 'conf-colon-mode)) [conf-unix-mode] (menu-item "Unix mode" conf-unix-mode :help "Conf Mode starter for Unix style Conf files" :button (:radio eq major-mode 'conf-unix-mode)) [conf-xdefaults-mode] (menu-item "Xdefaults mode" conf-xdefaults-mode :help "Conf Mode starter for Xdefaults files" :button (:radio eq major-mode 'conf-xdefaults-mode)) [c-s0] ("--") [conf-quote-normal] (menu-item "Set quote syntax normal" conf-quote-normal :help "Set the syntax of ' and \" to punctuation") [conf-align-assignments] (menu-item "Align assignments" conf-align-assignments :help "Align assignments")] 5) (#$ . 1562)) #@59 Syntax table in use in Windows style `conf-mode' buffers. (defvar conf-mode-syntax-table (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\306#\210\302\310\306#\210\302\311\312#\210\302\313\314#\210\302\315\316#\210\302\317\316#\210)\207" [table make-syntax-table modify-syntax-entry 61 "." 95 "_" 45 46 39 "\"" 59 "<" 10 ">" 13] 4) (#$ . 3835)) #@56 Syntax table in use in Unix style `conf-mode' buffers. (defvar conf-unix-mode-syntax-table (byte-code "\302!\303\304\305 #\210\303\306\307 #\210 )\207" [conf-mode-syntax-table table make-syntax-table modify-syntax-entry 35 "<" 59 "."] 4) (#$ . 4207)) #@49 Syntax table in use in Java properties buffers. (defvar conf-javaprop-mode-syntax-table (byte-code "\302!\303\304\305 #\210\303\306\307 #\210 )\207" [conf-unix-mode-syntax-table table make-syntax-table modify-syntax-entry 47 ". 124" 42 ". 23b"] 4) (#$ . 4466)) #@49 Syntax table in use in PPD `conf-mode' buffers. (defvar conf-ppd-mode-syntax-table (byte-code "\302!\303\304\305 #\210\303\306\307 #\210\303\310\311 #\210\303\312\311 #\210 )\207" [conf-mode-syntax-table table make-syntax-table modify-syntax-entry 42 ". 1" 37 ". 2" 39 "." 59] 4) (#$ . 4735)) #@61 Syntax table in use in Xdefaults style `conf-mode' buffers. (defvar conf-xdefaults-mode-syntax-table (byte-code "\302!\303\304\305 #\210\303\306\307 #\210 )\207" [conf-mode-syntax-table table make-syntax-table modify-syntax-entry 33 "<" 59 "."] 4) (#$ . 5036)) #@37 Keywords to highlight in Conf mode. (defvar conf-font-lock-keywords '(("^[ ]*\\[\\(.+\\)\\]" 1 'font-lock-type-face) ("^[ ]*\\(.+?\\)\\(?:\\[\\(.*?\\)\\]\\)?[ ]*=" (1 'font-lock-variable-name-face) (2 'font-lock-constant-face nil t)) ("^[ ]*\\([^=:\n]+?\\)[ \n]*{[^{}]*?$" 1 'font-lock-type-face prepend)) (#$ . 5305)) #@53 Keywords to highlight in Conf Java Properties mode. (defvar conf-javaprop-font-lock-keywords '(("^[ ]*\\(.+?\\)\\(?:\\.\\([0-9]+\\)\\(?:\\.\\(.+?\\)\\(?:\\.\\([0-9]+\\)\\(?:\\.\\(.+?\\)\\(?:\\.\\([0-9]+\\)\\(\\..+?\\)?\\)?\\)?\\)?\\)?\\)?\\([:= ]\\|$\\)" (1 'font-lock-variable-name-face) (2 'font-lock-constant-face nil t) (3 'font-lock-variable-name-face nil t) (4 'font-lock-constant-face nil t) (5 'font-lock-variable-name-face nil t) (6 'font-lock-constant-face nil t) (7 'font-lock-variable-name-face nil t))) (#$ . 5635)) #@66 File-name-based settings for the variable `conf-space-keywords'. (defvar conf-space-keywords-alist '(("\\`/etc/gpm/" . "key\\|name\\|foreground\\|background\\|border\\|head") ("\\`/etc/magic\\'" . "[^ ]+[ ]+\\(?:[bl]?e?\\(?:short\\|long\\)\\|byte\\|string\\)[^ ]*") ("/mod\\(?:ules\\|probe\\)\\.conf" . "alias\\|in\\(?:clude\\|stall\\)\\|options\\|remove") ("/manpath\\.config" . "MAN\\(?:DATORY_MANPATH\\|PATH_MAP\\|DB_MAP\\)") ("/sensors\\.conf" . "chip\\|bus\\|label\\|compute\\|set\\|ignore") ("/sane\\(\\.d\\)?/" . "option\\|device\\|port\\|usb\\|sc\\(?:si\\|anner\\)") ("/resmgr\\.conf" . "class\\|add\\|allow\\|deny") ("/dictionary\\.lst\\'" . "DICT\\|HYPH\\|THES") ("/tuxracer/options" . "set")) (#$ . 6172)) #@208 Regexps for functions that may come before a space assignment. This allows constructs such as keyword var value This variable is best set in the file local variables, or through `conf-space-keywords-alist'. (defvar conf-space-keywords nil (#$ . 6899)) (put 'conf-space-keywords 'safe-local-variable 'stringp) #@43 Keywords to highlight in Conf Space mode. (defvar conf-space-font-lock-keywords '(("^[ ]*\\[\\(.+\\)\\]" 1 'font-lock-type-face) ("^[ ]*\\(.+?\\)[ \n]*{[^{}]*?$" 1 'font-lock-type-face) (eval if conf-space-keywords (list (concat "^[ ]*\\(" conf-space-keywords "\\)[ ]+\\([^ - ]+\\)") '(1 'font-lock-keyword-face) '(2 'font-lock-variable-name-face)) '("^[ ]*\\([^ - ]+\\)" 1 'font-lock-variable-name-face))) (#$ . 7214)) #@43 Keywords to highlight in Conf Colon mode. (defvar conf-colon-font-lock-keywords '(("^[ ]*\\[\\(.+\\)\\]" 1 'font-lock-type-face) ("^[ ]*\\(.+?\\)[ ]*:" (1 'font-lock-variable-name-face)) ("^[ ]*\\([^:\n]+\\)[ \n]*{[^{}]*?$" 1 'font-lock-type-face prepend)) (#$ . 7646)) #@45 Sign used for assignments (char or string). (defvar conf-assignment-sign 61 (#$ . 7927)) #@175 Regexp to recognize assignments. It is anchored after the first sexp on a line. There must be a grouping for the assignment sign, including leading and trailing whitespace. (defvar conf-assignment-regexp ".+?\\([ ]*=[ ]*\\)" (#$ . 8023)) (defalias 'conf-align-assignments #[(&optional arg) "\203\n \306!\202 \212\214\307 \203 \310 \311 }\210eb\210m?\205\271 \312 \211\203+ \nb\210)\313\314!\204, m\204\263 \315!\203\263 \316\224b\210`\316\225|\210\f\203\234 \317Y\203u j\210 \203a `Sf\320>\204a \321c\210\f \203n l\204n \321\202o \322\261\210\202\263 \203} \321\202~ \322\f\261\210l\204\263 [j\210 \203\263 `Sf\323>\204\263 \321c\210\202\263 l\204\263 i\324!Y\203\256 \321c\210\202\263 \324!j\210\325y\210\202 *\207" [arg conf-assignment-column cs conf-assignment-regexp conf-assignment-sign conf-assignment-space prefix-numeric-value use-region-p region-beginning region-end comment-beginning forward-comment 9 looking-at 1 0 (32 9) 32 "" (32 9) abs nil] 4 nil "P"]) #@441 Set the syntax of ' and " to punctuation. With prefix arg, only do it for ' if 1, or only for " if 2. This only affects the current buffer. Some conf files use quotes to delimit strings, while others allow quotes as simple parts of the assigned value. In those files font locking will be wrong, and you can correct it with this command. (Some files even do both, i.e. quotes delimit strings, except when they are unbalanced, but hey...) (defalias 'conf-quote-normal #[(arg) "\303\304 ! \203 \305 !\306U\203 \307\310\311#\210 \203# \305 !\312U\203) \307\313\311#\210\314!\210\n\2053 \315 )\207" [table arg font-lock-mode copy-syntax-table syntax-table prefix-numeric-value 1 modify-syntax-entry 39 "." 2 34 set-syntax-table font-lock-fontify-buffer] 4 (#$ . 9018) "P"]) (defalias 'conf-outline-level #[nil "\302\211\225\303\304\305\217*\207" [pt depth 0 nil (byte-code "\302\303\304# T\211\205 \202 \207" [pt depth scan-lists -1 1] 4) ((scan-error depth))] 3]) #@1377 Mode for Unix and Windows Conf files and Java properties. Most conf files know only three kinds of constructs: parameter assignments optionally grouped into sections and comments. Yet there is a great range of variation in the exact syntax of conf files. See below for various wrapper commands that set up the details for some of the most widespread variants. This mode sets up font locking, outline, imenu and it provides alignment support through `conf-align-assignments'. If strings come out wrong, try `conf-quote-normal'. Some files allow continuation lines, either with a backslash at the end of line, or by indenting the next line (further). These constructs cannot currently be recognized. Because of this great variety of nuances, which are often not even clearly specified, please don't expect it to get every file quite right. Patches that clearly identify some special case, without breaking the general ones, are welcome. If instead you start this mode with the generic `conf-mode' command, it will parse the buffer. It will generally well identify the first four cases listed below. If the buffer doesn't have enough contents to decide, this is identical to `conf-windows-mode' on Windows, elsewhere to `conf-unix-mode'. See also `conf-space-mode', `conf-colon-mode', `conf-javaprop-mode', `conf-ppd-mode' and `conf-xdefaults-mode'. \{conf-mode-map} (defalias 'conf-mode #[nil "\204\313 \306\211\211\211\211\211,\212eb\210m\204\201 \307\310w\210\310f\311=\203, ,T,\202{ \310f\312=\2039 T\202{ \310f\313=\204{ l\204{ \310f\314=\204{ \315\316!\203f \306\225Sf\317=\203` \fT\202{ T\202{ \315\320!\203r T\202{ \315\321!\204{ \nT\310y\210\202 ) , ]\322]V\203\222 \323 \202\310 \f\n]V\203\237 \324 \202\310 \n\f]V\203\254 \325 \202\310 ,V\204\301 ,U\203\306 -\326=\203\306 \327 \202\310 \330 .\207\331 \210\332.!\210\333/\3340\335\336!\210\337\335\340!\210\341 \335\342!\210\343\"\335\344!\210\345$\335\346!\210\347&\3501!\210\3512\352\353!\207" [delay-mode-hooks jp space colon equal win 0 " \f" nil 35 59 91 125 looking-at "[^ \n=:]+\\(?: ?[^ \n=:]+\\)*[ ]*[=:]" 61 "/[/*]" ".*{" 3 conf-javaprop-mode conf-colon-mode conf-space-mode windows-nt conf-windows-mode conf-unix-mode kill-all-local-variables use-local-map conf-mode "Conf[?]" make-local-variable font-lock-defaults (conf-font-lock-keywords nil t nil nil) parse-sexp-ignore-comments t outline-regexp "[ ]*\\(?:\\[\\|.+[ \n]*{\\)" outline-heading-end-regexp "[\n}]" outline-level conf-outline-level set-syntax-table (("Parameters" "^[ ]*\\(.+?\\)[ ]*=" 1) (nil "^[ ]*\\[[ ]*\\(.+\\)[ ]*\\]" 1) (nil "^[ ]*\\([^=:{} \n][^=:{}\n]+\\)[ \n]*{" 1)) run-mode-hooks conf-mode-hook unix system-type conf-mode-map major-mode mode-name conf-mode-syntax-table imenu-generic-expression] 6 (#$ . 10002) nil]) #@171 Initializations for sub-modes of conf-mode. COMMENT initializes `comment-start' and `comment-start-skip'. The optional arg FONT-LOCK is the value for FONT-LOCK-KEYWORDS. (defalias 'conf-mode-initialize #[(comment &optional font-lock) "\305\301!\210\305\302!\210\306 !\307P\205 \305\304!\210\310B\211\207" [comment comment-start comment-start-skip font-lock font-lock-defaults make-local-variable regexp-quote "+\\s *" (nil t nil nil)] 2 (#$ . 12838)]) (byte-code "\300\301N\204 \302\300\301\303\304!#\210\305\306!\204 \302\306\307\310#\210\300\207" [conf-unix-mode-hook variable-documentation put purecopy "Hook run when entering Conf[Unix] mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp conf-unix-mode-map definition-name conf-unix-mode] 5) (defvar conf-unix-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" [conf-unix-mode-map variable-documentation put purecopy "Keymap for `conf-unix-mode'." boundp conf-unix-mode-syntax-table definition-name conf-unix-mode] 5) (defvar conf-unix-mode-syntax-table (make-syntax-table)) (byte-code "\300\301N\204 \302\300\301\303\304!#\210\302\305\306\307#\207" [conf-unix-mode-syntax-table variable-documentation put purecopy "Syntax table for `conf-unix-mode'." conf-unix-mode-abbrev-table definition-name conf-unix-mode] 5) (defvar conf-unix-mode-abbrev-table (progn (define-abbrev-table 'conf-unix-mode-abbrev-table nil) conf-unix-mode-abbrev-table)) (byte-code "\300\301N\204 \302\300\301\303\304!#\210\302\305\306\307#\207" [conf-unix-mode-abbrev-table variable-documentation put purecopy "Abbrev table for `conf-unix-mode'." conf-unix-mode derived-mode-parent conf-mode] 5) #@411 Conf Mode starter for Unix style Conf files. Comments start with `#'. For details see `conf-mode'. Example: # Conf mode font-locks this right on Unix and with \[conf-unix-mode] [Desktop Entry] Encoding=UTF-8 Name=The GIMP Name[ca]=El GIMP Name[cs]=GIMP In addition to any hooks its parent mode might have run, this mode runs the hook `conf-unix-mode-hook', as the final step during initialization. (defalias 'conf-unix-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<