;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:25:04 2007 ;;; from file /home/cyd/emacs/lisp/progmodes/hideif.el ;;; in Emacs version 22.0.99 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`hideif.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\302\303\304\305\306\307%\207" [require cc-mode custom-declare-group hide-ifdef nil "Hide selected code within `ifdef'." :group c] 6) #@70 Keymap used by `hide-ifdef-mode' under `hide-ifdef-mode-prefix-key'. (defvar hide-ifdef-mode-submap (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\325\326\327#\210)\207" [map make-sparse-keymap define-key "d" hide-ifdef-define "u" hide-ifdef-undef "D" hide-ifdef-set-define-alist "U" hide-ifdef-use-define-alist "h" hide-ifdefs "s" show-ifdefs "" hide-ifdef-block "" show-ifdef-block "" hide-ifdef-toggle-read-only substitute-key-definition toggle-read-only hide-ifdef-toggle-outside-read-only] 4) (#$ . 728)) #@46 Prefix key for all Hide-Ifdef mode commands. (defconst hide-ifdef-mode-prefix-key "@" (#$ . 1383)) #@37 Keymap used with `hide-ifdef-mode'. (defvar hide-ifdef-mode-map (byte-code "\303 \304 \n#\210)\207" [map hide-ifdef-mode-prefix-key hide-ifdef-mode-submap make-sparse-keymap define-key] 4) (#$ . 1489)) #@34 Non-nil when text may be hidden. (defvar hide-ifdef-hiding nil (#$ . 1700)) (byte-code "\301\236\204\n\302B\301\207" [minor-mode-alist hide-ifdef-hiding (hide-ifdef-hiding " Hiding")] 2) #@51 Syntax table used for tokenizing #if expressions. (defvar hide-ifdef-syntax-table (byte-code "\302!\303\304\305 #\210\303\306\307 #\210\303\310\307 #\210 )\207" [c-mode-syntax-table st copy-syntax-table modify-syntax-entry 95 "w" 38 "." 124] 4) (#$ . 1897)) #@47 An alist of defined symbols and their values. (defvar hide-ifdef-env nil (#$ . 2163)) #@73 Internal variable. Saves the value of `buffer-read-only' while hiding. (defvar hif-outside-read-only nil (#$ . 2255)) #@99 Non-nil if Hide-Ifdef mode is enabled. Use the command `hide-ifdef-mode' to change this variable. (defvar hide-ifdef-mode nil (#$ . 2380)) (make-variable-buffer-local 'hide-ifdef-mode) #@1152 Toggle Hide-Ifdef mode. This is a minor mode, albeit a large one. With ARG, turn Hide-Ifdef mode on if arg is positive, off otherwise. In Hide-Ifdef mode, code within #ifdef constructs that the C preprocessor would eliminate may be hidden from view. Several variables affect how the hiding is done: `hide-ifdef-env' An association list of defined and undefined symbols for the current buffer. Initially, the global value of `hide-ifdef-env' is used. `hide-ifdef-define-alist' An association list of defined symbol lists. Use `hide-ifdef-set-define-alist' to save the current `hide-ifdef-env' and `hide-ifdef-use-define-alist' to set the current `hide-ifdef-env' from one of the lists in `hide-ifdef-define-alist'. `hide-ifdef-lines' Set to non-nil to not show #if, #ifdef, #ifndef, #else, and #endif lines when hiding. `hide-ifdef-initially' Indicates whether `hide-ifdefs' should be called when Hide-Ifdef mode is activated. `hide-ifdef-read-only' Set to non-nil if you want to make buffers read only while hiding. After `show-ifdefs', read-only status is restored to previous value. \{hide-ifdef-mode-map} (defalias 'hide-ifdef-mode #[(&optional arg) "\306=\203 ?\202%\203\307!\310V\202% \204\311\202%\312\313\301\"\210\314\211\203c\315\302!\210\316\302!\315\303!\210\316\303!\315\305!\210\f\315\317!\210\311\320\321\322\314\311$\210\323\324!\210#\203]\325 \210\202r\326 \210\202r\327\317!\210\330\331!\210 \203r\326 \210\332\333 \203|\334\202}\335\"\210\336 \203\221\312\337 \203\216\340\202\217\341\"\210\342 \210 \207" [arg hide-ifdef-mode hide-ifdef-env hide-ifdef-hiding buffer-read-only hif-outside-read-only toggle prefix-numeric-value 0 t message "Toggling %s off; better pass an explicit argument." nil make-local-variable default-value line-move-ignore-invisible add-hook change-major-mode-hook #[nil "\300\301!\207" [hide-ifdef-mode -1] 2] add-to-invisibility-spec (hide-ifdef . t) hide-ifdefs show-ifdefs kill-local-variable remove-from-invisibility-spec (hide-ifdef . t) run-hooks hide-ifdef-mode-hook hide-ifdef-mode-on-hook hide-ifdef-mode-off-hook called-interactively-p "Hide-Ifdef mode %sabled" "en" "dis" force-mode-line-update hide-ifdef-initially] 6 (#$ . 2573) (list (or current-prefix-arg 'toggle))]) (byte-code "\300\301\302\303\304!\205 \304J#\207" [add-minor-mode hide-ifdef-mode " Ifdef" boundp hide-ifdef-mode-map] 5) #@45 Show all of the text in the current buffer. (defalias 'hif-show-all #[nil "\300ed\"\207" [hif-show-ifdef-region] 3 (#$ . 5000) nil]) (defalias 'hif-after-revert-function #[nil "\205 \205 \302\303!\207" [hide-ifdef-mode hide-ifdef-hiding hide-ifdefs t] 2]) (add-hook 'after-revert-hook 'hif-after-revert-function) (defalias 'hif-end-of-line #[nil "\300\210\301\302\300x\303\"\303U\205\304\210\202\207" [nil logand "\\\\" 1 2] 3]) (defalias 'hide-ifdef-region-internal #[(start end) "\303 \304\305$\210\306 \"\307\n\304\305#)\207" [start end o remove-overlays invisible hide-ifdef make-overlay overlay-put] 5]) #@121 START is the start of a #if or #else form. END is the ending part. Everything including these lines is made invisible. (defalias 'hide-ifdef-region #[(start end) "\212b\210\302 \210` b\210\302 \210`\303 \")\207" [start end hif-end-of-line hide-ifdef-region-internal] 3 (#$ . 5629)]) #@51 Everything between START and END is made visible. (defalias 'hif-show-ifdef-region #[(start end) "\302 \303\304$\207" [start end remove-overlays invisible hide-ifdef] 5 (#$ . 5923)]) #@140 The function to use to evaluate a form. The evaluator is given a canonical form and returns t if text under that form should be displayed. (defvar hide-ifdef-evaluator 'eval (#$ . 6114)) #@42 ...is by default considered to be false. (defvar hif-undefined-symbol nil (#$ . 6307)) #@45 Prepend (var value) pair to hide-ifdef-env. (defalias 'hif-set-var #[(var value) " B\nB\211\207" [var value hide-ifdef-env] 2 (#$ . 6400)]) (defalias 'hif-lookup #[(var) "\304 \"\211\203\nA\202 )\207" [var hide-ifdef-env val hif-undefined-symbol assoc] 4]) (defalias 'hif-defined #[(var) "\302 \"\203 \303\207\304\207" [var hide-ifdef-env assoc 1 0] 3]) (byte-code "\301B\305\306!\210\307B\310 \311P!\210\302B\312 \313P!\210\303B\314 \315P!\210\304B\316 \317P!\210\320B\321\n\322 \322\f\260!\210\323B\324\325!\207" [current-load-list hif-cpp-prefix hif-ifx-regexp hif-else-regexp hif-endif-regexp (lambda (#1=#:defconst-tmp-var) (defconst hif-cpp-prefix #1#)) "\\(^\\| \\)[ ]*#[ ]*" hif-ifndef-regexp (lambda (#2=#:defconst-tmp-var) (defconst hif-ifndef-regexp #2#)) "ifndef" (lambda (#3=#:defconst-tmp-var) (defconst hif-ifx-regexp #3#)) "if\\(n?def\\)?[ ]+" (lambda (#4=#:defconst-tmp-var) (defconst hif-else-regexp #4#)) "else" (lambda (#5=#:defconst-tmp-var) (defconst hif-endif-regexp #5#)) "endif" hif-ifx-else-endif-regexp (lambda (#6=#:defconst-tmp-var) (defconst hif-ifx-else-endif-regexp #6#)) "\\|" hif-token-regexp (lambda (#7=#:defconst-tmp-var) (defconst hif-token-regexp #7#)) "\\(&&\\|||\\|[!=]=\\|!\\|[()+?:-]\\|[<>]=?\\|\\w+\\)"] 6) #@62 Separate string between START and END into a list of tokens. (defalias 'hif-tokenize #[(start end) "\306\307 p\310\216\311 !\210\212\fb\210\312d!\210` W\203 \313\314!\203'\315u\210\202\3136!\203`\316\225{7\316\225b\2107\317\230\203C\320\202\3737\321\230\203N\322\202\3737\323\230\203Y\324\202\3737\325\230\203d\326\202\3737\327\230\203o\330\202\3737\331\230\203z\332\202\3737\333\230\203\205\334\202\3737\335\230\203\220\336\202\3737\337\230\203\233\340\202\3737\341\230\203\246\342\202\3737\343\230\203\261\344\202\3737\345\230\203\274\346\202\3737\347\230\203\307\350\202\3737\351\230\203\322\352\202\3737\353\230\203\335\354\202\3737\355\230\203\350\356\202\373\357\3607\"\203\367\3617!\202\373\3627!B)\202\363\364\365 \"\210\202,\237)\207" [token-list #1=#:buffer #2=#:table hide-ifdef-syntax-table start end nil syntax-table ((byte-code "rq\210\302 !\210)\302\207" [#1# #2# set-syntax-table] 2)) set-syntax-table forward-comment looking-at "\\\\\n" 2 0 "||" or "&&" and "==" equal "!=" hif-notequal "!" not "defined" hif-defined "(" lparen ")" rparen ">" hif-greater "<" hif-less ">=" hif-greater-equal "<=" hif-less-equal "+" hif-plus "-" hif-minus "?" hif-conditional ":" hif-colon string-match "\\`[0-9]*\\'" string-to-number intern error "Bad #if expression: %s" buffer-string hif-token-regexp token] 3 (#$ . 7685)]) #@71 Pop the next token from token-list into the let variable "hif-token". (defalias 'hif-nexttoken #[nil "\211A@\211\207" [hif-token-list hif-token] 2 (#$ . 9089)]) (put 'hif-nexttoken 'byte-optimizer 'byte-compile-inline-expand) #@63 Parse the TOKEN-LIST. Return translated list in prefix form. (defalias 'hif-parse-if-exp #[(hif-token-list) "\211A@\302 \203\303\304 \"\210\207" [hif-token-list hif-token hif-expr error "Error: unexpected token: %s"] 4 (#$ . 9324)]) #@89 Parse an expression as found in #if. expr : or-expr | or-expr '?' expr ':' expr. (defalias 'hif-expr #[nil "\304 \305\n\306=\2032 \211A@\307 \n\310=\203* \211A@\306 \307 F\202\311\312\n\"\210\202 *\207" [middle result hif-token hif-token-list hif-or-expr nil hif-conditional hif-expr hif-colon error "Error: unexpected token: %s"] 4 (#$ . 9570)]) #@53 Parse n or-expr : and-expr | or-expr '||' and-expr. (defalias 'hif-or-expr #[nil "\303  \304=\203\n\211A@\305\303 E\202)\207" [result hif-token hif-token-list hif-and-expr or hif-or] 3 (#$ . 9945)]) #@54 Parse an and-expr : eq-expr | and-expr '&&' eq-expr. (defalias 'hif-and-expr #[nil "\303  \304=\203\n\211A@\305\303 E\202)\207" [result hif-token hif-token-list hif-eq-expr and hif-and] 3 (#$ . 10160)]) #@69 Parse an eq-expr : math | eq-expr `=='|`!='|`<'|`>'|`>='|`<=' math. (defalias 'hif-eq-expr #[nil "\304 \305\n\306>\203\n \211A@ \304 E\202 *\207" [eq-token result hif-token hif-token-list hif-math nil (equal hif-notequal hif-greater hif-less hif-greater-equal hif-less-equal)] 3 (#$ . 10379)]) #@95 Parse an expression with + or - and simpler things. math : factor | math '+|-' factor. (defalias 'hif-math #[nil "\304 \305\n\306>\203\n \211A@ \304 E\202 *\207" [math-op result hif-token hif-token-list hif-factor nil (hif-plus hif-minus)] 3 (#$ . 10690)]) #@69 Parse a factor: '!' factor | '(' expr ')' | 'defined(' id ')' | id. (defalias 'hif-factor #[nil "\305=\203 \211A@\306\307 D\207\310=\2036 \211A@\311 \312=\204-\313\314\"\2024 \211A@\n)\207\315=\203~ \211A@\211\310=\205O \211A@\316\317>\203]\313\320\"\210\f\203q \211A@\211\312=\204q\313\321!\210 \211A@\315\322 *DD\207\247\203\213 \211A@\207\211\323>\203\227\313\324!\210 \211A@\325\322 )DD\207" [hif-token hif-token-list result ident paren not hif-not hif-factor lparen hif-expr rparen error "Bad token in parenthesized expression: %s" hif-defined t (or and not hif-defined lparen rparen) "Error: unexpected token: %s" "Error: expected \")\" after identifier" quote (or and) "Error: missing identifier" hif-lookup] 4 (#$ . 10971)]) #@54 Treat VAL as a number: if it's t or nil, use 1 or 0. (defalias 'hif-mathify #[(val) "\301=\203\302\207\204\303\207\207" [val t 1 0] 2 (#$ . 11755)]) (defalias 'hif-conditional #[(a b c) "\303\304!!\204\f\304 !\207\304\n!\207" [a b c zerop hif-mathify] 3]) (defalias 'hif-and #[(a b) "\302\303!!?\205\302\303 !!?\207" [a b zerop hif-mathify] 3]) (defalias 'hif-or #[(a b) "\302\303!!?\206\302\303 !!?\207" [a b zerop hif-mathify] 3]) (defalias 'hif-not #[(a) "\301\302!!\207" [a zerop hif-mathify] 3]) #@52 Like ordinary plus but treat t and nil as 1 and 0. (defalias 'hif-plus #[(a b) "\302!\302 !\\\207" [a b hif-mathify] 3 (#$ . 12278)]) #@53 Like ordinary minus but treat t and nil as 1 and 0. (defalias 'hif-minus #[(a b) "\302!\302 !Z\207" [a b hif-mathify] 3 (#$ . 12419)]) #@43 Like (not (equal A B)) but as one symbol. (defalias 'hif-notequal #[(a b) " \232?\207" [a b] 2 (#$ . 12561)]) #@20 Simple comparison. (defalias 'hif-greater #[(a b) "\302!\302 !V\207" [a b hif-mathify] 3 (#$ . 12678)]) #@20 Simple comparison. (defalias 'hif-less #[(a b) "\302!\302 !W\207" [a b hif-mathify] 3 (#$ . 12789)]) #@20 Simple comparison. (defalias 'hif-greater-equal #[(a b) "\302!\302 !Y\207" [a b hif-mathify] 3 (#$ . 12897)]) #@20 Simple comparison. (defalias 'hif-less-equal #[(a b) "\302!\302 !X\207" [a b hif-mathify] 3 (#$ . 13014)]) #@72 When at beginning of #ifX, return a Lisp expression for its condition. (defalias 'hif-canonicalize #[nil "\212\305!\306\n!\210\307`\310 \210`\"\311 ! \203\312\fD\202 \f,\207" [hif-ifndef-regexp negate hif-ifx-regexp tokens expr looking-at re-search-forward hif-tokenize hif-end-of-line hif-parse-if-exp hif-not] 3 (#$ . 13128)]) #@53 Move to next #if..., or #ifndef, at point or after. (defalias 'hif-find-any-ifX #[nil "\301d\302#\303 \210\207" [hif-ifx-regexp re-search-forward t beginning-of-line] 4 (#$ . 13470)]) #@64 Move to next #if..., #else, or #endif, after the current line. (defalias 'hif-find-next-relevant #[nil "\301\210\302d\303#\205 \304 \207" [hif-ifx-else-endif-regexp nil re-search-forward t beginning-of-line] 4 (#$ . 13661)]) #@69 Move to previous #if..., #else, or #endif, before the current line. (defalias 'hif-find-previous-relevant #[nil "\301 \210\302e\303#\205 \301 \207" [hif-ifx-else-endif-regexp beginning-of-line re-search-backward t] 4 (#$ . 13895)]) (defalias 'hif-looking-at-ifX #[nil "\301!\207" [hif-ifx-regexp looking-at] 2]) (defalias 'hif-looking-at-endif #[nil "\301!\207" [hif-endif-regexp looking-at] 2]) (defalias 'hif-looking-at-else #[nil "\301!\207" [hif-else-regexp looking-at] 2]) #@68 If positioned at #ifX or #else form, skip to corresponding #endif. (defalias 'hif-ifdef-to-endif #[nil "\300 \210\301 \203\302 \210\302 \207\303 \203\302 \207\304 \203\305\207\306\307!\207" [hif-find-next-relevant hif-looking-at-ifX hif-ifdef-to-endif hif-looking-at-else hif-looking-at-endif done error "Mismatched #ifdef #endif pair"] 2 (#$ . 14384)]) #@68 If positioned at #endif form, skip backward to corresponding #ifX. (defalias 'hif-endif-to-ifdef #[nil "`\301 \210`U\203\302\303!\210)\304 \203\305 \210\305 \207\306 \203#\305 \207\307 \203*\310\207\311\207" [start hif-find-previous-relevant error "Mismatched #ifdef #endif pair" hif-looking-at-endif hif-endif-to-ifdef hif-looking-at-else hif-looking-at-ifX done t] 2 (#$ . 14750)]) #@98 Move point to beginning of line of the next ifdef-endif. With argument, do this that many times. (defalias 'forward-ifdef #[(&optional arg) "\204\302\303W\203\304[!\207\303W\205:[`\305 \204$\306 \210\305 \203/\307 \210\2026 b\210\310\311!\210)\202\207" [arg start 1 0 backward-ifdef hif-looking-at-ifX hif-find-next-relevant hif-ifdef-to-endif error "No following #ifdef"] 2 (#$ . 15148) "p"]) #@94 Move point to beginning of the previous ifdef-endif. With argument, do this that many times. (defalias 'backward-ifdef #[(&optional arg) "\204\302\303W\203\304[!\207\303W\205=S\305 \210`\306 \204'\307 \210\306 \2032\310 \210\2029 b\210\311\312!\210)\202\207" [arg start 1 0 forward-ifdef beginning-of-line hif-looking-at-endif hif-find-previous-relevant hif-endif-to-ifdef error "No previous #ifdef"] 2 (#$ . 15566) "p"]) #@55 Move point to beginning of nested ifdef or else-part. (defalias 'down-ifdef #[nil "`\301 \210\302 \206\f\303 ?\205b\210\304\305!)\207" [start hif-find-next-relevant hif-looking-at-ifX hif-looking-at-else error "No following #ifdef"] 2 (#$ . 16012) nil]) #@58 Move point to beginning of enclosing ifdef or else-part. (defalias 'up-ifdef #[nil "\301 \210`\302 \204 \303 \210\302 \203\304 \210`U\205\305\306!)\207" [start beginning-of-line hif-looking-at-endif hif-find-previous-relevant hif-endif-to-ifdef error "No previous #ifdef"] 2 (#$ . 16277) nil]) #@99 Move to the beginning of the next #ifX, #else, or #endif. With argument, do this that many times. (defalias 'next-ifdef #[(&optional arg) "\204\301\302W\203\303[!\207\302W\205+S\304 \210l\203\305 \210\306\307!\210\202\207" [arg 1 0 previous-ifdef hif-find-next-relevant beginning-of-line error "No following #ifdefs, #elses, or #endifs"] 2 (#$ . 16584) "p"]) #@103 Move to the beginning of the previous #ifX, #else, or #endif. With argument, do this that many times. (defalias 'previous-ifdef #[(&optional arg) "\204\302\303W\203\304[!\207\303W\205-S`\305 \210 `U\203)\306\307!\210)\202\207" [arg start 1 0 next-ifdef hif-find-previous-relevant error "No previous #ifdefs, #elses, or #endifs"] 2 (#$ . 16966) "p"]) (defalias 'hif-make-range #[(start end &optional else) " \nE\207" [start else end] 3]) (put 'hif-make-range 'byte-optimizer 'byte-compile-inline-expand) (defalias 'hif-range-start #[(range) "\301\234\207" [range 0] 2]) (put 'hif-range-start 'byte-optimizer 'byte-compile-inline-expand) (defalias 'hif-range-else #[(range) "\301\234\207" [range 1] 2]) (put 'hif-range-else 'byte-optimizer 'byte-compile-inline-expand) (defalias 'hif-range-end #[(range) "\301\234\207" [range 2] 2]) (put 'hif-range-end 'byte-optimizer 'byte-compile-inline-expand) #@86 Return a Range structure describing the current #if region. Point is left unchanged. (defalias 'hif-find-range #[nil "\212\303 \210`\304\211\305 \210\306 \203\307 \210\202\n\310 \203\"`\202$` \203A\305 \210\306 \2036\307 \210\202(\310 \203?\311\312!\210`\n \211 E.\207" [end else start beginning-of-line nil hif-find-next-relevant hif-looking-at-ifX hif-ifdef-to-endif hif-looking-at-else error "Found two elses in a row? Broken!"] 4 (#$ . 17888)]) #@77 Hide the line containing point. Does nothing if `hide-ifdef-lines' is nil. (defalias 'hif-hide-line #[(point) "\205\212 b\210\302\303 \304 \210`\")\207" [hide-ifdef-lines point hide-ifdef-region-internal line-beginning-position hif-end-of-line] 3 (#$ . 18365)]) #@75 Call `hide-ifdef-guts' after narrowing to end of START line and END line. (defalias 'hif-recurse-on #[(start end) "\212\214b\210\302\210` }\210\303 *\207" [start end nil hide-ifdef-guts] 2 (#$ . 18637)]) #@123 Called at #ifX expression, this hides those parts that should be hidden. It uses the judgement of `hide-ifdef-evaluator'. (defalias 'hif-possibly-hide #[nil "\303 \304 \305\211\306\234)!\210\307\n !!\204]\211\310\234)\203K\305\211\310\234)!\210\311\211\310\234)\211\306\234)S\"\210\312\211\313\234)\211\310\234)\"\210\202\234\312\211\313\234)\211\306\234)\"\210\202\234\211\310\234)\203\221\305\211\310\234)!\210\311\211\313\234)\211\310\234)S\"\210\312\211\310\234)\211\306\234)\"\210\202\234\311`\211\306\234)S\"\210\305\211\313\234)!\210\211\306\234)b\210\314*\207" [range test hide-ifdef-evaluator hif-canonicalize hif-find-range hif-hide-line 2 hif-not 1 hide-ifdef-region hif-recurse-on 0 nil] 5 (#$ . 18850)]) #@112 Does most of the work of `hide-ifdefs'. It does not do the work that's pointless to redo on a recursive entry. (defalias 'hide-ifdef-guts #[nil "\212eb\210\300 \205\301 \210\202)\207" [hif-find-any-ifX hif-possibly-hide] 1 (#$ . 19619)]) #@76 *Non-nil means call `hide-ifdefs' when Hide-Ifdef mode is first activated. (custom-declare-variable 'hide-ifdef-initially 'nil '(#$ . -19867) :type 'boolean :group 'hide-ifdef) #@71 *Set to non-nil if you want buffer to be read-only while hiding text. (custom-declare-variable 'hide-ifdef-read-only 'nil '(#$ . -20050) :type 'boolean :group 'hide-ifdef) #@56 *Non-nil means hide the #ifX, #else, and #endif lines. (custom-declare-variable 'hide-ifdef-lines 'nil '(#$ . -20228) :type 'boolean :group 'hide-ifdef) #@32 Toggle `hide-ifdef-read-only'. (defalias 'hide-ifdef-toggle-read-only #[nil "?\304\305\203 \306\202\307\"\210 \203\206\n\310 \207" [hide-ifdef-read-only hide-ifdef-hiding hif-outside-read-only buffer-read-only message "Hide-Read-Only %s" "ON" "OFF" force-mode-line-update] 3 (#$ . 20387) nil]) #@60 Replacement for `toggle-read-only' within Hide-Ifdef mode. (defalias 'hide-ifdef-toggle-outside-read-only #[nil "?\304\305\203 \306\202\307\"\210 \203\n\206\310 \207" [hif-outside-read-only hide-ifdef-hiding hide-ifdef-read-only buffer-read-only message "Read only %s" "ON" "OFF" force-mode-line-update] 3 (#$ . 20699) nil]) #@52 Define a VAR so that #ifdef VAR would be included. (defalias 'hide-ifdef-define #[(var) "\302\303\"\210 \205 \304 \207" [var hide-ifdef-hiding hif-set-var 1 hide-ifdefs] 3 (#$ . 21042) "SDefine what? "]) #@58 Undefine a VAR so that #ifdef VAR would not be included. (defalias 'hide-ifdef-undef #[(var) "\302\303\"\210 \205 \304 \207" [var hide-ifdef-hiding hif-set-var nil hide-ifdefs] 3 (#$ . 21254) "SUndefine what? "]) #@275 Hide the contents of some #ifdefs. Assume that defined symbols have been added to `hide-ifdef-env'. The text hidden is the text that would not be included by the C preprocessor if it were given the file with those symbols defined. Turn off hiding by calling `show-ifdefs'. (defalias 'hide-ifdefs #[(&optional nomsg) "\306\307!\210\n\204\302\310!\210 \203\311 \210\312\313 \210\f\206  \206'\306\314!\207" [buffer-read-only hif-outside-read-only hide-ifdef-mode hide-ifdef-hiding hide-ifdef-read-only nomsg message "Hiding..." 1 show-ifdefs t hide-ifdef-guts "Hiding done"] 2 (#$ . 21476) nil]) #@71 Cancel the effects of `hide-ifdef': show the contents of all #ifdefs. (defalias 'show-ifdefs #[nil "\303 \210\304\211\207" [hif-outside-read-only buffer-read-only hide-ifdef-hiding hif-show-all nil] 2 (#$ . 22087) nil]) #@94 Utility for hide and show `ifdef-block'. Return as (TOP . BOTTOM) the extent of ifdef block. (defalias 'hif-find-ifdef-block #[nil "\301\212\302 \210\303 \204\304 \204\305 \210`\306 \210`S)\212\302 \210\307 \204'\310 \210\304 \2035\306 \210\310 \210\202'`S^*B\207" [max-bottom nil beginning-of-line hif-looking-at-else hif-looking-at-ifX up-ifdef hif-ifdef-to-endif hif-looking-at-endif hif-find-next-relevant] 3 (#$ . 22316)]) #@75 Hide the ifdef block (true or false part) enclosing or before the cursor. (defalias 'hide-ifdef-block #[nil "\204\300\306!\210\307 \310 @ A\"\210\n\203!\311 @!\210\311 AT!\210\312)\f\206) \211 \207" [hide-ifdef-mode top-bottom hide-ifdef-lines hide-ifdef-hiding hide-ifdef-read-only hif-outside-read-only 1 hif-find-ifdef-block hide-ifdef-region hif-hide-line t buffer-read-only] 3 (#$ . 22760) nil]) #@75 Show the ifdef block (true or false part) enclosing or before the cursor. (defalias 'show-ifdef-block #[nil "\302  \203\303\212@b\210\304 )\212ATb\210\305 \210`)\"\202&\303@SA\")\207" [top-bottom hide-ifdef-lines hif-find-ifdef-block hif-show-ifdef-region line-beginning-position hif-end-of-line] 3 (#$ . 23175) nil]) #@50 A global assoc list of pre-defined symbol lists. (defvar hide-ifdef-define-alist nil (#$ . 23507)) #@67 Compress the define list ENV into a list of defined symbols only. (defalias 'hif-compress-define-list #[(env) "\304 \304\211\203 @\305\n@!\203 @B A\211\204\n\304+\207" [new-defs env def #1=#:--cl-dolist-temp-- nil hif-lookup] 3 (#$ . 23612)]) #@51 Set the association for NAME to `hide-ifdef-env'. (defalias 'hide-ifdef-set-define-alist #[(name) "\303 !B\nB\211\207" [name hide-ifdef-env hide-ifdef-define-alist hif-compress-define-list] 3 (#$ . 23875) "SSet define list: "]) #@60 Set `hide-ifdef-env' to the define list specified by NAME. (defalias 'hide-ifdef-use-define-alist #[(name) ";\203 \305!\306 \"\211\203\307\310\nA\"\202 \311\312\"\210\f\205&\313 )\207" [name hide-ifdef-define-alist define-list hide-ifdef-env hide-ifdef-hiding intern assoc mapcar #[(arg) "\301B\207" [arg t] 2] error "No define list for %s" hide-ifdefs] 4 (#$ . 24111) (list (completing-read "Use define list: " (mapcar (lambda (x) (symbol-name (car x))) hide-ifdef-define-alist) nil t))]) (provide 'hideif)