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

2013-04-02 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn tsdh 13/04/02 07:22:30

Index: latex.el
===
RCS file: /sources/auctex/auctex/latex.el,v
retrieving revision 5.492
retrieving revision 5.493
diff -u -b -r5.492 -r5.493
--- latex.el28 Mar 2013 10:14:46 -  5.492
+++ latex.el2 Apr 2013 07:22:29 -   5.493
@@ -1737,7 +1737,15 @@
 (defun TeX-arg-document (optional optional ignore)
   Insert arguments to documentclass.
 OPTIONAL and IGNORE are ignored.
-  (let ((style (completing-read
+  (let* ((TeX-file-extensions '(cls))
+(search (if (eq TeX-arg-input-file-search 'ask)
+(not (y-or-n-p Find class yourself? ))
+  TeX-arg-input-file-search))
+(LaTeX-style-list
+ (if search
+ (mapcar 'identity (TeX-search-files-by-type 'texinputs 'global t 
t))
+   LaTeX-style-list))
+(style (completing-read
(concat Document class: (default  LaTeX-default-style ) )
LaTeX-style-list))
(options (read-string Options: 

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2013-03-07 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn tsdh 13/03/07 09:21:40

Index: latex.el
===
RCS file: /sources/auctex/auctex/latex.el,v
retrieving revision 5.489
retrieving revision 5.490
diff -u -b -r5.489 -r5.490
--- latex.el6 Mar 2013 11:56:10 -   5.489
+++ latex.el7 Mar 2013 09:21:40 -   5.490
@@ -2121,6 +2121,19 @@
   TeX-left-right-braces)))
(indent-according-to-mode)
 
+(defun TeX-read-key-val (optional key-val-alist)
+  Prompt for keys and values in KEY-VAL-ALIST and return them.
+If OPTIONAL is non-nil, indicate in the prompt that we are
+reading an optional argument.  KEY-VAL-ALIST is an alist.  The
+car of each element should be a string representing a key and the
+optional cdr should be a list with strings to be used as values
+for the key.
+  (multi-prompt-key-value
+   (TeX-argument-prompt optional Options (k=v) nil)
+   (if (symbolp key-val-alist)
+   (eval key-val-alist)
+ key-val-alist)))
+
 (defun TeX-arg-key-val (optional key-val-alist)
   Prompt for keys and values in KEY-VAL-ALIST.
 Insert the given value as a TeX macro argument.  If OPTIONAL is
@@ -2128,11 +2141,7 @@
 alist.  The car of each element should be a string representing a
 key and the optional cdr should be a list with strings to be used
 as values for the key.
-  (let ((options (multi-prompt-key-value
- (TeX-argument-prompt optional Options (k=v) nil)
- (if (symbolp key-val-alist)
- (eval key-val-alist)
-   key-val-alist
+  (let ((options (TeX-read-key-val optional key-val-alist)))
 (TeX-argument-insert options optional)))
 
 

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2013-03-04 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn tsdh 13/03/04 09:26:51

Index: latex.el
===
RCS file: /sources/auctex/auctex/latex.el,v
retrieving revision 5.487
retrieving revision 5.488
diff -u -b -r5.487 -r5.488
--- latex.el25 Feb 2013 11:24:50 -  5.487
+++ latex.el4 Mar 2013 09:26:50 -   5.488
@@ -1980,6 +1980,18 @@
nil t)
optional))
 
+(defun TeX-arg-date (optional optional prompt)
+  Prompt for a date, defaulting to the current date.
+If OPTIONAL is non-nil, insert the resulting value as an optional
+argument, otherwise as a mandatory one.  Use PROMPT as the prompt
+string.
+  (let ((default (format-time-string %Y/%m/%d (current-time
+(TeX-argument-insert
+ (TeX-read-string (TeX-argument-prompt
+  optional prompt (format Date (default %s) default))
+ nil nil default)
+ optional)))
+
 (defun TeX-arg-pagestyle (optional optional prompt definition)
   Prompt for a LaTeX pagestyle with completion.
 If OPTIONAL is non-nil, insert the resulting value as an optional
@@ -5461,7 +5473,7 @@
'(breve t) '(check t) '(hat t) '(vec t) '(dot t)
'(widetilde t) '(widehat t)
'(author t)
-   '(date t)
+   '(date TeX-arg-date)
'(thanks t)
'(title t)
'(pagenumbering (TeX-arg-eval

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2013-02-25 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn tsdh 13/02/25 11:24:50

Index: latex.el
===
RCS file: /sources/auctex/auctex/latex.el,v
retrieving revision 5.486
retrieving revision 5.487
diff -u -b -r5.486 -r5.487
--- latex.el20 Feb 2013 20:07:01 -  5.486
+++ latex.el25 Feb 2013 11:24:50 -  5.487
@@ -3736,7 +3736,7 @@
   '([ ] ; display math
 appendix begin caption chapter end include includeonly
 label maketitle noindent par paragraph part section
-subsection subsubsection tableofcontents)
+subsection subsubsection tableofcontents newpage clearpage)
   Internal list of LaTeX macros that should have their own line.)
 
 (defun LaTeX-paragraph-commands-regexp-make ()

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2013-02-18 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn tsdh 13/02/18 10:57:49

Index: latex.el
===
RCS file: /sources/auctex/auctex/latex.el,v
retrieving revision 5.484
retrieving revision 5.485
diff -u -b -r5.484 -r5.485
--- latex.el12 Feb 2013 07:54:39 -  5.484
+++ latex.el18 Feb 2013 10:57:49 -  5.485
@@ -1804,6 +1804,7 @@
 (graphics ${TEXINPUTS} (tex/) LaTeX-includegraphics-extensions)
 (bibinputs ${BIBINPUTS} (bibtex/bib/) BibTeX-file-extensions)
 (bstinputs ${BSTINPUTS} (bibtex/bst/) BibTeX-style-extensions)
+(bbxinputs  (tex/latex/) BibLaTeX-style-extensions)
 (biberinputs ${BIBINPUTS} (bibtex/bib/) TeX-Biber-file-extensions))
   Alist of filetypes with locations and file extensions.
 Each element of the alist consists of a symbol expressing the
@@ -1885,6 +1886,12 @@
 Initialized once at the first time you prompt for an input file.
 May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.)
 
+(defvar BibLaTeX-global-style-files nil
+  Association list of BibLaTeX style files.
+
+Initialized once at the first time you prompt for a BibLaTeX
+style.  May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.)
+
 (defun TeX-arg-bibstyle (optional optional prompt)
   Prompt for a BibTeX style file.
 If OPTIONAL is non-nil, insert the resulting value as an optional

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2013-01-28 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn tsdh 13/01/28 08:35:44

Index: latex.el
===
RCS file: /sources/auctex/auctex/latex.el,v
retrieving revision 5.481
retrieving revision 5.482
diff -u -b -r5.481 -r5.482
--- latex.el17 Jan 2013 07:20:42 -  5.481
+++ latex.el28 Jan 2013 08:35:44 -  5.482
@@ -48,8 +48,8 @@
   :type 'string)
 
 (defcustom LaTeX-default-options nil
-  Default options to documentstyle.
-A list of strings.
+  Default options to documentclass.
+A comma-seperated list of strings.
   :group 'LaTeX-environment
   :type '(repeat (string :format %v)))
 
@@ -1215,6 +1215,10 @@
   '((newlength *{?\\([A-Za-z]+\\)}? 1 LaTeX-auto-length))
   List of regular expressions matching LaTeX lengths only.)
 
+(defvar LaTeX-auto-savebox-regexp-list
+  '((newsavebox *{?\\([A-Za-z]+\\)}? 1 LaTeX-auto-savebox))
+  List of regular expressions matching LaTeX saveboxes only.)
+
 (defvar LaTeX-auto-regexp-list
   (append
(let ((token TeX-token-char))
@@ -1251,7 +1255,8 @@
LaTeX-auto-minimal-regexp-list
LaTeX-auto-pagestyle-regexp-list
LaTeX-auto-counter-regexp-list
-   LaTeX-auto-length-regexp-list)
+   LaTeX-auto-length-regexp-list
+   LaTeX-auto-savebox-regexp-list)
   List of regular expression matching common LaTeX macro definitions.)
 
 (defun LaTeX-split-bibs (match)
@@ -1441,6 +1446,7 @@
 (TeX-auto-add-type pagestyle LaTeX)
 (TeX-auto-add-type counter LaTeX)
 (TeX-auto-add-type length LaTeX)
+(TeX-auto-add-type savebox LaTeX saveboxes)
 
 (fset 'LaTeX-add-bibliographies-auto
   (symbol-function 'LaTeX-add-bibliographies))
@@ -1608,18 +1614,19 @@
(LaTeX-add-counters counter))
 (TeX-argument-insert counter optional)))
 
-;; Why is DEFINITION unused?
 (defun TeX-arg-savebox (optional optional prompt definition)
   Prompt for a LaTeX savebox.
 If OPTIONAL is non-nil, insert the resulting value as an optional
 argument, otherwise as a mandatory one.  Use PROMPT as the prompt
-string.  DEFINITION is unused.
-  ;; Completion not implemented yet.
-  (TeX-argument-insert
-   (read-string (TeX-argument-prompt optional prompt
-(concat Savebox:  TeX-esc)
-t))
-   optional TeX-esc))
+string.  If definition is non-nil, the savebox is added to the
+list of defined saveboxes.
+  (let ((savebox (completing-read (TeX-argument-prompt optional prompt
+  (concat Savebox: 
+  TeX-esc) t)
+   (LaTeX-savebox-list
+(if (and definition (not (zerop (length savebox
+(LaTeX-add-saveboxes savebox))
+(TeX-argument-insert savebox optional TeX-esc)))
 
 (defun TeX-arg-length (optional optional prompt initial-input definition)
   Prompt for a LaTeX length.
@@ -5512,7 +5519,8 @@
hfil hfill vfil vfill hrulefill dotfill
indent noindent today
appendix
-   dots)
+   dots
+   makeatletter makeatother jobname)
 
   (when (string-equal LaTeX-version 2e)
 (LaTeX-add-environments

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2013-01-28 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn tsdh 13/01/29 07:37:51

Index: latex.el
===
RCS file: /sources/auctex/auctex/latex.el,v
retrieving revision 5.482
retrieving revision 5.483
diff -u -b -r5.482 -r5.483
--- latex.el28 Jan 2013 08:35:44 -  5.482
+++ latex.el29 Jan 2013 07:37:50 -  5.483
@@ -1100,8 +1100,8 @@
 (defun LaTeX-env-contents (environment)
   Insert ENVIRONMENT with filename for contents.
   (save-excursion
-(when (re-search-backward ^documentclass.*{ nil t)
-  (error Put %s environment before \\documentclass environment)))
+(when (re-search-backward LaTeX-header-end nil t)
+  (error Put %s environment before \\begin{document} environment)))
   (LaTeX-insert-environment environment
(concat TeX-grop
(read-string File: )

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2013-01-16 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn tsdh 13/01/17 07:20:42

Index: latex.el
===
RCS file: /sources/auctex/auctex/latex.el,v
retrieving revision 5.480
retrieving revision 5.481
diff -u -b -r5.480 -r5.481
--- latex.el15 Jan 2013 07:39:46 -  5.480
+++ latex.el17 Jan 2013 07:20:42 -  5.481
@@ -1211,6 +1211,10 @@
 (@definecounter{\\([A-Za-z]+\\)} 1 LaTeX-auto-counter))
   List of regular expressions matching LaTeX counters only.)
 
+(defvar LaTeX-auto-length-regexp-list
+  '((newlength *{?\\([A-Za-z]+\\)}? 1 LaTeX-auto-length))
+  List of regular expressions matching LaTeX lengths only.)
+
 (defvar LaTeX-auto-regexp-list
   (append
(let ((token TeX-token-char))
@@ -1246,7 +1250,8 @@
LaTeX-auto-index-regexp-list
LaTeX-auto-minimal-regexp-list
LaTeX-auto-pagestyle-regexp-list
-   LaTeX-auto-counter-regexp-list)
+   LaTeX-auto-counter-regexp-list
+   LaTeX-auto-length-regexp-list)
   List of regular expression matching common LaTeX macro definitions.)
 
 (defun LaTeX-split-bibs (match)
@@ -1435,6 +1440,7 @@
 (TeX-auto-add-type index-entry LaTeX index-entries)
 (TeX-auto-add-type pagestyle LaTeX)
 (TeX-auto-add-type counter LaTeX)
+(TeX-auto-add-type length LaTeX)
 
 (fset 'LaTeX-add-bibliographies-auto
   (symbol-function 'LaTeX-add-bibliographies))
@@ -1615,6 +1621,30 @@
 t))
optional TeX-esc))
 
+(defun TeX-arg-length (optional optional prompt initial-input definition)
+  Prompt for a LaTeX length.
+If OPTIONAL is non-nil, insert the resulting value as an optional
+argument, otherwise as a mandatory one.  Use PROMPT as the prompt
+string.  If INITIAL-INPUT is non-nil, insert it in the minibuffer
+initially, with point positioned at the end.  If DEFINITION is
+non-nil, the length is added to the list of defined length.
+  (let ((length (completing-read (TeX-argument-prompt optional prompt Length)
+;; A valid length can be a macro or a length of
+;; the form valuedimension.  Input starting
+;; with a `\' can be completed with length
+;; macros.
+(mapcar (lambda(elt) (concat TeX-esc (car 
elt)))
+(LaTeX-length-list))
+;; Some macros takes as argument only a length
+;; macro (e.g., `\setlength' in its first
+;; argument, and `\newlength'), in this case is
+;; convenient to set `\\' as initial input.
+nil nil initial-input)))
+(if (and definition (not (zerop (length length
+   ;; Strip leading TeX-esc from macro name
+(LaTeX-add-lengths (substring length 1)))
+(TeX-argument-insert length optional)))
+
 (defun TeX-arg-file (optional optional prompt)
   Prompt for a filename in the current directory.
 If OPTIONAL is non-nil, insert the resulting value as an optional
@@ -1667,6 +1697,13 @@
 string.
   (TeX-arg-savebox optional prompt t))
 
+(defun TeX-arg-define-length (optional optional prompt)
+  Prompt for a LaTeX length.
+If OPTIONAL is non-nil, insert the resulting value as an optional
+argument, otherwise as a mandatory one.  Use PROMPT as the prompt
+string.
+  (TeX-arg-length optional prompt \\ t))
+
 (defcustom LaTeX-style-list '((amsart)
  (amsbook)
  (article)
@@ -5280,6 +5317,12 @@
   (LaTeX-add-counters page equation enumi enumii enumiii
  enumiv footnote mpfootnote)
 
+  (LaTeX-add-lengths baselineskip baselinestretch columnsep
+columnwidth evensidemargin linewidth oddsidemargin
+paperwidth paperheight parindent parskip
+tabcolsep textheight textwidth topmargin
+unitlength)
+
   (TeX-add-symbols
'(addtocounter TeX-arg-counter Value)
'(alph TeX-arg-counter)
@@ -5373,12 +5416,14 @@
  t)
'(footnotemark
  (TeX-arg-conditional TeX-arg-footnote-number-p ([ Number ]) nil))
-   '(newlength TeX-arg-define-macro)
-   '(setlength TeX-arg-macro Length)
-   '(addtolength TeX-arg-macro Length)
-   '(settowidth TeX-arg-macro t)
-   '(settoheight TeX-arg-macro t)
-   '(settodepth TeX-arg-macro t)
+   '(newlength (TeX-arg-define-length Length macro))
+   '(setlength (TeX-arg-length Length macro \\)
+ (TeX-arg-length Length value))
+   '(addtolength (TeX-arg-length Length macro \\)
+ (TeX-arg-length Length to add))
+   '(settowidth (TeX-arg-length Length macro \\) Text)
+   '(settoheight (TeX-arg-length Length macro \\) Text)
+   '(settodepth (TeX-arg-length Length macro \\) Text)
'(\\ [ Space ])
'(\\* [ Space ])
'(hyphenation t)
@@ -5410,10 

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

2013-01-14 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn tsdh 13/01/14 07:41:29

Index: latex.el
===
RCS file: /sources/auctex/auctex/latex.el,v
retrieving revision 5.478
retrieving revision 5.479
diff -u -b -r5.478 -r5.479
--- latex.el13 Jan 2013 19:24:10 -  5.478
+++ latex.el14 Jan 2013 07:41:28 -  5.479
@@ -1563,7 +1563,7 @@
 the list of defined environments.
   (let ((environment (completing-read (TeX-argument-prompt optional prompt
   Environment)
- (TeX-symbol-list
+ (LaTeX-environment-list
 (if (and definition (not (string-equal  environment)))
(LaTeX-add-environments environment))
 

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2013-01-14 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn tsdh 13/01/15 07:40:21

Index: latex.el
===
RCS file: /sources/auctex/auctex/latex.el,v
retrieving revision 5.479
retrieving revision 5.480
diff -u -b -r5.479 -r5.480
--- latex.el14 Jan 2013 07:41:28 -  5.479
+++ latex.el15 Jan 2013 07:39:46 -  5.480
@@ -1204,7 +1204,12 @@
 
 (defvar LaTeX-auto-pagestyle-regexp-list
   '((ps@\\([A-Za-z]+\\) 1 LaTeX-auto-pagestyle))
-  List of regular expression matching LaTeX pagestyle only.)
+  List of regular expressions matching LaTeX pagestyles only.)
+
+(defvar LaTeX-auto-counter-regexp-list
+  '((newcounter *{\\([A-Za-z]+\\)} 1 LaTeX-auto-counter)
+(@definecounter{\\([A-Za-z]+\\)} 1 LaTeX-auto-counter))
+  List of regular expressions matching LaTeX counters only.)
 
 (defvar LaTeX-auto-regexp-list
   (append
@@ -1240,7 +1245,8 @@
LaTeX-auto-label-regexp-list
LaTeX-auto-index-regexp-list
LaTeX-auto-minimal-regexp-list
-   LaTeX-auto-pagestyle-regexp-list)
+   LaTeX-auto-pagestyle-regexp-list
+   LaTeX-auto-counter-regexp-list)
   List of regular expression matching common LaTeX macro definitions.)
 
 (defun LaTeX-split-bibs (match)
@@ -1428,6 +1434,7 @@
 (TeX-auto-add-type bibliography LaTeX bibliographies)
 (TeX-auto-add-type index-entry LaTeX index-entries)
 (TeX-auto-add-type pagestyle LaTeX)
+(TeX-auto-add-type counter LaTeX)
 
 (fset 'LaTeX-add-bibliographies-auto
   (symbol-function 'LaTeX-add-bibliographies))
@@ -1582,16 +1589,18 @@
 (apply 'LaTeX-add-bibitems items)
 (TeX-argument-insert (mapconcat 'identity items ,) optional optional)))
 
-;; Why is DEFINITION unused?
 (defun TeX-arg-counter (optional optional prompt definition)
   Prompt for a LaTeX counter.
 If OPTIONAL is non-nil, insert the resulting value as an optional
 argument, otherwise as a mandatory one.  Use PROMPT as the prompt
-string.  DEFINITION is unused.
-  ;; Completion not implemented yet.
-  (TeX-argument-insert
-   (read-string (TeX-argument-prompt optional prompt Counter))
-   optional))
+string.  If DEFINITION is non-nil, add the chosen counter to
+the list of defined counters.
+  (let ((counter (completing-read (TeX-argument-prompt optional prompt
+  Counter)
+ (LaTeX-counter-list
+(if (and definition (not (string-equal  counter)))
+   (LaTeX-add-counters counter))
+(TeX-argument-insert counter optional)))
 
 ;; Why is DEFINITION unused?
 (defun TeX-arg-savebox (optional optional prompt definition)
@@ -1918,15 +1927,18 @@
nil t)
optional))
 
-(defun TeX-arg-pagestyle (optional optional prompt)
+(defun TeX-arg-pagestyle (optional optional prompt definition)
   Prompt for a LaTeX pagestyle with completion.
 If OPTIONAL is non-nil, insert the resulting value as an optional
 argument, otherwise as a mandatory one.  Use PROMPT as the prompt
-string.
-  (TeX-argument-insert
-   (completing-read (TeX-argument-prompt optional prompt Pagestyle)
-   (LaTeX-pagestyle-list))
-   optional))
+string.  If DEFINITION is non-nil, add the chosen pagestyle to
+the list of defined pagestyles.
+  (let ((pagestyle (completing-read (TeX-argument-prompt optional prompt
+Pagestyle)
+   (LaTeX-pagestyle-list
+(if (and definition (not (string-equal  pagestyle)))
+   (LaTeX-add-pagestyles pagestyle))
+(TeX-argument-insert pagestyle optional)))
 
 (defcustom LaTeX-default-verb-delimiter ?|
   Default delimiter for `\\verb' macros.
@@ -5264,6 +5276,10 @@
   ;; `latex.ltx' defines `plain' and `empty' pagestyles
   (LaTeX-add-pagestyles plain empty)
 
+  ;; `latex.ltx' defines the following counters
+  (LaTeX-add-counters page equation enumi enumii enumiii
+ enumiv footnote mpfootnote)
+
   (TeX-add-symbols
'(addtocounter TeX-arg-counter Value)
'(alph TeX-arg-counter)

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2013-01-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn tsdh 13/01/13 19:24:11

Index: latex.el
===
RCS file: /sources/auctex/auctex/latex.el,v
retrieving revision 5.477
retrieving revision 5.478
diff -u -b -r5.477 -r5.478
--- latex.el10 Jan 2013 09:29:33 -  5.477
+++ latex.el13 Jan 2013 19:24:10 -  5.478
@@ -1,6 +1,6 @@
 ;;; latex.el --- Support for LaTeX documents.
 
-;; Copyright (C) 1991, 1993-1997, 1999, 2000, 2003-2012
+;; Copyright (C) 1991, 1993-1997, 1999, 2000, 2003-2013
 ;;   Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-devel@gnu.org
@@ -1202,6 +1202,10 @@
  1 TeX-auto-symbol))
   List of regular expressions matching macros in LaTeX classes and packages.)
 
+(defvar LaTeX-auto-pagestyle-regexp-list
+  '((ps@\\([A-Za-z]+\\) 1 LaTeX-auto-pagestyle))
+  List of regular expression matching LaTeX pagestyle only.)
+
 (defvar LaTeX-auto-regexp-list
   (append
(let ((token TeX-token-char))
@@ -1235,7 +1239,8 @@
LaTeX-auto-class-regexp-list
LaTeX-auto-label-regexp-list
LaTeX-auto-index-regexp-list
-   LaTeX-auto-minimal-regexp-list)
+   LaTeX-auto-minimal-regexp-list
+   LaTeX-auto-pagestyle-regexp-list)
   List of regular expression matching common LaTeX macro definitions.)
 
 (defun LaTeX-split-bibs (match)
@@ -1422,6 +1427,7 @@
 (TeX-auto-add-type environment LaTeX)
 (TeX-auto-add-type bibliography LaTeX bibliographies)
 (TeX-auto-add-type index-entry LaTeX index-entries)
+(TeX-auto-add-type pagestyle LaTeX)
 
 (fset 'LaTeX-add-bibliographies-auto
   (symbol-function 'LaTeX-add-bibliographies))
@@ -1912,13 +1918,6 @@
nil t)
optional))
 
-(defcustom LaTeX-pagestyle-list
-  '((plain) (empty) (headings) (myheadings))
-  A list of available pagestyles.
-  :group 'LaTeX
-  :type '(repeat (list (string
-(make-variable-buffer-local 'LaTeX-pagestyle-list)
-
 (defun TeX-arg-pagestyle (optional optional prompt)
   Prompt for a LaTeX pagestyle with completion.
 If OPTIONAL is non-nil, insert the resulting value as an optional
@@ -1926,7 +1925,7 @@
 string.
   (TeX-argument-insert
(completing-read (TeX-argument-prompt optional prompt Pagestyle)
-   LaTeX-pagestyle-list)
+   (LaTeX-pagestyle-list))
optional))
 
 (defcustom LaTeX-default-verb-delimiter ?|
@@ -5262,6 +5261,9 @@
'(thebibliography LaTeX-env-bib)
'(theindex LaTeX-env-item))
 
+  ;; `latex.ltx' defines `plain' and `empty' pagestyles
+  (LaTeX-add-pagestyles plain empty)
+
   (TeX-add-symbols
'(addtocounter TeX-arg-counter Value)
'(alph TeX-arg-counter)

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2013-01-10 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn tsdh 13/01/10 09:29:33

Index: latex.el
===
RCS file: /sources/auctex/auctex/latex.el,v
retrieving revision 5.476
retrieving revision 5.477
diff -u -b -r5.476 -r5.477
--- latex.el30 Dec 2012 17:05:47 -  5.476
+++ latex.el10 Jan 2013 09:29:33 -  5.477
@@ -763,12 +763,24 @@
 
 (defun LaTeX-env-document (optional ignore)
   Create new LaTeX document.
+Also inserts a \\documentclass macro if there's none already
 The compatibility argument IGNORE is ignored.
+  ;; just assume a single valid \\documentclass, i.e., one not in a
+  ;; commented line
+  (let ((found nil))
+(save-excursion
+  (while (and (not found)
+ (re-search-backward
+  
documentclass\\(\\[[a-z0-9A-Z\-\_,]*\\]\\)?\\({[^}]+}\\)
+  nil t))
+   (and (not (TeX-in-commented-line))
+(setq found t
+(when (not found)
   (TeX-insert-macro documentclass)
   (LaTeX-newline)
   (LaTeX-newline)
   (LaTeX-newline)
-  (end-of-line 0)
+  (end-of-line 0)))
   (LaTeX-insert-environment document)
   (run-hooks 'LaTeX-document-style-hook)
   (setq LaTeX-document-style-hook nil))

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2012-12-30 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn tsdh 12/12/30 17:05:47

Index: latex.el
===
RCS file: /sources/auctex/auctex/latex.el,v
retrieving revision 5.475
retrieving revision 5.476
diff -u -b -r5.475 -r5.476
--- latex.el25 Dec 2012 18:47:56 -  5.475
+++ latex.el30 Dec 2012 17:05:47 -  5.476
@@ -1900,6 +1900,13 @@
nil t)
optional))
 
+(defcustom LaTeX-pagestyle-list
+  '((plain) (empty) (headings) (myheadings))
+  A list of available pagestyles.
+  :group 'LaTeX
+  :type '(repeat (list (string
+(make-variable-buffer-local 'LaTeX-pagestyle-list)
+
 (defun TeX-arg-pagestyle (optional optional prompt)
   Prompt for a LaTeX pagestyle with completion.
 If OPTIONAL is non-nil, insert the resulting value as an optional
@@ -1907,7 +1914,7 @@
 string.
   (TeX-argument-insert
(completing-read (TeX-argument-prompt optional prompt Pagestyle)
-   '((plain) (empty) (headings) (myheadings)))
+   LaTeX-pagestyle-list)
optional))
 
 (defcustom LaTeX-default-verb-delimiter ?|

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2012-12-25 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn tsdh 12/12/25 18:47:56

Index: latex.el
===
RCS file: /sources/auctex/auctex/latex.el,v
retrieving revision 5.474
retrieving revision 5.475
diff -u -b -r5.474 -r5.475
--- latex.el4 Dec 2012 08:01:33 -   5.474
+++ latex.el25 Dec 2012 18:47:56 -  5.475
@@ -3953,10 +3953,10 @@
 (nil bigtriangledown Binary Op 9661) ;; #X25BD
 (nil triangleleft Binary Op 9665) ;; #X25C1
 (nil triangleright Binary Op 9655) ;; #X25B7
-(nil lhd Binary Op)
-(nil rhd Binary Op)
-(nil unlhd Binary Op)
-(nil unrhd Binary Op)
+(nil lhd Binary Op 8882) ;; #X22B2
+(nil rhd Binary Op 8883) ;; #X22B3
+(nil unlhd Binary Op 8884) ;; #X22B4
+(nil unrhd Binary Op 8885) ;; #X22B5
 (nil oplus Binary Op 8853) ;; #X2295
 (nil ominus Binary Op 8854) ;; #X2296
 (nil otimes Binary Op 8855) ;; #X2297
@@ -4048,10 +4048,10 @@
 (?0 emptyset Misc Symbol 8709) ;; #X2205
 (?E exists Misc Symbol 8707) ;; #X2203
 (nil surd Misc Symbol 8730) ;; #X221A
-(nil Box Misc Symbol)
+(nil Box Misc Symbol 9633) ;; #X25A1
 (nil triangle Misc Symbol 9651) ;; #X25B3
-(nil Diamond Misc Symbol)
-(nil imath Misc Symbol 305) ;; #X0131
+(nil Diamond Misc Symbol 9671) ;; #X25C7
+(nil imath Misc Symbol 120484) ;; #X1D6A4
 (nil jmath Misc Symbol 120485) ;; #X1D6A5
 (nil ell Misc Symbol 8467) ;; #X2113
 (nil neg Misc Symbol 172) ;; #X00AC
@@ -4117,8 +4117,8 @@
 (?\C-^ sup Log-like)
 (?\C-t tan Log-like)
 (nil tanh Log-like)
-(nil { Delimiters)
-(nil } Delimiters)
+(nil { Delimiters ?{)
+(nil } Delimiters ?})
 (nil lfloor Delimiters 8970) ;; #X230A
 (nil rfloor Delimiters 8971) ;; #X230B
 (nil lceil Delimiters 8968) ;; #X2308
@@ -4127,10 +4127,10 @@
 (?\) rangle Delimiters 10217) ;; #X27E9
 (nil rmoustache Delimiters 9137) ;; #X23B1
 (nil lmoustache Delimiters 9136) ;; #X23B0
-(nil rgroup Delimiters)
-(nil lgroup Delimiters)
+(nil rgroup Delimiters 9133) ;; #X23AD
+(nil lgroup Delimiters 9129) ;; #X23A9
 (nil backslash Delimiters 92) ;; #X005C
-(nil | Delimiters)
+(nil | Delimiters 8214) ;; #X2016)
 (nil arrowvert Delimiters)
 (nil Arrowvert Delimiters)
 (nil bracevert Delimiters)
@@ -4138,8 +4138,8 @@
 (nil widehat Constructs 770) ;; #X0302
 (nil overleftarrow Constructs 8406) ;; #X20D6
 (nil overrightarrow Constructs)
-(nil overline Constructs)
-(nil underline Constructs)
+(nil overline Constructs 773) ;; #X0305
+(nil underline Constructs 818) ;; #X0332
 (nil overbrace Constructs 65079) ;; #XFE37
 (nil underbrace Constructs 65080) ;; #XFE38
 (nil sqrt Constructs 8730) ;; #X221A
@@ -4154,22 +4154,23 @@
 (nil vec Accents 8407) ;; #X20D7
 (nil ddot Accents 776) ;; #X0308
 (?~ tilde Accents 771) ;; #X0303
+(nil mathring Accents 778) ;; #X030A
 (nil digamma (AMS Hebrew) 989) ;; #X03DD
 (nil varkappa (AMS Hebrew) 1008) ;; #X03F0
 (nil beth (AMS Hebrew) 8502) ;; #X2136
 (nil daleth (AMS Hebrew) 8504) ;; #X2138
 (nil gimel (AMS Hebrew) 8503) ;; #X2137
-(v G varGamma (AMS Greek Uppercase))
-(v D varDelta (AMS Greek Uppercase))
-(v J varTheta (AMS Greek Uppercase))
-(v L varLambda (AMS Greek Uppercase))
-(v X varXi (AMS Greek Uppercase))
-(v P varPi (AMS Greek Uppercase))
-(v S varSigma (AMS Greek Uppercase))
-(v U varUpsilon (AMS Greek Uppercase))
-(v F varPhi (AMS Greek Uppercase))
-(v Y varPsi (AMS Greek Uppercase))
-(v W varOmega (AMS Greek Uppercase))
+(v G varGamma (AMS Greek Uppercase) 120548) ;; #X1D6E4
+(v D varDelta (AMS Greek Uppercase) 120549) ;; #X1D6E5
+(v J varTheta (AMS Greek Uppercase) 120553) ;; #X1D6E9
+(v L varLambda (AMS Greek Uppercase) 120556) ;; #X1D6EC
+(v X varXi (AMS Greek Uppercase) 120559) ;; #X1D6EF
+(v P varPi (AMS Greek Uppercase) 120561) ;; #X1D6F1
+(v S varSigma (AMS Greek Uppercase) 120564) ;; #X1D6F4
+(v U varUpsilon (AMS Greek Uppercase) 120566) ;; #X1D6F6
+(v F varPhi (AMS Greek Uppercase) 120567) ;; #X1D6F7
+(v Y varPsi (AMS Greek Uppercase) 120569) ;; #X1D6F9
+(v W varOmega (AMS Greek Uppercase) 120570) ;; #X1D6FA
 (nil dashrightarrow (AMS Arrows))
 (nil dashleftarrow (AMS Arrows))
 (nil leftleftarrows (AMS Arrows) 8647) ;; #X21C7
@@ -4180,7 +4181,7 @@
 (nil looparrowleft (AMS Arrows) 8619) ;; #X21AB
 (nil leftrightharpoons (AMS Arrows) 8651) ;; #X21CB
 (nil curvearrowleft (AMS Arrows) 8630) ;; #X21B6
-(nil circlearrowleft (AMS Arrows))
+(nil circlearrowleft (AMS Arrows) 8634) ;; #X21BA
 (nil Lsh (AMS Arrows) 8624) ;; #X21B0
 (nil upuparrows (AMS Arrows) 8648) ;; #X21C8
 (nil upharpoonleft (AMS Arrows) 8639) ;; #X21BF
@@ -4213,7 +4214,7 @@
 (nil lessgtr (AMS Relational I) 

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

2012-12-04 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn tsdh 12/12/04 08:01:34

Index: latex.el
===
RCS file: /sources/auctex/auctex/latex.el,v
retrieving revision 5.473
retrieving revision 5.474
diff -u -b -r5.473 -r5.474
--- latex.el26 Nov 2012 19:56:21 -  5.473
+++ latex.el4 Dec 2012 08:01:33 -   5.474
@@ -1,8 +1,7 @@
 ;;; latex.el --- Support for LaTeX documents.
 
-;; Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2003,
-;;   2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-;;   Foundation, Inc.
+;; Copyright (C) 1991, 1993-1997, 1999, 2000, 2003-2012
+;;   Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-devel@gnu.org
 ;; Keywords: tex

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2012-11-26 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli12/11/26 19:56:22

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.472
retrieving revision 5.473
diff -u -b -r5.472 -r5.473
--- latex.el14 Nov 2012 17:57:13 -  5.472
+++ latex.el26 Nov 2012 19:56:21 -  5.473
@@ -1198,22 +1198,26 @@
(1 2 3) LaTeX-auto-optional)
(,(concat \\(?:new\\|provide\\)command\\*?{?\\( token 
+\\)}?\\[\\([0-9]+\\)\\])
(1 2) LaTeX-auto-arguments)
-   (,(concat \\(?:new\\|provide\\)command\\*?{?\\( token 
+\\)}?) 1 TeX-auto-symbol)
+   (,(concat \\(?:new\\|provide\\)command\\*?{?\\( token 
+\\)}?)
+   1 TeX-auto-symbol)
(,(concat newenvironment\\*?{?\\( token 
+\\)}?\\[\\([0-9]+\\)\\]\\[)
1 LaTeX-auto-environment)
(,(concat newenvironment\\*?{?\\( token 
+\\)}?\\[\\([0-9]+\\)\\])
(1 2) LaTeX-auto-env-args)
-   (,(concat newenvironment\\*?{?\\( token +\\)}?) 1 
LaTeX-auto-environment)
+   (,(concat newenvironment\\*?{?\\( token +\\)}?)
+   1 LaTeX-auto-environment)
(,(concat newtheorem{\\( token +\\)}) 1 LaTeX-auto-environment)
(input{\\(\\.*[^#}%\\.\n\r]+\\)\\(\\.[^#}%\\.\n\r]+\\)?}
1 TeX-auto-file)
(include{\\(\\.*[^#}%\\.\n\r]+\\)\\(\\.[^#}%\\.\n\r]+\\)?}
1 TeX-auto-file)
-   (, (concat bibitem{\\( token [^, \n\r\t%\#'()={}]*\\)}) 1 
LaTeX-auto-bibitem)
+   (, (concat bibitem{\\( token [^, \n\r\t%\#'()={}]*\\)})
+ 1 LaTeX-auto-bibitem)
(, (concat bibitem\\[[^][\n\r]+\\]{\\( token [^, 
\n\r\t%\#'()={}]*\\)})
  1 LaTeX-auto-bibitem)
(bibliography{\\([^#}\n\r]+\\)} 1 LaTeX-auto-bibliography)
-   (addbibresource\\(?:\\[[^]]+\\]\\)?{\\([^#}\n\r\.]+\\)\\..+} 
1 LaTeX-auto-bibliography)
+   (addbibresource\\(?:\\[[^]]+\\]\\)?{\\([^#}\n\r\.]+\\)\\..+}
+   1 LaTeX-auto-bibliography)

(add\\(?:global\\|section\\)bib\\(?:\\[[^]]+\\]\\)?{\\([^#}\n\r\.]+\\)\\(?:\\..+\\)?}
 1 LaTeX-auto-bibliography)
(newrefsection\\[\\([^]]+\\)\\] 1 LaTeX-split-bibs)
(begin{refsection}\\[\\([^]]+\\)\\] 1 LaTeX-split-bibs)))
@@ -1224,12 +1228,14 @@
   List of regular expression matching common LaTeX macro definitions.)
 
 (defun LaTeX-split-bibs (match)
+  Extract bibliography resources from MATCH.
+Split the string at commas and remove Biber file extensions.
   (let ((bibs (TeX-split-string  *, * (TeX-match-buffer match
 (dolist (bib bibs)
   (LaTeX-add-bibliographies (replace-regexp-in-string 
 (concat \\(?:\\.
 (mapconcat 'regexp-quote
-   BibTeX-Biber-file-extensions
+   TeX-Biber-file-extensions
\\|\\.)
 \\))
  bib)
@@ -1724,8 +1730,9 @@
   TeX-file-extensions)
 (docs ${TEXDOCS} (doc/) TeX-doc-extensions)
 (graphics ${TEXINPUTS} (tex/) LaTeX-includegraphics-extensions)
-(bibinputs ${BIBINPUTS} (bibtex/bib/) BibTeX-Biber-file-extensions)
-(bstinputs ${BSTINPUTS} (bibtex/bst/) BibTeX-style-extensions))
+(bibinputs ${BIBINPUTS} (bibtex/bib/) BibTeX-file-extensions)
+(bstinputs ${BSTINPUTS} (bibtex/bst/) BibTeX-style-extensions)
+(biberinputs ${BIBINPUTS} (bibtex/bib/) TeX-Biber-file-extensions))
   Alist of filetypes with locations and file extensions.
 Each element of the alist consists of a symbol expressing the
 filetype, a variable which can be expanded on kpathsea-based
@@ -1822,27 +1829,42 @@
BibTeX-global-style-files))
optional))
 
-(defvar BibTeX-Biber-global-files nil
-  Association list of BibTeX/Biber files.
+(defvar BibTeX-global-files nil
+  Association list of BibTeX files.
+
+Initialized once at the first time you prompt for a BibTeX file.
+May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.)
+
+(defvar TeX-Biber-global-files nil
+  Association list of Biber files.
 
-Initialized once at the first time you prompt for an BibTeX/Biber file.
+Initialized once at the first time you prompt for an Biber file.
 May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.)
 
 (defun TeX-arg-bibliography (optional optional prompt)
-  Prompt for a BibTeX/Biber database file.
+  Prompt for a BibTeX or Biber database file.
 If OPTIONAL is non-nil, insert the resulting value as an optional
 argument, otherwise as a mandatory one.  Use PROMPT as the prompt
 string.
-  (message Searching for BibTeX/Biber files...)
-  (or BibTeX-Biber-global-files
-  (setq BibTeX-Biber-global-files
-   

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

2012-11-14 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli12/11/14 17:57:14

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.471
retrieving revision 5.472
diff -u -b -r5.471 -r5.472
--- latex.el13 Sep 2012 10:14:18 -  5.471
+++ latex.el14 Nov 2012 17:57:13 -  5.472
@@ -1216,22 +1216,13 @@
(addbibresource\\(?:\\[[^]]+\\]\\)?{\\([^#}\n\r\.]+\\)\\..+} 
1 LaTeX-auto-bibliography)

(add\\(?:global\\|section\\)bib\\(?:\\[[^]]+\\]\\)?{\\([^#}\n\r\.]+\\)\\(?:\\..+\\)?}
 1 LaTeX-auto-bibliography)
(newrefsection\\[\\([^]]+\\)\\] 1 LaTeX-split-bibs)
-   (begin{refsection}\\[\\([^]]+\\)\\] 1 LaTeX-split-bibs)
-   (backend=\\(biber\\) 1 LaTeX-biber)
-   
(ExecuteBibliographyOptions\\(?:\\[[^]]+\\]\\)?{.*?backend=\\(biber\\)} 1 
LaTeX-using-Biber)))
+   (begin{refsection}\\[\\([^]]+\\)\\] 1 LaTeX-split-bibs)))
LaTeX-auto-class-regexp-list
LaTeX-auto-label-regexp-list
LaTeX-auto-index-regexp-list
LaTeX-auto-minimal-regexp-list)
   List of regular expression matching common LaTeX macro definitions.)
 
-;; Either the user has set a global use biber flag or we detect it from the 
file
-(defun LaTeX-biber (match)
-  (if (or LaTeX-always-use-Biber
-  (string= biber (TeX-match-buffer match)))
-  (setq LaTeX-using-Biber t)
-  (setq LaTeX-using-Biber nil)))
-
 (defun LaTeX-split-bibs (match)
   (let ((bibs (TeX-split-string  *, * (TeX-match-buffer match
 (dolist (bib bibs)
@@ -1256,17 +1247,41 @@
 (defun LaTeX-listify-package-options (options)
   Return a list from a comma-separated string of package OPTIONS.
 The input string may include LaTeX comments and newlines.
-  ;; FIXME: Parse key=value options like pdftitle={A Perfect
-  ;; Day},colorlinks=false correctly.  When this works, the check for
-  ;; = can be removed again.
-  (let (opts)
-(dolist (elt (TeX-split-string \\(,\\|%[^\n\r]*[\n\r]\\)+
-  options))
-  (unless (string-match = elt)
-   ;; Strip whitespace.
-   (dolist (item (TeX-split-string [ \t\r\n]+ elt))
- (unless (string= item )
-   (add-to-list 'opts item)
+  ;; We jump through all those hoops and don't just use `split-string'
+  ;; or the like in order to be able to deal with key=value package
+  ;; options which can look like this: pdftitle={A Perfect Day},
+  ;; colorlinks=false
+  (let (opts match start)
+(with-temp-buffer
+  (set-syntax-table LaTeX-mode-syntax-table)
+  (insert options)
+  (newline) ; So that the last entry can be found.
+  (goto-char (point-min))
+  (setq start (point))
+  (while (re-search-forward [{ ,%\n\r] nil t)
+   (setq match (match-string 0))
+   (cond
+;; Step over groups.  (Let's hope nobody uses escaped braces.)
+((string= match {)
+ (up-list))
+;; Get rid of whitespace.
+((string= match  )
+ (delete-region (1- (point))
+(save-excursion
+  (skip-chars-forward  )
+  (point
+;; Add entry to output.
+((or (string= match ,) (= (point) (point-max)))
+ (add-to-list 'opts (buffer-substring-no-properties
+ start (1- (point))) t)
+ (setq start (point)))
+;; Get rid of comments.
+((string= match %)
+ (delete-region (1- (point))
+(line-beginning-position 2)))
+;; Get rid of newlines.
+((or (string= match \n) (string= match \r))
+ (delete-backward-char 1)
 opts))
 
 (defun LaTeX-auto-cleanup ()
@@ -1409,10 +1424,10 @@
   (setq LaTeX-environment-modify-menu nil))
 
 ;;; Biber support
-;;; Need a variable to say if we're using biber - certain things need 
consitionalising on this
 
-(defvar LaTeX-using-Biber nil Used to track whether we detected Biber in use)
-(defvar LaTeX-always-use-Biber nil Global override for biber usage)
+(defvar LaTeX-using-Biber nil
+  Used to track whether Biber is in use.)
+(make-variable-buffer-local 'LaTeX-using-Biber)
 
 ;;; BibTeX
 

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2012-09-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn tsdh 12/09/13 10:14:19

Index: latex.el
===
RCS file: /sources/auctex/auctex/latex.el,v
retrieving revision 5.470
retrieving revision 5.471
diff -u -b -r5.470 -r5.471
--- latex.el7 Aug 2011 15:32:42 -   5.470
+++ latex.el13 Sep 2012 10:14:18 -  5.471
@@ -1212,13 +1212,37 @@
(, (concat bibitem{\\( token [^, \n\r\t%\#'()={}]*\\)}) 1 
LaTeX-auto-bibitem)
(, (concat bibitem\\[[^][\n\r]+\\]{\\( token [^, 
\n\r\t%\#'()={}]*\\)})
  1 LaTeX-auto-bibitem)
-   (bibliography{\\([^#}\n\r]+\\)} 1 LaTeX-auto-bibliography)))
+   (bibliography{\\([^#}\n\r]+\\)} 1 LaTeX-auto-bibliography)
+   (addbibresource\\(?:\\[[^]]+\\]\\)?{\\([^#}\n\r\.]+\\)\\..+} 
1 LaTeX-auto-bibliography)
+   
(add\\(?:global\\|section\\)bib\\(?:\\[[^]]+\\]\\)?{\\([^#}\n\r\.]+\\)\\(?:\\..+\\)?}
 1 LaTeX-auto-bibliography)
+   (newrefsection\\[\\([^]]+\\)\\] 1 LaTeX-split-bibs)
+   (begin{refsection}\\[\\([^]]+\\)\\] 1 LaTeX-split-bibs)
+   (backend=\\(biber\\) 1 LaTeX-biber)
+   
(ExecuteBibliographyOptions\\(?:\\[[^]]+\\]\\)?{.*?backend=\\(biber\\)} 1 
LaTeX-using-Biber)))
LaTeX-auto-class-regexp-list
LaTeX-auto-label-regexp-list
LaTeX-auto-index-regexp-list
LaTeX-auto-minimal-regexp-list)
   List of regular expression matching common LaTeX macro definitions.)
 
+;; Either the user has set a global use biber flag or we detect it from the 
file
+(defun LaTeX-biber (match)
+  (if (or LaTeX-always-use-Biber
+  (string= biber (TeX-match-buffer match)))
+  (setq LaTeX-using-Biber t)
+  (setq LaTeX-using-Biber nil)))
+
+(defun LaTeX-split-bibs (match)
+  (let ((bibs (TeX-split-string  *, * (TeX-match-buffer match
+(dolist (bib bibs)
+  (LaTeX-add-bibliographies (replace-regexp-in-string 
+  (concat \\(?:\\.
+ (mapconcat 'regexp-quote
+BibTeX-Biber-file-extensions
+\\|\\.)
+   \\))
+  bib)
+
 (defun LaTeX-auto-prepare ()
   Prepare for LaTeX parsing.
   (setq LaTeX-auto-arguments nil
@@ -1248,7 +1272,7 @@
 (defun LaTeX-auto-cleanup ()
   Cleanup after LaTeX parsing.
 
-  ;; Cleanup BibTeX files
+  ;; Cleanup BibTeX/Biber files
   (setq LaTeX-auto-bibliography
(apply 'append (mapcar (lambda (arg)
 (TeX-split-string , arg))
@@ -1384,6 +1408,12 @@
   (setq LaTeX-environment-menu nil)
   (setq LaTeX-environment-modify-menu nil))
 
+;;; Biber support
+;;; Need a variable to say if we're using biber - certain things need 
consitionalising on this
+
+(defvar LaTeX-using-Biber nil Used to track whether we detected Biber in use)
+(defvar LaTeX-always-use-Biber nil Global override for biber usage)
+
 ;;; BibTeX
 
 ;;;###autoload
@@ -1679,7 +1709,7 @@
   TeX-file-extensions)
 (docs ${TEXDOCS} (doc/) TeX-doc-extensions)
 (graphics ${TEXINPUTS} (tex/) LaTeX-includegraphics-extensions)
-(bibinputs ${BIBINPUTS} (bibtex/bib/) BibTeX-file-extensions)
+(bibinputs ${BIBINPUTS} (bibtex/bib/) BibTeX-Biber-file-extensions)
 (bstinputs ${BSTINPUTS} (bibtex/bst/) BibTeX-style-extensions))
   Alist of filetypes with locations and file extensions.
 Each element of the alist consists of a symbol expressing the
@@ -1777,27 +1807,27 @@
BibTeX-global-style-files))
optional))
 
-(defvar BibTeX-global-files nil
-  Association list of BibTeX files.
+(defvar BibTeX-Biber-global-files nil
+  Association list of BibTeX/Biber files.
 
-Initialized once at the first time you prompt for an BibTeX file.
+Initialized once at the first time you prompt for an BibTeX/Biber file.
 May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.)
 
 (defun TeX-arg-bibliography (optional optional prompt)
-  Prompt for a BibTeX database file.
+  Prompt for a BibTeX/Biber database file.
 If OPTIONAL is non-nil, insert the resulting value as an optional
 argument, otherwise as a mandatory one.  Use PROMPT as the prompt
 string.
-  (message Searching for BibTeX files...)
-  (or BibTeX-global-files
-  (setq BibTeX-global-files
+  (message Searching for BibTeX/Biber files...)
+  (or BibTeX-Biber-global-files
+  (setq BibTeX-Biber-global-files
(mapcar 'list (TeX-search-files-by-type 'bibinputs 'global t t
   (let ((styles (multi-prompt
 , t
-(TeX-argument-prompt optional prompt BibTeX files)
+(TeX-argument-prompt optional prompt BibTeX/Biber files)
 (append (mapcar 'list (TeX-search-files-by-type
'bibinputs 'local t t))
-BibTeX-global-files
+BibTeX-Biber-global-files
 (apply 'LaTeX-add-bibliographies styles)
 

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

2011-08-07 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli11/08/07 15:32:42

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.469
retrieving revision 5.470
diff -u -b -r5.469 -r5.470
--- latex.el25 Apr 2011 18:05:47 -  5.469
+++ latex.el7 Aug 2011 15:32:42 -   5.470
@@ -3165,6 +3165,7 @@
((string= match-string $$) $$)
(t (concat TeX-esc ])))
  (point-max) t)
+(skip-chars-forward ^ \n)
 (point))
   (line-beginning-position))
fill-column)))

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2011-04-25 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli11/04/25 18:05:47

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.468
retrieving revision 5.469
diff -u -b -r5.468 -r5.469
--- latex.el15 Apr 2011 14:29:46 -  5.468
+++ latex.el25 Apr 2011 18:05:47 -  5.469
@@ -1598,6 +1598,7 @@
  (dinbrief)
  (foils)
  (letter)
+ (memoir)
  (minimal)
  (prosper)
  (report)

___
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2011-02-27 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli11/02/27 16:04:54

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.466
retrieving revision 5.467
diff -u -b -r5.466 -r5.467
--- latex.el30 Jan 2011 16:24:36 -  5.466
+++ latex.el27 Feb 2011 16:04:53 -  5.467
@@ -5408,6 +5408,7 @@
[ Number of arguments ] [ Default value for first argument ] t)
  '(usepackage LaTeX-arg-usepackage)
  '(RequirePackage LaTeX-arg-usepackage)
+ '(ProvidesPackage Name [ Version ])
  '(documentclass TeX-arg-document)))
 
   (TeX-add-style-hook latex2e

___
auctex-diffs mailing list
auctex-di...@gnu.org
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2011-01-30 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli11/01/30 16:24:36

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.465
retrieving revision 5.466
diff -u -b -r5.465 -r5.466
--- latex.el22 Jan 2011 16:23:58 -  5.465
+++ latex.el30 Jan 2011 16:24:36 -  5.466
@@ -5350,8 +5350,9 @@
clearpage cleardoublepage twocolumn onecolumn
 
maketitle tableofcontents listoffigures listoftables
-   tiny scriptsize footnotesize small
-   normalsize large Large LARGE huge Huge
+   '(tiny -1) '(scriptsize -1) '(footnotesize -1) '(small -1)
+   '(normalsize -1) '(large -1) '(Large -1) '(LARGE -1) '(huge -1)
+   '(Huge -1)
pounds copyright
hfil hfill vfil vfill hrulefill dotfill
indent noindent today

___
auctex-diffs mailing list
auctex-di...@gnu.org
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2011-01-09 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli11/01/09 14:45:12

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.463
retrieving revision 5.464
diff -u -b -r5.463 -r5.464
--- latex.el12 Dec 2010 16:01:06 -  5.463
+++ latex.el9 Jan 2011 14:45:12 -   5.464
@@ -5248,6 +5248,8 @@
'(setlength TeX-arg-macro Length)
'(addtolength TeX-arg-macro Length)
'(settowidth TeX-arg-macro t)
+   '(settoheight TeX-arg-macro t)
+   '(settodepth TeX-arg-macro t)
'(\\ [ Space ])
'(\\* [ Space ])
'(hyphenation t)

___
auctex-diffs mailing list
auctex-di...@gnu.org
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2010-12-12 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli10/12/12 16:01:07

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.462
retrieving revision 5.463
diff -u -b -r5.462 -r5.463
--- latex.el5 Dec 2010 20:49:06 -   5.462
+++ latex.el12 Dec 2010 16:01:06 -  5.463
@@ -1100,10 +1100,10 @@
 (defun LaTeX-env-args (environment rest args)
   Insert ENVIRONMENT and arguments defined by ARGS.
   (LaTeX-insert-environment environment)
-  (let ((pos (point-marker)))
-(end-of-line 0)
-(TeX-parse-arguments args)
-(goto-char pos)))
+  (save-excursion
+(LaTeX-find-matching-begin)
+(end-of-line)
+(TeX-parse-arguments args)))
 
 ;;; Item hooks
 

___
auctex-diffs mailing list
auctex-di...@gnu.org
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2010-10-17 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli10/10/17 18:43:09

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.458
retrieving revision 5.459
diff -u -b -r5.458 -r5.459
--- latex.el7 Mar 2010 09:15:54 -   5.458
+++ latex.el17 Oct 2010 18:43:09 -  5.459
@@ -1671,9 +1671,21 @@
  (mapc 'TeX-run-style-hooks (LaTeX-listify-package-options options))
  (TeX-argument-insert options t))
 
+(defcustom TeX-arg-input-file-search t
+  If `TeX-arg-input-file' should search for files.
+If the value is t, files in `TeX-macro-private' and
+`TeX-macro-global' are searched for and provided for completion.
+The file name is then inserted without directory and extension.
+If the value is nil, the file name can be specified manually and
+is inserted with a path relative to the directory of the current
+buffer's file and with extension.  If the value is `ask', you are
+asked for the method to use every time `TeX-arg-input-file' is
+called.
+  :group 'LaTeX-macro
+  :type '(choice (const t) (const nil) (const ask)))
+
 (defvar TeX-global-input-files nil
   List of the non-local TeX input files.
-
 Initialized once at the first time you prompt for an input file.
 May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.)
 
@@ -1683,28 +1695,33 @@
 argument, otherwise as a mandatory one.  PROMPT is the prompt,
 LOCAL is a flag.  If the flag is set, only complete with local
 files.
+  (let ((search (if (eq TeX-arg-input-file-search 'ask)
+   (not (y-or-n-p Find file yourself? ))
+ TeX-arg-input-file-search))
+   file style)
+(if search
+   (progn
   (unless (or TeX-global-input-files local)
 (message Searching for files...)
 (setq TeX-global-input-files
- (mapcar 'list (TeX-search-files (append TeX-macro-private
- TeX-macro-global)
+ (mapcar 'list (TeX-search-files
+(append TeX-macro-private TeX-macro-global)
  TeX-file-extensions t t
-  (let ((file (if TeX-check-path
- (completing-read
+ (setq file (completing-read
   (TeX-argument-prompt optional prompt File)
   (TeX-delete-dups-by-car
-   (append (mapcar 'list
-   (TeX-search-files '(./)
- TeX-file-extensions
- t t))
+  (append (mapcar 'list (TeX-search-files
+ '(./) TeX-file-extensions t t))
(unless local
  TeX-global-input-files
-   (read-file-name
-(TeX-argument-prompt optional prompt File)
-(if (null file)
-   (setq file ))
-(if (not (string-equal  file))
-   (TeX-run-style-hooks file))
+   style file))
+  (setq file (read-file-name
+ (TeX-argument-prompt optional prompt File) nil ))
+  (unless (string-equal file )
+   (setq file (file-relative-name file)))
+  (setq style (file-name-sans-extension (file-name-nondirectory file
+(unless (string-equal  style)
+  (TeX-run-style-hooks style))
 (TeX-argument-insert file optional)))
 
 (defvar BibTeX-global-style-files nil

___
auctex-diffs mailing list
auctex-di...@gnu.org
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2009-10-31 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli09/10/31 17:03:29

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.456
retrieving revision 5.457
diff -u -b -r5.456 -r5.457
--- latex.el13 Apr 2009 16:55:16 -  5.456
+++ latex.el31 Oct 2009 17:03:28 -  5.457
@@ -765,7 +765,6 @@
   Create new LaTeX document.
 The compatibility argument IGNORE is ignored.
   (TeX-insert-macro documentclass)
-
   (LaTeX-newline)
   (LaTeX-newline)
   (LaTeX-newline)
@@ -5049,6 +5048,7 @@
 \\$\\$ ; Plain TeX display math
 \\|$\\)))
 
+  (setq TeX-verbatim-p-function 'LaTeX-verbatim-p)
   (setq TeX-search-forward-comment-start-function
'LaTeX-search-forward-comment-start)
 


___
auctex-diffs mailing list
auctex-di...@gnu.org
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2009-04-13 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli09/04/13 16:55:16

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.455
retrieving revision 5.456
diff -u -b -r5.455 -r5.456
--- latex.el4 Apr 2009 20:11:10 -   5.455
+++ latex.el13 Apr 2009 16:55:16 -  5.456
@@ -1931,7 +1931,9 @@
 as values for the key.
   (let ((options (multi-prompt-key-value
  (TeX-argument-prompt optional Options nil)
- key-val-alist)))
+ (if (symbolp key-val-alist)
+ (eval key-val-alist)
+   key-val-alist
 (TeX-argument-insert options optional)))
 
 


___
auctex-diffs mailing list
auctex-di...@gnu.org
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2009-04-04 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli09/04/04 20:11:11

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.454
retrieving revision 5.455
diff -u -b -r5.454 -r5.455
--- latex.el29 Mar 2009 19:56:50 -  5.454
+++ latex.el4 Apr 2009 20:11:10 -   5.455
@@ -1097,6 +1097,14 @@
TeX-grcl))
   (delete-horizontal-space))
 
+(defun LaTeX-env-args (environment rest args)
+  Insert ENVIRONMENT and arguments defined by ARGS.
+  (LaTeX-insert-environment environment)
+  (let ((pos (point-marker)))
+(end-of-line 0)
+(TeX-parse-arguments args)
+(goto-char pos)))
+
 ;;; Item hooks
 
 (defvar LaTeX-item-list nil
@@ -1406,22 +1414,28 @@
 
 ;;; Macro Argument Hooks
 
-;; FIXME: Make doc-strings of the following functions checkdoc clean.
-;; Especially the optional argument.  -- rs
-
 (defun TeX-arg-conditional (optional expr then else)
   Implement if EXPR THEN ELSE.
 
+If OPTIONAL is non-nil, insert the resulting value as an optional
+argument, otherwise as a mandatory one.
+
 If EXPR evaluate to true, parse THEN as an argument list, else parse
 ELSE as an argument list.
   (TeX-parse-arguments (if (eval expr) then else)))
 
 (defun TeX-arg-eval (optional rest args)
-  Evaluate args and insert value in buffer.
+  Evaluate ARGS and insert value in buffer.
+If OPTIONAL is non-nil, insert the resulting value as an optional
+argument, otherwise as a mandatory one.
   (TeX-argument-insert (eval args) optional))
 
 (defun TeX-arg-label (optional optional prompt definition)
-  Prompt for a label completing with known labels.
+  Prompt for a label completing with known labels.
+If OPTIONAL is non-nil, insert the resulting value as an optional
+argument, otherwise as a mandatory one.  Use PROMPT as the prompt
+string.  If DEFINITION is non-nil, add the chosen label to the
+list of defined labels.
   (let ((label (completing-read (TeX-argument-prompt optional prompt Key)
(LaTeX-label-list
 (if (and definition (not (string-equal  label)))
@@ -1431,7 +1445,12 @@
 (defalias 'TeX-arg-ref 'TeX-arg-label)
 
 (defun TeX-arg-index-tag (optional optional prompt rest args)
-  Prompt for an index tag.  This is the name of an index, not the entry.
+  Prompt for an index tag.
+This is the name of an index, not the entry.
+
+If OPTIONAL is non-nil, insert the resulting value as an optional
+argument, otherwise as a mandatory one.  Use PROMPT as the prompt
+string.  ARGS is unused.
   (let (tag)
 (setq prompt (concat (if optional (Optional)  )
 (if prompt prompt Index tag)
@@ -1440,7 +1459,10 @@
 (TeX-argument-insert tag optional)))
 
 (defun TeX-arg-index (optional optional prompt rest args)
-  Prompt for an index entry completing with known entries.
+  Prompt for an index entry completing with known entries.
+If OPTIONAL is non-nil, insert the resulting value as an optional
+argument, otherwise as a mandatory one.  Use PROMPT as the prompt
+string.  ARGS is unused.
   (let ((entry (completing-read (TeX-argument-prompt optional prompt Key)
(LaTeX-index-entry-list
 (if (and (not (string-equal  entry))
@@ -1451,7 +1473,11 @@
 (defalias 'TeX-arg-define-index 'TeX-arg-index)
 
 (defun TeX-arg-macro (optional optional prompt definition)
-  Prompt for a TeX macro with completion.
+  Prompt for a TeX macro with completion.
+If OPTIONAL is non-nil, insert the resulting value as an optional
+argument, otherwise as a mandatory one.  Use PROMPT as the prompt
+string.  If DEFINITION is non-nil, add the chosen macro to the
+list of defined macros.
   (let ((macro (completing-read (TeX-argument-prompt optional prompt
 (concat Macro: 
 TeX-esc)
@@ -1462,7 +1488,11 @@
 (TeX-argument-insert macro optional TeX-esc)))
 
 (defun TeX-arg-environment (optional optional prompt definition)
-  Prompt for a LaTeX environment with completion.
+  Prompt for a LaTeX environment with completion.
+If OPTIONAL is non-nil, insert the resulting value as an optional
+argument, otherwise as a mandatory one.  Use PROMPT as the prompt
+string.  If DEFINITION is non-nil, add the chosen environment to
+the list of defined environments.
   (let ((environment (completing-read (TeX-argument-prompt optional prompt
   Environment)
  (TeX-symbol-list
@@ -1471,8 +1501,12 @@
 
 (TeX-argument-insert environment optional)))
 
+;; Why is DEFINITION unused?
 (defun TeX-arg-cite (optional optional prompt definition)
-  Prompt for a BibTeX citation with completion.
+  Prompt for a BibTeX citation with completion.
+If OPTIONAL is non-nil, insert the resulting 

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

2009-03-29 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli09/03/29 19:56:51

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.453
retrieving revision 5.454
diff -u -b -r5.453 -r5.454
--- latex.el1 Mar 2009 16:32:16 -   5.453
+++ latex.el29 Mar 2009 19:56:50 -  5.454
@@ -1825,6 +1825,18 @@
   TeX-left-right-braces)))
(indent-according-to-mode)
 
+(defun TeX-arg-key-val (optional key-val-alist)
+  Prompt for keys and values in KEY-VAL-ALIST.
+Insert the given value as a TeX macro argument.  If OPTIONAL is
+non-nil, insert it as an optional argument.  KEY-VAL-ALIST is an
+alist.  The car of each element should be a string representing a
+key and the optional cdr should be a list with strings to be used
+as values for the key.
+  (let ((options (multi-prompt-key-value
+ (TeX-argument-prompt optional Options nil)
+ key-val-alist)))
+(TeX-argument-insert options optional)))
+
 
 ;;; Verbatim constructs
 


___
auctex-diffs mailing list
auctex-di...@gnu.org
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2009-03-01 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli09/03/01 16:32:16

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.452
retrieving revision 5.453
diff -u -b -r5.452 -r5.453
--- latex.el14 Jan 2009 19:58:28 -  5.452
+++ latex.el1 Mar 2009 16:32:16 -   5.453
@@ -1,7 +1,7 @@
 ;;; latex.el --- Support for LaTeX documents.
 
-;; Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000,
-;;   2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2003,
+;;   2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-devel@gnu.org
 ;; Keywords: tex
@@ -1920,15 +1920,17 @@
   (save-excursion
 (let ((orig (point))
  (verbatim-regexp (regexp-opt (LaTeX-verbatim-macros-with-delims) t)))
+  ;; Search backwards for the macro start, unless we are facing one
   (unless (looking-at (concat (regexp-quote TeX-esc) verbatim-regexp))
(catch 'found
  (while (progn
   (skip-chars-backward (concat ^\n (regexp-quote TeX-esc))
(line-beginning-position))
   (when (looking-at verbatim-regexp) (throw 'found nil))
-  (forward-char -1)
+  (or (bobp) (forward-char -1))
   (/= (point) (line-beginning-position))
-  (unless (= (point) (line-beginning-position))
+  ;; Search forward for the macro end, unless we failed to find a start
+  (unless (bolp)
(let ((beg (1- (point
  (goto-char (1+ (match-end 0)))
  (skip-chars-forward (concat ^ (buffer-substring-no-properties
@@ -3602,14 +3604,16 @@
 of verbatim constructs are not considered.
   (setq limit (or limit (point-max)))
   (save-excursion
+(let (start)
 (catch 'found
   (while (progn
   (when (and (TeX-re-search-forward-unescaped
   TeX-comment-start-regexp limit 'move)
  (not (LaTeX-verbatim-p)))
+  (setq start (match-beginning 0))
 (throw 'found t))
   ( (point) limit
-(unless (= (point) limit) (match-beginning 0
+  start)))
 
 
 ;;; Math Minor Mode


___
auctex-diffs mailing list
auctex-di...@gnu.org
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2009-01-14 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli09/01/14 19:58:28

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.451
retrieving revision 5.452
diff -u -b -r5.451 -r5.452
--- latex.el22 Dec 2008 16:41:56 -  5.451
+++ latex.el14 Jan 2009 19:58:28 -  5.452
@@ -4737,6 +4737,8 @@
(h-after-h
(call-interactively 'self-insert-command))
(t (insert hyphen))
+;; Cater for Delete Selection mode
+(put 'LaTeX-babel-insert-hyphen 'delete-selection t)
 
 (defcustom LaTeX-enable-toolbar t
   Enable LaTeX tool bar.


___
auctex-diffs mailing list
auctex-di...@gnu.org
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2008-12-22 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli08/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.el14 Oct 2008 18:27:29 -  5.450
+++ latex.el22 Dec 2008 16:41:56 -  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


___
auctex-diffs mailing list
auctex-di...@gnu.org
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2008-10-14 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli08/10/14 18:27:30

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.449
retrieving revision 5.450
diff -u -b -r5.449 -r5.450
--- latex.el6 Oct 2008 19:35:19 -   5.449
+++ latex.el14 Oct 2008 18:27:29 -  5.450
@@ -728,33 +728,21 @@
   (let* ((in-comment (TeX-in-commented-line))
 (comment-prefix (and in-comment (TeX-comment-prefix
 (save-excursion
-  (while (and
- (/= arg 0)
+  (while (and (/= arg 0)
  (re-search-backward
-  (concat (regexp-quote TeX-esc) begin (regexp-quote TeX-grop)
-  \\|
-  (regexp-quote TeX-esc) end (regexp-quote TeX-grop))
-  nil t 1)
- (or (and LaTeX-syntactic-comments
+  \\(begin\\|end\\) *{ *\\([A-Za-z*]+\\) *} nil t))
+   (when (or (and LaTeX-syntactic-comments
   (eq in-comment (TeX-in-commented-line))
-  ;; If we are in a commented line, check if the
-  ;; prefix matches the one we started out with.
   (or (not in-comment)
+  ;; Consider only matching prefixes in the
+  ;; commented case.
   (string= comment-prefix (TeX-comment-prefix
  (and (not LaTeX-syntactic-comments)
-  (not (TeX-in-commented-line)
-   (cond ((looking-at (concat [ \t]* (regexp-quote TeX-esc)
-  end (regexp-quote TeX-grop)))
-  (setq arg (1+ arg)))
- (t
-  (setq arg (1- arg)
+  (not (TeX-in-commented-line
+ (setq arg (if (string= (match-string 1) end) (1+ arg) (1- arg)
   (if (/= arg 0)
  document
-   (search-forward TeX-grop)
-   (let ((beg (point)))
- (search-forward TeX-grcl)
- (backward-char 1)
- (buffer-substring-no-properties beg (point)))
+   (match-string-no-properties 2)
 
 (defun docTeX-in-macrocode-p ()
   Determine if point is inside a macrocode environment.


___
auctex-diffs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2008-10-06 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli08/10/06 19:35:19

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.448
retrieving revision 5.449
diff -u -b -r5.448 -r5.449
--- latex.el7 Sep 2008 14:21:16 -   5.448
+++ latex.el6 Oct 2008 19:35:19 -   5.449
@@ -3434,9 +3434,8 @@
 (defun LaTeX-paragraph-commands-regexp-make ()
   Return a regular expression matching defined paragraph commands.
   (concat (regexp-quote TeX-esc) \\(
- (when LaTeX-paragraph-commands
-   (concat LaTeX-paragraph-commands \\|))
- (regexp-opt LaTeX-paragraph-commands-internal) \\)))
+ (regexp-opt (append LaTeX-paragraph-commands
+ LaTeX-paragraph-commands-internal)) \\)))
 
 (defcustom LaTeX-paragraph-commands nil
   List of LaTeX macros that should have their own line.


___
auctex-diffs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2008-09-07 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli08/09/07 14:21:17

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.447
retrieving revision 5.448
diff -u -b -r5.447 -r5.448
--- latex.el19 Jul 2008 17:09:13 -  5.447
+++ latex.el7 Sep 2008 14:21:16 -   5.448
@@ -3357,10 +3357,10 @@
 ;; Point should not end up in the middle of nowhere if the search fails.
 (save-excursion
   (dotimes (c count) (LaTeX-find-matching-end))
-  (setq beg (line-beginning-position 2))
+  (setq end (line-beginning-position 2))
   (goto-char cur)
   (dotimes (c count) (LaTeX-find-matching-begin))
-  (setq end (point)))
+  (setq beg (point)))
 (set-mark end)
 (goto-char beg)
 (TeX-activate-region)))


___
auctex-diffs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2008-07-19 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli08/07/19 16:29:28

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.445
retrieving revision 5.446
diff -u -b -r5.445 -r5.446
--- latex.el17 Jul 2008 18:21:32 -  5.445
+++ latex.el19 Jul 2008 16:29:27 -  5.446
@@ -3344,17 +3344,24 @@
 (or (= level 0)
(error Can't locate beginning of current environment
 
-(defun LaTeX-mark-environment ()
+(defun LaTeX-mark-environment (optional count)
   Set mark to end of current environment and point to the matching begin.
+If passed a prefix argument COUNT, mark the outer environnment by COUNT levels.
+Example: if point is --!-- and COUNT=2, env1 is the marked environment.
+
+\\begin{env1} \\begin{env2} --!-- \\begin{env2} \\begin{env1}
+
 Will not work properly if there are unbalanced begin-end pairs in
 comments and verbatim environments
-  (interactive)
-  (let ((cur (point)))
-(LaTeX-find-matching-end)
+  (interactive p)
+  (unless count (seq count 1))
+  (let ( (cur (point)))
+(unless ( count 0) (error invalid prefix arg, expects a positive 
number))
+(dotimes (c count) (LaTeX-find-matching-end))
 (beginning-of-line 2)
 (set-mark (point))
 (goto-char cur)
-(LaTeX-find-matching-begin)
+(dotimes (c count) (LaTeX-find-matching-begin))
 (TeX-activate-region)))
 
 (defun LaTeX-fill-environment (justify)


___
auctex-diffs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2008-07-19 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli08/07/19 17:09:13

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.446
retrieving revision 5.447
diff -u -b -r5.446 -r5.447
--- latex.el19 Jul 2008 16:29:27 -  5.446
+++ latex.el19 Jul 2008 17:09:13 -  5.447
@@ -3346,22 +3346,23 @@
 
 (defun LaTeX-mark-environment (optional count)
   Set mark to end of current environment and point to the matching begin.
-If passed a prefix argument COUNT, mark the outer environnment by COUNT levels.
-Example: if point is --!-- and COUNT=2, env1 is the marked environment.
-
-\\begin{env1} \\begin{env2} --!-- \\begin{env2} \\begin{env1}
-
-Will not work properly if there are unbalanced begin-end pairs in
-comments and verbatim environments
+If prefix argument COUNT is given, mark the respective number of
+enclosing environments.  The command will not work properly if
+there are unbalanced begin-end pairs in comments and verbatim
+environments.
   (interactive p)
-  (unless count (seq count 1))
-  (let ( (cur (point)))
-(unless ( count 0) (error invalid prefix arg, expects a positive 
number))
+  (setq count (if count (abs count) 1))
+  (let ((cur (point)) beg end)
+;; Only change point and mark after beginning and end were found.
+;; Point should not end up in the middle of nowhere if the search fails.
+(save-excursion
 (dotimes (c count) (LaTeX-find-matching-end))
-(beginning-of-line 2)
-(set-mark (point))
+  (setq beg (line-beginning-position 2))
 (goto-char cur)
 (dotimes (c count) (LaTeX-find-matching-begin))
+  (setq end (point)))
+(set-mark end)
+(goto-char beg)
 (TeX-activate-region)))
 
 (defun LaTeX-fill-environment (justify)


___
auctex-diffs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2008-07-17 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli08/07/17 18:17:05

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.443
retrieving revision 5.444
diff -u -b -r5.443 -r5.444
--- latex.el25 May 2008 12:32:03 -  5.443
+++ latex.el17 Jul 2008 18:17:05 -  5.444
@@ -3425,8 +3425,10 @@
 
 (defun LaTeX-paragraph-commands-regexp-make ()
   Return a regular expression matching defined paragraph commands.
-  (concat (regexp-quote TeX-esc)
- (regexp-opt LaTeX-paragraph-commands-internal t)))
+  (concat (regexp-quote TeX-esc) \\(
+ (when LaTeX-paragraph-commands
+   (concat LaTeX-paragraph-commands \\|))
+ (regexp-opt LaTeX-paragraph-commands-internal) \\)))
 
 (defvar LaTeX-paragraph-commands-regexp (LaTeX-paragraph-commands-regexp-make)
 Regular expression matching LaTeX macros that should have their own 
line.)


___
auctex-diffs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2008-05-25 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli08/05/25 07:33:40

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.441
retrieving revision 5.442
diff -u -b -r5.441 -r5.442
--- latex.el3 Feb 2008 14:53:33 -   5.441
+++ latex.el25 May 2008 07:33:39 -  5.442
@@ -612,12 +612,16 @@
 marker))
(move-marker marker nil)
 
+(defvar LaTeX-after-insert-env-hooks nil
+  List of functions to be run at the end of `LaTeX-insert-environment'.
+Each function is called with three arguments: the name of the
+environment just inserted, the buffer position just before
+\\begin and the position just before \\end.)
+
 (defun LaTeX-insert-environment (environment optional extra)
   Insert LaTeX ENVIRONMENT with optional argument EXTRA.
   (let ((active-mark (and (TeX-active-mark) (not (eq (mark) (point)
-   (macrocode-p (and (eq major-mode 'doctex-mode)
- (string-match \\`macrocode\\*?\\' environment)))
-   prefix content-start)
+   prefix content-start env-start env-end)
 (when (and active-mark ( (mark) (point))) (exchange-point-and-mark))
 ;; Compute the prefix.
 (when (and LaTeX-insert-into-comments (TeX-in-commented-line))
@@ -663,7 +667,8 @@
   (newline)
   (when prefix (insert prefix))
 ;; Now insert the environment.
-(if macrocode-p (insert %) (when prefix (insert prefix)))
+(when prefix (insert prefix))
+(setq env-start (point))
 (insert TeX-esc begin TeX-grop environment TeX-grcl)
 (indent-according-to-mode)
 (when extra (insert extra))
@@ -673,7 +678,8 @@
   (when prefix (insert prefix))
   (newline))
 (when active-mark (goto-char (mark)))
-(if macrocode-p (insert %) (when prefix (insert prefix)))
+(when prefix (insert prefix))
+(setq env-end (point))
 (insert TeX-esc end TeX-grop environment TeX-grcl)
 (end-of-line 0)
 (if active-mark
@@ -682,8 +688,10 @@
  (LaTeX-fill-region content-start (line-beginning-position 2)))
  (set-mark content-start))
   (indent-according-to-mode))
-(save-excursion (beginning-of-line 2) (indent-according-to-mode)))
-  (TeX-math-input-method-off))
+(save-excursion (beginning-of-line 2) (indent-according-to-mode))
+(TeX-math-input-method-off)
+(run-hook-with-args 'LaTeX-after-insert-env-hooks
+   environment env-start env-end)))
 
 (defun LaTeX-modify-environment (environment)
   Modify current ENVIRONMENT.
@@ -1304,31 +1312,31 @@
   (add-to-list 'TeX-auto-file latex2))
 
   ;; Cleanup optional arguments
-  (mapcar (lambda (entry)
+  (mapc (lambda (entry)
(add-to-list 'TeX-auto-symbol
 (list (nth 0 entry)
-  (string-to-int (nth 1 entry)
+(string-to-number (nth 1 entry)
  LaTeX-auto-arguments)
 
   ;; Cleanup default optional arguments
-  (mapcar (lambda (entry)
+  (mapc (lambda (entry)
(add-to-list 'TeX-auto-symbol
 (list (nth 0 entry)
   (vector argument)
-  (1- (string-to-int (nth 1 entry))
+(1- (string-to-number (nth 1 entry))
  LaTeX-auto-optional)
 
   ;; Cleanup environments arguments
-  (mapcar (lambda (entry)
+  (mapc (lambda (entry)
(add-to-list 'LaTeX-auto-environment
 (list (nth 0 entry)
-  (string-to-int (nth 1 entry)
+(string-to-number (nth 1 entry)
  LaTeX-auto-env-args)
 
   ;; Cleanup use of def to add environments
   ;; NOTE: This uses an O(N^2) algorithm, while an O(N log N)
   ;; algorithm is possible.
-  (mapcar (lambda (symbol)
+  (mapc (lambda (symbol)
(if (not (TeX-member symbol TeX-auto-symbol 'equal))
;; No matching symbol, insert in list
(add-to-list 'TeX-auto-symbol (concat end symbol))
@@ -1601,7 +1609,7 @@
  ;; in the style list can come from documentclass options and
  ;; does not necessarily mean that the babel-related
  ;; extensions should be activated.
- (mapcar 'TeX-run-style-hooks (LaTeX-listify-package-options options))
+ (mapc 'TeX-run-style-hooks (LaTeX-listify-package-options options))
  (TeX-argument-insert options t))
 
 (defvar TeX-global-input-files nil
@@ -4491,7 +4499,7 @@
   (or LaTeX-section-menu
   (progn
(setq LaTeX-section-list-changed nil)
-   (mapcar 'LaTeX-section-enable LaTeX-section-list)
+   (mapc 'LaTeX-section-enable LaTeX-section-list)
(setq LaTeX-section-menu
  (mapcar 'LaTeX-section-menu-entry LaTeX-section-list)
 
@@ -5316,7 

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

2008-05-25 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli08/05/25 12:32:03

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.442
retrieving revision 5.443
diff -u -b -r5.442 -r5.443
--- latex.el25 May 2008 07:33:39 -  5.442
+++ latex.el25 May 2008 12:32:03 -  5.443
@@ -4828,7 +4828,7 @@
   ;; Make filling and indentation aware of DocStrip guards.
   (setq paragraph-start (concat paragraph-start \\|%)
paragraph-separate (concat paragraph-separate \\|%)
-   TeX-comment-start-regexp %\\(?:[^]+\\)?)
+   TeX-comment-start-regexp \\(?:%\\(?:[^]+\\)?\\))
   (setq TeX-base-mode-name docTeX)
   (TeX-set-mode-name)
   (funcall TeX-install-font-lock))


___
auctex-diffs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2007-12-25 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli07/12/25 21:46:27

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.439
retrieving revision 5.440
diff -u -b -r5.439 -r5.440
--- latex.el11 Oct 2007 20:30:35 -  5.439
+++ latex.el25 Dec 2007 21:46:27 -  5.440
@@ -2883,18 +2883,26 @@
(verb-macros (regexp-opt (append (LaTeX-verbatim-macros-with-delims)
 (LaTeX-verbatim-macros-with-braces)
 (save-excursion
+  ;; Look for the start of a verbatim macro in the current line.
   (when (re-search-backward (concat (regexp-quote TeX-esc)
\\(?: verb-macros \\)\\([EMAIL 
PROTECTED]))
(line-beginning-position) t)
+   ;; Determine start and end of verbatim macro.
(let ((beg (point))
  (end (if (not (string-match [ [{] (match-string 1)))
   (cdr (LaTeX-verbatim-macro-boundaries))
 (TeX-find-macro-end
- (when (and end ( (- end (line-beginning-position))
-   (current-fill-column)))
+ ;; Determine if macro end is behind fill column.
+ (when (and end
+( (- end (line-beginning-position))
+   (current-fill-column))
+( end final-breakpoint))
+   ;; Search backwards for place to break before the macro.
(goto-char beg)
(skip-chars-backward ^ \n)
-   (when (bolp)
+   ;; Determine if point ended up at the beginning of the line.
+   (when (save-excursion (skip-chars-backward  \t%) (bolp))
+ ;; Search forward for a place to break after the macro.
  (goto-char end)
  (skip-chars-forward ^ \n (point-max)))
(setq final-breakpoint (point))


___
auctex-diffs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2007-10-11 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli07/10/11 20:30:36

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.438
retrieving revision 5.439
diff -u -b -r5.438 -r5.439
--- latex.el1 Jul 2007 09:54:31 -   5.438
+++ latex.el11 Oct 2007 20:30:35 -  5.439
@@ -1728,10 +1728,14 @@
   Prompt for delimiter and text.
   (let ((del (read-quoted-char
  (concat Delimiter: (default 
- (char-to-string LaTeX-default-verb-delimiter) ) )))
-   (text (read-from-minibuffer Text: )))
+ (char-to-string LaTeX-default-verb-delimiter) ) 
 (when (= del ?\ ) (setq del LaTeX-default-verb-delimiter))
-(insert del text del)
+(if (TeX-active-mark)
+   (progn
+ (insert del)
+ (goto-char (mark))
+ (insert del))
+  (insert del (read-from-minibuffer Text: ) del))
 (setq LaTeX-default-verb-delimiter del)))
 
 (defun TeX-arg-pair (optional first second)


___
auctex-diffs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2007-07-01 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli07/07/01 09:54:31

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.437
retrieving revision 5.438
diff -u -b -r5.437 -r5.438
--- latex.el20 Jun 2007 21:02:19 -  5.437
+++ latex.el1 Jul 2007 09:54:31 -   5.438
@@ -1127,10 +1127,10 @@
 
 (defvar LaTeX-auto-minimal-regexp-list
   '((document\\(style\\|class\\)\
-\\(\\[\\(\\([^#\\.%]\\|%[^\n\r]*[\n\r]\\)*\\)\\]\\)?\
-{\\([^#\\.\n\r]+?\\)}
+\\(\\[\\(\\([^#\\%]\\|%[^\n\r]*[\n\r]\\)*\\)\\]\\)?\
+{\\([^#\\.\n\r]+?\\)}
  (3 5 1) LaTeX-auto-style)
-(use\\(package\\)\\(\\[\\([^\]]*\\)\\]\\)?\
+(use\\(package\\)\\(\\[\\([^\]\\]*\\)\\]\\)?\
 {\\(\\([^#}\\.%]\\|%[^\n\r]*[\n\r]\\)+?\\)}
  (3 4 1) LaTeX-auto-style))
   Minimal list of regular expressions matching LaTeX macro definitions.)


___
auctex-diffs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2007-06-20 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli07/06/20 21:02:19

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.436
retrieving revision 5.437
diff -u -b -r5.436 -r5.437
--- latex.el10 Jun 2007 18:45:18 -  5.436
+++ latex.el20 Jun 2007 21:02:19 -  5.437
@@ -5226,6 +5226,7 @@
   ;; parsing properly.  -- dak
   (TeX-add-style-hook pdftex 'TeX-PDF-mode-on)
   (TeX-add-style-hook pdftricks 'TeX-PDF-mode-on)
+  (TeX-add-style-hook pst-pdf 'TeX-PDF-mode-on)
   (TeX-add-style-hook dvips 'TeX-PDF-mode-off)
 ;; This is now done in style/pstricks.el because it prevents other
 ;; pstricks style files from being loaded.


___
auctex-diffs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2007-06-10 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli07/06/10 18:45:19

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.435
retrieving revision 5.436
diff -u -b -r5.435 -r5.436
--- latex.el23 Apr 2007 18:54:34 -  5.435
+++ latex.el10 Jun 2007 18:45:18 -  5.436
@@ -5227,7 +5227,9 @@
   (TeX-add-style-hook pdftex 'TeX-PDF-mode-on)
   (TeX-add-style-hook pdftricks 'TeX-PDF-mode-on)
   (TeX-add-style-hook dvips 'TeX-PDF-mode-off)
-  (TeX-add-style-hook pstricks 'TeX-PDF-mode-off)
+;; This is now done in style/pstricks.el because it prevents other
+;; pstricks style files from being loaded.
+;;   (TeX-add-style-hook pstricks 'TeX-PDF-mode-off)
   (TeX-add-style-hook psfrag 'TeX-PDF-mode-off)
   (TeX-add-style-hook dvipdf 'TeX-PDF-mode-off)
   (TeX-add-style-hook dvipdfm 'TeX-PDF-mode-off)


___
auctex-diffs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2006-07-15 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli06/07/15 08:20:57

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.415
retrieving revision 5.416
diff -u -b -r5.415 -r5.416
--- latex.el12 Jul 2006 20:16:13 -  5.415
+++ latex.el15 Jul 2006 08:20:57 -  5.416
@@ -4653,7 +4653,8 @@
 (defun LaTeX-maybe-install-toolbar ()
   Conditionally install tool bar buttons for LaTeX mode.
 Install tool bar if `LaTeX-enable-toolbar' is non-nil.
-  (when LaTeX-enable-toolbar
+  (when (and (eq major-mode 'latex-mode)
+LaTeX-enable-toolbar)
 ;; Defined in `tex-bar.el':
 (LaTeX-install-toolbar)))
 


___
auctex-diffs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2006-07-15 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli06/07/15 08:40:48

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.416
retrieving revision 5.417
diff -u -b -r5.416 -r5.417
--- latex.el15 Jul 2006 08:20:57 -  5.416
+++ latex.el15 Jul 2006 08:40:48 -  5.417
@@ -4653,8 +4653,7 @@
 (defun LaTeX-maybe-install-toolbar ()
   Conditionally install tool bar buttons for LaTeX mode.
 Install tool bar if `LaTeX-enable-toolbar' is non-nil.
-  (when (and (eq major-mode 'latex-mode)
-LaTeX-enable-toolbar)
+  (when LaTeX-enable-toolbar
 ;; Defined in `tex-bar.el':
 (LaTeX-install-toolbar)))
 
@@ -4713,7 +4712,7 @@
   (setq major-mode 'latex-mode)
   (setq TeX-command-default LaTeX)
   (setq TeX-sentinel-default-function 'TeX-LaTeX-sentinel)
-  (add-hook 'tool-bar-mode-on-hook 'LaTeX-maybe-install-toolbar)
+  (add-hook 'tool-bar-mode-on-hook 'LaTeX-maybe-install-toolbar nil t)
   (when (if (featurep 'xemacs) (featurep 'toolbar) tool-bar-mode)
 (LaTeX-maybe-install-toolbar))
   (TeX-run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'LaTeX-mode-hook)


___
auctex-diffs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2006-07-15 Thread David Kastrup
Ralf Angeli [EMAIL PROTECTED] writes:

 CVSROOT:  /cvsroot/auctex
 Module name:  auctex
 Changes by:   Ralf Angeli angeli06/07/15 08:40:48
(setq major-mode 'latex-mode)
(setq TeX-command-default LaTeX)
(setq TeX-sentinel-default-function 'TeX-LaTeX-sentinel)
 -  (add-hook 'tool-bar-mode-on-hook 'LaTeX-maybe-install-toolbar)
 +  (add-hook 'tool-bar-mode-on-hook 'LaTeX-maybe-install-toolbar nil t)

I should be surprised if this worked on all supported Emacs versions
and in particular XEmacs.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


___
auctex-devel mailing list
auctex-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/auctex-devel


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

2006-07-12 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli06/07/12 19:45:55

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.413
retrieving revision 5.414
diff -u -b -r5.413 -r5.414
--- latex.el29 Jun 2006 18:42:00 -  5.413
+++ latex.el12 Jul 2006 19:45:55 -  5.414
@@ -2815,9 +2815,7 @@
 ;; while searching backward, search forward again.
 (cond ((bolp)
   (skip-chars-forward ^ \n (point-max)))
- ((TeX-looking-at-backward
-   (concat ^[ \t]+\\|^[ \t]* TeX-comment-start-regexp +[ \t]*)
-   (1- (line-beginning-position)))
+ ((TeX-looking-at-backward ^[ \t%]+ (1- (line-beginning-position)))
   (goto-char (match-end 0))
   (skip-chars-forward ^ \n (point-max
 ;; This code was copied from the function `fill-move-to-break-point'


___
auctex-diffs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2006-07-12 Thread Ralf Angeli
CVSROOT:/cvsroot/auctex
Module name:auctex
Changes by: Ralf Angeli angeli06/07/12 20:16:13

Index: latex.el
===
RCS file: /cvsroot/auctex/auctex/latex.el,v
retrieving revision 5.414
retrieving revision 5.415
diff -u -b -r5.414 -r5.415
--- latex.el12 Jul 2006 19:45:55 -  5.414
+++ latex.el12 Jul 2006 20:16:13 -  5.415
@@ -2813,11 +2813,10 @@
   (skip-chars-backward ^ \n))
 ;; Prevent infinite loops: If we cannot find a place to break
 ;; while searching backward, search forward again.
-(cond ((bolp)
+(when (save-excursion
+   (skip-chars-backward  \t%)
+   (bolp))
   (skip-chars-forward ^ \n (point-max)))
- ((TeX-looking-at-backward ^[ \t%]+ (1- (line-beginning-position)))
-  (goto-char (match-end 0))
-  (skip-chars-forward ^ \n (point-max
 ;; This code was copied from the function `fill-move-to-break-point'
 ;; in `fill.el' (CVS Emacs, 2005-02-22) and adapted accordingly.
 (when (and ( linebeg (point))


___
auctex-diffs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/auctex-diffs


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

2006-06-07 Thread Reiner Steib
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Reiner Steib rsteib   06/06/07 20:27:38

Index: latex.el
===
RCS file: /sources/auctex/auctex/latex.el,v
retrieving revision 5.410
retrieving revision 5.411
diff -u -b -r5.410 -r5.411
--- latex.el7 Jun 2006 16:30:34 -   5.410
+++ latex.el7 Jun 2006 20:27:38 -   5.411
@@ -4526,8 +4526,6 @@
 (?\C-s \\textsl{ })
 (?\C-t \\texttt{ } \\mathtt{ })
 (?\C-u \\textup{ })
-(?^ \\textsuperscript{ } ^{ })
-(?_ \\textsubscript{ } _{ })
 (?\C-d   t))
   Font commands used with LaTeX2e.  See `TeX-font-list'.
   :group 'LaTeX-macro
@@ -4708,9 +4706,7 @@
   (setq TeX-command-default LaTeX)
   (setq TeX-sentinel-default-function 'TeX-LaTeX-sentinel)
   (add-hook 'tool-bar-mode-on-hook 'LaTeX-maybe-install-toolbar)
-  (when (if (featurep 'xemacs)
-   (featurep 'toolbar)
- tool-bar-mode)
+  (when (if (featurep 'xemacs) (featurep 'toolbar) tool-bar-mode)
 (LaTeX-maybe-install-toolbar))
   (TeX-run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'LaTeX-mode-hook)
   (TeX-set-mode-name)


___
auctex-diffs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/auctex-diffs