[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

14 Using cflow with GNU Emacs.

GNU cflow comes with an emacs module providing a major mode for visiting flow charts in GNU Emacs. If you have a working emacs on your machine, the module will be installed somewhere in your Emacs load-path. To load the module at startup, add the following lines to your ‘.emacs’ or ‘site-start.el’ file:

(autoload 'cflow-mode "cflow-mode")
(setq auto-mode-alist (append auto-mode-alist
                              '(("\\.cflow$" . cflow-mode))))

The second statement associates cflow-mode with any file having suffix ‘.cflow’. If you prefer to have another suffix for flow graph files, use it instead. You can also omit this option, if you do not use any special suffix for your graph files. In this case we recommend using ‘--emacs’ command line option. This option generates the first line telling Emacs to use cflow major mode when visiting the file.

The buffer opened in cflow mode is made read-only. The following key bindings are defined:


Temporarily exits from cflow mode and allows you to edit the graph file. To resume cflow mode type <M-x> cflow-mode <RET>. This option is provided mainly for debugging purposes. We do not recommend you to edit chart files, since this will change line numbering and thus prevent cflow mode from correctly tracing line references.


Go to expansion of the current graph vertex. Use this key if the point stands on a line ending with ‘[see N]’ reference. It will bring you directly to the referenced line. Use exchange-point-and-mark (by default <C-x C-x>) to return to the line you examined.


If the point is standing on a recursive function, go to the next recursion. Sets mark.


If the point is standing on a recursive function, return to its definition (a recursion root). Sets mark.


Visit the referenced source file and find the function definition.

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on December 30, 2021 using texi2html 5.0.