# Selecting environment with double click in Emacs+AUCTeX

I want to select whole environment by just double clicking on \begin{environment} or \end{environment}. Maybe someone already did this?

Also how can I change definition of a word that double clicking on \command selects not only word 'command' but also a slash in front of it, however I don't want to select subsequent slash if it exists.

-
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces or enclose words in backticks , they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). –  Guido Nov 16 '12 at 12:37
While it exists, mouse support in emacs isn't a key feature : most users try to avoid it as much as possible (or have no choice when using emacs without a graphical session), and some "powerusers" tend to despise mouse users. That being said, this behavior is certainly achievable, but it may be hard to find someone willing to work on it. What do you exactly want to achieve by selecting a whole environment or a command less its backslash? Maybe we can find workarounds. –  T. Verron Nov 16 '12 at 18:35
Could you post a small example of what you wish to accomplish by changing the definition of a word 'command' without the backslash? –  Ricardo Nov 16 '12 at 19:31

The keyboard shortcut for environment selection in AUCTeX is C-c . with the point within the environment you wish to select.
For your proposed example, you would first mark the region that contains your float with C-c .; then you would kill the marked region with C-w, move the point to the new best place for your float and yank it with C-y`. AUCTeX outline mode might come in handy if you are working with larger projects.