Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Modern Cscope interface for GNU Emacs
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Type||Name||Latest commit message||Commit time|
|Failed to load latest commit information.|
RCscope is Cscope interface for GNU Emacs 25 and up 1. Introduction Cscope (http://cscope.sourceforge.net/) is a powerful and efficient code browsing and cross referencing tool for the C programming language. RCscope is Cscope interface for the GNU Emacs 25 era. Using Cscope, you can easily search for where symbols are used and defined. Cscope 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? RCscope follows GNU Emacs `compilation-mode' and `occur-mode' conventions. Output is displayed in a format similar to `multi-occur'. Query results can be navigated using `next-error'/`previous-error', just like `grep' and `occur' searches. RCscope automatically manages Cscope index files and index updates (using projectile.el and the -R Cscope option), and uses persistent Cscope processes that also support working on remote projects with TRAMP. In addition to standard Cscope queries, RCscope also provides a tree visualization of a function's callers in a format similar to Steve Baker's Tree (http://mama.indstate.edu/users/ice/tree/) directory listing utility. If you need more complete control flow visualization, look at GNU cflow: https://www.gnu.org/software/cflow/ RCscope is based on Robert Jarzmik's rscope: https://github.com/rjarzmik/rscope 2. Requirements RCscope is only tested to work on GNU Emacs version 25. RCscope depends on expand-region (https://github.com/magnars/expand-region.el) and projectile (https://github.com/bbatsov/projectile). 3. Setup The recommended configuration for RCscope is as a hook to `c-mode': (use-package rcscope :hook (c-mode . rcscope-mode)) 4. Usage By default, `rcscope-mode' provides Cscope query commands under the prefix "M-s c" ("M-s" being the default `search-map' binding). The prefix can be customized via `rcscope-keymap-prefix'. For a list of query commands, please consult the definition of `rcscope-prefix-map', or install which-key (https://github.com/justbur/emacs-which-key), a recommended extension that provides minibuffer help for all prefix keymaps. Once a query has been issued, the results buffer behaves similarly to `grep' or `occur' - use `next-error'/`previous-error' to navigate the results from the results or code buffers. In the results buffer, `next-error-follow-minor-mode' is also available. Use `revert-buffer' (by default bound to "g") in the results buffer to update the Cscope index with any changes made to the code.