auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] Changes to auctex/latex.el,v


From: Ralf Angeli
Subject: [AUCTeX-diffs] Changes to auctex/latex.el,v
Date: Mon, 22 Dec 2008 16:41:57 +0000

CVSROOT:        /cvsroot/auctex
Module name:    auctex
Changes by:     Ralf Angeli <angeli>    08/12/22 16:41:56

Index: latex.el
===================================================================
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.450
retrieving revision 5.451
diff -u -b -r5.450 -r5.451
--- latex.el    14 Oct 2008 18:27:29 -0000      5.450
+++ latex.el    22 Dec 2008 16:41:56 -0000      5.451
@@ -857,6 +857,10 @@
                            "^[ \t]*" TeX-comment-start-regexp "+[ \t]*$"))
     (delete-region (point) (line-end-position)))
   (delete-horizontal-space)
+  ;; Deactivate the mark here in order to prevent `TeX-parse-macro'
+  ;; from swapping point and mark and the \item ending up right after
+  ;; \begin{...}.
+  (TeX-deactivate-mark)
   (LaTeX-insert-item)
   ;; The inserted \item may have outdented the first line to the
   ;; right.  Fill it, if appropriate.
@@ -1104,7 +1108,10 @@
 You may use `LaTeX-item-list' to change the routines used to insert the item."
   (interactive "*")
   (let ((environment (LaTeX-current-environment)))
-    (LaTeX-newline)
+    (when (and (TeX-active-mark)
+              (> (point) (mark)))
+      (exchange-point-and-mark))
+    (unless (bolp) (LaTeX-newline))
     (if (assoc environment LaTeX-item-list)
        (funcall (cdr (assoc environment LaTeX-item-list)))
       (TeX-insert-macro "item"))
@@ -3614,7 +3621,7 @@
 (defcustom LaTeX-math-list nil
   "Alist of your personal LaTeX math symbols.
 
-Each entry should be a list with upto four elements, KEY, VALUE,
+Each entry should be a list with up to four elements, KEY, VALUE,
 MENU and CHARACTER.
 
 KEY is the key (after `LaTeX-math-abbrev-prefix') to be redefined




reply via email to

[Prev in Thread] Current Thread [Next in Thread]