Hi,

let's say I have a code snippet that I copy into my LaTeX buffer:

--8<---------------cut here---------------start------------->8---
  query isFemale(m : families::Member) : Boolean {
    not m.familyMother.oclIsUndefined()
    or not m.familyDaughter.oclIsUndefined()
  }
--8<---------------cut here---------------end--------------->8---

Now I activate the mark at the beginning of the first line and move
point to the beginning of the line after the closing brace.  I hit C-c
C-e, choose the lstlisting environment and enter my options.  When
confirming with RET, that's what I end up with.

--8<---------------cut here---------------start------------->8---
\begin{lstlisting}
  query isFemale(m : families::Member) : Boolean {
    not m.familyMother.oclIsUndefined()
    or not
    
m.familyDaughter.oclIsUndefined()[float={h!},language=qvtr,label={lst:qvtr-query-is-female},caption={caption}]
  }
\end{lstlisting}
--8<---------------cut here---------------end--------------->8---

As you can see, the options are misplaced, and the correct thing would
be

--8<---------------cut here---------------start------------->8---
\begin{lstlisting}[float={h!},language=qvtr,label={lst:qvtr-query-is-female},caption={caption}]
  query isFemale(m : families::Member) : Boolean {
    not m.familyMother.oclIsUndefined()
    or not m.familyDaughter.oclIsUndefined()
  }
\end{lstlisting}
--8<---------------cut here---------------end--------------->8---

This feature of environmentalizing a marked region (including the bug)
requires transient-mark-mode.

I use AUCTeX 11.86 with the patch from Ralf
(<[email protected]> on auctex-devel).

Bye,
Tassilo


_______________________________________________
auctex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/auctex

Reply via email to