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

Lines Matching +defs:function +defs:list

39 If you set this variable, do not also set `tags-table-list'.
59 ;; Use `visit-tags-table-buffer' to cycle through tags tables in this list.
60 (defcustom tags-table-list nil
63 To switch to a new list of tags tables, setting this variable is sufficient.
70 (defcustom tags-compression-info-list '("" ".Z" ".bz2" ".gz" ".tgz")
74 \(i.e. via customize of `auto-compression-mode' or by calling the function
79 ;; !!! tags-compression-info-list should probably be replaced by access
80 ;; to directory list and matching jka-compr-compression-info-list. Currently,
82 ;; jka-compr-compression-info-list to be reflected in this var.
84 ;; element in this list (e.g. t) means : try at this point
86 ;; jka-compr-compression-info-list.
91 "*Control whether to add a new tags table to the current list.
92 t means do; nil means don't (always start a new list).
94 to the current list (as opposed to starting a new list)."
105 (defvar tags-table-computed-list nil
106 "List of tags tables to search, computed from `tags-table-list'.
107 This includes tables implicitly included by other tables. The list is not
112 See `tags-table-check-computed-list'.")
114 (defvar tags-table-computed-list-for nil
115 "Value of `tags-table-list' that `tags-table-computed-list' corresponds to.
116 If `tags-table-list' changes, `tags-table-computed-list' is thrown away and
117 recomputed; see `tags-table-check-computed-list'.")
119 (defvar tags-table-list-pointer nil
120 "Pointer into `tags-table-computed-list' for the current state of searching.
121 Use `visit-tags-table-buffer' to cycle through tags tables in this list.")
123 (defvar tags-table-list-started-at nil
124 "Pointer into `tags-table-computed-list', where the current search started.")
126 (defvar tags-table-set-list nil
128 Each element is a list of strings which are file names.")
139 (defcustom find-tag-default-function nil
140 "*A function of no arguments used by \\[find-tag] to pick a default tag.
142 has a `find-tag-default-function' property (see `put'), that is used.
145 :type '(choice (const nil) function))
168 If non-nil, value should be a list of triples (TITLE FUNCTION
172 TITLE, a string, is a title used to label the additional list of tags.
173 FUNCTION is a function to call when a symbol is selected in the
183 :type '(repeat (list (string :tag "Title")
184 function
191 (defvar default-tags-table-function nil
192 "If non-nil, a function to choose a default tags file for a buffer.
193 This function receives no arguments and should return the default
214 (defvar next-file-list nil
224 until one returns non-nil. The function should make buffer-local bindings
225 of the format-parsing tags function variables if successful.")
227 (defvar file-of-tag-function nil
231 (defvar tags-table-files-function nil
233 (defvar tags-completion-table-function nil
235 (defvar snarf-tag-function nil
236 "Function to get info about a matched tag for `goto-tag-location-function'.
239 (defvar goto-tag-location-function nil
241 One argument, the tag info returned by `snarf-tag-function'.")
242 (defvar find-tag-regexp-search-function nil
243 "Search function passed to `find-tag-in-order' for finding a regexp tag.")
248 (defvar find-tag-search-function nil
249 "Search function passed to `find-tag-in-order' for finding a tag.")
254 (defvar list-tags-function nil
255 "Function to do the work of `list-tags' (which see).")
256 (defvar tags-apropos-function nil
258 (defvar tags-included-tables-function nil
260 (defvar verify-tags-table-function nil
298 (interactive (list (read-file-name "Visit tags table (default TAGS): "
304 (or (stringp file) (signal 'wrong-type-argument (list 'stringp file)))
314 (signal 'file-error (list "Visiting tags table"
325 (defun tags-table-check-computed-list ()
326 "Compute `tags-table-computed-list' from `tags-table-list' if necessary."
327 (let ((expanded-list (mapcar 'tags-expand-table-name tags-table-list)))
328 (or (equal tags-table-computed-list-for expanded-list)
329 ;; The list (or default-directory) has changed since last computed.
330 (let* ((compute-for (mapcar 'copy-sequence expanded-list))
346 ;; Insert the included tables into the list we
353 ;; tables before searching the next table in the list.
357 ;; Record the tags-table-list value (and the context of the
359 (setq tags-table-computed-list-for compute-for
360 tags-table-computed-list (nreverse computed))))))
362 ;; Extend `tags-table-computed-list' to remove the first `t' placeholder.
363 ;; An element of the list that is `t' is a placeholder indicating that the
367 ;; included tables inserted into the list.
368 (defun tags-table-extend-computed-list ()
369 (let ((list tags-table-computed-list))
370 (while (not (eq (nth 1 list) t))
371 (setq list (cdr list)))
373 (if (tags-verify-table (car list))
375 ;; list of included tables and insert it into the computed list.
386 ;; Insert the included tables into the list we
392 ;; tables before searching the next table in the list.
396 ;; COMPUTED now contains the list of included tables (and
398 ;; current list.
399 (setcdr list (nconc computed (cdr (cdr list)))))
401 (setcdr list (cdr (cdr list)))))))
412 (defun tags-table-list-member (file list)
414 (while (and list
415 (or (eq (car list) t)
416 (not (string= file (tags-expand-table-name (car list))))))
417 (setq list (cdr list)))
418 list)
429 (setq win (or verify-tags-table-function (tags-table-mode)))
445 (and verify-tags-table-function
446 (funcall verify-tags-table-function))
454 ;; Propagate the change to tags-file-name and tags-table-list.
455 (let ((tail (member file tags-table-list)))
469 (let ((tables tags-table-computed-list)
471 ;; Loop over the list, looking for a table containing tags for THIS-FILE.
481 (tags-table-extend-computed-list)))
484 ;; Select the tags table buffer and get the file list up to date.
495 ;; element of the computed list to see if it appears in the user's
496 ;; explicit list; the last element we will check is FOUND itself.
498 ;; tags-table-list.
500 (elt tags-table-computed-list))
502 (if (tags-table-list-member (car elt) tags-table-list)
503 ;; This table appears in the user's list, so it could be
509 ;; The last element we found in the computed list before FOUND
510 ;; that appears in the user's list will be the table that
514 ;; Subroutine of visit-tags-table-buffer. Move tags-table-list-pointer
517 ;; If there is a placeholder element next, compute the list to replace it.
518 (while (eq (nth 1 tags-table-list-pointer) t)
519 (tags-table-extend-computed-list))
521 ;; Go to the next table in the list.
522 (setq tags-table-list-pointer (cdr tags-table-list-pointer))
523 (or tags-table-list-pointer
525 (setq tags-table-list-pointer tags-table-computed-list))
527 (if (eq tags-table-list-pointer tags-table-list-started-at)
529 (setq tags-table-list-pointer nil)
530 ;; Set tags-file-name to the name from the list. It is already expanded.
531 (setq tags-file-name (car tags-table-list-pointer))))
537 If optional arg is t, visit the next table in `tags-table-list'.
541 `tags-file-name', `tags-table-list', `tags-table-list-pointer'.
542 Returns t if it visits a tags table, or nil if there are no more in the list."
563 (tags-table-check-computed-list) ;Get it up to date, we might use it.
572 ;; Second, try a user-specified function to guess.
573 (and default-tags-table-function
574 (funcall default-tags-table-function))
587 ;; not already in the current list.
589 (not (tags-table-list-member tags-file-name
590 tags-table-computed-list))
592 ;; Fifth, use the user variable giving the table list.
593 ;; Find the first element of the list that actually exists.
594 (let ((list tags-table-list)
596 (while (and list
597 (setq file (tags-expand-table-name (car list)))
600 (setq list (cdr list)))
601 (car list))
612 (unless (and (eq cont t) (null tags-table-list-pointer))
627 ;; sure tags-table-list includes the chosen table, and
628 ;; update the list pointer variables.
630 ;; Look in the list for the table we chose.
631 (let ((found (tags-table-list-member
633 tags-table-computed-list)))
636 (setq tags-table-list-pointer found
637 tags-table-list-started-at found)
641 (let ((sets tags-table-set-list))
643 (not (tags-table-list-member
650 (or (memq tags-table-list tags-table-set-list)
651 ;; Save the current list.
652 (setq tags-table-set-list
653 (cons tags-table-list
654 tags-table-set-list)))
655 (setq tags-table-list (car sets)))
658 (if (and tags-table-list
662 (concat "Keep current list of "
664 ;; Add it to the current list.
665 (setq tags-table-list (cons local-tags-file-name
666 tags-table-list))
668 ;; Make a fresh list, and store the old one.
669 (message "Starting a new list of tags tables")
670 (or (null tags-table-list)
671 (memq tags-table-list tags-table-set-list)
672 (setq tags-table-set-list
673 (cons tags-table-list
674 tags-table-set-list)))
676 (dolist (table tags-table-list)
677 ;; The list can contain items `t'.
682 (setq tags-table-list (list local-tags-file-name))))
684 ;; Recompute tags-table-computed-list.
685 (tags-table-check-computed-list)
686 ;; Set the tags table list state variables to start
687 ;; over from tags-table-computed-list.
688 (setq tags-table-list-started-at tags-table-computed-list
689 tags-table-list-pointer
690 tags-table-computed-list)))))
716 tags-table-list nil
717 tags-table-computed-list nil
718 tags-table-computed-list-for nil
719 tags-table-list-pointer nil
720 tags-table-list-started-at nil
721 tags-table-set-list nil))
730 (funcall file-of-tag-function relative))
734 "Return a list of files in the current tags table.
740 (funcall tags-table-files-function))))
743 "Return a list of tags tables included by the current table.
746 (setq tags-included-tables (funcall tags-included-tables-function))))
759 ;; Iterate over the current list of tags tables.
762 (setq current-table (funcall tags-completion-table-function))
776 ;; Completion function for tags. Does normal try-completion,
793 (default (funcall (or find-tag-default-function
794 (get major-mode 'find-tag-default-function)
813 (list nil (if (< (prefix-numeric-value current-prefix-arg) 0)
816 (list (if no-default
885 find-tag-regexp-search-function
886 find-tag-search-function)
1037 ;; Internal tag finding function.
1040 ;; any member of the function list ORDER (third arg). If ORDER is nil,
1078 ;; Clear the list of tags matched by the previous search.
1092 ;; Iterate over the list of tags tables.
1102 ;; Iterate over the list of ordering predicates.
1143 tag-info (funcall snarf-tag-function))
1146 (setq goto-func goto-tag-location-function)
1161 tags-compression-info-list
1185 (error "File %s (with or without extensions %s) not found" file tags-compression-info-list)
1206 '((file-of-tag-function . etags-file-of-tag)
1207 (tags-table-files-function . etags-tags-table-files)
1208 (tags-completion-table-function . etags-tags-completion-table)
1209 (snarf-tag-function . etags-snarf-tag)
1210 (goto-tag-location-function . etags-goto-tag-location)
1211 (find-tag-regexp-search-function . re-search-forward)
1214 (find-tag-search-function . search-forward)
1224 (list-tags-function . etags-list-tags)
1225 (tags-apropos-function . etags-tags-apropos)
1226 (tags-included-tables-function . etags-tags-included-tables)
1227 (verify-tags-table-function . etags-verify-tags-table)
1372 (defun etags-list-tags (file)
1378 (goto-func goto-tag-location-function)
1382 (setq tag-info (save-excursion (funcall snarf-tag-function t))
1461 (goto-func goto-tag-location-function)
1462 (tag-info (save-excursion (funcall snarf-tag-function)))
1540 '(tags-table-files-function
1541 tags-completion-table-function
1542 find-tag-regexp-search-function
1543 find-tag-search-function
1544 tags-apropos-function
1545 tags-included-tables-function))
1546 (set (make-local-variable 'verify-tags-table-function)
1598 ;; Look at the comment of the make_tag function in lib-src/etags.c for
1656 beginning of the list of files in the tags table. If the argument is
1657 neither nil nor t, it is evalled to initialize the list of files.
1665 (interactive (list (if current-prefix-arg t)))
1670 ;; Initialize the list from the tags table.
1672 ;; Visit the tags table buffer to get its list of files.
1674 ;; Copy the list so we can setcdr below, and expand the file
1676 (setq next-file-list (mapcar 'expand-file-name (tags-table-files)))
1678 ;; a complete list of referenced file names.
1680 ;; Find the tail of the working list and chain on the new
1682 (let ((tail next-file-list))
1686 ;; list later returned by (tags-table-files).
1689 (setq next-file-list (mapcar 'expand-file-name
1692 ;; Initialize the list by evalling the argument.
1693 (setq next-file-list (eval initialize))))
1694 (unless next-file-list
1699 (let* ((next (car next-file-list))
1702 ;; Advance the list before trying to find the file.
1704 (setq next-file-list (cdr next-file-list))
1811 (defun tags-search (regexp &optional file-list-form)
1825 (tags-loop-continue (or file-list-form t))))
1828 (defun tags-query-replace (from to &optional delimited file-list-form start end)
1844 (tags-loop-continue (or file-list-form t)))
1857 (defun list-tags (file &optional next-match)
1858 "Display list of tags in file FILE.
1859 This searches only the first table in the list, and no included tables.
1862 (interactive (list (completing-read "List tags in file: "
1874 (if (funcall list-tags-function file)
1886 "Display list of all tags in tags table REGEXP matches."
1896 (funcall tags-apropos-function regexp))))
1916 The list of tags tables to select from is stored in `tags-table-set-list';
1917 see the doc of that variable if you want to add names to the list."
1922 (let ((set-list tags-table-set-list)
1925 (when tags-table-list
1928 (princ (mapcar 'abbreviate-file-name tags-table-list) (current-buffer))
1930 'etags-table (car tags-table-list))
1932 (while set-list
1933 (unless (eq (car set-list) tags-table-list)
1935 (princ (mapcar 'abbreviate-file-name (car set-list)) (current-buffer))
1937 'etags-table (car (car set-list)))
1939 (setq set-list (cdr set-list)))
1948 (setq set-list (delete tags-file-name
1949 (apply 'nconc (cons (copy-sequence tags-table-list)
1951 tags-table-set-list)))))
1952 (while set-list
1954 (insert (abbreviate-file-name (car set-list)))
1956 'etags-table (car set-list))
1958 (setq set-list (delete (car set-list) set-list)))
1987 (interactive (list (or (button-at (line-beginning-position))
2000 ;; Note, there is another definition of this function in bindings.el.
2008 (or tags-table-list
2016 (pattern (funcall (or find-tag-default-function
2017 (get major-mode 'find-tag-default-function)
2035 (message "Making completion list...")
2037 (display-completion-list
2040 (message "Making completion list...%s" "done")))))
2053 (add-to-list 'debug-ignored-errors x))