• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/

Lines Matching +defs:buffer +defs:modified

1 ;;; imenu.el --- framework for mode-specific buffer indexes
32 ;; To present a framework for mode-specific buffer indexes.
33 ;; A buffer index is an alist of names and buffer positions.
74 "Mode-specific buffer indexes."
81 "*Non-nil means use markers instead of integers for Imenu buffer positions.
84 buffer will make the generated index positions wrong.
104 This variable is buffer-local."
108 (defvar imenu-always-use-completion-buffer-p nil)
109 (make-obsolete-variable 'imenu-always-use-completion-buffer-p
113 (if imenu-always-use-completion-buffer-p
114 (not (eq imenu-always-use-completion-buffer-p 'never))
125 (defcustom imenu-eager-completion-buffer
126 (not (eq imenu-always-use-completion-buffer-p 'never))
127 "If non-nil, eagerly popup the completion buffer."
133 "*Hooks called after jumping to a place in the buffer.
148 in the buffer.
166 ;; (defcustom imenu-scanning-message "Scanning buffer for index (%3d%%)"
167 ;; "*Progress message during the index scanning of the buffer.
168 ;; If non-nil, user gets a message during the scanning of the buffer.
170 ;; Relevant only if the mode-specific function that creates the buffer
179 Used when presenting the index in a completion buffer to make the
193 "The regex pattern to use for creating a buffer index.
196 create a buffer index. Look there for the documentation of this
205 (make-variable-buffer-local 'imenu-generic-expression)
211 "The function to use for creating an index alist of the current buffer.
214 an index alist of the current buffer. The function is
217 See `imenu--index-alist' for the format of the buffer index alist.")
219 (make-variable-buffer-local 'imenu-create-index-function)
233 (make-variable-buffer-local 'imenu-prev-index-position-function)
243 (make-variable-buffer-local 'imenu-extract-index-name-function)
257 (make-variable-buffer-local 'imenu-name-lookup-function)
264 (make-variable-buffer-local 'imenu-default-goto-function)
273 ;; If RELPOS is nil, then the relative position in the buffer
310 ;; [ydi] modified for imenu-use-markers
313 (cons (buffer-substring beg end)
331 (buffer-substring beg end)))
423 ;; The item to use in the index for rescanning the buffer.
426 ;; The latest buffer index.
429 "The buffer index alist computed for this buffer in Imenu.
432 POSITION is the buffer position of the item; to go to the item
444 element recalculates the buffer's index alist.")
446 (make-variable-buffer-local 'imenu--index-alist)
449 "The latest buffer index alist used to update the menu bar menu.")
451 (make-variable-buffer-local 'imenu--last-menubar-index-alist)
453 ;; History list for 'jump-to-function-in-buffer'.
454 ;; Making this buffer local caused it not to work!
475 ;; Support function to calculate relative position in buffer
476 ;; Beginning of buffer is 0 and end of buffer is 100
479 (total (buffer-size)))
557 "Create an index alist for the definitions in the current buffer.
566 (> (buffer-size) imenu-auto-rescan-maxout))))
576 (error "No items suitable for an index found in this buffer"))
657 (make-variable-buffer-local 'imenu-syntax-alist)
660 "*Default function to create an index alist of the current buffer.
662 The most general method is to move point to end of buffer, then repeatedly call
692 (error "This buffer cannot use `imenu-default-create-index-function'"))))
705 (make-variable-buffer-local 'imenu-case-fold-search)
710 "Return an index alist of the current buffer based on PATTERNS.
724 REGEXP is a regexp that should match a construct in the buffer
742 Returns an index of the current buffer as an alist. The elements in
851 (defun imenu--completion-buffer (index-alist &optional prompt)
852 "Let the user select from INDEX-ALIST in a completion buffer with PROMPT.
855 ;; Create a list for this buffer only when needed.
873 ;; Display the completion buffer.
874 (if (not imenu-eager-completion-buffer)
883 (imenu--completion-buffer (cdr choice) prompt)
887 "Let the user select from a buffer index from a mouse menu.
889 INDEX-ALIST is the buffer index and EVENT is a mouse event.
893 (let* ((menu (imenu--split-menu index-alist (or title (buffer-name))))
900 (defun imenu-choose-buffer-index (&optional prompt alist)
901 "Let the user select from a buffer index and return the chosen index.
904 menu is used. Otherwise a completion buffer is used and the user is
913 If `imenu-use-popup-menu' is nil, then the completion buffer
926 ;; Create a list for this buffer only when needed.
933 (imenu--completion-buffer index-alist prompt)))
941 "Add an `imenu' entry to the menu bar for the current buffer.
961 "Add an Imenu \"Index\" entry on the menu bar for the current buffer.
967 (defvar imenu-buffer-menubar nil)
969 (defvar imenu-menubar-modified-tick 0
970 "The value of (buffer-chars-modified-tick) as of the last call
972 (make-variable-buffer-local 'imenu-menubar-modified-tick)
977 (/= (buffer-chars-modified-tick) imenu-menubar-modified-tick))
978 (setq imenu-menubar-modified-tick (buffer-chars-modified-tick))
987 (buffer-name)))
1002 (setq imenu-menubar-modified-tick -1)
1024 "Jump to a place in the buffer chosen using a buffer menu or mouse menu.
1025 INDEX-ITEM specifies the position. See `imenu-choose-buffer-index'
1027 (interactive (list (imenu-choose-buffer-index)))
1044 '("^No items suitable for an index found in this buffer$"
1045 "^This buffer cannot use `imenu-default-create-index-function'$"