next up previous contents
Next: Tags with vi Up: Using Tags Previous: Using Tags   Contents

Tags with Emacs

The command gmake TAGS will create a database for a routine reference table to be used within Emacs. This database can be accessed within Emacs if you add either of the following lines to your .emacs file:
(setq tags-file-name "CACTUS_HOME/TAGS") XOR
(setq tag-table-alist '(("CACTUS_HOME" . "CACTUS_HOME/TAGS")))
where CACTUS_HOME is your Cactus directory.

You can now easily navigate your Cactus flesh and Toolkits by searching for functions or ``tags'':

  1. Alt. will find a tag
  2. Alt, will find the next matching tag
  3. Alt* will go back to the last matched tag
If you add the following lines to your .emacs file, the files found with tags will opened in read-only mode:
(defun find-tag-readonly (&rest a)
  (interactive)
  (call-interactively `find-tag a)
  (if (eq nil buffer-read-only) (setq buffer-read-only t))  )

(defun find-tag-readonly-next (&rest a)
  (interactive)
  (call-interactively `tags-loop-continue a)
  (if (eq nil buffer-read-only) (setq buffer-read-only t))  )

(global-set-key [(control meta \.)] 'find-tag-readonly)
(global-set-key [(control meta \,)] 'find-tag-readonly-next)
The key strokes to use when you want to browse in read-only mode are:
  1. CTRL Alt. will find a tag and open the file in read-only mode
  2. CTRL Alt, will find the next matching tag in read-only mode


next up previous contents
Next: Tags with vi Up: Using Tags Previous: Using Tags   Contents