This question in inspired by https://stackoverflow.com/q/605785/.
By M-x describe-function <TAB> I can get a list of all
interactive or nonintractive functions available in the current state
of emacs.
If an specific mode is activated (e.g. latex-mode) we get a longer
list, as the functions available in latex-mode are also listed.

My question is how to obtain a list of all functions exclusively available in an
specific mode (e.g. latex-mode)? In other words excluding all other
functions not provided by that mode. Like in the above link providing a short description of the functions would also be handy.

4 Answers
4

What does it mean for a mode to provide a function? You say "a list of all functions exclusively available in an specific mode" and "excluding all other functions not provided by that mode".

It sounds like you are confusing a mode with the library that defines it. A library provides/defines functions. A mode generally does not do so.

If you want to get a list of all of the functions defined in a given library, then see @wvxvw's answer, for a start. You can also try matching the library prefix against function names - that is often pertinent, but it is by no means definitive.

If, however, you want to get a list of all of the functions that might be pertinent to a given mode, e.g., functions that can be used only, or are most useful, when that mode is turned on, then I'm afraid you will need to examine the library where the mode is defined. And you might even need to examine some other libraries.

A given library typically defines more than just some things that are pertinent to a given mode. And a given mode can very well make use of things that are defined in different libraries, and in some cases things that make sense only for that given mode or a set of modes that includes it.

In sum, as currently posed, your question is not very clear. You might help yourself to better answers by clarifying it.

You are right, the question should be more precise. For example for latex I mean all functions defined in the .el files contained in the folder site-lisp>auctex. For org-mode I mean all functions defined in the .el files contained in the folder site-lisp>org. For many modes the situation is more straightforward as for them there is only one .el file. I hope these explanations make the motive of my question clear now.
– NameJul 24 '15 at 19:35

The problem

Due to non-deterministic nature of code parsing and loading several issues need to be addressed:

When is the function defined in a file? Functions can be defined conditionally, and predicting whether a condition will favor function definition or not is equivalent to solving the halting problem. To illustrate this, suppose this code:

(if (> (random 100) 50)
(defun foo ())
(defun bar ()))

It is not generally possible to tell, whether a lisp form defined a function before (successfully) evaluating the form. This is, again, equivalent to halting problem, so, not solvable in general.

There are some common special cases such as aliasing and advising, which (a) create duplicates, (b) may misguide you as to the source file which declared the function.

Large fraction of functions are declared in C code (not necessarily accessible), which isn't really divided into libraries in the same sense that Emacs Lisp code is.

All this said, you probably want to look into find-func.el for inspiration, to get the general idea of the layout and the problems related to locating the source code for Emacs Lisp functions.

Let me report this: when running this code I get the error Symbol's function definition is void: find-library-name. The is also a small typo symobols-->symbols.
– NameJul 24 '15 at 19:14

@Name hm... but this function is very old (I find it mentioned in source code in 2002). Could you try (require 'find-func) before running this code. Thanks for the typo found. I'll correct that.
– wvxvwJul 24 '15 at 20:04

Thanks, It would be great if the name of library can be given by regular expressions.
– NameJul 24 '15 at 20:53

I have no experience running CEDET on Windows. The command should work fine on GNU/Linux for 24.5.2 and 25 though.
– abo-aboJul 24 '15 at 13:09

Your answer speaks of "commands", but the OP question is about functions, not just commands. If you really mean functions then you might want to correct the text. If you mean only commands then this post does not really answer the question yet, in which case you might want to correct it (e.g. change the code or whatever).
– DrewJul 24 '15 at 17:18