;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Tue May 2 20:19:50 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/cpp.el ;;; emacs version 19.28.90.69. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "`/gd/gnu/emacs/19.0/lisp/cpp.el' was compiled for Emacs 19")) #@35 *Face used for known cpp symbols. (defvar cpp-known-face (quote invisible) (#$ . -475)) #@37 *Face used for unknown cpp cymbols. (defvar cpp-unknown-face (quote highlight) (#$ . -569)) #@168 *Indicate what background face type you prefer. Can be either light or dark for color screens, mono for monochrome screens, and none if you don't use a window system. (defvar cpp-face-type (quote light) (#$ . -668)) #@66 *Non-nil means you are allowed to modify the known conditionals. (defvar cpp-known-writable t (#$ . -890)) #@68 *Non-nil means you are allowed to modify the unknown conditionals. (defvar cpp-unknown-writable t (#$ . -1003)) #@322 Alist of cpp macros and information about how they should be displayed. Each entry is a list with the following elements: 0. The name of the macro (a string). 1. Face used for text that is `ifdef' the macro. 2. Face used for text that is `ifndef' the macro. 3. `t', `nil', or `both' depending on what text may be edited. (defvar cpp-edit-list nil (#$ . 1122)) (byte-code "! B! B B‡" [boundp cpp-overlay-list nil current-load-list make-variable-buffer-local cpp-callback-data cpp-state-stack] 2) #@61 Alist of strings and names of the defined face collections. (defconst cpp-face-type-list (quote (("light color background" . light) ("dark color background" . dark) ("monochrome" . mono) ("tty" . none))) (#$ . 1640)) (byte-code "\nB!\nB!\nB! \nBŇ" [(("writable" . t) ("read-only")) cpp-writable-list current-load-list boundp cpp-button-event nil cpp-edit-buffer make-variable-buffer-local (("false") ("true" . t) ("both" . both)) cpp-branch-list] 2) #@57 List of faces you can choose from for cpp conditionals. (defvar cpp-face-default-list nil (#$ . 2127)) #@56 Background colours useful with dark foreground colors. (defvar cpp-face-light-name-list (quote ("light gray" "light blue" "light cyan" "light yellow" "light pink" "pale green" "beige" "orange" "magenta" "violet" "medium purple" "turquoise")) (#$ . 2236)) #@57 Background colours useful with light foreground colors. (defvar cpp-face-dark-name-list (quote ("dim gray" "blue" "cyan" "yellow" "red" "dark green" "brown" "dark orange" "dark khaki" "dark violet" "purple" "dark turquoise")) (#$ . 2497)) #@60 Alist of names and faces to be used for light backgrounds. (defvar cpp-face-light-list nil (#$ . 2742)) #@59 Alist of names and faces to be used for dark backgrounds. (defvar cpp-face-dark-list nil (#$ . 2852)) #@60 Alist of names and faces to be used for monocrome screens. (defvar cpp-face-mono-list (quote (("bold" quote bold) ("bold-italic" quote bold-italic) ("italic" quote italic) ("underline" quote underline))) (#$ . 2960)) #@75 Alist of names and faces available even if you don't use a window system. (defvar cpp-face-none-list (quote (("default" . default) ("invisible" . invisible))) (#$ . 3183)) #@62 All faces used for highligting text inside cpp conditionals. (defvar cpp-face-all-list (append cpp-face-light-list cpp-face-dark-list cpp-face-mono-list cpp-face-none-list) (#$ . 3361)) #@46 List of cpp macros used in the local buffer. (defvar cpp-parse-symbols nil (#$ . 3553)) (byte-code "!QB" [make-variable-buffer-local cpp-parse-symbols "'\\|\"\\|/\\*\\|//\\|" "\\(^[ ]*#[ ]*\\(ifdef\\|ifndef\\|if\\|" "elif\\|else\\|endif\\)\\b\\)" cpp-parse-regexp current-load-list] 3) #@238 Highlight C code according to preprocessor conditionals. This command pops up a buffer which you should edit to specify what kind of highlighting to use, and the criteria for highlighting. A prefix arg suppresses display of that buffer. (defalias 'cpp-highlight-buffer #[(arg) " \f eb! #-`eZ_ \"ΔΕ{И?јKΔbӏ)Ԙa#)!)٘ow)۔`Tܔܕ{ە`{ ᘃ $(㘃 $(䘃 $(嘃&' \"* $(阃 ! @@? @A@ F, \", B)(혃$ \"(!,)!) B @8b!))3O ?O " [nil cpp-parse-symbols cpp-parse-reset cpp-edit-list cpp-edit-load cpp-state-stack cpp-progress-message "Parsing..." re-search-forward cpp-parse-regexp t "Parsing...%d%%" 100 buffer-size 0 match "'" "\"" (forward-sexp) ((error (cpp-parse-error "Unterminated string or character"))) "/*" search-forward "*/" error "Unterminated comment" "//" "^\n " 1 2 expr type to from "ifdef" cpp-parse-open "ifndef" "if" "elif" cpp-unknown-face cpp-known-face cpp-parse-close "else" cpp-parse-error "Top level #else" entry "endif" "Parser error" message "Parsing...done" 3 "Unclosed conditional" arg cpp-parse-edit] 6 (#$ . 3862) "P"]) #@70 Push information about conditional-beginning onto `cpp-state-stack'. (defalias 'cpp-parse-open #[(branch expr begin end) "\n\"\nÉO\nÕOP\n\"#\nÉO\n\"0\nÉO\n\"F\nÉO\nÕOP0\n \nF B \n\f`\n\fB\f\n\"o \n\" \n\"" [string-match "\\b[ ]*/\\*.*\\*/[ ]*\\b" expr 0 nil "\\b[ ]*/\\*" "\\b[ ]*\\(//.*\\)?$" "[ ]+" branch begin end cpp-state-stack cpp-parse-symbols assoc cpp-edit-list cpp-make-known-overlay cpp-make-unknown-overlay] 4 (#$ . 5111)]) (defalias 'cpp-parse-close #[(from to) " @A@\n\" @@ @8 @8 A*ɂ+8?8= G  \"\f  \"\fB `\f #=o\f!~=~\f#\f!\f!, \"," [assoc cpp-state-stack cpp-edit-list 2 3 end begin branch entry 1 make-overlay from overlay priority read-only face cpp-make-known-overlay to cpp-overlay-list overlay-put invisible cpp-make-overlay-hidden default cpp-make-overlay-read-only cpp-make-overlay-sticky cpp-make-unknown-overlay] 6]) (defalias 'cpp-parse-error #[(error) "Pe`\"\"" [error " at line %d" count-lines] 5]) #@46 Reset display of cpp conditionals to normal. (defalias 'cpp-parse-reset #[nil "@!A‡" [cpp-overlay-list delete-overlay nil] 3 (#$ . 6214) nil]) #@48 Edit display information for cpp conditionals. (defalias 'cpp-parse-edit #[nil "!p!  )" [cpp-parse-symbols cpp-highlight-buffer t buffer pop-to-buffer "*CPP Edit*" cpp-edit-mode cpp-edit-buffer cpp-edit-reset] 2 (#$ . 6377) nil]) (defalias 'cpp-make-known-overlay #[(start end) " \n\"\f= !/\f= \f#\n/ # # B)" [make-overlay start end overlay cpp-known-face invisible cpp-make-overlay-hidden default overlay-put face cpp-known-writable modification-hooks (cpp-signal-read-only) insert-in-front-hooks (cpp-signal-read-only) cpp-overlay-list] 4]) (defalias 'cpp-make-unknown-overlay #[(start end) " \n\"\f= !\f= \f#\n/ # # B)" [make-overlay start end overlay cpp-unknown-face invisible cpp-make-overlay-hidden default overlay-put face cpp-unknown-writable modification-hooks (cpp-signal-read-only) insert-in-front-hooks (cpp-signal-read-only) cpp-overlay-list] 4]) (defalias 'cpp-make-overlay-hidden #[(overlay) " # # # #" [overlay-put overlay invisible t intangible modification-hooks (cpp-signal-read-only) insert-in-front-hooks (cpp-signal-read-only)] 4]) (defalias 'cpp-make-overlay-read-only #[(overlay) " # # #" [overlay-put overlay modification-hooks (cpp-signal-read-only) insert-in-front-hooks (cpp-signal-read-only) insert-behind-hooks (cpp-signal-read-only)] 4]) (defalias 'cpp-make-overlay-sticky #[(overlay) " # #" [overlay-put overlay insert-in-front-hooks (cpp-grow-overlay) insert-behind-hooks (cpp-grow-overlay)] 4]) (defalias 'cpp-signal-read-only #[(overlay after start end &optional len) "?\n! W\n! V!" [after overlay-start overlay start overlay-end end error "This text is read only"] 2]) (defalias 'cpp-grow-overlay #[(overlay after start end &optional len) "\n \n!^ \n!]#" [after move-overlay overlay start overlay-start end overlay-end] 6]) (byte-code "! B  ! # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #!: B!" [boundp cpp-edit-map nil current-load-list make-keymap suppress-keymap define-key [down-mouse-2] cpp-push-button [mouse-2] ignore " " scroll-up "" scroll-down [delete] "" cpp-edit-apply "a" "A" "r" cpp-edit-reset "R" "s" cpp-edit-save "S" "l" cpp-edit-load "L" "h" cpp-edit-home "H" "b" cpp-edit-background "B" "k" cpp-edit-known "K" "u" cpp-edit-unknown "t" cpp-edit-true "T" "f" cpp-edit-false "F" "w" cpp-edit-write "W" "X" cpp-edit-toggle-known "x" "Y" cpp-edit-toggle-unknown "y" "q" bury-buffer "Q" cpp-edit-symbols make-variable-buffer-local] 4) #@178 Major mode for editing the criteria for highlighting cpp conditionals. Click on objects to change them. You can also use the keyboard accelerators indicated like this: [K]ey. (defalias 'cpp-edit-mode #[nil " !  !" [kill-all-local-variables buffer-disable-undo auto-save-mode -1 t buffer-read-only cpp-edit-mode major-mode "CPP Edit" mode-name use-local-map cpp-edit-map] 2 (#$ . 9105)]) #@54 Apply edited display information to original buffer. (defalias 'cpp-edit-apply #[nil " !" [cpp-edit-home cpp-highlight-buffer t] 2 (#$ . 9518) nil]) #@49 Reset display information from original buffer. (defalias 'cpp-edit-reset #[nil "p `qq\n c!\"ѱ\"c\"c\"c\"cc\"@\"c#!$c'(\"@\"c+!$c.(\"@\"%c\nf\n@668\"9A@:98<998?\nA9::@=<<@=?=A98\"896GBV6CBOD\"E6\"c:!F6G%HcRςT )Y\n \f\nDDqD$#+" [format "%s" name nil to from padding 0 make-string 32 face assoc cpp-face-all-list check (default invisible) bold add-text-properties append (mouse-face highlight) cpp-callback callback data cpp-data] 10]) (defalias 'cpp-push-button #[(event) " A@)@)!q A@)A@:#\nA@@&\nA@) \" \"  E \"!T\f\"T\f\"!," [window-buffer event position pos get-text-property cpp-data cpp-callback cpp-button-event fun cpp-callback-data call-interactively lookup-key global-map [down-mouse-2] [down-mouse-2]] 5 nil "@e"]) (defalias 'cpp-create-bg-face #[(color) "\nP! ! \n\"\n )B" [intern "cpp " color name make-face set-face-background] 3]) (byte-code " \n\n!" [cpp-choose-default-face window-system cpp-face-type none] 2) (defalias 'cpp-face-name #[(face) " \n \"\f@ \")" [rassq face default cpp-face-all-list entry format "<%s>"] 4]) (byte-code "! B" [boundp cpp-progress-time 0 current-load-list] 2) (defalias 'cpp-progress-message #[(&rest args) " A@\nU?  \")" [current-time time cpp-progress-time apply message args] 4]) (provide (quote cpp))