;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Mon Apr 17 19:43:36 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/imenu.el ;;; emacs version 19.28.90.26. ;;; 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/imenu.el' was compiled for Emacs 19")) #@287 *Set this to non-nil for displaying the index in a completion buffer. Non-nil means always display the index in a completion buffer. Nil means display the index as a mouse menu when the mouse was used to invoke `imenu'. `never' means never automatically display a listing of any kind. (defvar imenu-always-use-completion-buffer-p nil (#$ . -480)) #@501 *The function to use for sorting the index mouse-menu. Affects only the mouse index menu. Set this to nil if you don't want any sorting (faster). The items in the menu are then presented in the order they were found in the buffer. Set it to `imenu--sort-by-name' if you want alphabetic sorting. The function should take two arguments and return T if the first element should come before the second. The arguments are cons cells; (NAME . POSITION). Look at `imenu--sort-by-name' for an example. (defvar imenu-sort-function nil (#$ . -835)) #@53 *Maximum number of elements in an index mouse-menu. (defvar imenu-max-items 25 (#$ . -1386)) #@231 *Progress message during the index scanning of the buffer. If non-nil, user gets a message during the scanning of the buffer Relevant only if the mode-specific function that creates the buffer index use `imenu-progress-message'. (defvar imenu-scanning-message "Scanning buffer for index. (%3d%%)" (#$ . -1486)) #@140 *The replacement string for spaces in index names. Used when presenting the index in a completion-buffer to make the names work as tokens. (defvar imenu-space-replacement "^" (#$ . -1805)) #@150 *The separator between index names of different levels. Used for making mouse-menu titles and for flattening nested indexes with name concatenation. (defvar imenu-level-separator ":" (#$ . -2001)) #@40 *The format for making a submenu name. (defvar imenu-submenu-name-format "%s..." (#$ . -2204)) #@126 Generic regular expression for index gathering. Can be either an regular expression or an alist in the form (REGEXP PAREN). (defvar imenu-generic-expression nil (#$ . 2306)) (make-variable-buffer-local (quote imenu-generic-expression)) #@368 The function to use for creating a buffer index. It should be a function that takes no arguments and returns an index of the current buffer as an alist. The elements in the alist look like: (INDEX-NAME . INDEX-POSITION). You may also nest index list like (INDEX-NAME . INDEX-ALIST). This function is called within a `save-excursion'. The variable is buffer-local. (defvar imenu-create-index-function (quote imenu-default-create-index-function) (#$ . 2550)) (make-variable-buffer-local (quote imenu-create-index-function)) #@375 Function for finding the next index position. If `imenu-create-index-function' is set to `imenu-default-create-index-function', then you must set this variable to a function that will find the next index, looking backwards in the file. The function should leave point at the place to be connected to the index and it should return nil when it doesn't find another index.  (defvar imenu-prev-index-position-function (quote beginning-of-defun) (#$ . 3082)) (make-variable-buffer-local (quote imenu-prev-index-position-function)) #@138 Function for extracting the index name. This function is called after the function pointed out by `imenu-prev-index-position-function'. (defvar imenu-extract-index-name-function nil (#$ . 3618)) (make-variable-buffer-local (quote imenu-extract-index-name-function)) (defalias 'imenu-progress-message '(macro . #[(prevpos &optional relpos reverse) "\f\f\fDDC\fȂ#\fEE\fBBEEEE" [and imenu-scanning-message let pos relpos imenu--relative-position reverse if t > + 5 prevpos progn (message imenu-scanning-message pos) setq (pos)] 11])) (defalias 'imenu-example--name-and-position #[nil "!` `  Ɠ \f{ ,B" [forward-sexp -1 make-marker marker end beg nil] 3]) (defalias 'imenu-example--lisp-extract-index-name #[nil " Ž!Ǐ*" [match-data match-data ((store-match-data match-data)) looking-at "(def" nil (byte-code "!!`!` {*" [down-list 1 forward-sexp 2 -1 end beg] 4) ((error))] 3]) (defalias 'imenu-example--create-lisp-index #[nil "db \") B! \\VA\") Ў!!!e! \fB!w! B!!`SfU!!! B! \nB)* \")\f!\fB B ! B B\n!\nB B -" [nil prev-pos index-unknown-alist index-type-alist index-var-alist index-alist imenu-scanning-message 0 pos message beginning-of-defun imenu--relative-position t 5 match-data match-data ((store-match-data match-data)) looking-at "(def" down-list 1 "def\\(var\\|const\\)" forward-sexp 2 imenu-example--name-and-position "def\\(un\\|subst\\|macro\\|advice\\)" "def\\(type\\|struct\\|class\\|ine-condition\\)" 41 -1 100 imenu-create-submenu-name "Variables" "Types" "Syntax-unknown"] 6]) (byte-code "!ÉŰB" [boundp imenu-example--function-name-regexp-c "^[a-zA-Z0-9]+[ ]?" "\\([a-zA-Z0-9_*]+[ ]+\\)?" "\\([*&]+[ ]*\\)?" "\\([a-zA-Z0-9_*]+\\)[ ]*(" current-load-list] 5) (defalias 'imenu-example--create-c-index #[(&optional regexp) "eb\f\f\")  ʎ\f( #e\fI!\n\\VH\f\")!`\"bg) = B *\fw\f\") +" [nil char prev-pos index-alist imenu-scanning-message 0 pos message match-data match-data ((store-match-data match-data)) re-search-forward regexp imenu-example--function-name-regexp-c t imenu--relative-position 5 backward-up-list 1 scan-sexps 59 imenu-example--name-and-position 100] 5]) #@65 imenu generic expression for C++ mode in the form (REGEXP PAR). (defvar imenu-example--generic-c++-expression (byte-code "‰É͉DB" ["^" "\\(template[ ]*<[^>]+>[ ]*\\)?" "\\(" "\\([a-zA-Z0-9_:]+[ ]+\\)?" "[a-zA-Z0-9_:]+" "\\([ ]*[*&]+[ ]*\\|[ ]+\\)" "\\)?" "[a-zA-Z0-9_:~]+" "\\|" "\\([a-zA-Z0-9_:~]*::\\)?operator" "[^a-zA-Z1-9_][^(]*" " \\)" "[ ]*([^)]*)[ \n]*[^ ;]" "\\)" "\\(class[ ]+[a-zA-Z0-9_]+\\)" "[ ]*[:{]" 8 11] 24) (#$ . 6036)) #@164 imenu generic expression for TexInfo mode in the form (REGEXP PAR). To overide this example, Either set 'imenu-generic-expression or 'imenu-create-index-function (defvar imenu-example--generic-texinfo-expression (byte-code "PCB" ["^@node[ ]+" "\\([^,\n]*\\)" 1] 2) (#$ . 6517)) #@63 imenu generic expression for LaTex mode in the form "REGEXP". (defvar imenu-example--generic-latex-expression (concat "\\(" "%[ ]*[0-9]+\\.[0-9]+[,;]?[ ]?" "\\|" "\\\\part{[^}]*}" "\\|" "\\\\chapter{[^}]*}" "\\|" "\\\\[a-zA-Z]*section{[^}]*}" "\\)") (#$ . 6807)) (byte-code "\nB!\nB!!\nB!" [("*Rescan*" . -99) imenu--rescan-item current-load-list boundp imenu--index-alist nil make-variable-buffer-local imenu--history-list] 2) (defalias 'imenu--sort-by-name #[(item1 item2) "@ @" [item1 item2] 2]) (defalias 'imenu--relative-position #[(&optional reverse) "`  \nZ V\nS ť]&\nS_ ]*" [buffer-size total pos reverse 50000 100 1] 3]) (defalias 'imenu-create-submenu-name #[(name) " \n\"" [format imenu-submenu-name-format name] 3]) (defalias 'imenu--split #[(list n) ".A@\fB TU \f B \f7\f B ," [list nil 0 i sublist result remain n] 5]) (defalias 'imenu--split-menu #[(menulist title) "\f \"\"B" ["Function menus" mapcar #[(menu) "\n\" B" [format "(%s)" title menu] 3] imenu--split menulist imenu-max-items] 6]) (defalias 'imenu--make-index-alist #[nil " )!\fB" [imenu--index-alist imenu-create-index-function error "No items suitable for an index found in this buffer." imenu--rescan-item] 2]) (defalias 'imenu--cleanup #[(&optional alist) " \"ć" [alist imenu--index-alist mapcar #[(item) " A! A‰ A: A!" [markerp item nil imenu--cleanup] 3] t] 3]) #@223 *Wrapper for index searching functions. Moves point to end of buffer and then repeatedly calls `imenu-prev-index-position-function' and `imenu-extract-index-name-function'. Their results are gathered into an index alist. (defalias 'imenu-default-create-index-function #[nil " !w\n!wÉdb)  \" ) `K! \\VJ \" )\n )\f;)\f`BB)s  \" )+!= = =!= =!=!\"" [fboundp imenu-prev-index-position-function imenu-extract-index-name-function nil name prev-pos index-alist imenu-scanning-message 0 pos message imenu--relative-position t 5 100 imenu-generic-expression imenu--generic-function major-mode emacs-lisp-mode imenu-example--create-lisp-index lisp-mode c++-mode imenu-example--generic-c++-expression c-mode imenu-example--create-c-index latex-mode imenu-example--generic-latex-expression texinfo-mode imenu-example--generic-texinfo-expression error "The mode \"%s\" does not take full advantage of imenu.el yet." mode-name] 4 (#$ . -8307)]) (defalias 'imenu--replace-spaces #[(name replacement) "\n#" [mapconcat #[(ch) " \" !" [char-equal ch 32 replacement char-to-string] 3] name ""] 4]) (defalias 'imenu--flatten-index-alist #[(index-alist &optional concat-names prefix) "\n\"" [mapcan #[(item) "@A \f\f Q \n!#\n+\nBC0\n\"+" [item name pos concat-names prefix imenu-level-separator new-prefix markerp imenu--flatten-index-alist] 3] index-alist] 3]) (defalias 'imenu--generic-extract-name #[(paren) "GS‰y X2 82\fš2\fš2 T XC\f\f{I{ ," [paren 0 nil index par parencount numofpar] 5]) #@121 Generic function for index gathering. EXP can be either an regular expression or an alist in the form (REGEXP PAREN).  (defalias 'imenu--generic-function #[(exp) ";-<)@A-!db C   \" )\f# h! \n\\Vg  \" ) u !~yʔʕ{) ;C `B BC    \" ) -" [nil name prev-pos paren regexp index-alist exp error "Wrong type of argument." imenu-scanning-message 0 pos message re-search-backward 1 t imenu--relative-position 5 imenu--generic-extract-name 100] 6 (#$ . 10023)]) #@129 Let the user select from INDEX-ALIST in a completion buffer with PROMPT. Returns t for rescan and otherwise a position number. (defalias 'imenu--completion-buffer #[(index-alist &optional prompt) " \"=$\n\f&'΋;1T@>̂T\f\"A