%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/net/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/net/snmp-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\316\317\306\303&\210\312\320\321\322\316\323\306\303&\210\312\324\304\325\316\317\306\303&\210\312\326\314\327\316\317\306\303&\210\312\330\304\331\316\332\306\303&\210\312\333\304\334\316\332\306\303&\210\312\335\304\336\316\332\306\303&\207" [require tempo custom-declare-group snmp nil "Mode for editing SNMP MIB files." :group data :version "20.4" custom-declare-variable snmp-special-indent t "If non-nil, use a simple heuristic to try to guess the right indentation.\nIf nil, then no special indentation is attempted." :type boolean snmp-indent-level 4 "Indentation level for SNMP MIBs." integer snmp-tab-always-indent "Non-nil means TAB should always reindent the current line.\nA value of nil means reindent if point is within the initial line indentation;\notherwise insert a TAB." snmp-completion-ignore-case "Non-nil means that case differences are ignored during completion.\nA value of nil means that case is significant.\nThis is used during Tempo template completion." snmp-common-mode-hook "Hook(s) evaluated when a buffer enters either SNMP or SNMPv2 mode." hook snmp-mode-hook "Hook(s) evaluated when a buffer enters SNMP mode." snmpv2-mode-hook "Hook(s) evaluated when a buffer enters SNMPv2 mode."] 8)
#@27 Tempo tags for SNMP mode.
(defvar snmp-tempo-tags nil (#$ . 1717))
#@29 Tempo tags for SNMPv2 mode.
(defvar snmpv2-tempo-tags nil (#$ . 1790))
#@46 Basic SNMP MIB mode expression highlighting.
(defvar snmp-font-lock-keywords-1 (list '("^[ 	]*\\([a-z][-a-zA-Z0-9]+\\)[ 	]+\\(\\(MODULE-\\(COMPLIANCE\\|IDENTITY\\)\\|OBJECT-\\(COMPLIANCE\\|GROUP\\|IDENTITY\\|TYPE\\)\\|TRAP-\\(GROUP\\|TYPE\\)\\)\\|\\(OBJECT\\)[ 	]+\\(IDENTIFIER\\)[ 	]*::=\\)" (1 font-lock-variable-name-face) (3 font-lock-keyword-face nil t) (7 font-lock-keyword-face nil t) (8 font-lock-keyword-face nil t)) '("^[ 	]*\\([A-Z][-a-zA-Z0-9]+\\)[ 	]+\\(DEFINITIONS\\)[ 	]*::=" (1 font-lock-function-name-face) (2 font-lock-keyword-face))) (#$ . 1867))
#@47 Medium SNMP MIB mode expression highlighting.
(defvar snmp-font-lock-keywords-2 (append '(("ACCESS\\|BEGIN\\|DE\\(FVAL\\|SCRIPTION\\)\\|END\\|FROM\\|I\\(MPORTS\\|NDEX\\)\\|S\\(TATUS\\|YNTAX\\)" (0 font-lock-keyword-face))) snmp-font-lock-keywords-1) (#$ . 2439))
#@46 Gaudy SNMP MIB mode expression highlighting.
(defvar snmp-font-lock-keywords-3 (append '(("\\([^\n]+\\)[ 	]+::=[ 	]+\\(SEQUENCE\\)[ 	]+{" (1 font-lock-constant-face) (2 font-lock-keyword-face)) ("::=[ 	]*{[ 	]*\\([a-z0-9].*[ 	]+\\)?\\([0-9]+\\)[ 	]*}" (1 font-lock-constant-face nil t) (2 font-lock-variable-name-face))) snmp-font-lock-keywords-2) (#$ . 2708))
#@48 Default SNMP MIB mode expression highlighting.
(defvar snmp-font-lock-keywords snmp-font-lock-keywords-1 (#$ . 3075))
#@38 Predefined types for SYNTAX clauses.
(defvar snmp-mode-syntax-list nil (#$ . 3199))
#@29 Types from RFC 1155 v1 SMI.
(defvar snmp-rfc1155-types '("INTEGER" "OCTET STRING" "OBJECT IDENTIFIER" "NULL" "IpAddress" "NetworkAddress" "Counter" "Gauge" "TimeTicks" "Opaque") (#$ . 3289))
#@29 Types from RFC 1213 MIB-II.
(defvar snmp-rfc1213-types '("DisplayString") (#$ . 3486))
#@29 Types from RFC 1902 v2 SMI.
(defvar snmp-rfc1902-types '("INTEGER" "OCTET STRING" "OBJECT IDENTIFIER" "Integer32" "IpAddress" "Counter32" "Gauge32" "Unsigned32" "TimeTicks" "Opaque" "Counter64") (#$ . 3579))
#@42 Types from RFC 1903 Textual Conventions.
(defvar snmp-rfc1903-types '("DisplayString" "PhysAddress" "MacAddress" "TruthValue" "TestAndIncr" "AutonomousType" "InstancePointer" "VariablePointer" "RowPointer" "RowStatus" "TimeStamp" "TimeInterval" "DateAndTime" "StorageType" "TDomain" "TAddress") (#$ . 3793))
#@39 Predefined values for ACCESS clauses.
(defvar snmp-mode-access-list nil (#$ . 4107))
#@37 ACCESS values from RFC 1155 v1 SMI.
(defvar snmp-rfc1155-access '("read-only" "read-write" "write-only" "not-accessible") (#$ . 4198))
#@37 ACCESS values from RFC 1155 v1 SMI.
(defvar snmp-rfc1902-access '("read-only" "read-write" "read-create" "not-accessible" "accessible-for-notify") (#$ . 4339))
#@39 Predefined values for STATUS clauses.
(defvar snmp-mode-status-list nil (#$ . 4505))
#@37 STATUS values from RFC 1212 v1 SMI.
(defvar snmp-rfc1212-status '("mandatory" "obsolete" "deprecated") (#$ . 4596))
#@37 STATUS values from RFC 1902 v2 SMI.
(defvar snmp-rfc1902-status '("current" "obsolete" "deprecated") (#$ . 4718))
#@35 Abbrev table in use in SNMP mode.
(defvar snmp-mode-abbrev-table nil (#$ . 4838))
(define-abbrev-table 'snmp-mode-abbrev-table nil)
#@37 Abbrev table in use in SNMPv2 mode.
(defvar snmpv2-mode-abbrev-table nil (#$ . 4976))
(define-abbrev-table 'snmpv2-mode-abbrev-table nil)
#@27 Keymap used in SNMP mode.
(defvar snmp-mode-map (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\312#\210)\207" [map make-sparse-keymap define-key "" backward-delete-char-untabify "	" tempo-complete-tag "" tempo-forward-mark "" tempo-backward-mark] 4) (#$ . 5120))
#@45 Syntax table used for buffers in SNMP mode.
(defvar snmp-mode-syntax-table (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\310#\210\302\312\313#\210\302\314\313#\210\302\315\313#\210)\207" [st make-syntax-table modify-syntax-entry 92 "\\" 45 "_ 1234" 10 ">" 13 95 "." 58 61] 4) (#$ . 5431))
(defalias 'snmp-common-mode #[(name mode abbrev font-keywords imenu-index tempo-tags) "\306 \210\n\307\f!\210\310
!\210!\"\311\312!\210\313#P\n\311\314!\210\n\f\311\315!\210\316
\311\317!\210\320\311\321!\210\322\311\323!\210\324\311\325!\210\316$\203T\311\326!\210\327\311\330!\210%\311\331!\210&\332B\311\333!\210'\334(!\210\311\335!\210\336\311\337!\210\316\311\340!\210)\211 \207" [name mode-name mode major-mode snmp-mode-map snmp-mode-syntax-table kill-all-local-variables use-local-map set-syntax-table make-local-variable paragraph-start "$\\|" paragraph-separate paragraph-ignore-fill-prefix t comment-start "-- " comment-start-skip "--+[ 	]*" comment-column 40 parse-sexp-ignore-comments indent-line-function snmp-indent-line tab-always-indent font-lock-defaults (nil nil ((45 . "w 1234"))) imenu-create-index-function tempo-use-tag-list tempo-match-finder "\\b\\(.+\\)\\=" tempo-interactive require-final-newline abbrev local-abbrev-table page-delimiter snmp-special-indent snmp-tab-always-indent font-keywords imenu-index tempo-tags mode-require-final-newline] 2])
#@327 Major mode for editing SNMP MIBs.
Expression and list commands understand all C brackets.
Tab indents for C code.
Comments start with -- and end with newline or another --.
Delete converts tabs to spaces as it moves back.
\{snmp-mode-map}
Turning on snmp-mode runs the hooks in `snmp-common-mode-hook', then
`snmp-mode-hook'.
(defalias 'snmp-mode #[nil "\306\307\310\311\312\313&\210\314\303!\210\315	\n#\314\305!\210\f\314\316!\210\317\320\321\"\207" [snmp-mode-abbrev-table snmp-rfc1155-types snmp-rfc1213-types snmp-mode-syntax-list snmp-rfc1155-access snmp-mode-access-list snmp-common-mode "SNMP" snmp-mode (snmp-font-lock-keywords snmp-font-lock-keywords-1 snmp-font-lock-keywords-2 snmp-font-lock-keywords-3) snmp-mode-imenu-create-index snmp-tempo-tags make-local-variable append snmp-mode-status-list run-mode-hooks snmp-common-mode-hook snmp-mode-hook snmp-rfc1212-status] 7 (#$ . 6882) nil])
#@331 Major mode for editing SNMPv2 MIBs.
Expression and list commands understand all C brackets.
Tab indents for C code.
Comments start with -- and end with newline or another --.
Delete converts tabs to spaces as it moves back.
\{snmp-mode-map}
Turning on snmp-mode runs the hooks in `snmp-common-mode-hook',
then `snmpv2-mode-hook'.
(defalias 'snmpv2-mode #[nil "\306\307\310\311\312\313&\210\314\303!\210\315	\n#\314\305!\210\f\314\316!\210\317\320\321\"\207" [snmpv2-mode-abbrev-table snmp-rfc1902-types snmp-rfc1903-types snmp-mode-syntax-list snmp-rfc1902-access snmp-mode-access-list snmp-common-mode "SNMPv2" snmpv2-mode (snmp-font-lock-keywords snmp-font-lock-keywords-1 snmp-font-lock-keywords-2 snmp-font-lock-keywords-3) snmp-mode-imenu-create-index snmpv2-tempo-tags make-local-variable append snmp-mode-status-list run-mode-hooks snmp-common-mode-hook snmpv2-mode-hook snmp-rfc1902-status] 7 (#$ . 7801) nil])
(defvar snmp-macro-open "[a-zA-Z][-a-zA-Z0-9]*[ 	]*\\(OBJECT\\|TRAP\\)-\\(TYPE\\|GROUP\\)\\|DESCRIPTION\\|IMPORTS\\|MODULE\\(-IDENTITY\\|-COMPLIANCE\\)\\|.*::=[ 	]*\\(BEGIN\\|TEXTUAL-CONVENTION\\)[ 	]*$")
(defvar snmp-macro-close "::=[ 	]*{\\|\\(END\\|.*[;\"]\\)[ 	]*$")
#@388 Calculate the current line indentation in SNMP MIB code.

We use a very simple scheme: if the previous non-empty line was a "macro
open" string, add `snmp-indent-level' to it.  If it was a "macro close"
string, subtract `snmp-indent-level'.  Otherwise, use the same indentation
as the previous non-empty line.  Note comments are considered empty
lines for the purposes of this function.
(defalias 'snmp-calculate-indent #[nil "\306\307Q\310\212\311y\312Y\203\313\n!\204\314\310w\210i\313!\203$\f\2020\313
!\203/\f[\2020\312\\+\207" [comment-start-skip case-fold-search empty snmp-macro-open snmp-indent-level snmp-macro-close "\\([ 	]*\\)\\(" "\\|$\\)" nil -1 0 looking-at " 	"] 3 (#$ . 9007)])
#@39 Indent current line as SNMP MIB code.
(defalias 'snmp-indent-line #[nil "\304 d`Z\305\211\306 \210`\307\305w\210iZ\211\310U\204%`|\210j\210d\nZ`V\2051d\nZb,\207" [beg shift-amt pos indent snmp-calculate-indent nil beginning-of-line " 	" 0] 5 (#$ . 9720)])
(defvar snmp-clause-regexp "^[ 	]*\\([a-zA-Z][-a-zA-Z0-9]*\\)[ 	\n]*\\(TRAP-TYPE\\|::=\\|OBJECT\\(-TYPE[ 	\n]+SYNTAX\\|[ 	\n]+IDENTIFIER[ 	\n]*::=\\)\\)")
(defalias 'snmp-mode-imenu-create-index #[nil "\306\211\211\211\211\211\211\211\211eb\210\307 \310\216\311\306\312#\203\203\313\225\314\315!\316 \315\224\306\223B\317\224b\210\320\321!\203H	B\202}\320\322!\203W	B\202}\320\323!\203d	
B\202}\320\324!\203q	\fB\202}\320\325!\203}	Bb\210\202*\237\203\230\326\237BB\f\203\245\327\f\237BB
\203\262\330
\237BB\203\301\331\237BB.	\207" [end token prev-pos case-fold-search index-trap-alist index-table-alist nil match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] re-search-forward t 0 match-string 1 make-marker 2 looking-at "OBJECT-TYPE[ 	\n]+SYNTAX" "OBJECT[ 	\n]+IDENTIFIER[ 	\n]*::=" "::=[ 	\n]*SEQUENCE[ 	\n]*{" "TRAP-TYPE" "::=" "Textual Conventions" "Traps" "Tables" "Object IDs" index-tc-alist index-oid-alist index-alist save-match-data-internal snmp-clause-regexp] 9])
#@153 Read from the minibuffer, with completion.
Like `completing-read', but the variable `snmp-completion-ignore-case'
controls whether case is significant.
(defalias 'snmp-completing-read #[(prompt table &optional pred require init hist) "\306\n\f
&)\207" [snmp-completion-ignore-case completion-ignore-case prompt table pred require completing-read init hist] 7 (#$ . 11088)])
(byte-code "\300\301\302\303\304\305%\210\300\306\307\310\311\305%\210\300\312\313\303\314\315%\210\300\316\317\310\320\315%\210\300\321\322\323\324\315%\210\325\326!\207" [tempo-define-template "snmp-object-type" (> (P "Object Label: ") " OBJECT-TYPE" n> "SYNTAX  " (if tempo-interactive (snmp-completing-read "Syntax: " snmp-mode-syntax-list nil nil) p) n> "ACCESS  " (if tempo-interactive (snmp-completing-read "Access: " snmp-mode-access-list nil t) p) n> "STATUS  " (if tempo-interactive (snmp-completing-read "Status: " snmp-mode-status-list nil t) p) n> "DESCRIPTION" n> "\"" p "\"" n> (P "Default Value: " defval t) (if (string= #1="" (tempo-lookup-named 'defval)) nil '(l "DEFVAL { " (s defval) " }" n>)) "::= { " (p "OID: ") " }" n) "objectType" "Insert an OBJECT-TYPE macro." snmp-tempo-tags "snmp-table-type" (> (P "Table Name: " table) (P "Entry Name: " entry t) (let* ((entry (tempo-lookup-named 'entry)) (seq (copy-sequence entry))) (aset entry 0 (downcase (aref entry 0))) (aset seq 0 (upcase (aref seq 0))) (tempo-save-named 'obj-entry entry) (tempo-save-named 'seq-entry seq) nil) " OBJECT-TYPE" n> "SYNTAX  SEQUENCE OF " (s seq-entry) n> "ACCESS  not-accessible" n> "STATUS  mandatory" n> "DESCRIPTION" n> "\"" p "\"" n> "::= { " (p "OID: ") " }" n n> (s obj-entry) " OBJECT-TYPE" n> "SYNTAX  " (s seq-entry) n> "ACCESS  not-accessible" n> "STATUS  mandatory" n> "DESCRIPTION" n> "\"" p "\"" n> "INDEX   { " (p "Index List: ") " }" n> "::= {" (s table) " 1 }" n n> (s seq-entry) " ::= SEQUENCE {" n> p n> "}" n) "tableType" "Insert an SNMP table." "snmpv2-object-type" (> (P "Object Label: ") " OBJECT-TYPE" n> "SYNTAX      " (if tempo-interactive (snmp-completing-read "Syntax: " snmp-mode-syntax-list nil nil) p) n> "MAX-ACCESS  " (if tempo-interactive (snmp-completing-read "Max Access: " snmp-mode-access-list nil t) p) n> "STATUS      " (if tempo-interactive (snmp-completing-read "Status: " snmp-mode-status-list nil t) p) n> "DESCRIPTION" n> "\"" p "\"" n> (P "Default Value: " defval t) (if (string= #1# (tempo-lookup-named 'defval)) nil '(l "DEFVAL { " (s defval) " }" n>)) "::= { " (p "OID: ") " }" n) "Insert an v2 SMI OBJECT-TYPE macro." snmpv2-tempo-tags "snmpv2-table-type" (> (P "Table Name: " table) (P "Entry Name: " entry t) (let* ((entry (tempo-lookup-named 'entry)) (seq (copy-sequence entry))) (aset entry 0 (downcase (aref entry 0))) (aset seq 0 (upcase (aref seq 0))) (tempo-save-named 'obj-entry entry) (tempo-save-named 'seq-entry seq) nil) " OBJECT-TYPE" n> "SYNTAX      SEQUENCE OF " (s seq-entry) n> "MAX-ACCESS  not-accessible" n> "STATUS      current" n> "DESCRIPTION" n> "\"" p "\"" n> "::= { " (p "OID: ") " }" n n> (s obj-entry) " OBJECT-TYPE" n> "SYNTAX      " (s seq-entry) n> "MAX-ACCESS  not-accessible" n> "STATUS      current" n> "DESCRIPTION" n> "\"" p "\"" n> "INDEX { " (p "Index List: ") " }" n> "::= { " (s table) " 1 }" n n> (s seq-entry) " ::= SEQUENCE {" n> p n> "}" n) "Insert an v2 SMI SNMP table." "snmpv2-textual-convention" (> (P "Textual Convention Type: ") " ::= TEXTUAL-CONVENTION" n> "STATUS  " (if tempo-interactive (snmp-completing-read "Status: " snmp-mode-status-list nil t) p) n> "DESCRIPTION" n> "\"" p "\"" n> "SYNTAX  " (if tempo-interactive (snmp-completing-read "Syntax: " snmp-mode-syntax-list nil nil) p) n>) "textualConvention" "Insert an v2 SMI TEXTUAL-CONVENTION macro." provide snmp-mode] 6)

Zerion Mini Shell 1.0