Speedbar how to add support for custom source files?

I want Speedbar to display contours (a list of variables, functions, and other "interesting" objects). I have in the source files that he has not yet understood. I have code for generating TAGS for the sources in question, where should I look for a hook / configuration for this?

+4
source share
1 answer

You can use the speedbar-add-supported-extension function to add new files that are not set by default in speed.

From speedbar.el :

You must use the "speedbar-add-support-extension" function to add a new extension to or use the configuration dialog to install it in the .emacs file. If you add an extension to this list and it does not appear, you may also need to change the "completion-ignored-extension", which will also help the completion of the file.

In addition to this, you can teach speedbar how to parse tags for this new file using speedbar-fetch-etags-parse-list . For C / C ++ with a .foo file extension, you can do something like this.

 (speedbar-add-supported-extension ".foo") (add-to-list 'speedbar-fetch-etags-parse-list '("\\.foo" . speedbar-parse-c-or-c++tag)) 
+4
source

Source: https://habr.com/ru/post/1441110/


All Articles