%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/textmodes/ |
Current File : //usr/local/share/emacs/27.2/lisp/textmodes/conf-mode.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; 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\316DD\317\320\321\306\303&\210\312\322\314\315\323DD\324\320\321\306\303&\210\312\325\314\315\326DD\324\320\321\306\303&\210\312\327\314\315\330DD\331\320\332\306\303&\210\312\333\314\315\334DD\335\320\332\306\303&\207" [require newcomment custom-declare-group conf nil "Configuration files." :group data :version "22.1" custom-declare-variable conf-assignment-column funcall function #[0 "\300\207" [24] 1] "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 #[0 "\300\207" [32] 1] "Value for `conf-assignment-column' in Java properties buffers." conf-colon-assignment-column #[0 "\301![\207" [conf-assignment-column abs] 2] conf-assignment-space #[0 "\300\207" [t] 1] "Put at least one space around assignments when aligning." boolean conf-colon-assignment-space #[0 "\300\207" [nil] 1] "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 "\300 \300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\311#\210\301\312\311#\210\301\313\314#\210\301\315\314#\210\301\316\317#\210\301\320\321#\210\301\322\323#\210\301\324\323#\210\301\325\323#\210\301\326\327#\210\301\330\331B#\210\301\332\333#\210\301\334\335#\210\301\336\337#\210\301\340\341#\210\301\342\343#\210\301\344\345#\210\301\346\347#\210\301\350\351#\210\301\352\353#\210\301\354\355#\210\207" [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")] 7) (#$ . 1576)) #@59 Syntax table in use in Windows style `conf-mode' buffers. (defvar conf-mode-syntax-table (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\305#\210\301\307\305#\210\301\310\311#\210\301\312\313#\210\301\314\315#\210\301\316\315#\210\211\207" [make-syntax-table modify-syntax-entry 61 "." 95 "_" 45 46 39 "\"" 59 "<" 10 ">" 13] 5) (#$ . 3836)) #@56 Syntax table in use in Unix style `conf-mode' buffers. (defvar conf-unix-mode-syntax-table (byte-code "\301!\302\303\304#\210\302\305\306#\210\211\207" [conf-mode-syntax-table make-syntax-table modify-syntax-entry 35 "<" 59 "."] 5) (#$ . 4203)) #@49 Syntax table in use in Java properties buffers. (defvar conf-javaprop-mode-syntax-table (byte-code "\301!\302\303\304#\210\302\305\306#\210\211\207" [conf-unix-mode-syntax-table make-syntax-table modify-syntax-entry 47 ". 124" 42 ". 23b"] 5) (#$ . 4457)) #@49 Syntax table in use in PPD `conf-mode' buffers. (defvar conf-ppd-mode-syntax-table (byte-code "\301!\302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\310#\210\211\207" [conf-mode-syntax-table make-syntax-table modify-syntax-entry 42 ". 1" 37 ". 2" 39 "." 59] 5) (#$ . 4721)) #@61 Syntax table in use in Xdefaults style `conf-mode' buffers. (defvar conf-xdefaults-mode-syntax-table (byte-code "\301!\302\303\304#\210\302\305\306#\210\211\207" [conf-mode-syntax-table make-syntax-table modify-syntax-entry 33 "<" 59 "."] 5) (#$ . 5017)) #@56 Syntax table in use in TOML style `conf-mode' buffers. (defvar conf-toml-mode-syntax-table (byte-code "\301!\302\303\304#\210\302\305\304#\210\302\306\307#\210\302\310\311#\210\302\312\313#\210\211\207" [conf-mode-syntax-table make-syntax-table modify-syntax-entry 34 "\"" 39 92 "\\" 35 "<" 59 "."] 5) (#$ . 5281)) #@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)) (#$ . 5608)) #@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))) (#$ . 5939)) #@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")) (#$ . 6476)) #@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 (#$ . 7203)) (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))) (#$ . 7518)) #@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)) (#$ . 7950)) #@42 Keywords to highlight in Conf TOML mode. (defvar conf-toml-font-lock-keywords '((conf-toml-recognize-section 0 'font-lock-type-face prepend) ("^\\s-*\\(.+?\\)\\(?:\\[\\(.*?\\)\\]\\)?\\s-*=" (1 'font-lock-variable-name-face) (2 'font-lock-constant-face nil t)) ("\\_<false\\|true\\_>" 0 'font-lock-keyword-face)) (#$ . 8231)) #@45 Keywords to highlight in Conf Desktop mode. (defvar conf-desktop-font-lock-keywords (append conf-font-lock-keywords '(("\\_<false\\|true\\_>" 0 'font-lock-constant-face) ("\\_<%[uUfFick%]\\_>" 0 'font-lock-constant-face))) (#$ . 8562)) #@45 Sign used for assignments (char or string). (defvar conf-assignment-sign 61 (#$ . 8804)) #@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 ".+?\\([ ]*=[ ]*\\)" (#$ . 8900)) #@202 Align the assignments in the buffer or active region. In Transient Mark mode, if the mark is active, operate on the contents of the region. Otherwise, operate on the whole buffer. (fn &optional ARG) (defalias 'conf-align-assignments #[256 "\211\203\n \304!\202 \262\212\214\305 \203 \306 \307 }\210eb\210m?\205\301 \310 \211\203+ \211b\210\210\311\312!\204, m\204\273 \313 !\203\273 \314\224b\210`\314\225|\210\n\203\244 \211\315Y\203y \211j\210\203e `\206[ `Sf\316>\204e \317c\210\n\203r l\204r \317\202s \320\261\210\202\273 \203\201 \317\202\202 \320\n\261\210l\204\273 \211[j\210\203\273 `\206\227 `Sf\321>\204\273 \317c\210\202\273 l\204\273 i\322!Y\203\266 \317c\210\202\273 \322!j\210\323y\210\202 *\207" [conf-assignment-column 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 (#$ . 9148) "P"]) #@455 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...) (fn ARG) (defalias 'conf-quote-normal #[257 "\300\301 !\203 \302!\303U\203 \304\305\306#\210\203\"