;ELC ;;; compiled by rms@mole.gnu.ai.mit.edu on Sat Jul 30 20:05:07 1994 ;;; from file /home/fsf/rms/e19/lisp/imenu.el ;;; emacs version 19.25.90.2. ;;; 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 "`/home/fsf/rms/e19/lisp/imenu.el' was compiled for Emacs 19")) (defvar imenu-always-use-completion-buffer-p nil "\ *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'.") (defvar imenu-sort-function nil "\ *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-max-items 25 "\ *Maximum number of elements in an index mouse-menu.") (defvar imenu-scanning-message "Scanning buffer for index. (%3d%%)" "\ *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-space-replacement "^" "\ *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-level-separator ":" "\ *The separator between index names of different levels. Used for making mouse-menu titles and for flattening nested indexes with name concatenation.") (defvar imenu-submenu-name-format "%s..." "\ *The format for making a submenu name.") (defvar imenu-create-index-function (quote imenu-default-create-index-function) "\ 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.") (make-variable-buffer-local (quote imenu-create-index-function)) (defvar imenu-prev-index-position-function (quote beginning-of-defun) "\ 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. ") (make-variable-buffer-local (quote imenu-prev-index-position-function)) (defvar imenu-extract-index-name-function nil "\ Function for extracting the index name. This function is called after the function pointed out by `imenu-prev-index-position-function'.") (byte-code "ÀÁ!ˆÂÄÅ!„ÆÀÅ!ˆÄÇ!„ÆÀÇ!ˆÈÉÊ\"ˆÈËÌ\"ˆÈÍÎ\"ˆÈÏÐ\"ˆÈÑÒ\"ˆÈÓÔ\"ˆÈÕÖ\"ˆÈ×Ø\"‡" [make-variable-buffer-local imenu-extract-index-name-function ("*Rescan*" . -99) imenu--rescan-item boundp imenu--index-alist nil imenu--history-list defalias imenu--sort-by-name #[(item1 item2) "@ @™‡" [item1 item2] 2] imenu--relative-position #[(&optional reverse) "`À  ƒ \nZ ÄVƒ\nS Å¥Æ]¥‚&\nSÅ_ Æ]¥*‡" [buffer-size total pos reverse 50000 100 1] 3] imenu-progress-message (macro . #[(prevpos &optional relpos reverse) "ÀÁÂÃ\fƒ\f\f‚ÅDDCÇ\fƒÈ‚#ÉÃÊË\fEEÍÎÏ\fÐBBEEEE‡" [and imenu-scanning-message let pos relpos imenu--relative-position reverse if t > + 5 prevpos progn (message imenu-scanning-message pos) setq (pos)] 11]) imenu-create-submenu-name #[(name) "À \n\"‡" [format imenu-submenu-name-format name] 3] imenu--split #[(list n) "Á‰Âƒ.‰A@\fB T‰Uƒ \fŸ BÂÁ‚ \fƒ7\fŸ B Ÿ,‡" [list nil 0 i sublist result remain n] 5] 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] 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] imenu--cleanup #[(&optional alist) "…Á ƒ ‚\"…ć" [imenu--index-alist mapc #[(item) "À A!ƒ A‰“‡ A<…à A!‡" [markerp item nil imenu--cleanup] 3] alist t] 3]] 3) (defalias 'imenu-default-create-index-function #[nil "Á=ƒ  ‡Ã=ƒ ‡Ä=ƒÅ ‡Æ=ƒ$Ç ‡È !ƒ2È\n!„8ËÌ \"ˆÎ‰‰dbˆƒXÓÕ\"ˆ) ƒ–ƒ}Ö×!‰Ø\\Vƒ|Õ\"ˆ)Š\n );ƒX`BB‚XƒªÙÕ\"ˆ)+‡" [major-mode emacs-lisp-mode imenu-example--create-lisp-index lisp-mode c++-mode imenu-example--create-c++-index c-mode imenu-example--create-c-index fboundp imenu-prev-index-position-function imenu-extract-index-name-function error "The mode \"%s\" does not take full advantage of imenu.el yet." mode-name nil prev-pos name index-alist imenu-scanning-message 0 pos message imenu--relative-position t 5 100] 4 "\ *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."]) (byte-code "ÀÁÂ\"ˆÀÃÄ\"‡" [defalias imenu--replace-spaces #[(name replacement) "ÀÁ\nÃ#‡" [mapconcat #[(ch) "À Â\"ƒ ‡Ä !‡" [char-equal ch 32 replacement char-to-string] 3] name ""] 4] imenu--flatten-index-alist #[(index-alist &optional concat-names prefix) "ÀÁ\n\"‡" [mapcan #[(item) "@A …\fƒ\f Q‚ Ç\n!„#\n§ƒ+\nBC‚0È\n\"+‡" [item name pos concat-names prefix imenu-level-separator new-prefix markerp imenu--flatten-index-alist] 3] index-alist] 3]] 3) (defalias 'imenu--completion-buffer #[(index-alist &optional prompt) "À‰Á \"Ç‹ˆ;„À‚:@˜ƒ$É‚:Ê\f\"‰A<ƒ9Ë A\f\"‚: +‡" [nil mapcar #[(item) "À @\n\" AB‡" [imenu--replace-spaces item imenu-space-replacement] 3] index-alist prepared-index-alist choice name ((byte-code "ÀÁÂÃ\f\"!‘ˆÅdžÉ\fÊËÊÌ& )ʇ" ["*Completions*" display-completion-list all-completions "" prepared-index-alist #[nil "pŠÁqˆ‰*‡" [buffer "*Completions*" completion-reference-buffer] 2] minibuffer-setup-hook completing-read prompt "Index item: " nil t imenu--history-list name] 7)) imenu--rescan-item t assoc imenu--completion-buffer prompt] 6 "\ Let the user select from INDEX-ALIST in a completion buffer with PROMPT. Returns t for rescan and otherwise a position number."]) (defalias 'imenu--mouse-menu #[(index-alist event &optional title) "À ƒ+ÂÃ\f :ƒ ‰A@B‚ Ÿ ¡ˆ* \"‚,\f†3È \" Ã\nË\f \"‰\nÃ=ƒL\n‚†\n<ƒtÍ\n\fƒjÏ\n\f\"@Q‚pÏ\n\f\"@#‚†\nAUƒÑ‚†Ï\n\f\"*‡" [imenu--split-menu imenu-sort-function sort nil index-alist oldlist res title buffer-name menu position x-popup-menu event imenu--mouse-menu imenu-level-separator rassq imenu--rescan-item t] 9 "\ Let the user select from a buffer index from a mouse menu. INDEX-ALIST is the buffer index and EVENT is a mouse event. Returns t for rescan and otherwise a position number."]) (defalias 'imenu-choose-buffer-index #[(&optional prompt alist) "À <Â\fƒ& ‰A@)‰@)É!„%Ê!ˆ) Â=ƒ` ƒ6 ‚8Ì \fƒI „IÎ \"‚NÏ \"‰Â=ƒ&Ñ ƒ&À‚& +‡" [nil last-nonmenu-event t result mouse-triggered index-alist event position window framep select-window alist imenu--make-index-alist imenu-always-use-completion-buffer-p imenu--mouse-menu imenu--completion-buffer prompt imenu--cleanup imenu--index-alist] 4 "\ Let the user select from a buffer index and return the chosen index. If the user originally activated this function with the mouse, a mouse menu is used. Otherwise a completion buffer is used and the user is prompted with PROMPT. If you call this function with index alist ALIST, then it lets the user select from ALIST. With no index alist ALIST, it calls `imenu--make-index-alist' to create the index alist. If `imenu-always-use-completion-buffer-p' is non-nil, then the completion buffer is always used, no matter if the mouse was used or not. The returned value is on the form (INDEX-NAME . INDEX-POSITION)."]) (defalias 'imenu-add-to-menubar #[(name) "…\fÁ Ã\fÅB#‡" [window-system define-key current-local-map [menu-bar index] name imenu] 5 "\ Adds an \"imenu\" entry to the menubar for the current local keymap. NAME is the string naming the menu to be added. See 'imenu' for more information." "sMenu name: "]) (defalias 'imenu #[nil "À ‰… ˆÃ A!ƒÄ A!b‚ Ab)‡" [imenu-choose-buffer-index index-item push-mark markerp marker-position] 3 "\ Jump to a place in the buffer chosen using a buffer menu or mouse menu. See `imenu-choose-buffer-index' for more information." nil]) (byte-code "ÀÁÂ\"ˆÀÃÄ\"ˆÀÅÆ\"ˆÇÈ!„ÉʉËÌ°ÀÍÎ\"ˆÇÏ!„2ÐщËÒ°ÀÓÔ\"ˆÕÖ!‡" [defalias imenu-example--name-and-position #[nil "ŠÀÁ!ˆ`À ˆ`  Æ“ˆ \f{ ,B‡" [forward-sexp -1 make-marker marker end beg nil] 3] 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] imenu-example--create-lisp-index #[nil "À‰‰‰‰dbˆƒ ÇÉ\"ˆ)Ê ƒ«ƒBËÌ!‰ Í\\VƒAÉ\"ˆ)Î ÐŽÑÒ!ƒ§ŠÓÔ!ˆÑÕ!ƒeÖ×!ˆØ \fB‚¦ÑÙ!ƒwÖ×!ˆØ B‚¦ÑÚ!ƒÖ×!ˆ`SfÛUƒ•ÖÜ!ˆÓÔ!ˆÖÔ!ˆØ 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] boundp imenu-example--function-name-regexp-c "^[a-zA-Z0-9]+[ ]?" "\\([a-zA-Z0-9_*]+[ ]+\\)?" "\\([*&]+[ ]*\\)?" "\\([a-zA-Z0-9_*]+\\)[ ]*(" imenu-example--create-c-index #[(&optional regexp) "À‰‰ebˆ\fƒÅÇ\f\"ˆ)È  ÊŽË\f†( ÀÎ#ƒe\fƒIÏÀ!‰\nÐ\\VƒHÇ\f\"ˆ)ÑÒ!ˆŠÓ`Ò\"bˆg) Ô=„ Õ B‚ *\fƒwÖÇ\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] imenu-example--function-name-regexp-c++ "^[a-zA-Z0-9:]+[ ]?" "\\([a-zA-Z0-9_:~*]+[ ]+\\)?" "\\([a-zA-Z0-9_:*]+\\)[ ]*(" imenu-example--create-c++-index #[nil "À !‡" [imenu-example--create-c-index imenu-example--function-name-regexp-c++] 2] provide imenu] 5)