⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xcscope.el

📁 tvapp用于播放tv程序
💻 EL
📖 第 1 页 / 共 3 页
字号:
;;;;    Once this has been done, you can then use the menu picks;;    (described in "Basic usage", above) to search for symbols.;;;;    Note, however, that, if you add or delete source files, you'll;;    have to either rebuild the database using the above procedure,;;    or edit the file, "cscope.files" to add/delete the names of the;;    source files.  To edit this file, you can use the menu pick,;;    "Cscope/Edit list of files to index".;;;;;; 2. If most of the files exist below a common directory, but a few;;    are outside, you can use the menu pick, "Cscope/Create list of;;    files to index", and specify the top-level directory.  Make sure;;    that "Cscope/Index recursively", is checked before you do so,;;    though.  You can then edit the list of files to index using the;;    menu pick, "Cscope/Edit list of files to index".  Just edit the;;    list to include any additional source files not already listed.;;;;    Once you've created, edited, and saved the list, you can then;;    use the menu picks described under "Basic usage", above, to;;    search for symbols.  The first time you search, you will have to;;    wait a while for cscope to fully index the source files, though.;;    If you have a lot of source files, you may want to manually run;;    cscope to build the database:;;;;            cd top-level-directory    # or wherever;;            rm -f cscope.out          # not always necessary;;            cscope -b;;;;;; 3. If the source files are scattered in many different, unrelated;;    places, you'll have to manually create cscope.files and put a;;    list of all pathnames into it.  Then build the database using:;;;;            cd some-directory         # wherever cscope.files exists;;            rm -f cscope.out          # not always necessary;;            cscope -b;;;;    Next, read the documentation for the variable,;;    "cscope-database-regexps", and set it appropriately, such that;;    the above-created cscope database will be referenced when you;;    edit a related source file.;;;;    Once this has been done, you can then use the menu picks;;    described under "Basic usage", above, to search for symbols.;;;;;; * Interesting configuration variables:;;;; "cscope-truncate-lines";;      This is the value of `truncate-lines' to use in cscope;;      buffers; the default is the current setting of;;      `truncate-lines'.  This variable exists because it can be;;      easier to read cscope buffers with truncated lines, while;;      other buffers do not have truncated lines.;;;; "cscope-use-relative-paths";;      If non-nil, use relative paths when creating the list of files;;      to index.  The path is relative to the directory in which the;;      cscope database will be created.  If nil, absolute paths will;;      be used.  Absolute paths are good if you plan on moving the;;      database to some other directory (if you do so, you'll;;      probably also have to modify `cscope-database-regexps').;;      Absolute paths may also be good if you share the database file;;      with other users (you'll probably want to specify some;;      automounted network path for this).;;;; "cscope-index-recursively";;      If non-nil, index files in the current directory and all;;      subdirectories.  If nil, only files in the current directory;;      are indexed.  This variable is only used when creating the;;      list of files to index, or when creating the list of files and;;      the corresponding cscope database.;;;; "cscope-name-line-width";;      The width of the combined "function name:line number" field in;;      the cscope results buffer.  If negative, the field is;;      left-justified.;;;; "cscope-do-not-update-database";;      If non-nil, never check and/or update the cscope database when;;      searching.  Beware of setting this to non-nil, as this will;;      disable automatic database creation, updating, and;;      maintenance.;;;; "cscope-display-cscope-buffer" ;;      If non-nil, display the *cscope* buffer after each search;;      (default).  This variable can be set in order to reduce the;;      number of keystrokes required to navigate through the matches.;;;; "cscope-database-regexps";; 	List to force directory-to-cscope-database mappings.;; 	This is a list of `(REGEXP DBLIST [ DBLIST ... ])', where:;;;; 	REGEXP is a regular expression matched against the current buffer's;; 	current directory.  The current buffer is typically some source file,;; 	and you're probably searching for some symbol in or related to this;; 	file.  Basically, this regexp is used to relate the current directory;; 	to a cscope database.  You need to start REGEXP with "^" if you want;; 	to match from the beginning of the current directory.;;;; 	DBLIST is a list that contains one or more of:;;;; 	    ( DBDIR );; 	    ( DBDIR ( OPTIONS ) );; 	    ( t );; 	    t;;;; 	Here, DBDIR is a directory (or a file) that contains a cscope;; 	database.  If DBDIR is a directory, then it is expected that the;; 	cscope database, if present, has the filename given by the variable,;; 	`cscope-database-file'; if DBDIR is a file, then DBDIR is the path;; 	name to a cscope database file (which does not have to be the same as;; 	that given by `cscope-database-file').  If only DBDIR is specified,;; 	then that cscope database will be searched without any additional;; 	cscope command-line options.  If OPTIONS is given, then OPTIONS is a;; 	list of strings, where each string is a separate cscope command-line;; 	option.;;;; 	In the case of "( t )", this specifies that the search is to use the;; 	normal hierarchical database search.  This option is used to;; 	explicitly search using the hierarchical database search either before;; 	or after other cscope database directories.;;;; 	If "t" is specified (not inside a list), this tells the searching;; 	mechanism to stop searching if a match has been found (at the point;; 	where "t" is encountered).  This is useful for those projects that;; 	consist of many subprojects.  You can specify the most-used;; 	subprojects first, followed by a "t", and then followed by a master;; 	cscope database directory that covers all subprojects.  This will;; 	cause the most-used subprojects to be searched first (hopefully;; 	quickly), and the search will then stop if a match was found.  If not,;; 	the search will continue using the master cscope database directory.;;;; 	Here, `cscope-database-regexps' is generally not used, as the normal;; 	hierarchical database search is sufficient for placing and/or locating;; 	the cscope databases.  However, there may be cases where it makes;; 	sense to place the cscope databases away from where the source files;; 	are kept; in this case, this variable is used to determine the;; 	mapping.;;;; 	This module searches for the cscope databases by first using this;; 	variable; if a database location cannot be found using this variable,;; 	then the current directory is searched, then the parent, then the;; 	parent's parent, until a cscope database directory is found, or the;; 	root directory is reached.  If the root directory is reached, the;; 	current directory will be used.;;;; 	A cscope database directory is one in which EITHER a cscope database;; 	file (e.g., "cscope.out") OR a cscope file list (e.g.,;; 	"cscope.files") exists.  If only "cscope.files" exists, the;; 	corresponding "cscope.out" will be automatically created by cscope;; 	when a search is done.  By default, the cscope database file is called;; 	"cscope.out", but this can be changed (on a global basis) via the;; 	variable, `cscope-database-file'.  There is limited support for cscope;; 	databases that are named differently than that given by;; 	`cscope-database-file', using the variable, `cscope-database-regexps'.;;;; 	Here is an example of `cscope-database-regexps':;;;;		(setq cscope-database-regexps;;		      '(;;			( "^/users/jdoe/sources/proj1";;			  ( t );;			  ( "/users/jdoe/sources/proj2");;			  ( "/users/jdoe/sources/proj3/mycscope.out");;			  ( "/users/jdoe/sources/proj4");;			  t;;			  ( "/some/master/directory" ("-d" "-I/usr/local/include") );;			  );;			( "^/users/jdoe/sources/gnome/";;			  ( "/master/gnome/database" ("-d") );;			  );;			));;;; 	If the current buffer's directory matches the regexp,;; 	"^/users/jdoe/sources/proj1", then the following search will be;; 	done:;;;; 	    1. First, the normal hierarchical database search will be used to;;	       locate a cscope database.;;;; 	    2. Next, searches will be done using the cscope database;;	       directories, "/users/jdoe/sources/proj2",;;	       "/users/jdoe/sources/proj3/mycscope.out", and;;	       "/users/jdoe/sources/proj4".  Note that, instead of the file,;;	       "cscope.out", the file, "mycscope.out", will be used in the;;	       directory "/users/jdoe/sources/proj3".;;;; 	    3. If a match was found, searching will stop.;;;; 	    4. If a match was not found, searching will be done using;;	       "/some/master/directory", and the command-line options "-d";;	       and "-I/usr/local/include" will be passed to cscope.;;;; 	If the current buffer's directory matches the regexp,;; 	"^/users/jdoe/sources/gnome", then the following search will be;; 	done:;;;; 	    The search will be done only using the directory,;; 	    "/master/gnome/database".  The "-d" option will be passed to;; 	    cscope.;;;; 	If the current buffer's directory does not match any of the above;; 	regexps, then only the normal hierarchical database search will be;; 	done.;;;;;; * Other notes:;;;; 1. The script, "cscope-indexer", uses a sed command to determine;;    what is and is not a C/C++/lex/yacc source file.  It's idea of a;;    source file may not correspond to yours.;;;; 2. This module is called, "xcscope", because someone else has;;    already written a "cscope.el" (although it's quite old).;;;;;; * KNOWN BUGS:;;;; 1. Cannot handle whitespace in directory or file names.;;;; 2. By default, colored faces are used to display results.  If you happen;;    to use a black background, part of the results may be invisible;;    (because the foreground color may be black, too).  There are at least;;    two solutions for this:;;;;    2a. Turn off colored faces, by setting `cscope-use-face' to `nil',;;        e.g.:;;;;            (setq cscope-use-face nil);;;;    2b. Explicitly set colors for the faces used by cscope.  The faces;;        are:;;;;            cscope-file-face;;            cscope-function-face;;            cscope-line-number-face;;            cscope-line-face;;            cscope-mouse-face;;;;        The face most likely to cause problems (e.g., black-on-black;;        color) is `cscope-line-face'.;;;; 3. The support for cscope databases different from that specified by;;    `cscope-database-file' is quirky.  If the file does not exist, it;;    will not be auto-created (unlike files names by;;    `cscope-database-file').  You can manually force the file to be;;    created by using touch(1) to create a zero-length file; the;;    database will be created the next time a search is done.;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;(require 'easymenu)(defgroup cscope nil  "Cscope interface for (X)Emacs.Using cscope, you can easily search for where symbols are used and defined.It is designed to answer questions like:        Where is this variable used?        What is the value of this preprocessor symbol?        Where is this function in the source files?        What functions call this function?        What functions are called by this function?        Where does the message \"out of space\" come from?        Where is this source file in the directory structure?        What files include this header file?"  :prefix "cscope-"  :group 'tools)(defcustom cscope-do-not-update-database nil  "*If non-nil, never check and/or update the cscope database when searching.Beware of setting this to non-nil, as this will disable automatic databasecreation, updating, and maintenance."  :type 'boolean  :group 'cscope)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -