![]() Remedied by typing "C-c s a" and then "M-del" to remove single path element in order to use a cscope database directory of /users/jdoe/sources. Only matches in files in /users/jdoe/sources/proj1 will be found. users/jdoe/sources/proj1 will be used as the cscope data base directory. c file in /users/jdoe/sources/proj1 then (assuming the variable, 'cscope-database-regexps', is not set) For example, consider a project that contains the following cscope database directories: The directory that this module would otherwise use. Setting the variable, 'cscope-initial-directory', is useful when a search is to be expanded by specifying a cscope database directory that is a parent of One use for this variable is when you want to share the database file with other users in thisĬase, the database may be located in a directory separate from the source files. This case, this variable is used to determine the mapping. However, there may be cases where it makes sense to place the cscope databases away from where the source files are kept in Note that the variable, 'cscope-database-regexps', is generally not needed, as the normal hierarchical database search is sufficient for placing and/or There is limited support for cscope databases thatĪre named differently than that given by 'cscope-database-file', using the variable, 'cscope-database-regexps'. By default, the cscope database file isĬalled "cscope.out", but this can be changed (on a global basis) via the variable, 'cscope-database-file'. "cscope.files" exists, the corresponding "cscope.out" will be automatically created by cscope when a search is done. If the root directory is reached, the current directory will be used.Ī 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. is searched until a cscope database directory is found, or the root directory is If the directory is not aĬscope database directory then the directory's parent, parent's parent, etc. Using this variable then a search is begun at the variable, 'cscope-initial-directory', if set, or the current directory otherwise. * Locating the cscope databases: This module will first use the variable, 'cscope-database-regexps', to search for a suitable database directory. Hopefully, the interface should be fairly intuitive. You can then use button 2 (the middle button) on the mouse to edit the selected file, or you can move the text cursor over The cscope database will be automatically created in the same directory as the source files (assuming that you've never used cscope before), and a buffer Just edit a source file, and use the pull-down or pop-up (button 3) menus to select one of: If your files are spread out over multipleĭirectories, see "Advanced usage", below. ![]() * Basic usage: If all of your C/C++/lex/yacc source files are in the same directory, you can just start using this module. (define-key global-map 'cscope-display-buffer-toggle) (define-key global-map 'cscope-display-buffer) (define-key global-map 'cscope-prev-file) (define-key global-map 'cscope-prev-symbol) (define-key global-map 'cscope-next-file) (define-key global-map 'cscope-next-symbol) (define-key global-map 'cscope-find-global-definition)Ĭscope-find-global-definition-no-prompting) (define-key global-map 'cscope-find-this-symbol) (define-key global-map 'cscope-unset-initial-directory) (define-key global-map 'cscope-set-initial-directory) Instead of "cscope:map" makes the keybindings available in all buffers: ForĮxample, the following will add "C-f#" keybindings, which are easier to type than the usual "C-c s" prefixed keybindings. If you intend to use xcscope.el often you can optionally edit your ~/.emacs file to add keybindings that reduce the number of keystrokes required. Edit your ~/.emacs file to add the line:ĥ. ![]() Ensure that the location of xcscope.el is in the xemacs module load pathģ. Ensure that the location of cscope-indexer is located in your pathĢ. (It is, of course, assumed that cscope is already properly installed on the current system.)ġ. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |