[elpa] externals/auctex 8926369 06/69: Improve new-file regex.

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 89263699459a6201c244d327d7dc4b606f9547d1
Author: Tassilo Horn 
Commit: Tassilo Horn 

Improve new-file regex.

* tex-buf.el (TeX-parse-error): Improve new-file regex.
---
 tex-buf.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index 6a3e4ad..a6dbe65 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1486,7 +1486,7 @@ You might want to examine and modify the free variables 
`file',
  ;; TeX error
  "^\\(!\\|\\(.*?\\):[0-9]+:\\) \\|"
  ;; New file
- "(\n?\\([^())]+\\)\\|"
+ "(\n?\\([^\n())]+\\)\\|"
  ;; End of file.
  "\\()\\)\\|"
  ;; Hook to change line numbers



[elpa] externals/auctex c34bf64 07/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit c34bf649f5d460fe396d43cff751164ceb2895f7
Merge: 8926369 bee6baf
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog |4 
 style/listings.el |2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 56743ca..55de221 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-05-02  Jobst Hoffmann(tiny change)
+
+   * style/listings.el ("listings"): Fix typo.
+
 2014-05-01  Mos� Giordano  
 
* font-latex.el (font-latex-set-syntactic-keywords): Fix
diff --git a/style/listings.el b/style/listings.el
index 7b467ed..82ebd71 100644
--- a/style/listings.el
+++ b/style/listings.el
@@ -235,7 +235,7 @@
 '("lstloadlanguages" t)
 ;; 4.17 Short Inline Listing Commands
 '("lstMakeShortInline" [ "Options" ] "Character")
-'("lstDeleteShortLine" "Character")
+'("lstDeleteShortInline" "Character")
 
 "lstgrinddeffile" "lstaspectfiles" "lstlanguagefiles"
 "lstlistingname" "lstlistlistingname")



[elpa] externals/auctex a33be07 62/69: Remove "table" and "table*" from LaTeX-indent-environment-list

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit a33be079f05bfb5e4358fb7bb38b3e6696af7c1c
Author: Matthew Leach 
Commit: Mosè Giordano 

Remove "table" and "table*" from LaTeX-indent-environment-list

* latex.el (LaTeX-indent-environment-list): Remove the "table" and
  "table*" elements.

Signed-off-by: Mosè Giordano 
---
 latex.el |4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/latex.el b/latex.el
index d684120..7221fce 100644
--- a/latex.el
+++ b/latex.el
@@ -2941,9 +2941,7 @@ consideration just as is in the non-commented source 
code."
 ("equation")
 ("equation*")
 ("picture")
-("tabbing")
-("table")
-("table*"))
+("tabbing"))
 "Alist of environments with special indentation.
 The second element in each entry is the function to calculate the
 indentation level in columns."



[elpa] externals/auctex f919468 01/69: Improve TeX error parsing.

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit f91946802bd0bc6689de31493da9d8f8e55abfbb
Author: Tassilo Horn 
Commit: Tassilo Horn 

Improve TeX error parsing.

* tex-buf.el (TeX-error): Error if file containing the TeX error
doesn't exist instead of finding a new file.
(TeX-parse-error): Greatly simplify the new file and end of file
regexps.
---
 tex-buf.el |   28 
 1 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index 84ca2da..c2c3ba6 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1483,16 +1483,9 @@ You might want to examine and modify the free variables 
`file',
  ;; TeX error
  "^\\(!\\|\\(.*?\\):[0-9]+:\\) \\|"
  ;; New file
- "(\\(\"[^\"]*?\"\\|/*\
-\\(?:\\.+[^()\r\n{} \\/]*\\|[^()\r\n{} .\\/]+\
-\\(?: [^()\r\n{} .\\/]+\\)*\\(?:\\.[-0-9a-zA-Z_.]*\\)?\\)\
-\\(?:[\\/]+\\(?:\\.+[^()\r\n{} \\/]*\\|[^()\r\n{} .\\/]+\
-\\(?: [^()\r\n{} .\\/]+\\)*\\(?:\\.[-0-9a-zA-Z_.]*\\)?\\)?\\)*\\)\
-)*\\(?: \\|\r?$\\)\\|"
- ;; End of file.  The [^:] skips package messages like:
- ;; Package hyperref Message: Driver (autodetected): hpdftex.
- ;; [Loading MPS to PDF converter (version 2006.09.02).]
- "\\()\\)[^:.]\\|"
+ "(\n?\\([^())]+\\)\\|"
+ ;; End of file.
+ "\\()\\)\\|"
  ;; Hook to change line numbers
  " !\\(?:offset(\\([---0-9]+\\))\\|"
  ;; Hook to change file name
@@ -1545,11 +1538,12 @@ You might want to examine and modify the free variables 
`file',
 ((match-beginning 3)
  (let ((file (TeX-match-buffer 3))
(end (match-end 3)))
-   ;; Strip quotation marks and remove newlines if necessary
+   ;; Trim, strip quotation marks and remove newlines if necessary
(when (or (eq (string-to-char file) ?\")
- (string-match "\n" file))
- (setq file
-   (mapconcat 'identity (split-string file "[\"\n]+") "")))
+ (string-match "[ \t\n]" file))
+ (setq file (mapconcat 'identity
+   (split-string file "[\"\n]+" nil "[ \t]")
+   "")))
(push file TeX-error-file)
(push nil TeX-error-offset)
(goto-char end))
@@ -1624,8 +1618,10 @@ You might want to examine and modify the free variables 
`file',
 (setq TeX-error-point (point))
 
 ;; Find the error.
-(if (null file)
-   (error "Error occurred after last TeX file closed"))
+(when (null file)
+  (error "Error occurred after last TeX file closed"))
+(when (not (file-exists-p file))
+  (error "No such file: %s" file))
 (let ((runbuf (current-buffer))
  (master (with-current-buffer
  TeX-command-buffer



[elpa] externals/auctex 30fe0e9 63/69: Ensure LaTeX-indent-environment-list environments aren't filled

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 30fe0e90de48d403525375ba62b7783c7b084c47
Author: Matthew Leach 
Commit: Mosè Giordano 

Ensure LaTeX-indent-environment-list environments aren't filled

* tests/latex/latex-filling-in.tex: Add a tabular environment to ensure
  the body of the environment isn't filled as it is listed in
  LaTeX-indent-environment-list.
* tests/latex/latex-filling-out.tex: Likewise.

Signed-off-by: Mosè Giordano 
---
 tests/latex/latex-filling-in.tex  |4 
 tests/latex/latex-filling-out.tex |4 
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/tests/latex/latex-filling-in.tex b/tests/latex/latex-filling-in.tex
index 4cc184b..6e7294a 100644
--- a/tests/latex/latex-filling-in.tex
+++ b/tests/latex/latex-filling-in.tex
@@ -1 +1,5 @@
 Lorem ipsum dolor sit amet, consectetur adipisci elit, sed eiusmod \(0 = 1\) 
tempor incidunt ut $a^{2} + b^{2} = c^{2}$ labore et dolore magna aliqua.  Ut 
enim ad minim veniam, quis nostrum exercitationem ullam corporis suscipit 
laboriosam, nisi ut aliquid ex ea commodi consequatur.
+
+\begin{tabular}{| l | l | l | l |}
+  Lorem ipsum dolor sit amet, consectetur adipisci & Lorem ipsum dolor sit 
amet, consectetur adipisci & Lorem ipsum dolor sit amet, consectetur adipisci & 
Lorem ipsum dolor sit amet, consectetur adipisci
+\end{tabular}
diff --git a/tests/latex/latex-filling-out.tex 
b/tests/latex/latex-filling-out.tex
index cdb767a..b0596f3 100644
--- a/tests/latex/latex-filling-out.tex
+++ b/tests/latex/latex-filling-out.tex
@@ -3,3 +3,7 @@ Lorem ipsum dolor sit amet, consectetur adipisci elit, sed 
eiusmod
 magna aliqua.  Ut enim ad minim veniam, quis nostrum exercitationem
 ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi
 consequatur.
+
+\begin{tabular}{| l | l | l | l |}
+  Lorem ipsum dolor sit amet, consectetur adipisci & Lorem ipsum dolor sit 
amet, consectetur adipisci & Lorem ipsum dolor sit amet, consectetur adipisci & 
Lorem ipsum dolor sit amet, consectetur adipisci
+\end{tabular}



[elpa] externals/auctex af1ee52 47/69: Add support for missing macro \SetLabelAlign

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit af1ee52a86509d81f3a25f9f880bdedb8ec9704d
Author: Arash Esbati 
Commit: Mosè Giordano 

Add support for missing macro \SetLabelAlign

* style/enumitem.el ("enumitem-SetLabelAlign"): Plug
\SetLabelAlign into AUCTeX parser.
(LaTeX-enumitem-SetLabelAlign-regexp): New variable.
(LaTeX-enumitem-auto-prepare): Reset
`LaTeX-auto-enumitem-SetLabelAlign'.
(LaTeX-arg-SetLabelAlign): New function to query the arguments of
\SetLabelAlign.
("enumitem"): Add \SetLabelAlign to style hook incl. fontification.
(LaTeX-arg-SetEnumitemValue): Use `completing-read' instead of
`TeX-read-key-val'.

Signed-off-by: Mosè Giordano 
---
 style/enumitem.el |   43 +--
 1 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/style/enumitem.el b/style/enumitem.el
index bbbfe79..87249bc 100644
--- a/style/enumitem.el
+++ b/style/enumitem.el
@@ -1,6 +1,6 @@
 ;;; enumitem.el --- AUCTeX style for `enumitem.sty' (v3.5.2)
 
-;; Copyright (C) 2015 Free Software Foundation, Inc.
+;; Copyright (C) 2015, 2016 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati 
 ;; Maintainer: auctex-de...@gnu.org
@@ -115,6 +115,16 @@ the ones initially available through `enumitem' package.")
   "Matches the arguments of `\\newlist' from `enumitem'
 package.")
 
+;; Setup for \SetLabelAlign:
+
+(TeX-auto-add-type "enumitem-SetLabelAlign" "LaTeX")
+
+(defvar LaTeX-enumitem-SetLabelAlign-regexp
+  '("SetLabelAlign{\\([^}]+\\)}"
+1 LaTeX-auto-enumitem-SetLabelAlign)
+  "Matches the argument of `\\SetLabelAlign' from `enumitem'
+package.")
+
 ;; Setup for \SetEnumitemKey:
 
 (TeX-auto-add-type "enumitem-SetEnumitemKey" "LaTeX")
@@ -146,6 +156,7 @@ package.")
 (defun LaTeX-enumitem-auto-prepare ()
   "Clear various `LaTeX-enumitem-*' before parsing."
   (setq LaTeX-auto-enumitem-newlist  nil
+   LaTeX-auto-enumitem-SetLabelAlignnil
LaTeX-auto-enumitem-SetEnumitemKey   nil
LaTeX-auto-enumitem-SetEnumitemValue nil))
 
@@ -203,6 +214,20 @@ key-val and the first item."
(current-fill-column)))
 (LaTeX-fill-paragraph nil)))
 
+(defun LaTeX-arg-SetLabelAlign (optional)
+  "Ask for new type (value) for the \"align\" key and add it to
+`LaTeX-enumitem-key-val-options-local'."
+  (LaTeX-enumitem-update-key-val-options)
+  (let* ((key "align")
+(val (TeX-read-string "Alignment: "))
+(val-match (cdr (assoc key LaTeX-enumitem-key-val-options-local)))
+(temp (copy-alist LaTeX-enumitem-key-val-options-local))
+(opts (assq-delete-all (car (assoc key temp)) temp)))
+(pushnew (list key (delete-dups (apply 'append (list val) val-match)))
+opts :test #'equal)
+(TeX-argument-insert val optional)
+(LaTeX-add-enumitem-SetLabelAligns val)))
+
 (defun LaTeX-arg-SetEnumitemKey (optional)
   "Ask for a new key to be defined and add it to
 `LaTeX-enumitem-key-val-options-local'."
@@ -225,7 +250,7 @@ key-val and the first item."
   "Ask for a new value added to an existing key incl. the final
 replacement of the value."
   (LaTeX-enumitem-update-key-val-options)
-  (let* ((key (TeX-read-key-val optional LaTeX-enumitem-key-val-options-local 
"Key"))
+  (let* ((key (completing-read  "Key: " LaTeX-enumitem-key-val-options-local))
 (val (TeX-read-string "String value: "))
 ;; (key-match (car (assoc key LaTeX-enumitem-key-val-options-local)))
 (val-match (cdr (assoc key LaTeX-enumitem-key-val-options-local)))
@@ -258,6 +283,15 @@ in `enumitem'-completions."
  (pushnew (list key (delete-dups (apply 'append (list val) val-match)))
   opts :test #'equal)
(pushnew (list key (list val)) opts :test #'equal))
+  (setq LaTeX-enumitem-key-val-options-local (copy-alist opts
+  (dolist (newalign (LaTeX-enumitem-SetLabelAlign-list))
+(let* ((key "align")
+  (val (car newalign))
+  (val-match (cdr (assoc key LaTeX-enumitem-key-val-options-local)))
+  (temp (copy-alist LaTeX-enumitem-key-val-options-local))
+  (opts (assq-delete-all (car (assoc key temp)) temp)))
+  (pushnew (list key (delete-dups (apply 'append (list val) val-match)))
+  opts :test #'equal)
   (setq LaTeX-enumitem-key-val-options-local (copy-alist opts)
 
 (TeX-add-style-hook
@@ -268,6 +302,7 @@ in `enumitem'-completions."
(TeX-auto-add-regexp LaTeX-enumitem-newlist-regexp)
(TeX-auto-add-regexp LaTeX-enumitem-SetEnumitemKey-regexp)
(TeX-auto-add-regexp LaTeX-enumitem-SetEnumitemValue-regexp)
+   (TeX-auto-add-regexp LaTeX-enumitem-SetLabelAlign-regexp)
 
;; Activate the buffer-local version of key-vals.
(setq LaTeX-enumitem-key-val-options-local
@@ -392,6 +427,9 @@ in `enumitem'-completions."
 (pushnew env enums :test #'equal
   (completing-read "List name: " enums)
 
+;; "Align" is added as new value to "align" key in 

[elpa] externals/auctex c6d3152 29/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit c6d3152545eae9258cad5ed71f3f7303e2edf56c
Merge: 16af75d babe224
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog|   20 
 context.el   |2 +-
 latex.el |2 +-
 style/amstext.el |2 +-
 tex-info.el  |6 +++---
 texmathp.el  |5 +++--
 6 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4a88c13..2ce2a0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2014-10-02  Ikumi Keita  
+
+   * texmathp.el (texmathp-tex-commands-default): Move equation*
+   environment to AMS-LaTeX section.
+   (texmathp-why): Fix docstring.
+
+2014-10-02  Ikumi Keita  
+
+   * style/amstext.el (LaTeX-amstext-package-options): Rename from
+   `LaTeX-amstext-package-option'.
+
+2014-10-02  Ikumi Keita  
+
+   * tex-info.el (Texinfo-mark-environment, Texinfo-mark-section)
+   (Texinfo-mark-node): Use `push-mark' instead of `set-mark'.
+
+   * latex.el (LaTeX-mark-environment): Ditto.
+
+   * context.el (ConTeXt-mark-environment): Ditto.
+
 2014-09-25  Tassilo Horn  
 
* latex.el (LaTeX-insert-environment): Pass correct \end buffer
diff --git a/context.el b/context.el
index 3cc890f..b9ce2c0 100644
--- a/context.el
+++ b/context.el
@@ -839,7 +839,7 @@ the contents."
   (interactive)
   (let ((cur (point)))
 (ConTeXt-find-matching-stop inner)
-(set-mark (point))
+(push-mark (point))
 (goto-char cur)
 (ConTeXt-find-matching-start inner)
 (TeX-activate-region)))
diff --git a/latex.el b/latex.el
index aa755c9..143cb4e 100644
--- a/latex.el
+++ b/latex.el
@@ -4172,7 +4172,7 @@ environments."
   (goto-char cur)
   (dotimes (c count) (LaTeX-find-matching-begin))
   (setq beg (point)))
-(set-mark end)
+(push-mark end)
 (goto-char beg)
 (TeX-activate-region)))
 
diff --git a/style/amstext.el b/style/amstext.el
index ea6f619..d0a8e87 100644
--- a/style/amstext.el
+++ b/style/amstext.el
@@ -11,7 +11,7 @@
  '("text" t
  LaTeX-dialect)
 
-(defvar LaTeX-amstext-package-option nil
+(defvar LaTeX-amstext-package-options nil
   "Package options for the amstext package.")
 
 ;;; amstext.el ends here.
diff --git a/tex-info.el b/tex-info.el
index 2c94b6a..83e0081 100644
--- a/tex-info.el
+++ b/tex-info.el
@@ -183,7 +183,7 @@ environments."
(unless (= (1+ c) count)
  (beginning-of-line 0)))
   (setq beg (point)))
-(set-mark end)
+(push-mark end)
 (goto-char beg)
 (TeX-activate-region)))
 
@@ -264,7 +264,7 @@ the section."
(when  (looking-at "^\\s-*@node\\_>")
  (set boundary (point))
 
-  (set-mark end)
+  (push-mark end)
   (goto-char beg)
   (TeX-activate-region) )))
 
@@ -284,7 +284,7 @@ beginning of keyword `@node' or `@bye'."
(progn (beginning-of-line) (point))
 
 (when (and beg end)
-  (set-mark end)
+  (push-mark end)
   (goto-char beg)
   (TeX-activate-region) )))
 
diff --git a/texmathp.el b/texmathp.el
index 350406b..f13e237 100644
--- a/texmathp.el
+++ b/texmathp.el
@@ -117,7 +117,7 @@
 ("\\vcenter" arg-off)
 
 ;; Standard LaTeX
-("equation"  env-on)  ("equation*" env-on)
+("equation"  env-on)
 ("eqnarray"  env-on)  ("eqnarray*" env-on)
 ("math"  env-on)
 ("displaymath"   env-on)
@@ -132,6 +132,7 @@
 ("\\ensuremath"  arg-on)
 
 ;; AMS-LaTeX
+("equation*" env-on)
 ("align" env-on)  ("align*"env-on)
 ("gather"env-on)  ("gather*"   env-on)
 ("multline"  env-on)  ("multline*" env-on)
@@ -230,7 +231,7 @@ will be considered arguments of the macro independent of 
its definition."
   "After a call to `texmathp' this variable shows why math-mode is on or off.
 The value is a cons cell (MATCH . POSITION).
 MATCH is a string like a car of an entry in `texmathp-tex-commands', e.q.
-\"equation\" or \"\\ensuremath\" or \"\\[\" or \"$\".
+\"equation\" or \"\\ensuremath\" or \"\\=\\[\" or \"$\".
 POSITION is the buffer position of the match.  If there was no match,
 it points to the limit used for searches, usually two paragraphs up.")
 



[elpa] externals/auctex 416f131 40/69: Catch LaTeX class warnings

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 416f1315ca14e4d7eff16e78c601f43a3f31a795
Author: Mosè Giordano 
Commit: Mosè Giordano 

Catch LaTeX class warnings

* tex-buf.el (LaTeX-warnings-regexp): New variable.  This is the same
  regexp used before by `TeX-LaTeX-sentinel-has-warnings' and
  `TeX-parse-error', but now catches class warnings as well.
(TeX-LaTeX-sentinel-has-warnings, TeX-parse-error): Use
`LaTeX-warnings-regexp'.
---
 tex-buf.el |9 ++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index d44cbc7..0d924c7 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1389,13 +1389,16 @@ Return nil ifs no errors were found."
   (setq TeX-command-next TeX-command-Show))
 nil))
 
+(defvar LaTeX-warnings-regexp
+  "\\(?:LaTeX [-A-Za-z0-9]*\\|\\(?:Class\\|Package\\) [-A-Za-z0-9]+ 
\\)Warning:"
+  "Regexp matching LaTeX warnings.")
+
 (defun TeX-LaTeX-sentinel-has-warnings ()
   "Return non-nil, if the output buffer contains warnings.
 Warnings can be indicated by LaTeX or packages."
   (save-excursion
 (goto-char (point-min))
-(re-search-forward
- "^\\(LaTeX [-A-Za-z]*\\|Package [-A-Za-z0-9]+ \\)Warning:" nil t)))
+(re-search-forward (concat "^" LaTeX-warnings-regexp) nil t)))
 
 (defun TeX-LaTeX-sentinel-has-bad-boxes ()
   "Return non-nil, if LaTeX output indicates overfull or underfull boxes."
@@ -2266,7 +2269,7 @@ Return non-nil if an error or warning is found."
  "^\\(\\(?:Overfull\\|Underfull\\|Tight\\|Loose\\)\
  .*?[0-9]+--[0-9]+\\)\\|"
  ;; LaTeX warning
- "^\\(\\(?:LaTeX [-A-Za-z]*\\|Package [-A-Za-z0-9]+ \\)Warning:.*\\)"))
+ "^\\(" LaTeX-warnings-regexp ".*\\)"))
(error-found nil))
 (while
(cond



[elpa] externals/auctex 17d1a5d 36/69: ; Merge branch 'simplify-TeX-parse-error'

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 17d1a5d71f9fb6adbb90e17dbf223f3bf1e2f92a
Merge: f9efa73 1950012
Author: Mosè Giordano 
Commit: Mosè Giordano 

; Merge branch 'simplify-TeX-parse-error'
---
 tex-buf.el |   38 +++---
 1 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index a8ba024..3478590 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1742,15 +1742,18 @@ command."
(goto-char pt)
(insert-before-markers string)
(set-marker (process-mark process) (point))
-   ;; Remove line breaks at column 79
+   ;; Remove line breaks at columns 79 and 80
(while (> (point) pt)
  (end-of-line 0)
- (when (and (= (- (point) (line-beginning-position)) 79)
-;; Heuristic: Don't delete the linebreak if the
-;; next line is empty or starts with an opening
-;; parenthesis or if point is located after a period.
+ (when (and (memql (- (point) (line-beginning-position)) '(79 80))
+;; Heuristic: Don't delete the linebreak if the next line
+;; is empty or starts with an opening parenthesis, or if
+;; point is located after a period and in the next line no
+;; word char follows.
 (not (memq (char-after (1+ (point))) '(?\n ?\()))
-(not (eq (char-before) ?.)))
+(not (and (eq (char-before) ?.)
+  (char-after (1+ (point)))
+  (not (eq ?w (char-syntax (char-after (1+ 
(point)
(delete-char 1)))
(goto-char (marker-position (process-mark process)))
;; Determine current page
@@ -2252,16 +2255,9 @@ Return non-nil if an error or warning is found."
  ;; TeX error
  "^\\(!\\|\\(.*?\\):[0-9]+:\\) \\|"
  ;; New file
- "(\\(\"[^\"]*?\"\\|/*\
-\\(?:\\.+[^()\r\n{} \\/]*\\|[^()\r\n{} .\\/]+\
-\\(?: [^()\r\n{} .\\/]+\\)*\\(?:\\.[-0-9a-zA-Z_.]*\\)?\\)\
-\\(?:[\\/]+\\(?:\\.+[^()\r\n{} \\/]*\\|[^()\r\n{} .\\/]+\
-\\(?: [^()\r\n{} .\\/]+\\)*\\(?:\\.[-0-9a-zA-Z_.]*\\)?\\)?\\)*\\)\
-)*\\(?: \\|\r?$\\)\\|"
- ;; End of file.  The [^:] skips package messages like:
- ;; Package hyperref Message: Driver (autodetected): hpdftex.
- ;; [Loading MPS to PDF converter (version 2006.09.02).]
- "\\()\\)[^:.]\\|"
+ "(\n?\\([^\n())]+\\)\\|"
+ ;; End of file.
+ "\\()\\)\\|"
  ;; Hook to change line numbers
  " !\\(?:offset(\\([---0-9]+\\))\\|"
  ;; Hook to change file name
@@ -2321,9 +2317,13 @@ Return non-nil if an error or warning is found."
(end (match-end 3)))
;; Strip quotation marks and remove newlines if necessary
(when (or (eq (string-to-char file) ?\")
- (string-match "\n" file))
- (setq file
-   (mapconcat 'identity (split-string file "[\"\n]+") "")))
+ (string-match "[ \t\n]" file))
+ (setq file (mapconcat 'identity (split-string file "[\"\n]+") 
"")))
+   ;; Trim whitespace at the front/end
+   (setq file
+ (progn
+   (string-match 
"^[[:space:]]*\\(.*[^[:space:]]\\)[[:space:]]*$" file)
+   (match-string 1 file)))
(push file TeX-error-file)
(push nil TeX-error-offset)
(goto-char end))



[elpa] externals/auctex 3dec183 08/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 3dec183d22fb0d43dddc2809b51e70ddb661e21d
Merge: c34bf64 da395f4
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog|   21 ++
 font-latex.el|   12 +-
 style/siunitx.el |  578 --
 3 files changed, 327 insertions(+), 284 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 55de221..2f27437 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2014-05-17  Mos� Giordano  
+
+   * font-latex.el: Update copyright years.
+   (font-latex-update-sectioning-faces): Make sure
+   `height-scale' is a floating point number.
+   (font-latex-make-sectioning-faces): Ditto.
+
+2014-05-10  Mos� Giordano  
+
+   * style/siunitx.el: Update copyright years and specify last
+   `siunitx' version supported.  Hard wrap lines longer than 80
+   columns.
+   (LaTeX-siunitx-regexp): Move the escape character out of the group
+   matching the unit name.
+   (LaTeX-arg-siunitx-unit): Add `prefix' argument.  Replace the
+   space with `TeX-esc' as the completion separator.
+   (LaTeX-arg-define-siunitx-unit): Define a default prompt; set
+   `initial-input' to nil; use `TeX-esc' as prefix to the given
+   input.
+   ("siunitx"): Remove the escape character from the unit names.
+
 2014-05-02  Jobst Hoffmann(tiny change)
 
* style/listings.el ("listings"): Fix typo.
diff --git a/font-latex.el b/font-latex.el
index 39be372..f2ad1f9 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1,6 +1,6 @@
 ;;; font-latex.el --- LaTeX fontification for Font Lock mode.
 
-;; Copyright (C) 1996-2013  Free Software Foundation, Inc.
+;; Copyright (C) 1996-2014  Free Software Foundation, Inc.
 
 ;; Authors:Peter S. Galbraith 
 ;; Simon Marshall 
@@ -182,7 +182,10 @@ correct value from document properties."
   "Update sectioning commands faces."
   (unless height-scale
 (setq height-scale (if (numberp font-latex-fontify-sectioning)
-  font-latex-fontify-sectioning
+  ;; Make sure `height-scale' is a floating point
+  ;; number because `set-face-attribute' treats
+  ;; integers differently from floating points.
+  (float font-latex-fontify-sectioning)
 1.1)))
   (unless max
 (setq max font-latex-sectioning-max))
@@ -236,7 +239,10 @@ Emacs."
   (unless max (setq max font-latex-sectioning-max))
   (unless height-scale
 (setq height-scale (if (numberp font-latex-fontify-sectioning)
-  font-latex-fontify-sectioning
+  ;; Make sure `height-scale' is a floating point
+  ;; number because the integer type is treated
+  ;; differently.
+  (float font-latex-fontify-sectioning)
 1.1)))
   (dotimes (num max)
 (let* (;; reverse for XEmacs:
diff --git a/style/babel.el b/style/babel.el
old mode 100755
new mode 100644
diff --git a/style/siunitx.el b/style/siunitx.el
index fbf2d89..aa73bba 100644
--- a/style/siunitx.el
+++ b/style/siunitx.el
@@ -1,6 +1,6 @@
-;;; siunitx.el --- AUCTeX style for `siunitx.sty' version 2.5q.
+;;; siunitx.el --- AUCTeX style for `siunitx.sty' version 2.5s.
 
-;; Copyright (C) 2012-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2014 Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-de...@gnu.org
 ;; Author: Mosè Giordano 
@@ -25,7 +25,7 @@
 
 ;;; Commentary:
 
-;; This file adds support for `siunitx.sty' version 2.5q.
+;; This file adds support for `siunitx.sty' version 2.5s.
 
 ;;; Code:
 
@@ -36,8 +36,9 @@
 ;; wrapped in `[...]'.
 (defvar LaTeX-siunitx-regexp
   (concat "Declare"
- 
"\\(?:SIUnit\\|SIPrefix\\|BinaryPrefix\\|SIPostPower\\|SIPrepower\\|SIQualifier\\)"
- "[ \t\n\r]*\\(?:\\[.*\\]\\)?[ \t\n\r]*{?\\([A-Za-z]+\\)}?")
+ "\\(?:SIUnit\\|SIPrefix\\|BinaryPrefix\\|SIPostPower\\|SIPrepower\\|"
+ "SIQualifier\\)"
+ "[ \t\n\r]*\\(?:\\[.*\\]\\)?[ \t\n\r]*{?\\([A-Za-z]+\\)}?")
   "Matches new siunitx unit, prefix, power, and qualifier definitions.")
 
 (defvar LaTeX-auto-siunitx-unit nil
@@ -60,39 +61,43 @@
 (defvar LaTeX-siunitx-unit-history nil
   "History of units in siunitx.")
 
-(defun LaTeX-arg-siunitx-unit (optional &optional prompt initial-input 
definition)
+(defun LaTeX-arg-siunitx-unit (optional &optional prompt initial-input
+   definition prefix)
   "Prompt for siunitx units, prefixes, powers, and qualifiers.
 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, add 

[elpa] externals/auctex 8b2550e 16/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 8b2550e597af38caa377b6353578f52928f2811e
Merge: a074732 46e6803
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog|   60 +
 Makefile.in  |   14 +++---
 doc/auctex.texi  |   21 +
 doc/changes.texi |   13 +
 latex.el |  131 -
 style/amsmath.el |  104 +-
 style/array.el   |5 ++-
 style/plext.el   |   77 +++
 8 files changed, 372 insertions(+), 53 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4162bec..fb1e62f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,63 @@
+2014-07-17  Mos� Giordano  
+
+   * Makefile.in: Update copyright years.
+   (EXCLUDEDFILES): Rename from GITFILES.  Remove also .cvsignore and
+   tests from the release tarball.
+   (release-commit): More precise suggestion to push tag and release
+   commit.
+   (tar-ball): Use EXCLUDEDFILES in place of GITFILES.
+
+2014-07-15  Ikumi Keita  
+
+   * latex.el: Enhance array and tabular(*) environments support.
+   (LaTeX-env-array): Add call to `LaTeX-item-array'.
+   (LaTeX-env-tabular*): Add call to `LaTeX-item-tabular*'.
+   (LaTeX-array-skipping-regexp): New variable.
+   (LaTeX-tabular*-skipping-regexp): Ditto.
+   (LaTeX-item-array): New function.  Put line break macro on the
+   last line and insert suitable number of ampersands.
+   (LaTeX-item-tabular*): Ditto.
+   (LaTeX-insert-ampersands): New function.  Insert suitable number
+   of ampersands.
+   (LaTeX-array-column-letters): New variable.  Column letters for
+   array-like environments.
+   (LaTeX-array-count-columns): New function.  Count number of
+   ampersands to be inserted.
+   (LaTeX-common-initialization): Add entries to LaTeX-item-list to
+   use `LaTeX-item-array' and `LaTeX-item-tabular*'.
+
+   * style/amsmath.el: Enhance alignat-like environments support
+   as well as some cleanups.
+   (LaTeX-item-equation-alignat): New function.  Insert contents to
+   terminate a line in multi-line equations environment.
+   (LaTeX-amsmath-env-alignat): Use it.  Add doc string.
+   (LaTeX-amsmath-env-alignedat): Ditto.
+   (LaTeX-amsmath-env-aligned): Removed.  Just specifying a prompt
+   string for an optional argument is enough.
+   (LaTeX-item-equation): Take over the job of
+   `LaTeX-item-equations'.  Add an optional `suppress' argument:
+   when it is non-nil skip putting line break macro.  Add doc string.
+   (LaTeX-item-equations): Removed.  Its task is now covered by
+   `LaTeX-item-equation'.
+   (LaTeX-item-equation-alignat): New function.  Insert ampersands
+   according to the columns number, as well as calling
+   `LaTeX-item-equation'.
+   (LaTeX-amsmath-alignat-number-of-ampersands): New function.
+   ("amsmath"): Arrange setups of variables to adopt the above
+   changes.
+
+   * style/array.el ("array"): Change `LaTeX-array-column-letters'
+   locally to include addtional letters extended in array.sty.
+
+   * style/plext.el: New style file.  Add support for extended
+   format for array-like environments.
+
+   * Makefile.in (STYLESRC): Include style/plext.el.
+
+   * doc/auctex.texi: Add documentation for the above enhancements.
+
+   * doc/changes.texi: Ditto.
+
 2014-07-14  Mos� Giordano  
 
* tex-buf.el (TeX-next-error): Do not pass `reparse' argument to
diff --git a/Makefile.in b/Makefile.in
index b69cf0c..efdc405 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -2,7 +2,7 @@
 
 # Maintainer: auctex-de...@gnu.org
 
-# Copyright (C) 2003-2008, 2010, 2013 Free Software
+# Copyright (C) 2003-2008, 2010, 2013, 2014 Free Software
 #   Foundation, Inc.
 
 # This file is part of AUCTeX.
@@ -58,8 +58,8 @@ AUTOLOAD=--eval '(let ((generated-autoload-file 
(expand-file-name "$@"))) \
   (save-buffers-kill-emacs t))'
 DESCEND=test -z "$(subdirs)" || (OLDPWD="`pwd`";for i in ""$(subdirs);do cd 
$$i;echo "Descending into `pwd`";$(MAKE) 'DESTDIR=$(DESTDIR)' 
PACKAGE=$(PACKAGE) $@ || exit $$?;cd "$$OLDPWD";echo "Ascending into 
$$OLDPWD";done)
 
-GITFILES=autogen.sh .gitignore doc/.gitignore preview/.gitignore \
-   preview/latex/.gitignore README.GIT
+EXCLUDEDFILES=autogen.sh .cvsignore .gitignore doc/.gitignore 
preview/.gitignore \
+   preview/latex/.gitignore README.GIT tests
 
 .SUFFIXES: .el .elc .texi
 
@@ -134,7 +134,7 @@ STYLESRC = style/prosper.el \
   style/acronym.el   style/xparse.elstyle/fancyvrb.el \
   style/tabulary.el  style/fontspec.el  style/unicode-math.el \
   style/luacode.el   style/metalogo.el  style/english.el \
-  style/exercise.el
+  style/exercise.el  style/plext.el
 STYLEELC = $(STYLESRC:.el=.elc)
 
 CLEANFILES = $(AUCEL

[elpa] externals/auctex 2e543ef 58/69: Fix parsing of vertical bad boxes context

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 2e543efcc625e2e8645c934e01d3baf76b104bee
Author: Mosè Giordano 
Commit: Mosè Giordano 

Fix parsing of vertical bad boxes context

* tex-buf.el (TeX-warning): Use as context for vertical bad boxes the
warning itself and don't move point.
* tests/tex/compilation-log.txt: Add a test for vertical bad boxes, and
horizontal bad boxes ending with "at line NN".  The two warnings are in
two consecutive lines, make sure the second one is correctly reported.
* tests/tex/error-parsing.el: Update result of the test accordingly.
---
 tests/tex/compilation-log.txt |6 +
 tests/tex/error-parsing.el|   12 +-
 tex-buf.el|   46 +
 3 files changed, 45 insertions(+), 19 deletions(-)

diff --git a/tests/tex/compilation-log.txt b/tests/tex/compilation-log.txt
index 2e8e00f..3598af4 100644
--- a/tests/tex/compilation-log.txt
+++ b/tests/tex/compilation-log.txt
@@ -41,6 +41,12 @@ LaTeX Font Warning: Font shape `OML/cmm/b/it' in size <5.5> 
not available
 
 [1{/opt/texlive/2015/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] 
(./test.aux)
 
+(./test.lof
+Underfull \vbox (badness 1048) has occurred while \output is active [7]
+Overfull \hbox (0.93071pt too wide) detected at line 31
+ []\T1/jkpl/m/n/10.95 144
+)
+
 LaTeX Warning: There were undefined references.
 
 )
diff --git a/tests/tex/error-parsing.el b/tests/tex/error-parsing.el
index 979059b..170c8bf 100644
--- a/tests/tex/error-parsing.el
+++ b/tests/tex/error-parsing.el
@@ -90,7 +90,17 @@ ABD: EveryShipout initializing macros"
  (warning "./test.tex" 70 "LaTeX Font Warning: Font shape 
`OML/cmm/b/it' in size <5.5> not available"
   0 "LaTeX Font Warning: Font shape `OML/cmm/b/it' in size <5.5> 
not available
 (Font)  size <5> substituted on input line 70.\n" nil 70 nil 1485 
nil)
+ (bad-box "./test.lof" nil "Underfull \\vbox (badness 1048) has 
occurred while \\output is active [7]"
+  0 "\nUnderfull \\vbox (badness 1048) has occurred while \\output 
is active [7]"
+  nil nil t 1651 nil)
+ ;; It is possible there are two different bad box warnings in two
+ ;; consecutive lines (for example it happens if the first one is a
+ ;; vertical bad box which doesn't provide additional information),
+ ;; this test makes sure the second warning is not mistaken as
+ ;; context of the first one.
+ (bad-box "./test.lof" 31 "Overfull \\hbox (0.93071pt too wide) 
detected at line 31"
+  0 "\n []\\T1/jkpl/m/n/10.95 144" "144" 31 t 1733 nil)
  (warning "./test.tex" nil "LaTeX Warning: There were undefined 
references."
-  0 "LaTeX Warning: There were undefined references.\n" nil nil 
nil 1616 nil)
+  0 "LaTeX Warning: There were undefined references.\n" nil nil 
nil 1785 nil)
 
 ;;; error-parsing.el ends here
diff --git a/tex-buf.el b/tex-buf.el
index 052f414..15e9a69 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -2590,24 +2590,34 @@ warning."
 (beginning-of-line))
   (point)))
 
-(context (if (string-match LaTeX-warnings-regexp warning)
- ;; The warnings matching `LaTeX-warnings-regexp' are
- ;; emitted by \GenericWarning macro, or macros based on it
- ;; (\ClassWarning, \PackageWarning, etc).  After such
- ;; warnings there is an empty line, just look for it to
- ;; find the end.
- (progn
-   (beginning-of-line)
-   (while (null (eolp))
- (forward-line 1))
-   (buffer-substring context-start (progn (end-of-line)
-  (point
-   (forward-line 1)
-   (end-of-line)
-   (while (equal (current-column) 79)
- (forward-line 1)
- (end-of-line))
-   (buffer-substring context-start (point
+(context (cond ((string-match LaTeX-warnings-regexp warning)
+;; The warnings matching `LaTeX-warnings-regexp' are
+;; emitted by \GenericWarning macro, or macros based on
+;; it (\ClassWarning, \PackageWarning, etc).  After
+;; such warnings there is an empty line, just look for
+;; it to find the end.
+(beginning-of-line)
+(while (null (eolp))
+  (forward-line 1))
+(buffer-substring context-start (progn (end-of-line)
+   (point
+
+   ((and bad-

[elpa] externals/auctex 891bba7 38/69: Add ERT test for error parsing

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 891bba7c125e7fff5e0c345e5aab1a28a809902e
Author: Mosè Giordano 
Commit: Mosè Giordano 

Add ERT test for error parsing

* tests/tex/compilation-log.txt: Add minimal example of compilation log
  that failed to be parsed correctly with the old parsing function.
* tests/tex/error-parsing.el: New ERT test.
---
 tests/tex/compilation-log.txt |8 ++
 tests/tex/error-parsing.el|   55 +
 2 files changed, 63 insertions(+), 0 deletions(-)

diff --git a/tests/tex/compilation-log.txt b/tests/tex/compilation-log.txt
new file mode 100644
index 000..f28dbf1
--- /dev/null
+++ b/tests/tex/compilation-log.txt
@@ -0,0 +1,8 @@
+(./test.tex
+(/opt/texlive/2015/texmf-dist/tex/context/base/supp-pdf.mkii
+[Loading MPS to PDF converter (version 2006.09.02).]
+)
+
+Package foo Warning: This is a warning!
+
+[1{/opt/texlive/2015/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] 
(./test.aux))
diff --git a/tests/tex/error-parsing.el b/tests/tex/error-parsing.el
new file mode 100644
index 000..aa01629
--- /dev/null
+++ b/tests/tex/error-parsing.el
@@ -0,0 +1,55 @@
+;;; error-parsing.el --- tests for error parsing
+
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Code:
+
+(require 'ert)
+(require 'tex-buf)
+
+(defun AUCTeX-set-ert-path (&rest sym-val)
+  "Set first element of SYM-VAL to the next one, and so on.
+
+The value is the path to the test file, make sure it is expanded
+in the right directory even when the ERT test is run from the
+command line and from another directory."
+  (while sym-val
+(set (pop sym-val)
+(expand-file-name (pop sym-val)
+  (when load-file-name
+(file-name-directory load-file-name))
+
+(AUCTeX-set-ert-path
+ 'TeX-test-compilation-log
+ "compilation-log.txt")
+
+(ert-deftest TeX-error-parsing ()
+  "Test error parsing functions."
+  (should (equal
+  (with-temp-buffer
+(setq TeX-debug-warnings t)
+ (insert-file-contents TeX-test-compilation-log)
+ (TeX-parse-all-errors)
+TeX-error-list)
+  '((warning "./test.tex" nil "Package foo Warning: This is a warning!"
+ 0 "Package foo Warning: This is a warning!\n"
+ nil nil nil 170)
+
+;;; error-parsing.el ends here



[elpa] externals/auctex 056d8c8 50/69: Fix TeX-check-files

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 056d8c84edcdf20a3b365516f4d5c2dc4a554fda
Author: Mosè Giordano 
Commit: Mosè Giordano 

Fix TeX-check-files

* tex-buf.el (TeX-check-files): Run the test in `TeX-master-directory'
  as well.
---
 tex-buf.el |   11 ++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index 3ba1f87..f55d6f4 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -571,7 +571,16 @@ ORIGINALS which are modified but not saved yet."
 (buffers (buffer-list)))
 (dolist (path (mapcar (lambda (dir)
(expand-file-name (file-name-as-directory dir)))
- TeX-check-path))
+ (append
+  TeX-check-path
+  ;; In `TeX-command-default', this function is used to
+  ;; check whether bibliography databases are newer
+  ;; than generated *.bbl files, but bibliography
+  ;; database are relative to `TeX-master-directory'
+  ;; and the test can be run also from included files
+  ;; that are in directories different from
+  ;; `TeX-master-directory'.
+  (list (TeX-master-directory)
   (dolist (orig originals)
(dolist (ext extensions)
  (let ((filepath (concat path orig "." ext)))



[elpa] externals/auctex 7d4bfac 18/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 7d4bfacf028203616194b95d5eff7f263d2f6d51
Merge: 312c74a 4c8d64c
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog|   14 +++
 doc/auctex.texi  |   34 ++
 doc/changes.texi |   13 +--
 latex.el |  100 --
 tex-buf.el   |   11 +++---
 5 files changed, 130 insertions(+), 42 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2be1b61..806e013 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2014-08-11  Mos� Giordano  
+
+   * tex-buf.el (TeX-command): Keep the frame and the buffer
+   associate to the error overview if the command to be run is View.
+
+   * latex.el (LaTeX-auto-insert-label): New customizable variable.
+   (LaTeX-label): Use it.
+
+   * doc/auctex.texi (Environments): Document
+   `LaTeX-auto-insert-label'.
+
+   * doc/changes.texi: Mention `LaTeX-auto-insert-label'.  Fix a
+   couple of bad-boxes in the PDF output of the manual.
+
 2014-07-25  Tassilo Horn  
 
* latex.el (LaTeX-largest-level-set): Adapt
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 7261705..37c7366 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -848,6 +848,40 @@ prefix argument), the current environment is modified and 
no new
 environment is inserted.
 @end deffn
 
+@AUCTeX{} helps you adding labels to environments which use them, such
+as @samp{equation}, @samp{figure}, @samp{table}, etc@dots{}  When you
+insert one of the supported environments with @kbd{C-c C-e}, you will be
+automatically prompted for a label.  If you want to select the
+environments for which to automatically insert or not the label,
+customize the @code{LaTeX-auto-insert-label} variable.
+@defopt LaTeX-auto-insert-label
+Control whether @code{LaTeX-environment} (@kbd{C-c C-e}) should insert a
+label.  If nil, never inserts a label, if t always inserts a label and
+this the default.
+
+This variable may also be a cons cell, to whitelist or blacklist the
+environments for which a label should or should not be inserted.  The
+car can be either nil or t.  In the former case,
+@code{LaTeX-environment} never inserts labels except for the
+environments listed in the cdr; in the latter case
+@code{LaTeX-environment} always inserts labels except for the
+environments listed in the cdr.  In any cases, you can manually insert
+at point a label inside an environment with @kbd{C-c C-m label
+@key{RET}}, as usual.
+
+For example, the value
+@lisp
+(t . "equation")
+@end lisp
+makes @AUCTeX{} always prompt you for a label except for the
+@samp{equation} environment.  Instead with the value
+@lisp
+(nil . "caption" "figure")
+@end lisp
+you will be prompted for a label only for @samp{caption} and
+@samp{figure} environments.
+@end defopt
+
 As a default selection, @AUCTeX{} will suggest the environment last
 inserted or, as the first choice the value of the variable
 @code{LaTeX-default-environment}.
diff --git a/doc/changes.texi b/doc/changes.texi
index b408b47..3ce9d34 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -26,7 +26,7 @@ by the TeX compiler can be opened with @kbd{M-x 
TeX-error-overview
 
 @item
 Style file authors are encouraged to distinguish common from expert
-macros/environments, and mark the latter using
+macros and environments, and mark the latter using
 @code{TeX-declare-expert-macros} and
 @code{LaTeX-declare-expert-environments}.
 
@@ -53,9 +53,10 @@ non-nil.  Completion for class options of the standard 
@LaTeX{} classes
 is provided as well.
 
 @item
-New user options @code{LaTeX-default-author}, @code{TeX-date-format},
-@code{TeX-insert-braces-alist}, @code{LaTeX-fontspec-arg-font-search},
-and @code{LaTeX-fontspec-font-list-default}.  A new possible value
+New user options @code{LaTeX-default-author},
+@code{LaTeX-fontspec-arg-font-search},
+@code{LaTeX-fontspec-font-list-default}, @code{TeX-date-format}, and
+@code{TeX-insert-braces-alist}.  A new possible value
 (@code{show-all-optional-args}) for
 @code{TeX-insert-macro-default-style} was added.  The default value of
 @code{TeX-source-correlate-method} has been changed.
@@ -127,6 +128,10 @@ per file basis using the @code{TeX-command-extra-options} 
option.
 @item
 Now @kbd{C-c C-e document @key{RET}}, in an empty document, prompts for
 @samp{\usepackage} macros in addition to @samp{\documentclass}.
+
+@item
+You can customize for which environments a label should be automatically
+inserted or not through the user option @code{LaTeX-auto-insert-label}.
 @end itemize
 
 @heading News since 11.87
diff --git a/latex.el b/latex.el
index c798cda..d1ac41f 100644
--- a/latex.el
+++ b/latex.el
@@ -835,6 +835,28 @@ the label inserted, or nil if no label was inserted."
   :group 'LaTeX-label
   :type 'function)
 
+(defcustom LaTeX-auto-insert-label t
+  "Control whether `LaTeX-label' function should insert a label.
+If nil, never inserts a

[elpa] externals/auctex 464bef6 39/69: Fix TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 464bef63b52ef3aee0b50c4bee76d24dc6b58ddc
Author: Mosè Giordano 
Commit: Mosè Giordano 

Fix TeX-parse-error

* tex-buf.el (TeX-parse-error): Remove from the file string pages of the
  output file.
* tests/tex/compilation-log.txt: Add a warning containing such faulty
  file name.
* tests/tex/error-parsing.el (TeX-error-parsing): Update result of the
  test accordingly.
---
 tests/tex/compilation-log.txt |7 ++-
 tests/tex/error-parsing.el|   10 --
 tex-buf.el|   20 
 3 files changed, 30 insertions(+), 7 deletions(-)

diff --git a/tests/tex/compilation-log.txt b/tests/tex/compilation-log.txt
index f28dbf1..98b3422 100644
--- a/tests/tex/compilation-log.txt
+++ b/tests/tex/compilation-log.txt
@@ -5,4 +5,9 @@
 
 Package foo Warning: This is a warning!
 
-[1{/opt/texlive/2015/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] 
(./test.aux))
+[1{/opt/texlive/2015/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] 
(./test.aux)
+
+(./secondary-file.tex [8] [9] [10]
+Underfull \hbox (badness 6608) in paragraph at lines 131--132
+[]|\T1/jkpl/m/n/10.95 (+20) Something bla
+[11] [12]))
diff --git a/tests/tex/error-parsing.el b/tests/tex/error-parsing.el
index aa01629..ce09750 100644
--- a/tests/tex/error-parsing.el
+++ b/tests/tex/error-parsing.el
@@ -44,12 +44,18 @@ command line and from another directory."
   "Test error parsing functions."
   (should (equal
   (with-temp-buffer
-(setq TeX-debug-warnings t)
+(setq TeX-debug-warnings t
+  TeX-debug-bad-boxes t)
  (insert-file-contents TeX-test-compilation-log)
  (TeX-parse-all-errors)
 TeX-error-list)
   '((warning "./test.tex" nil "Package foo Warning: This is a warning!"
  0 "Package foo Warning: This is a warning!\n"
- nil nil nil 170)
+ nil nil nil 170)
+(bad-box
+ "./secondary-file.tex" 131
+ "Underfull \\hbox (badness 6608) in paragraph at lines 131--132"
+ 0 "\n[]|\\T1/jkpl/m/n/10.95 (+20) Something bla" "bla"
+ 132 10 391)
 
 ;;; error-parsing.el ends here
diff --git a/tex-buf.el b/tex-buf.el
index 3478590..d44cbc7 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -2319,11 +2319,23 @@ Return non-nil if an error or warning is found."
(when (or (eq (string-to-char file) ?\")
  (string-match "[ \t\n]" file))
  (setq file (mapconcat 'identity (split-string file "[\"\n]+") 
"")))
-   ;; Trim whitespace at the front/end
+   ;; Polish `file' string
(setq file
- (progn
-   (string-match 
"^[[:space:]]*\\(.*[^[:space:]]\\)[[:space:]]*$" file)
-   (match-string 1 file)))
+ (let ((string file))
+   ;; Trim whitespaces at the front.  XXX: XEmacs doesn't
+   ;; support character classes in regexps, like "[:space:]".
+   (setq string
+ (if (string-match "\\'[ \t\n\r]*" string)
+ (replace-match "" t t string)
+   string))
+   ;; Sometimes `file' is something like
+   ;; "./path/to/file.tex [9] [10] "
+   ;; where "[9]" and "[10]" are pages of the output file.
+   ;; Remove these numbers together with whitespaces at the end
+   ;; of the string.
+   (if (string-match "\\( *\\(\\[[0-9]+\\]\\)? *\\)*\\'" 
string)
+   (replace-match "" t t string)
+ string)))
(push file TeX-error-file)
(push nil TeX-error-offset)
(goto-char end))



[elpa] externals/auctex 524b45b 05/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 524b45bd1daaa2891d5854ef7fe4b265515a1c2c
Merge: a7f4839 32fc9bd
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog |6 ++
 font-latex.el |   16 ++--
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d5dc59f..56743ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-05-01  Mos� Giordano  
+
+   * font-latex.el (font-latex-set-syntactic-keywords): Fix
+   fontification of the optional argument to a verbatim-like
+   environment.
+
 2014-04-16  Tassilo Horn  
 
* tex-buf.el (TeX-parse-error): Add another exception.
diff --git a/font-latex.el b/font-latex.el
index 33eb1ad..39be372 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -896,8 +896,20 @@ have changed."
  font-latex-syntactic-keywords nil)
 (unless (= (length verb-envs) 0)
   (add-to-list 'font-latex-syntactic-keywords
-  `(,(concat "^[ \t]*begin *{\\(?:" verb-envs
- "\\)}.*\\(\n\\)")
+  `(,(concat
+  "^[ \t]*begin *{\\(?:" verb-envs "\\)}"
+  ;; Some environments accept an optional argument that can
+  ;; span over more lines.  Between "\begin{}" and
+  ;; the optional argument there can be whitespaces and the
+  ;; newline can be commented by a "%" character.
+  "[ \t]*\\(?:%.*\n[ \t]*\\)?"
+  ;; The following line of the regexp matches the optional
+  ;; argument and allows for up to one level of brackets
+  ;; inside the argument (e.g., the dialect of a language
+  ;; in the `lstlisting' environment by the `listings'
+  ;; package).
+  "\\(?:\\[[^\]\[]*\\(?:\\[[^\]\[]*\\][^\]\[]*\\)*\\]\\)?"
+  "\\(\n\\)")
 (1 "|" t)))
   (add-to-list 'font-latex-syntactic-keywords
   ;; Using the newline character for the syntax



[elpa] externals/auctex d4059b8 02/69: Improve line wrap removal heuristics.

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit d4059b8f49c2609369d694a8250d1df8641161c3
Author: Tassilo Horn 
Commit: Tassilo Horn 

Improve line wrap removal heuristics.

* tex-buf.el (TeX-format-filter): Remove linebreaks at columns 79
and also column 80.  Also remove linebreaks preceded by a period
that are followed by a word character to remove linebreaks in file
names that are wrapped just after the period starting the file
name extension.
---
 tex-buf.el |   14 --
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index c2c3ba6..e64c3a2 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1176,15 +1176,17 @@ command."
(goto-char pt)
(insert-before-markers string)
(set-marker (process-mark process) (point))
-   ;; Remove line breaks at column 79
+   ;; Remove line breaks at columns 79 and 80
(while (> (point) pt)
  (end-of-line 0)
- (when (and (= (- (point) (line-beginning-position)) 79)
-;; Heuristic: Don't delete the linebreak if the
-;; next line is empty or starts with an opening
-;; parenthesis or if point is located after a period.
+ (when (and (memql (- (point) (line-beginning-position)) '(79 80))
+;; Heuristic: Don't delete the linebreak if the next line
+;; is empty or starts with an opening parenthesis, or if
+;; point is located after a period and in the next line no
+;; word char follows.
 (not (memq (char-after (1+ (point))) '(?\n ?\()))
-(not (eq (char-before) ?.)))
+(not (and (eq (char-before) ?.)
+  (not (eq ?w (char-syntax (char-after (1+ 
(point)
(delete-char 1)))
(goto-char (marker-position (process-mark process)))
;; Determine current page



[elpa] externals/auctex 2c21439 41/69: Improve parsing of certain warnings

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 2c21439771b038682814b239dfba0b8d799d487c
Author: Mosè Giordano 
Commit: Mosè Giordano 

Improve parsing of certain warnings

* tex-buf.el (TeX-warning): Get full context and line numbers for
  warnings matching `LaTeX-warnings-regexp'.
* tests/tex/compilation-log.txt: Add example warnings for this case.
* tests/tex/error-parsing.el: Update result of test accordingly.
---
 tests/tex/compilation-log.txt |   36 +---
 tests/tex/error-parsing.el|   40 
 tex-buf.el|   24 +++-
 3 files changed, 92 insertions(+), 8 deletions(-)

diff --git a/tests/tex/compilation-log.txt b/tests/tex/compilation-log.txt
index 98b3422..f97b300 100644
--- a/tests/tex/compilation-log.txt
+++ b/tests/tex/compilation-log.txt
@@ -1,13 +1,43 @@
-(./test.tex
+(./test.tex (./nice-class.cls
+Document Class: nice-class 1970/01/01 v42 A good class
+
+Package nice-class Warning: **
+(nice-class)* THIS IS JUST A WARNING WITH A PESKY
+(nice-class)* UNMATCHED CLOSED PARENTHESIS :-)
+(nice-class)** on 
input line 32.
+
+)
+
 (/opt/texlive/2015/texmf-dist/tex/context/base/supp-pdf.mkii
 [Loading MPS to PDF converter (version 2006.09.02).]
 )
 
-Package foo Warning: This is a warning!
+./test.tex:2: Class nice-class Error: ***
+(nice-class)  * This is a very bad error!
+(nice-class)  .
+
+See the suftesi class documentation for explanation.
+Type  H   for immediate help.
+ ...  
+  
+l.2 \begin{document}
+
+(/other/packages/loaded.sty)
+ABD: EveryShipout initializing macros
+
+Package foo Warning: This is a warning! on input line 3.
 
 [1{/opt/texlive/2015/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] 
(./test.aux)
 
 (./secondary-file.tex [8] [9] [10]
 Underfull \hbox (badness 6608) in paragraph at lines 131--132
 []|\T1/jkpl/m/n/10.95 (+20) Something bla
-[11] [12]))
+[11] [12])
+
+LaTeX Warning: Reference `wrong' on page 1 undefined on input line 4.
+
+[1{/opt/texlive/2015/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] 
(./test.aux)
+
+LaTeX Warning: There were undefined references.
+
+)
diff --git a/tests/tex/error-parsing.el b/tests/tex/error-parsing.el
index ce09750..b826fc3 100644
--- a/tests/tex/error-parsing.el
+++ b/tests/tex/error-parsing.el
@@ -49,13 +49,45 @@ command line and from another directory."
  (insert-file-contents TeX-test-compilation-log)
  (TeX-parse-all-errors)
 TeX-error-list)
-  '((warning "./test.tex" nil "Package foo Warning: This is a warning!"
- 0 "Package foo Warning: This is a warning!\n"
- nil nil nil 170)
+  '((warning
+ "./nice-class.cls" 32
+ "Package nice-class Warning: 
**"
+ 0
+ "Package nice-class Warning: 
**
+(nice-class)* THIS IS JUST A WARNING WITH A PESKY
+(nice-class)* UNMATCHED CLOSED PARENTHESIS :-)
+(nice-class)** on 
input line 32.\n"
+ nil 32 nil 376)
+(error
+  "./test.tex" 2
+  "Class nice-class Error: ***" 0
+  "\n(nice-class)  * This is a very bad error!
+(nice-class)  .
+
+See the suftesi class documentation for explanation.
+Type  H   for immediate help.
+ ...  
+  
+l.2 \\begin{document}
+
+(/other/packages/loaded.sty)
+ABD: EveryShipout initializing macros"
+  "\\begin{document}\n\n(/other/packages/loaded.sty)" nil nil 971)
+(warning "./test.tex" 3
+  "Package foo Warning: This is a warning! on input line 3." 0
+ "Package foo Warning: This is a warning! on input line 3.\n"
+ nil 3 nil 1030)
 (bad-box
  "./secondary-file.tex" 131
  "Underfull \\hbox (badness 6608) in paragraph at lines 131--132"
  0 "\n[]|\\T1/jkpl/m/n/10.95 (+20) Something bla" "bla"
- 132 10 391)
+ 132 10 1251)
+ (warning "./test.tex" 4
+  "LaTeX Warning: Reference `wrong' on page 1 undefined on input 
line 4."
+  0
+  "LaTeX Warning: Reference `wrong' on page 1 undefined on input 
line 4.\n"
+  "wrong" 4 nil 1334)
+ (warning "./test.tex" 4 "LaTeX Warning: There were undefined 
references."
+  

[elpa] externals/auctex 2888571 52/69: Allow ignoring certain warnings

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 28885717e4f75ecaab2c9018d4ba7713955778a4
Author: Mosè Giordano 
Commit: Mosè Giordano 

Allow ignoring certain warnings

* tex.el (TeX-ignore-warnings, TeX-suppress-ignored-warnings): New
  customizable options.
(TeX-toggle-suppress-ignored-warnings): New function.
(TeX-mode-map): Add key-binding for `TeX-toggle-suppress-ignored-warnings'.
* tex-buf.el (TeX-error-list-skip-warning-p): Add new argument and use it.
(TeX-parse-TeX): Provide additional argument to
`TeX-error-list-skip-warning-p'.
(TeX-error-list): Document new information.
(TeX-find-display-help): Add new (ignored) argument.
(TeX-error): Add new element to `TeX-error-list' entry.
(TeX-warning): Set the "ignore" flag for `TeX-error-list'
(TeX-error-overview-make-entries): Provide additional argument to
`TeX-error-list-skip-warning-p'.
(TeX-error-overview-toggle-debug-bad-boxes):
(TeX-error-overview-toggle-debug-warnings): Determine
`TeX-master-directory' in `TeX-command-buffer'.
(TeX-error-overview-toggle-suppress-ignored-warnings): New function.
(TeX-error-overview-mode-map): Add key-binding for
`TeX-error-overview-toggle-suppress-ignored-warnings'.
(TeX-error-overview-menu): Add entry for
`TeX-error-overview-toggle-suppress-ignored-warnings'.
---
 doc/auctex.texi  |   76 ++
 doc/changes.texi |8 
 tex-buf.el   |  108 +++---
 tex.el   |   33 
 4 files changed, 179 insertions(+), 46 deletions(-)

diff --git a/doc/auctex.texi b/doc/auctex.texi
index c8e35a3..d0d0673 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -190,6 +190,7 @@ Viewing the Formatted Output
 
 Catching the errors
 
+* Ignoring warnings::   Controlling warnings to be reported
 * Error overview::  List of all errors and warnings
 
 Customization and Extension
@@ -3337,36 +3338,76 @@ not parse the whole output log buffer and 
@code{TeX-previous-error}
 cannot be used.
 @end defopt
 
+As default, @AUCTeX{} will display a special help buffer containing the
+error reported by @TeX{} along with the documentation.  There is however
+an `expert' option, which allows you to display the real @TeX{} output.
+
+@defopt TeX-display-help
+If t @AUCTeX{} will automatically display a help text whenever an error
+is encountered using @code{TeX-next-error} (@kbd{C-c `}).  If nil a
+terse information about the error is displayed in the echo area.  If
+@code{expert} @AUCTeX{} will display the output buffer with the raw
+@TeX{} output.
+@end defopt
+
+@menu
+* Ignoring warnings:: Controlling warnings to be reported
+* Error overview::List of all errors and warnings
+@end menu
+
+@node Ignoring warnings
+@subsection Controlling warnings to be reported
+
 Normally @AUCTeX{} will only report real errors, but you may as well
 ask it to report `bad boxes' and warnings as well.
 
 @deffn Command TeX-toggle-debug-bad-boxes
 @kindex C-c C-t C-b
+@vindex TeX-debug-bad-boxes
 (@kbd{C-c C-t C-b}) Toggle whether @AUCTeX{} should stop at bad boxes
-(i.e. overfull and underfull boxes) as well as normal errors.
+(i.e. overfull and underfull boxes) as well as normal errors.  The
+boolean option @code{TeX-debug-bad-boxes} is set accordingly.
 @end deffn
 
 @deffn Command TeX-toggle-debug-warnings
 @kindex C-c C-t C-w
+@vindex TeX-debug-warnings
 (@kbd{C-c C-t C-w}) Toggle whether @AUCTeX{} should stop at warnings as
-well as normal errors.
+well as normal errors.  The boolean option @code{TeX-debug-warnings} is
+set accordingly.
 @end deffn
 
-As default, @AUCTeX{} will display a special help buffer containing the
-error reported by @TeX{} along with the documentation.  There is however
-an `expert' option, which allows you to display the real @TeX{} output.
+While many users desire to have warnings reported after compilation,
+there are certain warnings that are considered unimportant and users
+want to ignore them.  For a more fine-grained control of what kinds of
+warnings should be shown after compilation, @AUCTeX{} provides other
+options.
 
-@defopt TeX-display-help
-If t @AUCTeX{} will automatically display a help text whenever an error
-is encountered using @code{TeX-next-error} (@kbd{C-c `}).  If nil a
-terse information about the error is displayed in the echo area.  If
-@code{expert} @AUCTeX{} will display the output buffer with the raw
-@TeX{} output.
+@defopt TeX-ignore-warnings
+Controls which warnings are to be ignored.
+
+It can be a regexp matching the message of the warnings to be ignored.
+
+More advanced users can set also this option to a symbol with the name
+of a custom function taking as arguments all the information of the
+warning listed in @code{TeX-error-list} variable, except the last one
+about whether to ignore the warning.  See the code of @code{TeX-warning}
+function and the documentation of @code{Te

[elpa] externals/auctex 70e62a9 57/69: Catch more bad box warnings

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 70e62a98cac5882e7e4c5c2c7cb719adbb48fdd2
Author: Mosè Giordano 
Commit: Mosè Giordano 

Catch more bad box warnings

* tex-buf.el (TeX-error-list): More information for some elements of the
list.
(TeX-parse-error): Change regexp to catch bad vertical boxes as well and
provide new argument to `TeX-warning'.
(TeX-warning): Require an additional mandatory argument, `bad-box'.
Improve regexp for detecting ending line of horizontal bad boxes in
order to cater for the case "...at line NN".
* tests/tex/error-parsing.el: Update result of the test.
---
 tests/tex/error-parsing.el |2 +-
 tex-buf.el |   35 +--
 2 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/tests/tex/error-parsing.el b/tests/tex/error-parsing.el
index 6251847..979059b 100644
--- a/tests/tex/error-parsing.el
+++ b/tests/tex/error-parsing.el
@@ -81,7 +81,7 @@ ABD: EveryShipout initializing macros"
  "./secondary-file.tex" 131
  "Underfull \\hbox (badness 6608) in paragraph at lines 131--132"
  0 "\n[]|\\T1/jkpl/m/n/10.95 (+20) Something bla" "bla"
- 132 10 1268 nil)
+ 132 t 1268 nil)
  (warning "./test.tex" 4
   "LaTeX Warning: Reference `wrong' on page 1 undefined on input 
line 4."
   0
diff --git a/tex-buf.el b/tex-buf.el
index c2ba9f8..052f414 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -2277,11 +2277,12 @@ error or warning.  This is the structure of each 
element:
  *  2: line
  *  3: message of the error or warning
  *  4: offset
- *  5: context
- *  6: string
+ *  5: context, to be displayed in the help window
+ *  6: string to search in the buffer, in order to find location
+   of the error or warning
  *  7: for warnings referring to multiple lines (e.g. bad boxes),
the last line mentioned in the warning message
- *  8: bad-box
+ *  8: t if it is a bad-box, nil otherwise
  *  9: value of `TeX-error-point'
  * 10: whether the warning should be ignored
 
@@ -2329,7 +2330,7 @@ Return non-nil if an error or warning is found."
  "name(\\([^)]+\\))\\)\\|"
  ;; LaTeX bad box
  "^\\(\\(?:Overfull\\|Underfull\\|Tight\\|Loose\\)\
- .*?[0-9]+--[0-9]+\\)\\|"
+ [hv]box.*\\)\\|"
  ;; LaTeX warning
  "^\\(" LaTeX-warnings-regexp ".*\\)"))
(error-found nil))
@@ -2363,7 +2364,7 @@ Return non-nil if an error or warning is found."
  (if (or store TeX-debug-bad-boxes)
  (progn
(setq error-found t)
-   (TeX-warning (TeX-match-buffer 7) (match-beginning 7) store)
+   (TeX-warning (TeX-match-buffer 7) (match-beginning 7) t store)
nil)
(re-search-forward "\r?\n\
 \\(?:.\\{79\\}\r?\n\
@@ -2376,7 +2377,7 @@ Return non-nil if an error or warning is found."
  (if (or store TeX-debug-warnings)
  (progn
(setq error-found t)
-   (TeX-warning (TeX-match-buffer 8) (match-beginning 8) store)
+   (TeX-warning (TeX-match-buffer 8) (match-beginning 8) nil store)
nil)
t))
 
@@ -2553,19 +2554,20 @@ information in `TeX-error-list' instead of displaying 
the error."
   ;; Find the error point and display the help.
   (apply 'TeX-find-display-help info-list
 
-(defun TeX-warning (warning warning-start &optional store)
+(defun TeX-warning (warning warning-start bad-box &optional store)
   "Display a warning for WARNING.
 
-WARNING-START is the position where WARNING starts.
+WARNING-START is the position where WARNING starts.  If BAD-BOX
+is non-nil, the warning refers to a bad-box, otherwise it is a
+generic warning.
 
 If optional argument STORE is non-nil, store the warning
 information in `TeX-error-list' instead of displaying the
 warning."
 
-  (let* ( ;; bad-box is nil if this is a "LaTeX Warning"
-(bad-box (string-match "[vh]box.*[0-9]*--[0-9]*" warning))
-;; line-string: match 1 is beginning line, match 2 is end line
-(line-string (if bad-box " \\([0-9]*\\)--\\([0-9]*\\)"
+  (let* ( ;; line-string: match 1 is beginning line, match 2 is end line
+(line-string (if bad-box
+ "at lines? \\([0-9]*\\)\\(?:--\\([0-9]*\\)\\)?"
"on input line \\([0-9]*\\)\\."))
 ;; word-string: match 1 is the word
 (word-string (if bad-box "[][\\W() ---]\\(\\w+\\)[][\\W() ---]*$"
@@ -2576,7 +2578,11 @@ warning."
 (line (when (save-excursion (re-search-backward line-string
 warning-start t))
 (string-to-number (TeX-match-buffer 1
-(line-end (if bad-box (string-to-number (TeX-match-buffer 2))
+;; If this is a bad box and the warning ends with "...at lines MM--NN"
+;; we can use "NN" as `line-end', in any other case 

[elpa] externals/auctex 6962c34 56/69: Avoid checking duplicate directories in TeX-check-files

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 6962c34a28dbf62622f46fbeca77295223c3112c
Author: Mosè Giordano 
Commit: Mosè Giordano 

Avoid checking duplicate directories in TeX-check-files

* tex-buf.el (TeX-check-files): Delete duplicate directories in paths
  list before performing the check.
---
 tex-buf.el |   25 +
 1 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index 52483dc..c2ba9f8 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -569,18 +569,19 @@ ORIGINALS which are modified but not saved yet."
 found
(extensions (TeX-delete-duplicate-strings extensions))
 (buffers (buffer-list)))
-(dolist (path (mapcar (lambda (dir)
-   (expand-file-name (file-name-as-directory dir)))
- (append
-  TeX-check-path
-  ;; In `TeX-command-default', this function is used to
-  ;; check whether bibliography databases are newer
-  ;; than generated *.bbl files, but bibliography
-  ;; database are relative to `TeX-master-directory'
-  ;; and the test can be run also from included files
-  ;; that are in directories different from
-  ;; `TeX-master-directory'.
-  (list (TeX-master-directory)
+(dolist (path (TeX-delete-duplicate-strings
+  (mapcar (lambda (dir)
+(expand-file-name (file-name-as-directory dir)))
+  (append
+   TeX-check-path
+   ;; In `TeX-command-default', this function is used 
to
+   ;; check whether bibliography databases are newer
+   ;; than generated *.bbl files, but bibliography
+   ;; database are relative to `TeX-master-directory'
+   ;; and the test can be run also from included files
+   ;; that are in directories different from
+   ;; `TeX-master-directory'.
+   (list (TeX-master-directory))
   (dolist (orig originals)
(dolist (ext extensions)
  (let ((filepath (concat path orig "." ext)))



[elpa] externals/auctex cfa82d8 65/69: Prompt for optional short caption parameter.

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit cfa82d807cb2d2f9cdcd2f7816030485505e2eb4
Author: Matthew Leach 
Commit: Mosè Giordano 

Prompt for optional short caption parameter.

* latex.el (LaTeX-compose-caption-macro): New.
  (LaTeX-short-caption-prompt-length): New.
  (LaTeX-env-figure): Prompt for optional short caption parameter, when
  the caption length is >= `LaTeX-short-caption-prompt-length', and pass
  to `LaTeX-compose-caption-macro'.
* style/longtable.el ("longtable"): Likewise.
* style/psfig.el (LaTeX-env-psfigure): Likewise.
* doc/auctex.texi (Floats): Document short-caption prompting and
  `LaTeX-short-caption-prompt-length'.
* doc/changes.texi: Likewise.

Signed-off-by: Mosè Giordano 
---
 doc/auctex.texi|   13 +
 doc/changes.texi   |6 ++
 latex.el   |   37 -
 style/longtable.el |   12 +++-
 style/psfig.el |   20 +++-
 5 files changed, 65 insertions(+), 23 deletions(-)

diff --git a/doc/auctex.texi b/doc/auctex.texi
index d0d0673..8c5218a 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -1005,6 +1005,14 @@ at the bottom of the float.  You can specify floats 
where the caption
 should be placed at the top with @code{LaTeX-top-caption-list}.
 @vindex LaTeX-top-caption-list
 
+@item short caption
+If the specified caption is greater than a specific length, then a short
+caption is prompted for and it is inserted as an optional argument to
+the @samp{\caption} macro.  The length that a caption needs to be before
+prompting for a short version is controlled by
+@code{LaTeX-short-caption-prompt-length}.
+@vindex LaTeX-short-caption-prompt-length
+
 @item label
 The label of this float.  The label will have a default prefix, which is
 controlled by the variables @code{LaTeX-figure-label} and
@@ -1037,6 +1045,11 @@ Prefix to use for table labels.
 List of float environments with top caption.
 @end defopt
 
+@defopt LaTeX-short-caption-prompt-length
+Number of chars a caption should be before prompting for a short
+caption.
+@end defopt
+
 @node Itemize-like
 @subsection Itemize-like Environments
 @cindex Itemize
diff --git a/doc/changes.texi b/doc/changes.texi
index 141f765..9d39db2 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -12,6 +12,12 @@
 
 @itemize @bullet
 @item
+When inserting a new float, @AUCTeX{} will now prompt for a
+short-caption if the length of the caption provided is greater than a
+certain size.  This size is controlled via a new user option
+@code{LaTeX-short-caption-prompt-length}.
+
+@item
 Parsing of the compilation log has been reworked.  You should encounter
 fewer mistaken files while navigating through errors and warnings.
 
diff --git a/latex.el b/latex.el
index 64c0f58..c0b0baf 100644
--- a/latex.el
+++ b/latex.el
@@ -1032,16 +1032,35 @@ The inserted label is returned, nil if it is empty."
  label)
  nil)
 
+(defcustom LaTeX-short-caption-prompt-length 40
+  "The length that the caption of a figure should be before
+  propting for \\caption's optional short-version."
+  :group 'LaTeX-environment
+  :type 'integer)
+
+(defun LaTeX-compose-caption-macro (caption &optional short-caption)
+  "Return a \\caption macro for a given CAPTION as a string.
+If SHORT-CAPTION is non-nil pass it as an optional argument to
+\\caption."
+  (let ((short-caption-string
+ (if (and short-caption
+  (not (string= short-caption "")))
+ (concat LaTeX-optop short-caption LaTeX-optcl
+(concat TeX-esc "caption" short-caption-string
+TeX-grop caption TeX-grcl)))
+
 (defun LaTeX-env-figure (environment)
   "Create ENVIRONMENT with \\caption and \\label commands."
-  (let ((float (and LaTeX-float; LaTeX-float can be nil, i.e.
+  (let* ((float (and LaTeX-float   ; LaTeX-float can be nil, i.e.
; do not prompt
-   (TeX-read-string "(Optional) Float position: " 
LaTeX-float)))
-   (caption (TeX-read-string "Caption: "))
-   (center (y-or-n-p "Center? "))
-   (active-mark (and (TeX-active-mark)
- (not (eq (mark) (point)
-   start-marker end-marker)
+ (TeX-read-string "(Optional) Float position: " 
LaTeX-float)))
+ (caption (TeX-read-string "Caption: "))
+ (short-caption (when (>= (length caption) 
LaTeX-short-caption-prompt-length)
+  (TeX-read-string "(Optional) Short caption: ")))
+ (center (y-or-n-p "Center? "))
+ (active-mark (and (TeX-active-mark)
+   (not (eq (mark) (point)
+ start-marker end-marker)
 (when active-mark
   (if (< (mark) (point))
  (exchange-point-and-mark))
@@ -1064,7 +1083,7 @@ The inserted label is returned, nil if it is empty."
   (if (member environment LaTeX-top-caption-list)
  ;; to

[elpa] externals/auctex a074732 15/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit a074732d46699dd26c43ad0f907abce9695ddbd1
Merge: 8fac199 a34b0fe
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog  |   45 
 latex.el   |2 +-
 preview/preview.el |4 +-
 style/biblatex.el  |2 +-
 tex-buf.el |   84 ++-
 tex.el |   47 ++---
 6 files changed, 134 insertions(+), 50 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d60d2da..4162bec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,48 @@
+2014-07-14  Mos� Giordano  
+
+   * tex-buf.el (TeX-next-error): Do not pass `reparse' argument to
+   `next-error' in XEmacs as it is not supported.
+   (TeX-error-overview-frame, TeX-error-overview-buffer-name): Move
+   before their first use in order to prevent a runtime error in
+   XEmacs and GNU Emacs 21.  Reported by Ikumi Keita.
+   (TeX-parse-TeX): Manually set `item' to nil when
+   `TeX-error-last-visited' is negative.
+   (TeX-error-description-error, TeX-error-description-warning)
+   (TeX-error-description-tex-said): Set to nil in XEmacs and GNU
+   Emacs 21.  Reported by Ikumi Keita.
+
+2014-07-13  Mos� Giordano  
+
+   * latex.el (TeX-latex-mode): Add second argument to
+   `local-variable-p', mandatory in XEmacs.  Suggested by Ikumi
+   Keita.
+
+   * preview/preview.el (preview-dump-state): Ditto.
+
+   * style/biblatex.el ("biblatex"): Ditto.
+
+   * tex.el (TeX-how-many): Make the function return a number also in
+   XEmacs and Emacs 21.  Suggested by Ikumi Keita.
+
+2014-07-12  Mos� Giordano  
+
+   * tex-buf.el (TeX-error-description-error): Do not use the
+   `default' display, not supported by GNU Emacs 21 and XEmacs 21.4.
+   (TeX-error-description-warning): Ditto.
+
+2014-07-11  Mos� Giordano  
+
+   * tex-buf.el (TeX-error-description-error): Make face definition
+   XEmacs compatible.
+   (TeX-error-description-tex-said): Ditto.
+   (TeX-error-description-help): Ditto.
+
+   * tex.el (nil): Handle the case of a non-available crm.el with a
+   `condition-case', instead of using the third argument of
+   `require', not recognized by XEmacs 21.4.
+   (and): Check whether dbus support is available before requiring
+   dbus.el.
+
 2014-07-02  Mos� Giordano  
 
* tex.el (TeX-expand-list): Set
diff --git a/latex.el b/latex.el
index fe439e5..5ba3efb 100644
--- a/latex.el
+++ b/latex.el
@@ -5541,7 +5541,7 @@ of `LaTeX-mode-hook'."
   ;; button could be wrongly set.
   (add-hook 'TeX-update-style-hook
(lambda ()
- (if (local-variable-p 'LaTeX-biblatex-use-Biber)
+ (if (local-variable-p 'LaTeX-biblatex-use-Biber (current-buffer))
  (setq LaTeX-using-Biber LaTeX-biblatex-use-Biber))) nil t)
   (TeX-run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'LaTeX-mode-hook)
   (TeX-set-mode-name)
diff --git a/preview/preview.el b/preview/preview.el
index 72f624d..8077af4 100644
--- a/preview/preview.el
+++ b/preview/preview.el
@@ -1,6 +1,6 @@
 ;;; preview.el --- embed preview LaTeX images in source buffer
 
-;; Copyright (C) 2001-2006, 2010, 2012  Free Software Foundation, Inc.
+;; Copyright (C) 2001-2006, 2010-2014  Free Software Foundation, Inc.
 
 ;; Author: David Kastrup
 ;; Keywords: tex, wp, convenience
@@ -3554,7 +3554,7 @@ In the form of .mmdd")
 (defun preview-dump-state (buffer)
   (condition-case nil
   (progn
-   (unless (local-variable-p 'TeX-command-buffer)
+   (unless (local-variable-p 'TeX-command-buffer (current-buffer))
  (setq buffer (with-current-buffer buffer (TeX-active-buffer
(when (bufferp buffer)
  (insert "\nRun buffer contents:\n\n")
diff --git a/style/biblatex.el b/style/biblatex.el
index ff2d7d6..d5c3513 100644
--- a/style/biblatex.el
+++ b/style/biblatex.el
@@ -224,7 +224,7 @@ for citation keys."
;; the backend can be overridden by setting `LaTeX-biblatex-use-Biber' as a
;; local variable.
(setq LaTeX-using-Biber
-(if (local-variable-p 'LaTeX-biblatex-use-Biber)
+(if (local-variable-p 'LaTeX-biblatex-use-Biber (current-buffer))
 LaTeX-biblatex-use-Biber
   (not (or (LaTeX-provided-package-options-member
 "biblatex" "backend=bibtex")
diff --git a/tex-buf.el b/tex-buf.el
index 793b7be..0c9ff6f 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -292,7 +292,9 @@ message buffer and start at the first error."
   (if (or (null (TeX-active-buffer))
  (eq 'compilation-mode (with-current-buffer TeX-command-buffer
  major-mode)))
-  (next-error arg reparse)
+  (if (featurep 'xemacs)
+ (next-error arg)
+   (next-error arg reparse))
 
 ;; Force reparsing when the function is called with a universal-argument.

[elpa] externals/auctex 43ba124 23/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 43ba1244a245f7fa9cfc64317b49a6bec7915fa8
Merge: 901b20a 312dde3
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog |   42 +++
 bib-cite.el   |6 +--
 font-latex.el |5 +--
 latex.el  |   39 -
 tex-info.el   |   87 +++--
 tex.el|   52 ++---
 6 files changed, 116 insertions(+), 115 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 791a5a1..e6cc7e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,45 @@
+2014-08-18  Vincent Bela�che  
+
+   * font-latex.el (font-latex-add-quotes): Code optimization: use
+   '(add-to-list (make-local-variable (quote foo)) some-value)'
+   instead of '(make-local-variable (quote foo)) (add-to-list 'foo
+   some-value)' wherever possible.
+
+   * bib-cite.el (bib-cite-minor-mode)
+   (bib-cite-setup-highlight-mouse-keymap): Code optimization: use
+   '(set (make-local-variable (quote foo)) some-value)' instead of
+   '(make-local-variable (quote foo)) (setq foo some-value)' wherever
+   possible.
+
+   * latex.el (BibTeX-auto-store)
+   (LaTeX-common-initialization): Ditto.
+
+   * tex-info.el (TeX-texinfo-mode): Code optimization: use '(set
+   (make-local-variable (quote foo)) some-value)' instead of
+   '(make-local-variable (quote foo)) (setq foo some-value)' wherever
+   possible. Add in style Texinfo standard macros '@acronym' and
+   '@tie'.
+
+   * tex.el (TeX-assoc-string) new defalias to work-around missing
+   assoc-string in XEmacs.
+   (TeX-unload-style): Code optimization: use 'TeX-assoc-string'
+   instead of 'assoc' to search style in 'TeX-style-hook-list', and
+   use delq on returned value of assoc-string for removing the style
+   --- on the one hand delq will go through the whole list rather
+   than stop after the first match like in original code, but on the
+   other hand comparison are faster because eq instead of equal is
+   used and we are working on assoc cell rather than on key, so less
+   indirection, furthermore delq is C code. Anyway that make the code
+   much smaller and easier to understand.
+   (TeX-file-extensions): Add txi amongst extension of texinfo files,
+   for consistency with info node '(texinfo) Minimum'
+   (TeX-run-style-hooks): Code optimization: use 'TeX-assoc-string'
+   instead of 'assoc' to search style in 'TeX-style-hook-list'.
+   (VirTeX-common-initialization): Code optimization: use '(set
+   (make-local-variable (quote foo)) some-value)' instead of
+   '(make-local-variable (quote foo)) (setq foo some-value)' wherever
+   possible.
+
 2014-08-18  Tassilo Horn  
 
* font-latex.el (font-latex-set-syntactic-keywords): Allow for a
diff --git a/bib-cite.el b/bib-cite.el
index 1dbe272..8ac7ac9 100644
--- a/bib-cite.el
+++ b/bib-cite.el
@@ -756,8 +756,7 @@ runs bib-find, and [mouse-3] runs bib-display."
 ;; Added for version 2.19
 (if (boundp 'tags-always-exact)
(progn
- (make-local-variable 'tags-always-exact)
- (setq tags-always-exact nil)))
+ (set (make-local-variable 'tags-always-exact) nil)))
 ;; mouse overlay
 (if bib-highlight-mouse-t
(progn
@@ -795,8 +794,7 @@ runs bib-find, and [mouse-3] runs bib-display."
 ;; own.
 (defun bib-cite-setup-highlight-mouse-keymap ()
   "Set up the bib-cite text in the current buffer to be clickable."
-  (make-local-variable 'bib-highlight-mouse-keymap)
-  (setq bib-highlight-mouse-keymap
+  (set (make-local-variable 'bib-highlight-mouse-keymap)
;;; First, copy the local keymap so we don't have `disappearing' menus
;;; when the mouse is moved over a \ref, \label or \cite command.
 
diff --git a/font-latex.el b/font-latex.el
index b6226b1..0a1b8ad 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -127,8 +127,7 @@ If nil, quoted content will not be fontified."
 QUOTES has to be a list adhering to the format of an element of
 `font-latex-quote-list'."
   (setq font-latex-quotes-control nil)
-  (make-local-variable 'font-latex-quote-list)
-  (add-to-list 'font-latex-quote-list quotes))
+  (add-to-list (make-local-variable 'font-latex-quote-list) quotes))
 
 (defun font-latex-quotes-set-internal ()
   "Set `font-latex-quotes-internal' according to `font-latex-quotes'.
@@ -810,7 +809,7 @@ Generated by `font-latex-make-user-keywords'.")))
  (1 (get-text-property (match-end 1) 'face) t
 (add-to-list 'font-latex-keywords-1 item)
 (add-to-list 'font-latex-keywords-2 item))
-  (dolist (item 
+  (dolist (item
   '((font-latex-match-math-env
  (0 'font-latex-warning-face t t)
  (1 'font-latex-math-face append t))
diff --git a/latex.el b/latex.el
index c2685d7..b260625 100644
--- a/latex.el
++

[elpa] externals/auctex f351ed9 24/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit f351ed978811db6792be85cc1425f1d0219845f8
Merge: 43ba124 8570248
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e6cc7e1..ef147f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-2014-08-18  Vincent Bela�che  
+2014-08-18  Vincent Bela�che  
 
* font-latex.el (font-latex-add-quotes): Code optimization: use
'(add-to-list (make-local-variable (quote foo)) some-value)'



[elpa] externals/auctex 2cca33f 42/69: Minor fix in TeX-documentation-texdoc

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 2cca33f68a2df99cd3600b1d3193b2b3727ced80
Author: Mosè Giordano 
Commit: Mosè Giordano 

Minor fix in TeX-documentation-texdoc

* tex.el (TeX-documentation-texdoc): Make it possible to run the
  function in read-only buffers.
---
 tex.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tex.el b/tex.el
index b7077fc..3633fd3 100644
--- a/tex.el
+++ b/tex.el
@@ -6102,7 +6102,7 @@ Prompt for selection of the package of which to show the 
documentation.
 If called with a prefix argument ARG, after selecting the
 package, prompt for selection of the manual of that package to
 show."
-  (interactive "*P")
+  (interactive "P")
   (let ((pkg (thing-at-point 'symbol))
buffer list doc)
 ;; Strip off properties.  XXX: XEmacs doesn't have



[elpa] externals/auctex b72dcb7 44/69: Add support for SumatraPDF viewer

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit b72dcb7b2f40d861ff90bd9bea37c4aabcc9cf9c
Author: Arash Esbati 
Commit: Mosè Giordano 

Add support for SumatraPDF viewer

* doc/changes.texi: Mention support for SumatraPDF on Windows.
Fix typos.

* tex.el (TeX-view-program-list-builtin): Add support for
SumatraPDF on Windows.

Signed-off-by: Mosè Giordano 
---
 doc/changes.texi |7 +--
 tex.el   |4 
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/doc/changes.texi b/doc/changes.texi
index b4d5954..b0c666b 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -16,6 +16,9 @@ Parsing of the compilation log has been reworked.  You should 
encounter
 fewer mistaken files while navigating through errors and warnings.
 
 @item
+Added support for SumatraPDF viewer on Windows.
+
+@item
 Added support for Zathura viewer.  Forward and inverse search requires a
 recent version of the program to work (3.4 or later).
 
@@ -94,10 +97,10 @@ select the Mark version to be used with new option
 messages in the output log of a Mark IV document.
 
 @item
-Support for tons of @LaTeX{} packages has been addedd.
+Support for tons of @LaTeX{} packages has been added.
 
 @item
-Numbers of bugs have been fixed, many minor features have been addedd.
+Numbers of bugs have been fixed, many minor features have been added.
 @end itemize
 
 @heading News in 11.88
diff --git a/tex.el b/tex.el
index ee11202..3c11786 100644
--- a/tex.el
+++ b/tex.el
@@ -1270,6 +1270,10 @@ the requirements are met."
   (cond
((eq system-type 'windows-nt)
 '(("Yap" ("yap -1" (mode-io-correlate " -s %n%b") " %o") "yap")
+  ("SumatraPDF"
+   ("SumatraPDF -reuse-instance %o"
+   (mode-io-correlate " -forward-search \"%b\" %n"))
+   "SumatraPDF")
   ("dvips and start" "dvips %d -o && start \"\" %f" "dvips")
   ("start" "start \"\" %o")))
((eq system-type 'darwin)



[elpa] externals/auctex 53f2fab 53/69: Another fix for TeX-parse-errro

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 53f2fab87869063d07010229c0c8675a35721a95
Author: Mosè Giordano 
Commit: Mosè Giordano 

Another fix for TeX-parse-errro

* tex-buf.el (TeX-parse-error): Improve regexp for polishing file name.
* tests/tex/compilation-log.txt: Add example to test file.
* tests/tex/error-parsing.el: Update the expected result of the test
  accordingly.
---
 tests/tex/compilation-log.txt |2 +-
 tests/tex/error-parsing.el|   12 ++--
 tex-buf.el|   11 ++-
 3 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/tests/tex/compilation-log.txt b/tests/tex/compilation-log.txt
index f97b300..7703865 100644
--- a/tests/tex/compilation-log.txt
+++ b/tests/tex/compilation-log.txt
@@ -29,7 +29,7 @@ Package foo Warning: This is a warning! on input line 3.
 
 [1{/opt/texlive/2015/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] 
(./test.aux)
 
-(./secondary-file.tex [8] [9] [10]
+(./secondary-file.tex [8] [9] [10 <./path/to/file>]
 Underfull \hbox (badness 6608) in paragraph at lines 131--132
 []|\T1/jkpl/m/n/10.95 (+20) Something bla
 [11] [12])
diff --git a/tests/tex/error-parsing.el b/tests/tex/error-parsing.el
index b826fc3..611ba8d 100644
--- a/tests/tex/error-parsing.el
+++ b/tests/tex/error-parsing.el
@@ -57,7 +57,7 @@ command line and from another directory."
 (nice-class)* THIS IS JUST A WARNING WITH A PESKY
 (nice-class)* UNMATCHED CLOSED PARENTHESIS :-)
 (nice-class)** on 
input line 32.\n"
- nil 32 nil 376)
+ nil 32 nil 376 nil)
 (error
   "./test.tex" 2
   "Class nice-class Error: ***" 0
@@ -72,22 +72,22 @@ l.2 \\begin{document}
 
 (/other/packages/loaded.sty)
 ABD: EveryShipout initializing macros"
-  "\\begin{document}\n\n(/other/packages/loaded.sty)" nil nil 971)
+  "\\begin{document}\n\n(/other/packages/loaded.sty)" nil nil 971 
nil)
 (warning "./test.tex" 3
   "Package foo Warning: This is a warning! on input line 3." 0
  "Package foo Warning: This is a warning! on input line 3.\n"
- nil 3 nil 1030)
+ nil 3 nil 1030 nil)
 (bad-box
  "./secondary-file.tex" 131
  "Underfull \\hbox (badness 6608) in paragraph at lines 131--132"
  0 "\n[]|\\T1/jkpl/m/n/10.95 (+20) Something bla" "bla"
- 132 10 1251)
+ 132 10 1268 nil)
  (warning "./test.tex" 4
   "LaTeX Warning: Reference `wrong' on page 1 undefined on input 
line 4."
   0
   "LaTeX Warning: Reference `wrong' on page 1 undefined on input 
line 4.\n"
-  "wrong" 4 nil 1334)
+  "wrong" 4 nil 1351 nil)
  (warning "./test.tex" 4 "LaTeX Warning: There were undefined 
references."
-  0 "LaTeX Warning: There were undefined references.\n" nil 4 nil 
1465)
+  0 "LaTeX Warning: There were undefined references.\n" nil 4 nil 
1482 nil)
 
 ;;; error-parsing.el ends here
diff --git a/tex-buf.el b/tex-buf.el
index d3c6098..2bd6d21 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -2392,11 +2392,12 @@ Return non-nil if an error or warning is found."
  (replace-match "" t t string)
string))
;; Sometimes `file' is something like
-   ;; "./path/to/file.tex [9] [10] "
-   ;; where "[9]" and "[10]" are pages of the output file.
-   ;; Remove these numbers together with whitespaces at the end
-   ;; of the string.
-   (if (string-match "\\( *\\(\\[[0-9]+\\]\\)? *\\)*\\'" 
string)
+   ;; "./path/to/file.tex [9] [10 <./path/to/file>] "
+   ;; where "[9]" and "[10 <./path/to/file>]" are pages of the
+   ;; output file, with path to an included file.  Remove these
+   ;; numbers together with whitespaces at the end of the
+   ;; string.
+   (if (string-match "\\( *\\(\\[[^]]+\\]\\)? *\\)*\\'" string)
(replace-match "" t t string)
  string)))
(push file TeX-error-file)



[elpa] externals/auctex a7f4839 04/69: Fix Wrong type argument: characterp, nil error.

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit a7f4839406beb71f6c017bfdbf772faafdac50a6
Author: Tassilo Horn 
Commit: Tassilo Horn 

Fix Wrong type argument: characterp, nil error.

* tex-buf.el (TeX-format-filter): Fix error caused by trying to
get char syntax from char after EOF.
---
 tex-buf.el |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index 8aaf14d..6a3e4ad 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1186,6 +1186,7 @@ command."
 ;; word char follows.
 (not (memq (char-after (1+ (point))) '(?\n ?\()))
 (not (and (eq (char-before) ?.)
+  (char-after (1+ (point)))
   (not (eq ?w (char-syntax (char-after (1+ 
(point)
(delete-char 1)))
(goto-char (marker-position (process-mark process)))



[elpa] externals/auctex e414cbb 13/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit e414cbbdfb152634385bc2b2a8f376ca8a558040
Merge: 8cee4a7 d8f06a7
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog  |   16 +
 preview/ChangeLog  |5 ++
 preview/preview.el |2 +-
 tex-buf.el |  163 +--
 4 files changed, 89 insertions(+), 97 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c663758..f408ff7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2014-06-21  Mos� Giordano  
+
+   * tex-buf.el (TeX-parse-TeX): Use `TeX-find-display-help' in place
+   of `TeX-error-list-find-display-help'.
+   (TeX-error-list-find-display-help): Removed, replaced by more
+   general `TeX-find-display-help'.
+   (TeX-find-display-help): New function.
+   (TeX-error): Append nils to the `TeX-error-list' entry to make
+   each entry of the same lenght for both errors and warnings.
+   Append also `TeX-error-point'.  This fixes a bug occurring when
+   `TeX-display-help' is set to `expert'.  Use
+   `TeX-find-display-help' to display the help.
+   (TeX-warning): Append `TeX-error-point' to the `TeX-error-list'
+   entry to fix the above mentioned bug.  Use `TeX-find-display-help'
+   to display the help.
+
 2014-06-04  Mos� Giordano  
 
* tex-buf.el (TeX-parse-TeX): Use
diff --git a/preview/ChangeLog b/preview/ChangeLog
index e443453..5ad7682 100644
--- a/preview/ChangeLog
+++ b/preview/ChangeLog
@@ -1,3 +1,8 @@
+2014-06-24  Tassilo Horn  
+
+   * preview.el (preview-gs-command): Don't run the mgs command if
+   mgs is not installed.
+
 2013-09-05  Tassilo Horn  
 
* preview.el (preview-lispdir): New defvar.
diff --git a/preview/preview.el b/preview/preview.el
index 7b5aef6..72f624d 100644
--- a/preview/preview.el
+++ b/preview/preview.el
@@ -351,7 +351,7 @@ LIST consists of TeX dimensions in sp (1/65536 TeX point)."
   (let ((gs (executable-find "mgs")))
;; Check if mgs is functional for external non-MikTeX apps.
;; See 
http://blog.miktex.org/post/2005/04/07/Starting-mgsexe-at-the-DOS-Prompt.aspx
-   (when (= 0 (shell-command (concat gs " -q -dNODISPLAY -c quit")))
+   (when (and gs (= 0 (shell-command (concat gs " -q -dNODISPLAY -c 
quit"
  gs))
   ;; Windows ghostscript
   (executable-find "GSWIN32C.EXE")
diff --git a/tex-buf.el b/tex-buf.el
index b7b9d01..159d576 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1542,7 +1542,7 @@ already in an Emacs buffer) and the cursor is placed at 
the error."
   (beep)
   (TeX-pop-to-buffer old-buffer))
  (t
-  (TeX-error-list-find-display-help item
+  (apply 'TeX-find-display-help item
 
(goto-char TeX-error-point)
(TeX-parse-error old-buffer)
@@ -1688,19 +1688,62 @@ Return non-nil if an error or warning is found."
  t)))
 error-found))
 
-(defun TeX-error-list-find-display-help (item)
-  "Find the error and display the help associated to it.
-ITEM is an element of `TeX-error-list' with all relevant
-information about the error or warning."
-  (let ((type (car item)))
-(apply (intern (concat "TeX-"
-  (cond
-   ((equal type 'error)
-"error")
-   ((or (equal type 'warning) (equal type 'bad-box))
-"warning"))
-  "--find-display-help"))
-  (cdr item
+(defun TeX-find-display-help (type file line error offset context string
+  line-end bad-box error-point)
+  "Find the error and display the help."
+  (unless file
+(cond
+ ;; XXX: error messages have to be different?
+ ((equal type 'error)
+  (error "Error occurred after last TeX file closed"))
+ (t
+  (error "Could not determine file for warning"
+
+  ;; Go back to TeX-buffer
+  (let ((runbuf (current-buffer))
+   (master (with-current-buffer TeX-command-buffer
+ (expand-file-name (TeX-master-file
+   (command-buffer TeX-command-buffer)
+   error-file-buffer start)
+(run-hooks 'TeX-translate-location-hook)
+(setq error-file-buffer (find-file file))
+;; Set the value of `TeX-command-buffer' in the next file with an
+;; error to be displayed to the value it has in the current buffer.
+(with-current-buffer error-file-buffer
+  (set (make-local-variable 'TeX-command-buffer) command-buffer))
+
+;; Find the location of the error or warning.
+(when line
+  (goto-char (point-min))
+  (forward-line (+ offset line -1))
+  (cond
+   ;; Error.
+   ((equal type 'error)
+   (if (not (string= string " "))
+   (search-forward string nil t)))
+   ;; Warning or bad box.
+   (t
+   (beginning-of-line 0)
+ 

[elpa] externals/auctex d7f443e 37/69: Add script to update the ChangeLog

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit d7f443e5c9237cef9c0392738877cd5d6a093fe0
Author: Mosè Giordano 
Commit: Mosè Giordano 

Add script to update the ChangeLog

* ChangeLog.1: Add copyright notice and information about included
  commits.
* Makefile.in: Add ChangeLog-related variables and rules.
* build-aux/gitlog-to-auctexlog: New script, adapted from GNU Emacs.
---
 ChangeLog.1   |   21 +++
 Makefile.in   |   54 +
 build-aux/gitlog-to-auctexlog |  131 +
 3 files changed, 206 insertions(+), 0 deletions(-)

diff --git a/ChangeLog.1 b/ChangeLog.1
index 7a80e13c..1b523cd 100644
--- a/ChangeLog.1
+++ b/ChangeLog.1
@@ -18256,6 +18256,27 @@
 
* Version 9.1 released.
 
+This file records repository revisions from
+commit c865982cacab289f4480f9145b3438ec06824232 (exclusive) to
+commit df7dbbd3a029f02042b4fa01725c4a1f4502ff56 (inclusive).
+
 ;; Local Variables:
 ;; coding: iso-8859-1
 ;; End:
+
+  Copyright (C) 1994-2016 Free Software Foundation, Inc.
+
+  This file is part of GNU AUCTeX.
+
+  GNU AUCTeX is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  GNU AUCTeX is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with GNU AUCTeX.  If not, see .
diff --git a/Makefile.in b/Makefile.in
index ee9c122..ffe6d76 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -397,6 +397,60 @@ wc:
wc $(AUCSRC) $(STYLESRC)
 
 # --
+# The targets below update the ChangeLog from git log
+# and are intended to be used only by the maintainers.
+# These rules are adapted from GNU Emacs Makefile.
+
+.PHONY: ChangeLog change-history change-history-commit change-history-nocommit
+.PHONY: preferred-branch-is-current unchanged-history-files
+
+CHANGELOG = ChangeLog
+auctexlog = build-aux/gitlog-to-auctexlog
+# The ChangeLog history files are called ChangeLog.1, ChangeLog.2, ...,
+# ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX).  $(CHANGELOG_N) stands for
+# the newest (highest-numbered) ChangeLog history file.
+CHANGELOG_HISTORY_INDEX_MAX = 1
+CHANGELOG_N = ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX)
+
+# Check that we are in a good state for changing history.
+PREFERRED_BRANCH = master
+preferred-branch-is-current:
+   git branch | grep -q '^\* $(PREFERRED_BRANCH)$$'
+unchanged-history-files:
+   x=$$(git diff-files --name-only $(CHANGELOG_N) $(auctexlog)) && \
+ test -z "$$x"
+
+# Convert git commit log to ChangeLog file.  make-dist uses this.
+# I guess this is PHONY so it always updates?
+ChangeLog:
+ ./$(auctexlog) -o $(CHANGELOG) -n $(CHANGELOG_HISTORY_INDEX_MAX)
+
+# Regular expression that matches the newest commit covered by a ChangeLog.
+new_commit_regexp = ^commit [0123456789abcdef]* (inclusive)
+
+# Copy newer commit messages to the start of the ChangeLog history file,
+# and consider them to be older.
+change-history-nocommit: #preferred-branch-is-current unchanged-history-files
+   -rm -f ChangeLog.tmp
+   $(MAKE) ChangeLog CHANGELOG=ChangeLog.tmp
+   sed '/^This file records repository revisions/,$$d' \
+ ChangeLog.tmp > $(CHANGELOG_N).tmp
+   new_commit_line=`grep --text '$(new_commit_regexp)' ChangeLog.tmp` && \
+   sed 's/$(new_commit_regexp).*/'"$$new_commit_line/" \
+ $(CHANGELOG_N) >>$(CHANGELOG_N).tmp
+   rm ChangeLog.tmp
+   mv $(CHANGELOG_N).tmp $(CHANGELOG_N)
+
+change-history: change-history-nocommit
+   $(MAKE) $@-commit
+
+# If 'make change-history' fails because the newest ChangeLog history
+# file contains invalid text, fix the file by hand and then run
+# 'make change-history-commit'.
+change-history-commit:
+   git commit -m'; make $@' $(CHANGELOG_N) $(auctexlog)
+
+# --
 # The targets below are concerned with the release process and
 # intended to be used only by the maintainers.
 
diff --git a/build-aux/gitlog-to-auctexlog b/build-aux/gitlog-to-auctexlog
new file mode 100755
index 000..9836713
--- /dev/null
+++ b/build-aux/gitlog-to-auctexlog
@@ -0,0 +1,131 @@
+#!/bin/sh
+
+# Convert git log output to ChangeLog format for GNU AUCTeX.
+# Adapted from build-auc/gitlog-to-emacslog script, part of GNU Emacs.
+
+# Copyright (C) 2014-2016 Free Software Foundation, Inc.
+
+# Original Author: Paul Eggert
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public 

[elpa] externals/auctex 901b20a 22/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 901b20a29361df62d85f3053995cc4a80845a502
Merge: 95bef06 e515ecd
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog |5 +
 font-latex.el |   13 +
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 19e019c..791a5a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-08-18  Tassilo Horn  
+
+   * font-latex.el (font-latex-set-syntactic-keywords): Allow for a
+   mandatory argument for a verbatim environment.
+
 2014-08-15  Vladimir Lomov  
 
* style/mathtools.el ("mathtools"): Don't use the removed
diff --git a/font-latex.el b/font-latex.el
index 217d302..b6226b1 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -906,10 +906,11 @@ have changed."
   (add-to-list 'font-latex-syntactic-keywords
   `(,(concat
   "^[ \t]*begin *{\\(?:" verb-envs "\\)}"
-  ;; Some environments accept an optional argument that can
-  ;; span over more lines.  Between "\begin{}" and
-  ;; the optional argument there can be whitespaces and the
-  ;; newline can be commented by a "%" character.
+  ;; Some environments accept an optional and/or mandatory
+  ;; argument that can span over more lines.  Between
+  ;; "\begin{}" and the optional argument there
+  ;; can be whitespaces and the newline can be commented
+  ;; by a "%" character.
   "[ \t]*\\(?:%.*\n[ \t]*\\)?"
   ;; The following line of the regexp matches the optional
   ;; argument and allows for up to one level of brackets
@@ -917,6 +918,10 @@ have changed."
   ;; in the `lstlisting' environment by the `listings'
   ;; package).
   "\\(?:\\[[^\]\[]*\\(?:\\[[^\]\[]*\\][^\]\[]*\\)*\\]\\)?"
+  ;; After the optional argument, there may also be
+  ;; another mandatory argument (e.g. with VerbatimOut or
+  ;; the minted envs).
+  "\\(?:{[^}]+}\\)?"
   "\\(\n\\)")
 (1 "|" t)))
   (add-to-list 'font-latex-syntactic-keywords



[elpa] externals/auctex b88dc70 64/69: Improve prompts when defining LaTeX macros.

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit b88dc700c29d1cc36f6a3b9d54b7d56b4182c15e
Author: Matthew Leach 
Commit: Mosè Giordano 

Improve prompts when defining LaTeX macros.

* latex.el (TeX-arg-default-argument-value): New.
  (TeX-arg-define-macro-arguments): New.
  (LaTeX-common-initialization): Use new LaTeX macro argument functions.

Signed-off-by: Mosè Giordano 
---
 latex.el |   57 +++--
 1 files changed, 43 insertions(+), 14 deletions(-)

diff --git a/latex.el b/latex.el
index 7221fce..64c0f58 100644
--- a/latex.el
+++ b/latex.el
@@ -1969,6 +1969,35 @@ string.  `TeX-read-label-prefix' is used as initial 
input for the
 label."
   (TeX-arg-label optional prompt t))
 
+(defun TeX-arg-default-argument-value (optional &optional prompt)
+  "Prompt for the default value for the first argument of a LaTeX macro.
+
+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
+   (TeX-read-string
+(TeX-argument-prompt optional prompt "Default value for first argument"))
+   optional))
+
+(defun TeX-arg-define-macro-arguments (optional &optional prompt)
+  "Prompt for the number of arguments for a LaTeX macro.  If this
+is non-zero, also prompt for the default value for the first
+argument.
+
+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 ((arg-count (TeX-read-string
+(TeX-argument-prompt optional prompt
+ "Number of arguments"
+ nil
+(unless (or (string= arg-count "0")
+(string= arg-count ""))
+  (TeX-argument-insert arg-count optional)
+  (unless (string-equal LaTeX-version "2")
+(TeX-arg-default-argument-value optional)
+
 (defun TeX-arg-define-macro (optional &optional prompt)
   "Prompt for a TeX macro with completion.
 If OPTIONAL is non-nil, insert the resulting value as an optional
@@ -6022,16 +6051,16 @@ i.e. you do _not_ have to cater for this yourself by 
adding ' or $."
'("label" TeX-arg-define-label)
'("pageref" TeX-arg-ref)
'("ref" TeX-arg-ref)
-   '("newcommand" TeX-arg-define-macro [ "Number of arguments" ] t)
-   '("renewcommand" TeX-arg-macro [ "Number of arguments" ] t)
+   '("newcommand" TeX-arg-define-macro [ TeX-arg-define-macro-arguments ] t)
+   '("renewcommand" TeX-arg-macro [ TeX-arg-define-macro-arguments ] t)
'("newenvironment" TeX-arg-define-environment
  [ "Number of arguments"] t t)
'("renewenvironment" TeX-arg-environment
  [ "Number of arguments"] t t)
-   '("providecommand" TeX-arg-define-macro [ "Number of arguments" ] t)
-   '("providecommand*" TeX-arg-define-macro [ "Number of arguments" ] t)
-   '("newcommand*" TeX-arg-define-macro [ "Number of arguments" ] t)
-   '("renewcommand*" TeX-arg-macro [ "Number of arguments" ] t)
+   '("providecommand" TeX-arg-define-macro [ TeX-arg-define-macro-arguments ] 
t)
+   '("providecommand*" TeX-arg-define-macro [ TeX-arg-define-macro-arguments ] 
t)
+   '("newcommand*" TeX-arg-define-macro [ TeX-arg-define-macro-arguments ] t)
+   '("renewcommand*" TeX-arg-macro [ TeX-arg-define-macro-arguments ] t)
'("newenvironment*" TeX-arg-define-environment
  [ "Number of arguments"] t t)
'("renewenvironment*" TeX-arg-environment
@@ -6243,21 +6272,21 @@ i.e. you do _not_ have to cater for this yourself by 
adding ' or $."
 (setq TeX-font-replace-function 'TeX-font-replace-macro)
 (TeX-add-symbols
  '("newcommand" TeX-arg-define-macro
-   [ "Number of arguments" ] [ "Default value for first argument" ] t)
+   [ TeX-arg-define-macro-arguments ] t)
  '("renewcommand" TeX-arg-macro
-   [ "Number of arguments" ] [ "Default value for first argument" ] t)
+   [ TeX-arg-define-macro-arguments ] t)
  '("providecommand" TeX-arg-define-macro
-   [ "Number of arguments" ] [ "Default value for first argument" ] t)
+   [ TeX-arg-define-macro-arguments ] t)
  '("providecommand*" TeX-arg-define-macro
-   [ "Number of arguments" ] [ "Default value for first argument" ] t)
+   [ TeX-arg-define-macro-arguments ] t)
  '("newcommand*" TeX-arg-define-macro
-   [ "Number of arguments" ] [ "Default value for first argument" ] t)
+   [ TeX-arg-define-macro-arguments ] t)
  '("renewcommand*" TeX-arg-macro
-   [ "Number of arguments" ] [ "Default value for first argument" ] t)
+   [ TeX-arg-define-macro-arguments ] t)
  '("newenvironment" TeX-arg-define-environment
-   [ "Number of arguments" ] [ "Default value for first argument" ] t t)
+   [ TeX-arg-define-macro-arguments ]  t t)
  '("renewenvironment" TeX-arg-environment
-   [ "Number of arguments" ] [ "Default value for first argument" ] t t)
+   [

[elpa] externals/auctex 4837aba 26/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 4837aba8d2ef65806a082270a0907a90815eb9bd
Merge: fd46872 3a16f59
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog |5 +
 tex.el|6 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 01ff6dc..9b70f3a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-08  Tassilo Horn  
+
+   * tex.el (TeX-assoc-string): Remove docstring from defalias since
+   that's not supported with XEmacs.
+
 2014-08-25  Florent Rougon(tiny change)
 
* tex-buf.el (TeX-command-expand): Fix possible endless loop in
diff --git a/tex.el b/tex.el
index cf56f90..f3316d5 100644
--- a/tex.el
+++ b/tex.el
@@ -597,11 +597,7 @@ Also does other stuff."
 
 ;;;###autoload
 (defalias 'TeX-assoc-string
-  (symbol-function  (if (featurep 'xemacs) 'assoc 'assoc-string))
-  (concat "Compatibility alias that points to
-  function `assoc' with XEMACS and to function `assoc-string'
-  with GNU EMACS. See function `"
- (if (featurep 'xemacs) "assoc" "assoc-string") "'." ))
+  (symbol-function  (if (featurep 'xemacs) 'assoc 'assoc-string)))
 
 ;;; Documentation for Info-goto-emacs-command-node and similar
 



[elpa] externals/auctex f9efa73 35/69: Another fix for file name regexp in TeX-documentation-texdoc

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit f9efa73918d76c9955d54b4d46466bce390b6740
Author: Arash Esbati 
Commit: Mosè Giordano 

Another fix for file name regexp in TeX-documentation-texdoc

* tex.el (TeX-documentation-texdoc): Add `space' and `()'
to file name regexp for Windows paths.

Signed-off-by: Mosè Giordano 
---
 tex.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tex.el b/tex.el
index 1b955fe..b7077fc 100644
--- a/tex.el
+++ b/tex.el
@@ -6125,7 +6125,7 @@ show."
(while (re-search-forward
;; XXX: XEmacs doesn't support character classes in
;; regexps, like "[:alnum:]".
-   "^ *\\([0-9]+\\) +\\([-~/a-zA-Z0-9_.${}#%,:\\]+\\)" nil 
t)
+   "^ *\\([0-9]+\\) +\\([-~/a-zA-Z0-9_.${}#%,:\\ ()]+\\)" 
nil t)
  (push (cons (match-string 1) (match-string 2)) list
(unwind-protect
(cond



[elpa] externals/auctex 2fd59c9 60/69: Improve word-string regexp in TeX-warning

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 2fd59c93413440daddd585fc64230e2433f80008
Author: Mosè Giordano 
Commit: Mosè Giordano 

Improve word-string regexp in TeX-warning

* tex-buf.el (TeX-warning): Match letters, numbers, colons, and hyphens,
  not just word constituents.  They may be preceeded by both grave
  accent and apostrophe, not only grave accent.
* tests/tex/compilation-log.txt: Add test case.
* tests/tex/error-parsing.el: Update result.
---
 tests/tex/compilation-log.txt |2 ++
 tests/tex/error-parsing.el|6 +-
 tex-buf.el|4 +++-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/tex/compilation-log.txt b/tests/tex/compilation-log.txt
index f3d2b00..85e56c0 100644
--- a/tests/tex/compilation-log.txt
+++ b/tests/tex/compilation-log.txt
@@ -61,6 +61,8 @@ Overfull \hbox (13.59138pt too wide) in paragraph at lines 
367--368
 
 [93])
 
+LaTeX Warning: Citation 'Knuth:TeXbook-1984' undefined on input line 48.
+
 LaTeX Warning: There were undefined references.
 
 )
diff --git a/tests/tex/error-parsing.el b/tests/tex/error-parsing.el
index 2d0f282..f15f3ac 100644
--- a/tests/tex/error-parsing.el
+++ b/tests/tex/error-parsing.el
@@ -110,7 +110,11 @@ ABD: EveryShipout initializing macros"
  (bad-box "./file  name/with spaces.tex" 367 "Overfull \\hbox 
(13.59138pt too wide) in paragraph at lines 367--368"
   0 "\n[]\\T1/pplj/m/n/10.95 Un qua-dri-vet-to-re co-va-rian-te 
$\\OMS/zplm/m/n/10.95 f\\OML/zplm/m/it/10.95 A[]\\OMS/zplm/m/n/10.95 g$ 
\\T1/pplj/m/n/10.95 e un in-sie-me di quat-tro quan-ti-ta $\\OT1/zplm/m/n/10.95 
(\\OML/zplm/m/it/10.95 A[]; A[]; A[]; A[]\\OT1/zplm/m/n/10.95 )$" "$"
   368 t 2600 nil)
+ (warning "./test.tex" 48
+  "LaTeX Warning: Citation 'Knuth:TeXbook-1984' undefined on input 
line 48." 0
+  "LaTeX Warning: Citation 'Knuth:TeXbook-1984' undefined on input 
line 48.\n"
+  "Knuth:TeXbook-1984" 48 nil 2692 nil)
  (warning "./test.tex" nil "LaTeX Warning: There were undefined 
references."
-  0 "LaTeX Warning: There were undefined references.\n" nil nil 
nil 2667 nil)
+  0 "LaTeX Warning: There were undefined references.\n" nil nil 
nil 2741 nil)
 
 ;;; error-parsing.el ends here
diff --git a/tex-buf.el b/tex-buf.el
index 9a3662b..dca6614 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -2574,7 +2574,9 @@ warning."
"on input line \\([0-9]*\\)\\."))
 ;; word-string: match 1 is the word
 (word-string (if bad-box "[][\\W() ---]\\(\\w+\\)[][\\W() ---]*$"
-   "`\\(\\w+\\)'"))
+   ;; Match "ref" in both "Reference `ref' on page NN
+   ;; undefined" and "Citation 'ref' on page NN undefined".
+   "\\(?:`\\|'\\)\\([-a-zA-Z0-9:]+\\)'"))
 
 ;; Get error-line (warning).  Don't search before `warning-start' to
 ;; avoid catching completely unrelated line numbers.



[elpa] externals/auctex 0731fff 10/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 0731fffe9eb18249af10e00129ec632ec741d484
Merge: bfd5f18 fb40d42
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog  |8 
 tex-buf.el |4 ++--
 tex.el |2 ++
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c873968..521819d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2014-05-27  Mos� Giordano  
+
+   * tex.el (TeX-mode-specific-command-menu-entries): Add
+   `TeX-previous-error'.
+
+   * tex-buf.el (TeX-error-list): Fix typo.
+   (TeX-parse-all-errors): Ditto.
+
 2014-05-23  Stefan Monnier  
 
Backport from ELPA repository.
diff --git a/tex-buf.el b/tex-buf.el
index 479d669..66d1b71 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1559,7 +1559,7 @@ You might want to examine and modify the free variables 
`file',
 `offset', `line', `string', `error', and `context' from this hook.")
 
 (defvar TeX-error-list nil
-  "List of warning and errors.
+  "List of warnings and errors.
 
 This variable is intended to be set only in output buffer so it
 will be shared among all files of the same document.")
@@ -1568,7 +1568,7 @@ will be shared among all files of the same document.")
 (defcustom TeX-parse-all-errors t
   "Whether to automatically collect all warning and errors after running TeX.
 
-If t, it make it possible to use `TeX-previous-error' with TeX
+If t, it makes it possible to use `TeX-previous-error' with TeX
 commands."
   :group 'TeX-command
   :type 'boolean)
diff --git a/tex.el b/tex.el
index 2415219..89b7437 100644
--- a/tex.el
+++ b/tex.el
@@ -4419,6 +4419,8 @@ Brace insertion is only done if point is in a math 
construct and
:help "Kill the current TeX process"]
   ["Next Error" TeX-next-error
:help "Jump to the next error of the last TeX run"]
+  ["Previous Error" TeX-previous-error
+   :help "Jump to the previous error of the last TeX run"]
   ["Quick View" TeX-view
:help "Start a viewer without prompting"]
   "-"



[elpa] externals/auctex updated (0a99c11 -> f1abcf8)

2016-03-26 Thread Tassilo Horn
tsdh pushed a change to branch externals/auctex.

  from  0a99c11   Upgrade docs for release.
   new  f9e6e4b   New function for reading documentation with texdoc
   new  a1473f7   Capture warnings from packages with hyphens in name
   new  f7d0535   Fix file name regexp in TeX-documentation-texdoc
   new  f9efa73   Another fix for file name regexp in 
TeX-documentation-texdoc
   new  f919468   Improve TeX error parsing.
   new  d4059b8   Improve line wrap removal heuristics.
   new  836e461   Don't use TRIM arg of split-string.
   new  a7f4839   Fix Wrong type argument: characterp, nil error.
   new  524b45b   Merge branch 'master' into simplify-TeX-parse-error
   new  8926369   Improve new-file regex.
   new  c34bf64   Merge branch 'master' into simplify-TeX-parse-error
   new  3dec183   Merge branch 'master' into simplify-TeX-parse-error
   new  bfd5f18   Merge master branch.
   new  0731fff   Merge branch 'master' into simplify-TeX-parse-error
   new  6f74661   Merge from master.
   new  8cee4a7   Merge branch 'master' into simplify-TeX-parse-error
   new  e414cbb   Merge branch 'master' into simplify-TeX-parse-error
   new  8fac199   Merge branch 'master' into simplify-TeX-parse-error
   new  a074732   Merge branch 'master' into simplify-TeX-parse-error
   new  8b2550e   Merge branch 'master' into simplify-TeX-parse-error
   new  312c74a   Merge branch 'master' into simplify-TeX-parse-error
   new  7d4bfac   Merge branch 'master' into simplify-TeX-parse-error
   new  08ae29b   Merge branch 'master' into simplify-TeX-parse-error
   new  c1dcb84   Merge branch 'master' into simplify-TeX-parse-error
   new  95bef06   Merge branch 'master' into simplify-TeX-parse-error
   new  901b20a   Merge branch 'master' into simplify-TeX-parse-error
   new  43ba124   Merge branch 'master' into simplify-TeX-parse-error
   new  f351ed9   Merge branch 'master' into simplify-TeX-parse-error
   new  fd46872   Merge branch 'master' into simplify-TeX-parse-error
   new  4837aba   Merge branch 'master' into simplify-TeX-parse-error
   new  8683935   Merge branch 'master' into simplify-TeX-parse-error
   new  16af75d   Merge branch 'master' into simplify-TeX-parse-error
   new  c6d3152   Merge branch 'master' into simplify-TeX-parse-error
   new  b4ff376   Merge branch 'master' into simplify-TeX-parse-error
   new  1950012   Merge branch 'master' into simplify-TeX-parse-error
   new  17d1a5d   ; Merge branch 'simplify-TeX-parse-error'
   new  d7f443e   Add script to update the ChangeLog
   new  891bba7   Add ERT test for error parsing
   new  464bef6   Fix TeX-parse-error
   new  416f131   Catch LaTeX class warnings
   new  2c21439   Improve parsing of certain warnings
   new  2cca33f   Minor fix in TeX-documentation-texdoc
   new  16f3dd4   Add support for Zathura viewer
   new  b72dcb7   Add support for SumatraPDF viewer
   new  00d9438   Add support for dviout viewer
   new  e4cad1c   Add support for Atril viewer
   new  af1ee52   Add support for missing macro \SetLabelAlign
   new  c09c405   Fix wrong usage of `TeX-auto-prepare-hook'
   new  550e058   Add new style/splitidx.el
   new  056d8c8   Fix TeX-check-files
   new  cc59302   Show and hide warnings and bad boxes in error overview
   new  2888571   Allow ignoring certain warnings
   new  53f2fab   Another fix for TeX-parse-errro
   new  f1bcbe3   Improve LaTeX-warnings-regexp
   new  1711536   Fix detection of line number in TeX-warning
   new  6962c34   Avoid checking duplicate directories in TeX-check-files
   new  70e62a9   Catch more bad box warnings
   new  2e543ef   Fix parsing of vertical bad boxes context
   new  57147c7   Another fix for vertical bad box warnings
   new  2fd59c9   Improve word-string regexp in TeX-warning
   new  a2a919d   Use TeX-quote-after-quote in all language style files
   new  a33be07   Remove "table" and "table*" from 
LaTeX-indent-environment-list
   new  30fe0e9   Ensure LaTeX-indent-environment-list environments aren't 
filled
   new  b88dc70   Improve prompts when defining LaTeX macros.
   new  cfa82d8   Prompt for optional short caption parameter.
   new  188e4b1   Temporarily bind gc-cons-threshold in time-consuming task
   new  d4b0d5f   Fix forward sync bug with multi-file documents
   new  4357488   Merge branch 'master' into elpa
   new  f1abcf8   Upgrade docs for release


Summary of changes:
 ChangeLog.1   |   21 ++
 Makefile.in   |   57 -
 auctex.el |2 +-
 auctex.info   |  540 ++---
 build-aux/gitlog-to-auctexlog |  131 +
 doc/auctex.texi   |  104 ++--
 doc/changes.texi  |   56

[elpa] externals/auctex f1abcf8 69/69: Upgrade docs for release

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit f1abcf8e27d8de4a7e1f10b3030e0e368380356a
Author: Tassilo Horn 
Commit: Tassilo Horn 

Upgrade docs for release

* Version 11.89.2 released.
---
 auctex.el  |2 +-
 auctex.info|  540 +++-
 preview-latex.info |   46 +++---
 tex-site.el|2 +-
 4 files changed, 344 insertions(+), 246 deletions(-)

diff --git a/auctex.el b/auctex.el
index f0bd4a6..4ce1946 100644
--- a/auctex.el
+++ b/auctex.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014, 2015 Free Software Foundation, Inc.
 
-;; Version: 11.89.1
+;; Version: 11.89.2
 ;; URL: http://www.gnu.org/software/auctex/
 ;; Maintainer: auctex-de...@gnu.org
 
diff --git a/auctex.info b/auctex.info
index 23ceef1..501ee53 100644
--- a/auctex.info
+++ b/auctex.info
@@ -1,9 +1,9 @@
-This is auctex.info, produced by makeinfo version 6.0 from auctex.texi.
+This is auctex.info, produced by makeinfo version 6.1 from auctex.texi.
 
-This manual is for AUCTeX (version 11.89.1 from 2016-01-31), a
+This manual is for AUCTeX (version 11.89.2 from 2016-03-26), a
 sophisticated TeX environment for Emacs.
 
-   Copyright (C) 1992-1995, 2001, 2002, 2004-2015 Free Software
+   Copyright (C) 1992-1995, 2001, 2002, 2004-2016 Free Software
 Foundation, Inc.
 
  Permission is granted to copy, distribute and/or modify this
@@ -142,6 +142,7 @@ Viewing the Formatted Output
 
 Catching the errors
 
+* Ignoring warnings::   Controlling warnings to be reported
 * Error overview::  List of all errors and warnings
 
 Customization and Extension
@@ -731,7 +732,7 @@ big help already if things work from inside of Emacs.
Here is how to do the various parts:
 
 Making the Elisp available
---
+..
 
 In GNU Emacs, it should be sufficient if people just do
 
@@ -748,7 +749,7 @@ easy programmatic way to do this, except to have a script 
do the
 symlinking for them.)
 
 Making the Info files available

+...
 
 For making the info files accessible from within Elisp, something like
 the following might be convenient to add into your or other people's
@@ -764,7 +765,7 @@ of standalone readers outside of XEmacs.  (The info files 
in XEmacs are
 normally in '~/.xemacs/xemacs-packages/info'.)
 
 Making the LaTeX style available
-
+
 
 If you want others to be able to share your installation, you should
 configure it using '--without-texmf-dir', in which case things should
@@ -777,7 +778,7 @@ File: auctex.info,  Node: Installation under MS Windows,  
Next: Customizing,  Pr
 ---
 
 In a Nutshell
--
+.
 
 The following are brief installation instructions for the impatient.  In
 case you don't understand some of this, run into trouble of some sort,
@@ -841,7 +842,7 @@ further below.
   make install
 
 Detailed Installation Instructions
---
+..
 
 Installation of AUCTeX under Windows is in itself not more complicated
 than on other platforms.  However, meeting the prerequisites might
@@ -1979,6 +1980,13 @@ CAPTION
  the caption should be placed at the top with
  'LaTeX-top-caption-list'.
 
+SHORT CAPTION
+ If the specified caption is greater than a specific length, then a
+ short caption is prompted for and it is inserted as an optional
+ argument to the '\caption' macro.  The length that a caption needs
+ to be before prompting for a short version is controlled by
+ 'LaTeX-short-caption-prompt-length'.
+
 LABEL
  The label of this float.  The label will have a default prefix,
  which is controlled by the variables 'LaTeX-figure-label' and
@@ -2001,6 +2009,10 @@ environment.
  -- User Option: LaTeX-top-caption-list
  List of float environments with top caption.
 
+ -- User Option: LaTeX-short-caption-prompt-length
+ Number of chars a caption should be before prompting for a short
+ caption.
+
 
 File: auctex.info,  Node: Itemize-like,  Next: Tabular-like,  Prev: Floats,  
Up: Environments
 
@@ -3997,17 +4009,6 @@ variable.
  This is the default.  If nil, AUCTeX does not parse the whole
  output log buffer and 'TeX-previous-error' cannot be used.
 
-   Normally AUCTeX will only report real errors, but you may as well ask
-it to report 'bad boxes' and warnings as well.
-
- -- Command: TeX-toggle-debug-bad-boxes
- ('C-c C-t C-b') Toggle whether AUCTeX should stop at bad boxes
- (i.e.  overfull and underfull boxes) as well as normal errors.
-
- -- Command: TeX-toggle-debug-warnings
- ('C-c C-t C-w') Toggle whether AUCTeX should stop at warnings as
- well as normal errors.
-
As default, AUCTeX will display a special help buffer containing the
 error reported by TeX along with the documentation.  There is however 

[elpa] externals/auctex 312c74a 17/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 312c74a69ac6260bc82de4f377cf1813865ad2a5
Merge: 8b2550e 0da2913
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog|   16 
 doc/auctex.texi  |7 ++-
 doc/changes.texi |2 +-
 latex.el |   15 ++-
 4 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index fb1e62f..2be1b61 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2014-07-25  Tassilo Horn  
+
+   * latex.el (LaTeX-largest-level-set): Adapt
+   `outline-heading-alist' according to largest level in order to
+   make `outline-promote' (and others) work correctly.
+
+2014-07-25  Mos� Giordano  
+
+   * doc/auctex.texi (Adding Macros): Document `TeX-date-format'.
+
+   * doc/changes.texi: Mention `TeX-date-format'.
+
+   * latex.el (TeX-date-format): New customizable option.
+   Suggested by Uwe Brauer.
+   (TeX-arg-date): Use it.
+
 2014-07-17  Mos� Giordano  
 
* Makefile.in: Update copyright years.
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 3961bb8..7261705 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -4394,7 +4394,12 @@ Prompt for a @LaTeX{} length completing with known 
lengths.
 Prompt for a @TeX{} macro with completion.
 
 @item TeX-arg-date
-Prompt for a date, defaulting to the current date.
+@vindex TeX-date-format
+Prompt for a date, defaulting to the current date.  The format of the
+date is specified by the @code{TeX-date-format} option.  If you want to
+change the format when the @samp{babel} package is loaded with a
+specific language, set @code{TeX-date-format} inside the appropriate
+language hook, for details @pxref{European}.
 
 @item TeX-arg-version
 Prompt for the version of a file, using as initial input the current
diff --git a/doc/changes.texi b/doc/changes.texi
index 5707cd0..b408b47 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -53,7 +53,7 @@ non-nil.  Completion for class options of the standard 
@LaTeX{} classes
 is provided as well.
 
 @item
-New user options @code{LaTeX-default-author},
+New user options @code{LaTeX-default-author}, @code{TeX-date-format},
 @code{TeX-insert-braces-alist}, @code{LaTeX-fontspec-arg-font-search},
 and @code{LaTeX-fontspec-font-list-default}.  A new possible value
 (@code{show-all-optional-args}) for
diff --git a/latex.el b/latex.el
index d9a383f..c798cda 100644
--- a/latex.el
+++ b/latex.el
@@ -280,6 +280,14 @@ SECTION has to be a string contained in 
`LaTeX-section-list'.
 Additionally the function will invalidate the section submenu in
 order to let the menu filter regenerate it."
   (setq LaTeX-largest-level (LaTeX-section-level section))
+  (let ((offset (LaTeX-outline-offset)))
+(when (> offset 0)
+  (let (lst)
+   (dolist (tup outline-heading-alist)
+ (setq lst (cons (cons (car tup)
+   (+ offset (cdr tup)))
+ lst)))
+   (setq outline-heading-alist (nreverse lst)
   (setq LaTeX-section-menu nil))
 
 (defun LaTeX-outline-offset ()
@@ -2251,12 +2259,17 @@ string."
nil t)
optional))
 
+(defcustom TeX-date-format "%Y/%m/%d"
+  "The default date format prompted by `TeX-arg-date'."
+  :group 'LaTeX-macro
+  :type 'string)
+
 (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
+  (let ((default (format-time-string TeX-date-format (current-time
 (TeX-argument-insert
  (TeX-read-string (TeX-argument-prompt
   optional prompt (format "Date (default %s)" default))



[elpa] externals/auctex cc59302 51/69: Show and hide warnings and bad boxes in error overview

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit cc59302b0fddf9d8b3c89b5cfcf7e79338b44a41
Author: Mosè Giordano 
Commit: Mosè Giordano 

Show and hide warnings and bad boxes in error overview

* tex-buf.el (TeX-error-list-skip-warning-p): New function.
(TeX-parse-TeX): Skip warnings or bad boxes if they are to be ignored.
(TeX-error-list): Describe information present in the list.
(TeX-parse-error): When storing warnings and bad boxes, add them to
`TeX-error-list' even if `TeX-debug-bad-boxes' and `TeX-debug-warnings'
are nil.
(TeX-error-overview-make-entries): Skip warnings or bad boxes if they
are to be ignored.
(TeX-error-overview-toggle-debug-bad-boxes):
(TeX-error-overview-toggle-debug-warnings): New functions.
(TeX-error-overview-mode-map, TeX-error-overview-menu): Add
`TeX-error-overview-toggle-debug-bad-boxes' and
`TeX-error-overview-toggle-debug-warnings'.
(TeX-error-overview): Make the list of entries for the overview before
creating the buffer and use this list to decide whether there is
something to show.
---
 tex-buf.el |  173 +++-
 1 files changed, 124 insertions(+), 49 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index f55d6f4..39c35dc 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -2180,6 +2180,19 @@ If optional argument REPARSE is non-nil, reparse the 
output log."
 (process-name (TeX-active-process))
   "this")))
 
+(defun TeX-error-list-skip-warning-p (type)
+  "Decide if a warning of `TeX-error-list' should be skipped.
+
+TYPE is one of the types listed in `TeX-error-list'."
+  ;; The warning should be skipped if it...
+  (or
+   ;; ...is a warning and we want to ignore all warnings, or...
+   (and (null TeX-debug-warnings)
+   (equal type 'warning))
+   ;; ...is a bad-box and we want to ignore all bad-boxes.
+   (and (null TeX-debug-bad-boxes)
+   (equal type 'bad-box
+
 (defun TeX-parse-TeX (arg reparse)
   "Find the next error produced by running TeX.
 
@@ -2200,12 +2213,21 @@ already in an Emacs buffer) and the cursor is placed at 
the error."
  (TeX-parse-reset reparse))
   (if TeX-parse-all-errors
  (progn
-   (setq max-index (length TeX-error-list)
- TeX-error-last-visited (+ (or arg 1) TeX-error-last-visited)
- item (if (natnump TeX-error-last-visited)
-  (nth TeX-error-last-visited TeX-error-list)
-;; XEmacs doesn't support `nth' with a negative index.
-nil))
+   (setq arg (or arg 1)
+ max-index (length TeX-error-list))
+   ;; This loop is needed to skip ignored warnings.
+   (while (null (zerop arg))
+ (setq TeX-error-last-visited (1+ TeX-error-last-visited)
+   item (if (natnump TeX-error-last-visited)
+(nth TeX-error-last-visited TeX-error-list)
+  ;; XEmacs doesn't support `nth' with a negative 
index.
+  nil))
+ ;; Increase or decrease `arg' only if the warning isn't to be
+ ;; skipped.
+ (unless (TeX-error-list-skip-warning-p (nth 0 item))
+   (setq arg (if (> arg 0)
+ (1- arg)
+   (1+ arg)
(if (< TeX-error-last-visited -1)
(setq TeX-error-last-visited -1))
(cond ((or (null item)
@@ -2232,6 +2254,19 @@ You might want to examine and modify the free variables 
`file',
 (defvar TeX-error-list nil
   "List of warnings and errors.
 
+Each element of the list is a list of information for a specific
+error or warning.  This is the structure of each element:
+ *  0: type (error, warning, bad-box)
+ *  1: file
+ *  2: line
+ *  3: error/warning text
+ *  4: offset
+ *  5: context
+ *  6: string
+ *  7: line-end
+ *  8: bad-box
+ *  9: value of `TeX-error-point'
+
 This variable is intended to be set only in output buffer so it
 will be shared among all files of the same document.")
 (make-variable-buffer-local 'TeX-error-list)
@@ -2305,7 +2340,9 @@ Return non-nil if an error or warning is found."
nil))
 ;; LaTeX bad box
 ((match-beginning 7)
- (if TeX-debug-bad-boxes
+ ;; In `TeX-error-list' we collect all warnings, also if they're going
+ ;; to be actually skipped.
+ (if (or store TeX-debug-bad-boxes)
  (progn
(setq error-found t)
(TeX-warning (TeX-match-buffer 7) store)
@@ -2316,7 +2353,9 @@ Return non-nil if an error or warning is found."
t))
 ;; LaTeX warning
 ((match-beginning 8)
- (if TeX-debug-warnings
+ ;; In `TeX-error-list' we collect all warnings, also if they're going
+ ;; to be actually skipped.
+ (if (or store TeX-debug-warnings)
  (progn

[elpa] externals/auctex c1dcb84 20/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit c1dcb84b2695a5ee484eeb3695905c5634d36a8b
Merge: 08ae29b 8d69d3b
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog  |   26 
 doc/auctex.texi|   50 +++
 doc/changes.texi   |5 --
 latex.el   |  115 ++-
 style/amsmath.el   |   12 +++--
 style/longtable.el |   11 +++--
 6 files changed, 95 insertions(+), 124 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5f71fa0..71ccc62 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,29 @@
+2014-08-14  Mos� Giordano  
+
+   * latex.el (LaTeX-insert-label): Remove.
+   (LaTeX-label): Add a new mandatory argument.  Do not use
+   `LaTeX-insert-label'.  Determine the prefix at the beginning of
+   the function and insert the label only if the prefix is non nil.
+   (LaTeX-section-label, LaTeX-env-figure, LaTeX-env-label): Use the
+   second mandatory argument of `LaTeX-label'.
+
+   * style/amsmath.el: Update copyright years.
+   ("amsmath"): Append the environments to `LaTeX-label-alist'
+   instead of prepeding them.  Use the second mandatory argument of
+   the `LaTeX-label' function.
+
+   * style/longtable.el: Update copyright years.
+   ("longtable"): Move addition of "longtable" environment to
+   `LaTeX-label-alist' inside the style hook.  Append the environment
+   to the alist instead of prepending it.  Use the second mandatory
+   argument of the `LaTeX-label' function.
+
+   * doc/auctex.texi (Sectioning, Environments): Remove references to
+   `LaTeX-insert-label'.
+   (Environments): Document `LaTeX-label-alist'.
+
+   * doc/changes.texi: Remove references to `LaTeX-insert-label'.
+
 2014-08-12  Mos� Giordano  
 
* latex.el (LaTeX-insert-label): Rename from
diff --git a/doc/auctex.texi b/doc/auctex.texi
index d85a4d3..84ac235 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -734,12 +734,6 @@ Prefix to all section references.
 
 @end deffn
 
-@vindex LaTeX-insert-label
-The @code{LaTeX-insert-label} user option controls whether
-@code{LaTeX-section} should automatically insert a label for the given
-sectioning command.  By default, a label for all sectioning commands
-will be prompted.  @xref{Environments}, for more information.
-
 The precise behavior of @code{LaTeX-section} is defined by the contents
 of @code{LaTeX-section-hook}.
 
@@ -857,35 +851,21 @@ environment is inserted.
 @AUCTeX{} helps you adding labels to environments which use them, such
 as @samp{equation}, @samp{figure}, @samp{table}, etc@dots{}  When you
 insert one of the supported environments with @kbd{C-c C-e}, you will be
-automatically prompted for a label.  If you want to select the
-environments for which to automatically insert or not the label,
-customize the @code{LaTeX-insert-label} variable.
-@defopt LaTeX-insert-label
-Control whether @code{LaTeX-section} (@kbd{C-c C-s}) or
-@code{LaTeX-environment} (@kbd{C-c C-e}) should insert a label.  If nil,
-never insert a label, if t always insert a label and this the default.
-
-This variable may also be a cons cell, to whitelist or blacklist the
-sections or environments for which a label should or should not be
-inserted.  The car can be either nil or t.  In the former case,
-@code{LaTeX-section} and @code{LaTeX-environment} never insert labels
-except for the sections and environments listed in the cdr; in the
-latter case those functions always insert labels except for the sections
-and environments listed in the cdr.  In any cases, you can manually
-insert a label at point with @kbd{C-c C-m label @key{RET}}, as usual.
-
-For example, the value
-@lisp
-(t . "paragraph" "equation")
-@end lisp
-makes @AUCTeX{} always prompt you for a label except for the
-@samp{paragraph} section, and th @samp{equation} environment.  Instead
-with the value
-@lisp
-(nil . "part" "chapter" "caption" "figure")
-@end lisp
-you will be prompted for a label only for @samp{part} and @samp{chapter}
-sections, and @samp{caption} and @samp{figure} environments.
+automatically prompted for a label.  You can select the prefix to be
+used for such environments with the @code{LaTeX-label-alist} variable.
+@defopt LaTeX-label-alist
+List the prefixes to be used for the label of each supported
+environment.
+
+This is an alist whose car is the environment name, and the cdr either
+the prefix or a symbol referring to one.
+
+If the name is not found, or if the cdr is nil, no label is
+automatically inserted for that environment.
+
+If you want to automatically insert a label for a environment but with
+an empty prefix, use the empty string @code{""} as the cdr of the
+corresponding entry.
 @end defopt
 
 As a default selection, @AUCTeX{} will suggest the environment last
diff --git a/doc/changes.texi b/doc/changes.texi
index a717217..6d2e7b5 100644
--- a/doc/changes.texi
+++ b/doc

[elpa] externals/auctex 836e461 03/69: Don't use TRIM arg of split-string.

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 836e46136286941fbbb87178d33df9087469421e
Author: Tassilo Horn 
Commit: Tassilo Horn 

Don't use TRIM arg of split-string.

* tex-buf.el (TeX-parse-error): Don't use TRIM arg of
`split-string' which is new in emacs 24.4.
---
 tex-buf.el |   11 +++
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index e64c3a2..8aaf14d 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1540,12 +1540,15 @@ You might want to examine and modify the free variables 
`file',
 ((match-beginning 3)
  (let ((file (TeX-match-buffer 3))
(end (match-end 3)))
-   ;; Trim, strip quotation marks and remove newlines if necessary
+   ;; Strip quotation marks and remove newlines if necessary
(when (or (eq (string-to-char file) ?\")
  (string-match "[ \t\n]" file))
- (setq file (mapconcat 'identity
-   (split-string file "[\"\n]+" nil "[ \t]")
-   "")))
+ (setq file (mapconcat 'identity (split-string file "[\"\n]+") 
"")))
+   ;; Trim whitespace at the front/end
+   (setq file
+ (progn
+   (string-match 
"^[[:space:]]*\\(.*[^[:space:]]\\)[[:space:]]*$" file)
+   (match-string 1 file)))
(push file TeX-error-file)
(push nil TeX-error-offset)
(goto-char end))



[elpa] externals/auctex 1950012 31/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 1950012155d539f05c393dae3d6e93548bbc57b2
Merge: b4ff376 4b21d3f
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog |4 ++
 Makefile.in   |2 +-
 style/cleveref.el |  103 +
 3 files changed, 108 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 10cc9de..d91774a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-10-13  Matthew Leach  
+
+   * style/cleveref.el: New file.
+
 2014-10-02  Ikumi Keita  
 
* tex.el (featurep): Activate mark in the GNU Emacs version of
diff --git a/Makefile.in b/Makefile.in
index efdc405..583b6e7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -134,7 +134,7 @@ STYLESRC = style/prosper.el \
   style/acronym.el   style/xparse.elstyle/fancyvrb.el \
   style/tabulary.el  style/fontspec.el  style/unicode-math.el \
   style/luacode.el   style/metalogo.el  style/english.el \
-  style/exercise.el  style/plext.el
+  style/exercise.el  style/plext.el style/cleveref.el
 STYLEELC = $(STYLESRC:.el=.elc)
 
 CLEANFILES = $(AUCELC) $(STYLEELC) $(MULEELC)
diff --git a/style/cleveref.el b/style/cleveref.el
new file mode 100644
index 000..755239d
--- /dev/null
+++ b/style/cleveref.el
@@ -0,0 +1,103 @@
+;;; cleveref.el --- Style hook for the `cleveref.sty' package.
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; Author: Matthew Leach 
+;; Maintainer: auctex-de...@gnu.org
+;; Created: 13/10/2014
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Code
+
+(defun TeX-arg-cleveref-multiple-labels (optional &optional prompt definition)
+  "Prompt for a series of labels 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 each chosen label to the
+list of defined labels."
+  (let* ((labels (TeX-completing-read-multiple
+  (TeX-argument-prompt optional prompt "Keys")
+  (LaTeX-label-list)))
+ (labels-string (mapconcat 'identity labels ",")))
+(when definition
+  (apply 'LaTeX-add-labels labels))
+(TeX-argument-insert labels-string optional optional)))
+
+(TeX-add-style-hook
+ "cleveref"
+ (lambda ()
+   (TeX-add-symbols
+'("cref" TeX-arg-cleveref-multiple-labels)
+'("Cref" TeX-arg-cleveref-multiple-labels)
+'("crefrange" (TeX-arg-label "Key (first)") (TeX-arg-label "Key (last)"))
+'("Crefrange" (TeX-arg-label "key (first)") (TeX-arg-label "Key (last)"))
+'("cpageref" TeX-arg-cleveref-multiple-labels)
+'("Cpageref" TeX-arg-cleveref-multiple-labels)
+'("cpagerefrange" (TeX-arg-label "Key (first)") (TeX-arg-label "Key 
(last)"))
+'("Cpagerefrange" (TeX-arg-label "Key (first)") (TeX-arg-label "Key 
(last)"))
+'("cref*" TeX-arg-cleveref-multiple-labels)
+'("Cref*" TeX-arg-cleveref-multiple-labels)
+'("crefrange*" (TeX-arg-label "Key (first)") (TeX-arg-label "Key (last)"))
+'("Crefrange*" (TeX-arg-label "Key (first)") (TeX-arg-label "Key (last)"))
+'("namecref" TeX-arg-label)
+'("nameCref" TeX-arg-label)
+'("lnamecref" TeX-arg-label)
+'("namecrefs" TeX-arg-label)
+'("nameCrefs" TeX-arg-label)
+'("lnamecrefs" TeX-arg-label)
+'("labelcref" TeX-arg-cleveref-multiple-labels)
+'("labelcpageref" TeX-arg-cleveref-multiple-labels))
+
+   ;; These macros aren't used particularly often during the course of
+   ;; normal referencing.
+   (TeX-declare-expert-macros
+"cleveref"
+"namecref" "nameCref" "lnamecref" "namecrefs" "nameCrefs"
+"lnamecrefs" "labelcref" "labelcpageref")
+
+   ;; Fontification
+   (when (and (fboundp 'font-latex-add-keywords)
+ (fboundp 'font-latex-set-syntactic-keywords)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("cref" "*{")
+   ("Cref" "*{")
+   ("crefrange" "*{{")
+   ("Crefrange" "*{{")
+("cpageref" "{")
+("Cpageref" "{")
+ 

[elpa] externals/auctex 95bef06 21/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 95bef0636831eaabdf5a42df04a16b099e91426b
Merge: c1dcb84 6d4f7d1
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog  |5 +
 style/mathtools.el |4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 71ccc62..19e019c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-08-15  Vladimir Lomov  
+
+   * style/mathtools.el ("mathtools"): Don't use the removed
+   `LaTeX-amsmath-env-aligned' function.
+
 2014-08-14  Mos� Giordano  
 
* latex.el (LaTeX-insert-label): Remove.
diff --git a/style/mathtools.el b/style/mathtools.el
index ae63289..e550403 100644
--- a/style/mathtools.el
+++ b/style/mathtools.el
@@ -67,8 +67,8 @@
  (add-to-list 'LaTeX-mathtools-package-options elt))
 
(LaTeX-add-environments
-'("lgathered" LaTeX-amsmath-env-aligned)
-'("rgathered" LaTeX-amsmath-env-aligned)
+'("lgathered" ["Vertical position (t or b)"])
+'("rgathered" ["Vertical position (t or b)"])
 '("multlined" LaTeX-mathtools-env-multlined)
 '("matrix*" LaTeX-mathtools-env-matrix-starred)
 '("pmatrix*" LaTeX-mathtools-env-matrix-starred)



[elpa] externals/auctex 8cee4a7 12/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 8cee4a7fcd5f13901c93b672a7673f35183d013d
Merge: 6f74661 c2bdd11
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog  |9 +
 tex-buf.el |   40 +++-
 2 files changed, 36 insertions(+), 13 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 109025e..c663758 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-06-04  Mos� Giordano  
+
+   * tex-buf.el (TeX-parse-TeX): Use
+   `TeX-error-list-find-display-help'.
+   (TeX-error-list-find-display-help): New function.
+   (TeX-warning): Use `bad-box' when there is a bad box.
+   (TeX-warning--find-display-help): Cater for bad boxes.
+   (TeX-help-error): Ditto.
+
 2014-06-02  Mos� Giordano  
 
* tex-buf.el (TeX-error--find-display-help): Use new fourth
diff --git a/tex-buf.el b/tex-buf.el
index a5180c2..b7b9d01 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -966,10 +966,10 @@ Return nil ifs no errors were found."
(setq TeX-command-next TeX-command-default)
;; error reported to TeX-error-report-switches
(setq TeX-error-report-switches
- (plist-put TeX-error-report-switches
-(intern (plist-get TeX-error-report-switches
-   'TeX-current-master))
-t))
+ (plist-put TeX-error-report-switches
+(intern (plist-get TeX-error-report-switches
+   'TeX-current-master))
+t))
t)
 (setq TeX-command-next TeX-command-Show)
 nil))
@@ -1542,10 +1542,7 @@ already in an Emacs buffer) and the cursor is placed at 
the error."
   (beep)
   (TeX-pop-to-buffer old-buffer))
  (t
-  (apply (intern
-  (concat "TeX-" (symbol-name (car item))
-  "--find-display-help"))
- (cdr item)
+  (TeX-error-list-find-display-help item
 
(goto-char TeX-error-point)
(TeX-parse-error old-buffer)
@@ -1691,6 +1688,20 @@ Return non-nil if an error or warning is found."
  t)))
 error-found))
 
+(defun TeX-error-list-find-display-help (item)
+  "Find the error and display the help associated to it.
+ITEM is an element of `TeX-error-list' with all relevant
+information about the error or warning."
+  (let ((type (car item)))
+(apply (intern (concat "TeX-"
+  (cond
+   ((equal type 'error)
+"error")
+   ((or (equal type 'warning) (equal type 'bad-box))
+"warning"))
+  "--find-display-help"))
+  (cdr item
+
 (defun TeX-error (&optional store)
   "Display an error.
 
@@ -1836,8 +1847,8 @@ warning."
 (if store
;; Store the warning information.
(add-to-list 'TeX-error-list
-(list 'warning file line warning offset context
-  string line-end bad-box) t)
+(list (if bad-box 'bad-box 'warning) file line warning
+  offset context string line-end bad-box) t)
   ;; Find the warning point and display the help.
   (TeX-warning--find-display-help
file line warning offset context string line-end bad-box
@@ -1880,7 +1891,7 @@ warning."
   (TeX-pop-to-buffer error-file-buffer nil t))
  (TeX-display-help
   (TeX-help-error error (if bad-box context (concat "\n" context))
-  runbuf 'warning))
+  runbuf (if bad-box 'bad-box 'warning)))
  (t
   (message (concat "! " error))
 
@@ -1931,7 +1942,8 @@ warning."
 
 (defun TeX-help-error (error output runbuffer type)
   "Print ERROR in context OUTPUT from RUNBUFFER in another window.
-TYPE is a symbol specifing if ERROR is a real error or a warning."
+TYPE is a symbol specifing if ERROR is a real error, a warning or
+a bad box."
 
   (let ((old-buffer (current-buffer))
(log-file (with-current-buffer runbuffer
@@ -1953,7 +1965,9 @@ TYPE is a symbol specifing if ERROR is a real error or a 
warning."
((equal type 'error)
 (propertize "ERROR" 'font-lock-face 'TeX-error-description-error))
((equal type 'warning)
-(propertize "WARNING" 'font-lock-face 'TeX-error-description-warning)))
+(propertize "WARNING" 'font-lock-face 'TeX-error-description-warning))
+   ((equal type 'bad-box)
+(propertize "BAD BOX" 'font-lock-face 'TeX-error-description-warning)))
": " error
(propertize "\n\n--- TeX said ---" 'font-lock-face
   'TeX-error-description-tex-said)



[elpa] externals/auctex 6f74661 11/69: Merge from master.

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 6f746618e10a30024e808eeeb9a0dbf3dcdbd02b
Merge: 0731fff b9fa19d
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge from master.
---
 ChangeLog  |   19 
 tex-buf.el |  136 +--
 2 files changed, 113 insertions(+), 42 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 521819d..109025e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2014-06-02  Mos� Giordano  
+
+   * tex-buf.el (TeX-error--find-display-help): Use new fourth
+   argument of `TeX-help-error'.
+   (TeX-warning): Rename mandatory argument to `warning'.  Do not add
+   leading "** " to warning string.
+   (TeX-warning--find-display-help): Use new fourth argument of
+   `TeX-help-error'.
+   (TeX-error-description-faces): New group.
+   (TeX-error-description-error): New face.
+   (TeX-error-description-warning): Ditto.
+   (TeX-error-description-tex-said): Ditto.
+   (TeX-error-description-help): Ditto.
+   (TeX-help-error): Add new `type' argument.  Color help messages
+   using the new faces.
+   (TeX-warning): Preserve point when searching backward.  In some
+   cases this prevents infinite loops in `TeX-parse-all-errors' and
+   fixes wrong detection of context string.
+
 2014-05-27  Mos� Giordano  
 
* tex.el (TeX-mode-specific-command-menu-entries): Add
diff --git a/tex-buf.el b/tex-buf.el
index 66d1b71..a5180c2 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1778,20 +1778,19 @@ information in `TeX-error-list' instead of displaying 
the error."
   (goto-char TeX-error-point)
   (TeX-pop-to-buffer error-file-buffer nil t))
  (TeX-display-help
-  (TeX-help-error error context runbuf))
+  (TeX-help-error error context runbuf 'error))
  (t
   (message (concat "! " error))
 
-(defun TeX-warning (string &optional store)
-  "Display a warning for STRING.
+(defun TeX-warning (warning &optional store)
+  "Display a warning for WARNING.
 
 If optional argument STORE is non-nil, store the warning
 information in `TeX-error-list' instead of displaying the
 warning."
-  (let* ((error (concat "** " string))
 
-;; bad-box is nil if this is a "LaTeX Warning"
-(bad-box (string-match "[vh]box.*[0-9]*--[0-9]*" string))
+  (let* (;; bad-box is nil if this is a "LaTeX Warning"
+(bad-box (string-match "[vh]box.*[0-9]*--[0-9]*" warning))
 ;; line-string: match 1 is beginning line, match 2 is end line
 (line-string (if bad-box " \\([0-9]*\\)--\\([0-9]*\\)"
"on input line \\([0-9]*\\)\\."))
@@ -1799,8 +1798,8 @@ warning."
 (word-string (if bad-box "[][\\W() ---]\\(\\w+\\)[][\\W() ---]*$"
"`\\(\\w+\\)'"))
 
-;; Get error-line (warning)
-(line (when (re-search-backward line-string nil t)
+;; Get error-line (warning).
+(line (when (save-excursion (re-search-backward line-string nil t))
 (string-to-number (TeX-match-buffer 1
 (line-end (if bad-box (string-to-number (TeX-match-buffer 2))
 line))
@@ -1822,7 +1821,8 @@ warning."
 (error-point (point))
 
 ;; Now find the error word.
-(string (when (re-search-backward word-string context-start t)
+(string (when (save-excursion
+(re-search-backward word-string context-start t))
   (TeX-match-buffer 1)))
 
 ;; We might use these in another file.
@@ -1836,11 +1836,11 @@ warning."
 (if store
;; Store the warning information.
(add-to-list 'TeX-error-list
-(list 'warning file line error offset context
+(list 'warning file line warning offset context
   string line-end bad-box) t)
   ;; Find the warning point and display the help.
   (TeX-warning--find-display-help
-   file line error offset context string line-end bad-box
+   file line warning offset context string line-end bad-box
 
 (defun TeX-warning--find-display-help (file line error offset context
string line-end bad-box)
@@ -1880,14 +1880,58 @@ warning."
   (TeX-pop-to-buffer error-file-buffer nil t))
  (TeX-display-help
   (TeX-help-error error (if bad-box context (concat "\n" context))
-  runbuf))
+  runbuf 'warning))
  (t
   (message (concat "! " error))
 
 ;;; - Help
 
-(defun TeX-help-error (error output runbuffer)
-  "Print ERROR in context OUTPUT from RUNBUFFER in another window."
+(defgroup TeX-error-description-faces nil
+  "Faces used in error descriptions."
+  :prefix "TeX-error-description-"
+  :group 'AUCTeX)
+
+(defface TeX-error-description-error
+  ;; This is the same as `error' face in latest GNU Emacs versions.
+  '((def

[elpa] externals/auctex 550e058 49/69: Add new style/splitidx.el

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 550e05891f494b68af3a57381bd67dbdc0cd2052
Author: Arash Esbati 
Commit: Mosè Giordano 

Add new style/splitidx.el

* Makefile.in (STYLESRC): Add new style.

* tex-style.el (LaTeX-splitidx-sindex-reftex-quick-id-key): Add
customizable variable.

* style/splitidx.el: New file.

Signed-off-by: Mosè Giordano 
---
 Makefile.in   |3 +-
 style/splitidx.el |  309 +
 tex-style.el  |   12 ++
 3 files changed, 323 insertions(+), 1 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index ffe6d76..471ff21 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -153,7 +153,8 @@ STYLESRC = style/prosper.el \
   style/vwcol.el style/textpos.el   style/transparent.el \
   style/fontenc.el   style/Alegreya.el  style/gloss-italian.el \
   style/newfloat.el  style/subcaption.el style/AlegreyaSans.el \
-  style/hologo.elstyle/theorem.el   style/ntheorem.el
+  style/hologo.elstyle/theorem.el   style/ntheorem.el \
+  style/splitidx.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
diff --git a/style/splitidx.el b/style/splitidx.el
new file mode 100644
index 000..e299b5a
--- /dev/null
+++ b/style/splitidx.el
@@ -0,0 +1,309 @@
+;;; splitidx.el --- AUCTeX style for `splitidx.sty' (v1.2a)
+
+;; Copyright (C) 2016 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati 
+;; Maintainer: auctex-de...@gnu.org
+;; Created: 2015-09-19
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; This file adds support for `splitidx.sty' (v1.2a) from 2013/04/09.
+;; `splitidx.sty' is part of TeXLive.
+
+;; The main index macro provided by `splitidx.sty' is
+;;
+;; \sindex[]{}
+;;
+;; where  identifies the target where  is going
+;; into.  This style checks if RefTeX is loaded and adds "\sindex" to
+;; index macros known by RefTeX; this is described in RefTeX manual
+;; section 5.5 Defining Index Macros:
+;;
+;; (setq reftex-index-macros '(("\\sindex[]{*}" 1 ?s "" nil t)))
+;;
+;; To make things more user friendly, this style does not hard-code
+;; the key `?s' and offers a customizable variable called
+;; `LaTeX-splitidx-sindex-reftex-quick-id-key'.  Customize this
+;; variable to another unique key if you have other preference.  Also
+;; note the integer 1 after "\\sindex[]{*}".  This tells RefTeX to
+;; look in first optional argument to find out which index the entry
+;; belongs to.  If omitted, RefTeX puts the index entry into "idx".
+
+;; `splitidx.sty' provides also the option `idxcommands' where a
+;; command with the name of the  is defined for each
+;; declared index.  An example from splitidx.pdf:
+;;
+;; \documentclass{article}
+;; \usepackage[idxcommands]{splitidx}
+;;
+;; \newindex[General Index]{idx}   % Name and shortcut of the 1st index
+;; \newindex[Index of Animals]{ani}% ... 2nd index
+;; \newindex[Index of Fruits]{fru} % ... 3rd index
+;; \newindex[Index of Vegetables]{veg} % ... 4th index
+;; ...
+;;
+;; Now four index commands \idx, \ani, \fru and \veg are available.
+;; This style adds these commands to AUCTeX and RefTeX (check function
+;; `LaTeX-splitidx-auto-cleanup').  The only thing missing is adding
+;; these commands to `reftex-index-macros' since the unique keys must
+;; be set by user.  To get full advantage from RefTeX, remember that
+;; ?i, ?I, and ?g are reserved and set something like this in your
+;; init-file:
+;;
+;; (add-to-list 'reftex-index-macros '("\\idx" "idx" ?x "" nil t))
+;; (add-to-list 'reftex-index-macros '("\\ani" "ani" ?a "" nil t))
+;; (add-to-list 'reftex-index-macros '("\\fru" "fru" ?f "" nil t))
+;; (add-to-list 'reftex-index-macros '("\\veg" "veg" ?v "" nil t))
+;;
+;; Or you can do this in your tex file:
+;;
+;; %%% Local Variables:
+;; %%% mode: latex
+;; %%% TeX-master: t
+;; %%% eval: (add-to-list 'reftex-index-macros '("\\idx" "idx" ?x "" nil 
t))
+;; %%% eval: (add-to-list 'reftex-index-macros '("\\ani" "ani" ?a "" nil 
t))
+;; %%% eval: (add-to-list 'reftex-index-macros '("\\fru" "fru" ?f "" nil 
t))
+;; %%% eval: (add-to-list 'reftex-index-macros '("\\veg" "veg" ?v "" nil 
t))
+;;

[elpa] externals/auctex 16af75d 28/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 16af75d49cde69b34279d28e80b4a638e80790d4
Merge: 8683935 61c61a0
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog |5 +
 latex.el  |6 +-
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ca4d1e6..4a88c13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-25  Tassilo Horn  
+
+   * latex.el (LaTeX-insert-environment): Pass correct \end buffer
+   position to hooks in LaTeX-after-insert-env-hooks.
+
 2014-09-13  Vincent Bela�che  
 
* latex.el (LaTeX-dialect): Correct doctstring for consistency
diff --git a/latex.el b/latex.el
index 32a431f..aa755c9 100644
--- a/latex.el
+++ b/latex.el
@@ -695,7 +695,6 @@ environment just inserted, the buffer position just before
   (newline))
 (when active-mark (goto-char (mark)))
 (when prefix (insert prefix))
-(setq env-end (point))
 (insert TeX-esc "end" TeX-grop environment TeX-grcl)
 (end-of-line 0)
 (if active-mark
@@ -706,6 +705,11 @@ environment just inserted, the buffer position just before
   (indent-according-to-mode))
 (save-excursion (beginning-of-line 2) (indent-according-to-mode))
 (TeX-math-input-method-off)
+(setq env-end (save-excursion
+   (search-forward
+(concat TeX-esc "end" TeX-grop
+environment TeX-grcl))
+   (match-beginning 0)))
 (run-hook-with-args 'LaTeX-after-insert-env-hooks
environment env-start env-end)))
 



[elpa] externals/auctex a2a919d 61/69: Use TeX-quote-after-quote in all language style files

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit a2a919d3490021811344659a3f927e25c94c35b7
Author: Mosè Giordano 
Commit: Mosè Giordano 

Use TeX-quote-after-quote in all language style files

* style/icelandic.el ("icelandic"):
* style/polish.el ("polish"):
* style/polski.el ("polski"): Use value of `TeX-quote-after-quote'
  instead of hard-coding t.
---
 style/icelandic.el |2 +-
 style/polish.el|2 +-
 style/polski.el|2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/style/icelandic.el b/style/icelandic.el
index 427a88d..64507e1 100644
--- a/style/icelandic.el
+++ b/style/icelandic.el
@@ -42,7 +42,7 @@
  (lambda ()
(set-syntax-table LaTeX-icelandic-mode-syntax-table)
(unless (eq (car TeX-quote-language) 'override)
- (setq TeX-quote-language '("icelandic" "\"`" "\"'" t)))
+ (setq TeX-quote-language `("icelandic" "\"`" "\"'" 
,TeX-quote-after-quote)))
(setq LaTeX-babel-hyphen-language "icelandic")
;; Fontification of quotation marks.
(when (fboundp 'font-latex-add-quotes)
diff --git a/style/polish.el b/style/polish.el
index dac3451..31397f0 100644
--- a/style/polish.el
+++ b/style/polish.el
@@ -42,7 +42,7 @@
  (lambda ()
(set-syntax-table LaTeX-polish-mode-syntax-table)
(unless (eq (car TeX-quote-language) 'override)
- (setq TeX-quote-language '("polish" "\"`" "\"'" t)))
+ (setq TeX-quote-language `("polish" "\"`" "\"'" ,TeX-quote-after-quote)))
;; Fontification of quotation marks.
(when (fboundp 'font-latex-add-quotes)
  (font-latex-add-quotes '("\"`" "\"'"))
diff --git a/style/polski.el b/style/polski.el
index ef1985b..5e51082 100644
--- a/style/polski.el
+++ b/style/polski.el
@@ -46,7 +46,7 @@
 "ppauza")
;; Quotation marks
(unless (eq (car TeX-quote-language) 'override)
- (setq TeX-quote-language '("polski" ",," "''" t)))
+ (setq TeX-quote-language `("polski" ",," "''" ,TeX-quote-after-quote)))
;; Fontification of quotation marks.
(when (fboundp 'font-latex-add-quotes)
  (font-latex-add-quotes '(",," "''")))



[elpa] externals/auctex f7d0535 34/69: Fix file name regexp in TeX-documentation-texdoc

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit f7d053518bef8031bea12147d3a2bbc0e2612b35
Author: Arash Esbati 
Commit: Mosè Giordano 

Fix file name regexp in TeX-documentation-texdoc

* tex.el (TeX-documentation-texdoc): Add backslash separator for Windows
  paths.

Signed-off-by: Mosè Giordano 
---
 tex.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tex.el b/tex.el
index 244fa54..1b955fe 100644
--- a/tex.el
+++ b/tex.el
@@ -6125,7 +6125,7 @@ show."
(while (re-search-forward
;; XXX: XEmacs doesn't support character classes in
;; regexps, like "[:alnum:]".
-   "^ *\\([0-9]+\\) +\\([-~/a-zA-Z0-9_.${}#%,:]+\\)" nil t)
+   "^ *\\([0-9]+\\) +\\([-~/a-zA-Z0-9_.${}#%,:\\]+\\)" nil 
t)
  (push (cons (match-string 1) (match-string 2)) list
(unwind-protect
(cond



[elpa] externals/auctex f9e6e4b 32/69: New function for reading documentation with texdoc

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit f9e6e4b8528df03a7810910e7dc2c28b5806c506
Author: Mosè Giordano 
Commit: Mosè Giordano 

New function for reading documentation with texdoc

* tex.el (TeX-documentation-texdoc): New function.
(TeX-common-menu-entries): Replace `TeX-doc' with
`TeX-documentation-texdoc'.
(TeX-mode-map): Ditto.
* doc/auctex.texi (Documentation): Document `TeX-documentation-texdoc'
in place of `TeX-doc'.
* doc/changes.texi: Mention `TeX-documentation-texdoc'.
---
 doc/auctex.texi  |   15 +--
 doc/changes.texi |   12 -
 tex.el   |   71 +++--
 3 files changed, 86 insertions(+), 12 deletions(-)

diff --git a/doc/auctex.texi b/doc/auctex.texi
index 39125c9..c8e35a3 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -12,7 +12,7 @@ This manual is for @AUCTeX{}
 (version @value{VERSION} from @value{UPDATED}),
 a sophisticated TeX environment for Emacs.
 
-Copyright @copyright{} 1992-1995, 2001, 2002, 2004-2015
+Copyright @copyright{} 1992-1995, 2001, 2002, 2004-2016
 Free Software Foundation, Inc.
 
 @quotation
@@ -3523,16 +3523,15 @@ before it is actually done.  If non-nil, ask before 
deleting files.
 @section Documentation about macros and packages
 @cindex Documentation
 
-@deffn Command TeX-doc
+@deffn Command TeX-documentation-texdoc
 @kindex C-c ?
-(@kbd{C-c ?})  Get documentation about macros, packages or @TeX{} &
-Co. in general.  The function will prompt for the name of a command or
-manual, providing a list of available keywords for completion.  If point
-is on a command or word with available documentation, this will be
+(@kbd{C-c ?})  Get documentation about the packages installed on your
+system, using @samp{texdoc} to find the manuals.  The function will
+prompt for the name of packages.  If point is on a word, this will be
 suggested as default.
 
-In case no documentation could be found, a prompt for querying the
-@samp{texdoc} program is shown, should the latter be available.
+If the command is called with a prefix argument, you will be shown a
+list of manuals of the given package among to choose.
 
 The command can be invoked by the key binding mentioned above as well as
 the @samp{Find Documentation...} entry in the mode menu.
diff --git a/doc/changes.texi b/doc/changes.texi
index a48e7ab..2905400 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -1,5 +1,5 @@
 @c This is part of the AUCTeX manual.
-@c Copyright (C) 1994-2002, 2004-2010, 2012-2015 Free Software
+@c Copyright (C) 1994-2002, 2004-2010, 2012-2016 Free Software
 @c Foundation, Inc.
 @c See file auctex.texi for copying conditions.
 @include macros.texi
@@ -8,6 +8,16 @@
 
 @end ifset
 
+@heading News since 11.89
+
+@itemize @bullet
+@item
+A new function, @code{TeX-documentation-texdoc}, for reading
+documentation with @samp{texdoc} has been added.  @code{TeX-doc} is
+still available but now @kbd{C-c ?} runs
+@code{TeX-documentation-texdoc}.
+@end itemize
+
 @heading News in 11.89
 
 @itemize @bullet
diff --git a/tex.el b/tex.el
index 7f464b3..244fa54 100644
--- a/tex.el
+++ b/tex.el
@@ -1,6 +1,6 @@
 ;;; tex.el --- Support for TeX documents.
 
-;; Copyright (C) 1985-1987, 1991, 1993-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1987, 1991, 1993-2016 Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-de...@gnu.org
 ;; Keywords: tex
@@ -4736,7 +4736,7 @@ Brace insertion is only done if point is in a math 
construct and
 (define-key map "\C-c}"'up-list)
 (define-key map "\C-c#"'TeX-normal-mode)
 (define-key map "\C-c\C-n" 'TeX-normal-mode)
-(define-key map "\C-c?"'TeX-doc)
+(define-key map "\C-c?"'TeX-documentation-texdoc)
 (define-key map "\C-c\C-i" 'TeX-goto-info-page)
 (define-key map "\r"   'TeX-newline)
 
@@ -4959,7 +4959,7 @@ Brace insertion is only done if point is in a math 
construct and
:help "Save and reparse the current buffer for style information"]
   ["Reset AUCTeX" (TeX-normal-mode t) :keys "C-u C-c C-n"
:help "Reset buffer and reload AUCTeX style files"])
- ["Find Documentation..." TeX-doc
+ ["Find Documentation..." TeX-documentation-texdoc
   :help "Get help on commands, packages, or TeX-related topics in general"]
  ["Read the AUCTeX Manual" TeX-goto-info-page
   :help "Everything worth reading"]
@@ -6094,6 +6094,71 @@ to browse existing AUCTeX bugs.
 
 ;;; Documentation
 
+(defun TeX-documentation-texdoc (&optional arg)
+  "Run texdoc to read documentation.
+
+Prompt for selection of the package of which to show the documentation.
+
+If called with a prefix argument ARG, after selecting the
+package, prompt for selection of the manual of that package to
+show."
+  (interactive "*P")
+  (let ((pkg (thing-at-point 'symbol))
+   buffer list doc)
+;; Strip off properties.  XXX: XEmacs doesn't have
+;; `substring-no-properties'.
+(set-text-properties 0 (length pkg) nil pkg)
+ 

[elpa] externals/auctex 16f3dd4 43/69: Add support for Zathura viewer

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 16f3dd415aa0ef1c870f9724dda9f895f2467133
Author: Mosè Giordano 
Commit: Mosè Giordano 

Add support for Zathura viewer

* tex.el (TeX-view-program-list-builtin): Add Zathura.
* doc/changes.texi: Mention Zathura support and reworked error parsing.
---
 doc/changes.texi |8 
 tex.el   |7 ++-
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/doc/changes.texi b/doc/changes.texi
index 2905400..b4d5954 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -12,6 +12,14 @@
 
 @itemize @bullet
 @item
+Parsing of the compilation log has been reworked.  You should encounter
+fewer mistaken files while navigating through errors and warnings.
+
+@item
+Added support for Zathura viewer.  Forward and inverse search requires a
+recent version of the program to work (3.4 or later).
+
+@item
 A new function, @code{TeX-documentation-texdoc}, for reading
 documentation with @samp{texdoc} has been added.  @code{TeX-doc} is
 still available but now @kbd{C-c ?} runs
diff --git a/tex.el b/tex.el
index 3633fd3..ee11202 100644
--- a/tex.el
+++ b/tex.el
@@ -1304,7 +1304,12 @@ the requirements are met."
  " -p %(outpage)")) " %o")) "evince")
   ("Okular" ("okular --unique %o" (mode-io-correlate "#src:%n%a")) 
"okular")
   ("xdg-open" "xdg-open %o" "xdg-open")
-  ("PDF Tools" TeX-pdf-tools-sync-view
+  ("PDF Tools" TeX-pdf-tools-sync-view)
+  ("Zathura"
+   ("zathura %o"
+   (mode-io-correlate
+" --synctex-forward %n:0:%b -x \"emacsclient +%{line} %{input}\""))
+   "zathura"
   "Alist of built-in viewer specifications.
 This variable should not be changed by the user who can use
 `TeX-view-program-list' to add new viewers or overwrite the



[elpa] externals/auctex 8fac199 14/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 8fac19929e3a33ec62b5ad4a2862b675406afb4a
Merge: e414cbb fe51d8e
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog|   86 
 context.el   |4 +-
 doc/auctex.texi  |   72 --
 doc/changes.texi |   24 +++--
 doc/todo.texi|   40 ++--
 tex-buf.el   |  296 +-
 tex.el   |   93 --
 7 files changed, 530 insertions(+), 85 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f408ff7..d60d2da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,89 @@
+2014-07-02  Mos� Giordano  
+
+   * tex.el (TeX-expand-list): Set
+   `TeX-source-correlate-output-page-function' when necessary, in the
+   "%(outpage)" expander.
+   (TeX-source-correlate-method): Add an alist as a possible value
+   and change the default.
+   (TeX-source-correlate-method-active): Convert to a function.
+   (TeX-source-correlate-expand-options): Use the
+   `TeX-source-correlate-method-active' function.
+   (TeX-source-correlate-mode): Remove setting of the
+   `TeX-source-correlate-output-page-function' variable and of the
+   now deleted `TeX-source-correlate-method-active' variable.
+   (TeX-source-specials-view-expand-options): Use the
+   `TeX-source-correlate-method-active' function.
+   (TeX-mode-specific-command-menu-entries): Hide "Previous Error"
+   and "Error Overview" entries when not available.
+
+   * context.el: Update copyright years.
+   (ConTeXt-expand-options): Use the
+   `TeX-source-correlate-method-active' function.
+
+   * doc/auctex.texi (I/O Correlation): Update documentation of
+   `TeX-source-correlate-method'.
+
+   * doc/changes.texi: Mention change to the default value of
+   `TeX-source-correlate-method'.
+
+2014-06-29  Mos� Giordano  
+
+   * doc/todo.texi (Mid-term Goals): Remove "More flexible option and
+   command handling" item: we now have `TeX-command-extra-options'.
+   (Wishlist): Remove "Poor man's Source Specials": AUCTeX supports
+   source specials and SyncTeX.
+   (Wishlist): Remove "multiple completion for \bibliography" item:
+   "\bibliography" does complete multiple arguments.
+
+2014-06-28  Mos� Giordano  
+
+   * tex-buf.el (TeX-command): Kill the frame and buffer associated
+   to the error overview before running commands.
+   (TeX-TeX-sentinel): Open error overview if
+   `TeX-error-overview-open-after-TeX-run' is non-nil and there are
+   errors or warnings to show.
+   (TeX-LaTeX-sentinel): Ditto.
+   (TeX-find-display-help): Set `runbuf' to `TeX-active-buffer' since
+   this function may be called also from the error overview buffer.
+   (TeX-error-description-faces): Change group to more appropriate
+   `TeX-output'.
+   (TeX-error-overview-active-buffer): New variable.
+   (TeX-error-overview-orig-frame): Ditto.
+   (TeX-error-overview-orig-window): Ditto.
+   (TeX-error-overview-frame): Ditto.
+   (TeX-error-overview-setup): New customizable variable.
+   (TeX-error-overview-setup): New function.
+   (TeX-error-overview-goto-source): Ditto.
+   (TeX-error-overview-make-entries): Ditto.
+   (TeX-error-overview-next-error): Ditto.
+   (TeX-error-overview-previous-error): Ditto.
+   (TeX-error-overview-quit): Ditto.
+   (TeX-error-overview-mode-map): New variable.
+   (TeX-error-overview-list-entries): Ditto.
+   (TeX-error-overview-mode): New major mode.
+   (TeX-error-overview-buffer-name): New constant.
+   (TeX-error-overview-frame-parameters): New customizable variable.
+   (TeX-error-overview-open-after-TeX-run): Ditto.
+   (TeX-error-overview): New function.
+   (TeX-find-display-help): Expand the name of the file to be visited
+   starting from the directory of the master file.
+   (TeX-error-overview-make-entries): Add optional `master-dir'
+   argument, to shorten file names when they are relative.
+   (TeX-error-overview): Pass `TeX-master-directory' as argument to
+   `TeX-error-overview-make-entries'.
+
+   * tex.el (TeX-error-overview): Autoload `TeX-error-overview'.
+   (TeX-mode-specific-command-menu-entries): Add an entry for the
+   error overview.
+
+   * doc/auctex.texi (Debugging): Document error overview.
+
+   * doc/changes.texi: Mention error overview.  Add local variables
+   to the end of the file.
+
+   * doc/todo.texi: Add local variables to the end of the file.
+   (Wishlist): Update entry about error reporting.
+
 2014-06-21  Mos� Giordano  
 
* tex-buf.el (TeX-parse-TeX): Use `TeX-find-display-help' in place
diff --git a/context.el b/context.el
index ea333e5..3cc890f 100644
--- a/context.el
+++ b/context.el
@@ -1,6 +1,6 @@
 ;;; context.el --- Support for ConTe

[elpa] externals/auctex 1711536 55/69: Fix detection of line number in TeX-warning

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 17115360b88ca23a69f6361477891681efeec6bf
Author: Mosè Giordano 
Commit: Mosè Giordano 

Fix detection of line number in TeX-warning

* tex-buf.el (TeX-warning): Require as additional mandatory argument the
  position where the warning starts.  Use it to limit
  `re-search-backward' when looking for the line number.
(TeX-parse-error): Provide additional argument to `TeX-warning'.
* tests/tex/compilation-log.txt: Add another case where the line number
  of the warning was mistaken.
* tests/tex/error-parsing.el: Update expected result of the test
  accordingly.
---
 tests/tex/compilation-log.txt |3 +++
 tests/tex/error-parsing.el|7 +--
 tex-buf.el|   14 +-
 3 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/tests/tex/compilation-log.txt b/tests/tex/compilation-log.txt
index 7703865..2e8e00f 100644
--- a/tests/tex/compilation-log.txt
+++ b/tests/tex/compilation-log.txt
@@ -36,6 +36,9 @@ Underfull \hbox (badness 6608) in paragraph at lines 131--132
 
 LaTeX Warning: Reference `wrong' on page 1 undefined on input line 4.
 
+LaTeX Font Warning: Font shape `OML/cmm/b/it' in size <5.5> not available
+(Font)  size <5> substituted on input line 70.
+
 [1{/opt/texlive/2015/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] 
(./test.aux)
 
 LaTeX Warning: There were undefined references.
diff --git a/tests/tex/error-parsing.el b/tests/tex/error-parsing.el
index 611ba8d..6251847 100644
--- a/tests/tex/error-parsing.el
+++ b/tests/tex/error-parsing.el
@@ -87,7 +87,10 @@ ABD: EveryShipout initializing macros"
   0
   "LaTeX Warning: Reference `wrong' on page 1 undefined on input 
line 4.\n"
   "wrong" 4 nil 1351 nil)
- (warning "./test.tex" 4 "LaTeX Warning: There were undefined 
references."
-  0 "LaTeX Warning: There were undefined references.\n" nil 4 nil 
1482 nil)
+ (warning "./test.tex" 70 "LaTeX Font Warning: Font shape 
`OML/cmm/b/it' in size <5.5> not available"
+  0 "LaTeX Font Warning: Font shape `OML/cmm/b/it' in size <5.5> 
not available
+(Font)  size <5> substituted on input line 70.\n" nil 70 nil 1485 
nil)
+ (warning "./test.tex" nil "LaTeX Warning: There were undefined 
references."
+  0 "LaTeX Warning: There were undefined references.\n" nil nil 
nil 1616 nil)
 
 ;;; error-parsing.el ends here
diff --git a/tex-buf.el b/tex-buf.el
index 655faeb..52483dc 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -2362,7 +2362,7 @@ Return non-nil if an error or warning is found."
  (if (or store TeX-debug-bad-boxes)
  (progn
(setq error-found t)
-   (TeX-warning (TeX-match-buffer 7) store)
+   (TeX-warning (TeX-match-buffer 7) (match-beginning 7) store)
nil)
(re-search-forward "\r?\n\
 \\(?:.\\{79\\}\r?\n\
@@ -2375,7 +2375,7 @@ Return non-nil if an error or warning is found."
  (if (or store TeX-debug-warnings)
  (progn
(setq error-found t)
-   (TeX-warning (TeX-match-buffer 8) store)
+   (TeX-warning (TeX-match-buffer 8) (match-beginning 8) store)
nil)
t))
 
@@ -2552,9 +2552,11 @@ information in `TeX-error-list' instead of displaying 
the error."
   ;; Find the error point and display the help.
   (apply 'TeX-find-display-help info-list
 
-(defun TeX-warning (warning &optional store)
+(defun TeX-warning (warning warning-start &optional store)
   "Display a warning for WARNING.
 
+WARNING-START is the position where WARNING starts.
+
 If optional argument STORE is non-nil, store the warning
 information in `TeX-error-list' instead of displaying the
 warning."
@@ -2568,8 +2570,10 @@ warning."
 (word-string (if bad-box "[][\\W() ---]\\(\\w+\\)[][\\W() ---]*$"
"`\\(\\w+\\)'"))
 
-;; Get error-line (warning).
-(line (when (save-excursion (re-search-backward line-string nil t))
+;; Get error-line (warning).  Don't search before `warning-start' to
+;; avoid catching completely unrelated line numbers.
+(line (when (save-excursion (re-search-backward line-string
+warning-start t))
 (string-to-number (TeX-match-buffer 1
 (line-end (if bad-box (string-to-number (TeX-match-buffer 2))
 line))



[elpa] externals/auctex fd46872 25/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit fd46872350fadc2fd5d89615b6ab6bc028f0fa6c
Merge: f351ed9 3ac5929
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog  |   15 +++
 tests/tex/command-expansion.el |   36 
 tex-buf.el |   10 --
 tex.el |2 +-
 4 files changed, 60 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ef147f7..01ff6dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2014-08-25  Florent Rougon(tiny change)
+
+   * tex-buf.el (TeX-command-expand): Fix possible endless loop in
+   file name expansion.
+
+2014-08-24  Mos� Giordano  
+
+   * tests/tex/command-expansion.el: New test file.
+
+2014-08-24  Florent Rougon(tiny change)
+
+   * tex.el (TeX-expand-list): Add the previous position to the
+   lenght of the expanded string to get the current position in the
+   %' expander.
+
 2014-08-18  Vincent Bela�che  
 
* font-latex.el (font-latex-add-quotes): Code optimization: use
diff --git a/tests/tex/command-expansion.el b/tests/tex/command-expansion.el
new file mode 100644
index 000..d6dfc89
--- /dev/null
+++ b/tests/tex/command-expansion.el
@@ -0,0 +1,36 @@
+;;; command-expansion.el --- tests for TeX command expansion
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Code:
+
+(require 'ert)
+(require 'tex-buf)
+
+(ert-deftest TeX-command-expansion ()
+  "Check whether \"\" is correctly expanded when before \"%`\"."
+  (should (string=
+   (let ((TeX-command-list
+ (list (cons "Test" '(" %`%'" TeX-run-command t t)
+(TeX-command-expand (nth 1 (assoc "Test" TeX-command-list))
+'TeX-master-file))
+   "%%  \"\\input\"")))
+
+;;; command-expansion.el ends here
diff --git a/tex-buf.el b/tex-buf.el
index a466446..6eec2b7 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -387,7 +387,7 @@ without further expansion."
  (concat (and (stringp TeX-command-pos) TeX-command-pos)
  (apply ',file args)
  (and (stringp TeX-command-pos) TeX-command-pos)
-   case-fold-search string expansion arguments)
+expansion-res case-fold-search string expansion arguments)
 (setq list (cons
(list "%%" (lambda nil
 (setq pos (1+ pos))
@@ -410,7 +410,13 @@ without further expansion."
 (TeX-function-p expansion))
(apply expansion arguments))
   ((boundp expansion)
-   (apply (eval expansion) arguments))
+(setq expansion-res
+  (apply (eval expansion) arguments))
+(when (eq expansion 'file)
+  ;; Advance past the file name in order to
+  ;; prevent expanding any substring of it.
+  (setq pos (+ pos (length expansion-res
+  expansion-res)
   (t
(error "Nonexpansion %s" expansion)
   (if (stringp string)
diff --git a/tex.el b/tex.el
index e5378aa..cf56f90 100644
--- a/tex.el
+++ b/tex.el
@@ -507,7 +507,7 @@ string."
(prog1
(if (stringp TeX-command-text)
(progn
- (setq pos (+ (length TeX-command-text) 9)
+ (setq pos (+ pos (length TeX-command-text) 9)
TeX-command-pos
(and (string-match " "
   (funcall file t t))



[elpa] elpa updated (0a99c11 -> f1abcf8)

2016-03-26 Thread Tassilo Horn
tsdh pushed a change to branch elpa.

  from  0a99c11   Upgrade docs for release.
  adds  f9e6e4b   New function for reading documentation with texdoc
  adds  a1473f7   Capture warnings from packages with hyphens in name
  adds  f7d0535   Fix file name regexp in TeX-documentation-texdoc
  adds  f9efa73   Another fix for file name regexp in 
TeX-documentation-texdoc
  adds  f919468   Improve TeX error parsing.
  adds  d4059b8   Improve line wrap removal heuristics.
  adds  836e461   Don't use TRIM arg of split-string.
  adds  a7f4839   Fix Wrong type argument: characterp, nil error.
  adds  524b45b   Merge branch 'master' into simplify-TeX-parse-error
  adds  8926369   Improve new-file regex.
  adds  c34bf64   Merge branch 'master' into simplify-TeX-parse-error
  adds  3dec183   Merge branch 'master' into simplify-TeX-parse-error
  adds  bfd5f18   Merge master branch.
  adds  0731fff   Merge branch 'master' into simplify-TeX-parse-error
  adds  6f74661   Merge from master.
  adds  8cee4a7   Merge branch 'master' into simplify-TeX-parse-error
  adds  e414cbb   Merge branch 'master' into simplify-TeX-parse-error
  adds  8fac199   Merge branch 'master' into simplify-TeX-parse-error
  adds  a074732   Merge branch 'master' into simplify-TeX-parse-error
  adds  8b2550e   Merge branch 'master' into simplify-TeX-parse-error
  adds  312c74a   Merge branch 'master' into simplify-TeX-parse-error
  adds  7d4bfac   Merge branch 'master' into simplify-TeX-parse-error
  adds  08ae29b   Merge branch 'master' into simplify-TeX-parse-error
  adds  c1dcb84   Merge branch 'master' into simplify-TeX-parse-error
  adds  95bef06   Merge branch 'master' into simplify-TeX-parse-error
  adds  901b20a   Merge branch 'master' into simplify-TeX-parse-error
  adds  43ba124   Merge branch 'master' into simplify-TeX-parse-error
  adds  f351ed9   Merge branch 'master' into simplify-TeX-parse-error
  adds  fd46872   Merge branch 'master' into simplify-TeX-parse-error
  adds  4837aba   Merge branch 'master' into simplify-TeX-parse-error
  adds  8683935   Merge branch 'master' into simplify-TeX-parse-error
  adds  16af75d   Merge branch 'master' into simplify-TeX-parse-error
  adds  c6d3152   Merge branch 'master' into simplify-TeX-parse-error
  adds  b4ff376   Merge branch 'master' into simplify-TeX-parse-error
  adds  1950012   Merge branch 'master' into simplify-TeX-parse-error
  adds  17d1a5d   ; Merge branch 'simplify-TeX-parse-error'
  adds  d7f443e   Add script to update the ChangeLog
  adds  891bba7   Add ERT test for error parsing
  adds  464bef6   Fix TeX-parse-error
  adds  416f131   Catch LaTeX class warnings
  adds  2c21439   Improve parsing of certain warnings
  adds  2cca33f   Minor fix in TeX-documentation-texdoc
  adds  16f3dd4   Add support for Zathura viewer
  adds  b72dcb7   Add support for SumatraPDF viewer
  adds  00d9438   Add support for dviout viewer
  adds  e4cad1c   Add support for Atril viewer
  adds  af1ee52   Add support for missing macro \SetLabelAlign
  adds  c09c405   Fix wrong usage of `TeX-auto-prepare-hook'
  adds  550e058   Add new style/splitidx.el
  adds  056d8c8   Fix TeX-check-files
  adds  cc59302   Show and hide warnings and bad boxes in error overview
  adds  2888571   Allow ignoring certain warnings
  adds  53f2fab   Another fix for TeX-parse-errro
  adds  f1bcbe3   Improve LaTeX-warnings-regexp
  adds  1711536   Fix detection of line number in TeX-warning
  adds  6962c34   Avoid checking duplicate directories in TeX-check-files
  adds  70e62a9   Catch more bad box warnings
  adds  2e543ef   Fix parsing of vertical bad boxes context
  adds  57147c7   Another fix for vertical bad box warnings
  adds  2fd59c9   Improve word-string regexp in TeX-warning
  adds  a2a919d   Use TeX-quote-after-quote in all language style files
  adds  a33be07   Remove "table" and "table*" from 
LaTeX-indent-environment-list
  adds  30fe0e9   Ensure LaTeX-indent-environment-list environments aren't 
filled
  adds  b88dc70   Improve prompts when defining LaTeX macros.
  adds  cfa82d8   Prompt for optional short caption parameter.
  adds  188e4b1   Temporarily bind gc-cons-threshold in time-consuming task
  adds  d4b0d5f   Fix forward sync bug with multi-file documents
  adds  4357488   Merge branch 'master' into elpa
  adds  f1abcf8   Upgrade docs for release

No new revisions were added by this update.

Summary of changes:
 ChangeLog.1   |   21 ++
 Makefile.in   |   57 -
 auctex.el |2 +-
 auctex.info   |  540 ++---
 build-aux/gitlog-to-auctexlog |  131 +
 doc/auctex.texi   |  104 ++--
 doc/chan

[elpa] externals/auctex bfd5f18 09/69: Merge master branch.

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit bfd5f18bb8480d4333b97086064df48d60c9bbe5
Merge: 3dec183 a262726
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge master branch.
---
 ChangeLog|   56 +
 doc/auctex.texi  |   32 +-
 doc/changes.texi |9 ++-
 doc/todo.texi|   14 +-
 font-latex.el|   27 ++--
 tex-buf.el   |  365 +-
 tex-site.el.in   |   34 +++--
 7 files changed, 388 insertions(+), 149 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2f27437..c873968 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,59 @@
+2014-05-23  Stefan Monnier  
+
+   Backport from ELPA repository.
+   * tex-site.el (TeX-modes-set): Use advice-add if available.
+   * font-latex.el (font-latex-make-sectioning-faces): Don't rely on
+   dynamic scoping for `num'.
+   (font-latex-make-built-in-keywords): Don't use `eval' needlessly.
+   (font-latex-doctex-syntactic-keywords): Declare before first use.
+   (font-latex-match-command-with-arguments):
+   Stay away from `add-to-list' on let-bound variables.
+   (font-latex-match-command-in-braces): Remove unused var `end'.
+
+2014-05-20  Mos� Giordano  
+
+   * tex-buf.el: Update copyright years.
+   (TeX-error-last-visited): New buffer-local variable.
+   (TeX-get-parse-function): New function.
+   (TeX-next-error): Add `apt' argument and make all arguments
+   optional.  Use `TeX-get-parse-function'.
+   (TeX-previous-error): Use `TeX-get-parse-function'.  Use
+   `TeX-parse-TeX' to move between errors when possible.
+   (TeX-TeX-sentinel): Parse the output log when
+   `TeX-parse-all-errors' is non-nil.
+   (TeX-LaTeX-sentinel): Ditto.
+   (TeX-parse-reset): Add an optional `reparse' argument and reparse
+   the output log when it is non-nil.  Reset also `TeX-error-list'
+   and `TeX-error-last-visited'.
+   (TeX-parse-command): Add `arg' argument.
+   (TeX-parse-TeX): Add `arg' argument.  When `TeX-parse-all-errors'
+   is non-nil, use `TeX-error-list' to move to the error point.
+   (TeX-error-list): New buffer-local variable.
+   (TeX-parse-all-errors): New customizable variable.
+   (TeX-parse-all-errors): New function.
+   (TeX-parse-error): Add an optional `store' argument.  Make the
+   function return non-nil when an error or a warning is found.
+   (TeX-error): Add an optional `store' argument: when it is non-nil
+   store the relevant information about the error in
+   `TeX-error-list'.  Use `TeX-error--find-display-help'.
+   (TeX-error--find-display-help): New function.
+   (TeX-warning): Add an optional `store' argument: when it is
+   non-nil store the relevant information about the warning in
+   `TeX-error-list'.  Use `TeX-warning--find-display-help'.
+   (TeX-warning--find-display-help): New function.
+   (TeX-output-mode-map): Bind `p' to the now working
+   `TeX-previous-error'.
+
+   * doc/auctex.texi (Debugging): Document `TeX-previous-error' and
+   `TeX-parse-all-errors'.  Update `TeX-next-error'.
+
+   * doc/changes.texi: Update copyright years.  Mention
+   `TeX-next-error' and `TeX-previous-error' changes and the new
+   `TeX-parse-all-errors'.
+
+   * doc/todo.texi: Update copyright years.
+   (Wishlist): Update a couple of items related to error parsing.
+
 2014-05-17  Mos� Giordano  
 
* font-latex.el: Update copyright years.
diff --git a/doc/auctex.texi b/doc/auctex.texi
index c84282a..6320543 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -3097,14 +3097,44 @@ to do exactly.  In xdvi you normally have to use 
@kbd{C-down-mouse-1}.
 Once you've formatted your document you may `debug' it, i.e. browse
 through the errors (La)@TeX{} reported.
 
-@deffn Command TeX-next-error
+@deffn Command TeX-next-error @var{arg} @var{reparse}
 @kindex C-c `
 (@kbd{C-c `})  Go to the next error reported by @TeX{}.  The view will
 be split in two, with the cursor placed as close as possible to the
 error in the top view.  In the bottom view, the error message will be
 displayed along with some explanatory text.
+
+An optional numeric @var{arg}, positive or negative, specifies how many
+error messages to move.  A negative @var{arg} means to move back to
+previous error messages, see also @code{TeX-previous-error}.
+
+The optional @var{reparse} argument makes @AUCTeX{} reparse the error
+message buffer and start the debugging from the first error.  This can
+also be achieved by calling the function with a prefix argument
+(@kbd{C-u}).
+@end deffn
+
+@deffn Command TeX-previous-error @var{arg}
+@kindex M-g p
+(@kbd{M-g p}) Go to the previous error reported by @TeX{}.  An optional
+numeric @var{arg} specifies how many error messages to move backward.
+This is like calling @code{TeX-next-error} with a negative argument.
 @end deffn
 
+The command @code{TeX-previous-error} works only if @AUCTeX

[elpa] externals/auctex c09c405 48/69: Fix wrong usage of `TeX-auto-prepare-hook'

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit c09c40589cda2e9859b400932e52e55445a98529
Author: Arash Esbati 
Commit: Mosè Giordano 

Fix wrong usage of `TeX-auto-prepare-hook'

* style/theorem.el (TeX-auto-cleanup-hook):
* style/ntheorem.el (TeX-auto-cleanup-hook):
* style/newfloat.el (TeX-auto-cleanup-hook):
* style/amsthm.el (TeX-auto-cleanup-hook): Use
`TeX-auto-cleanup-hook' instead of mistakenly used
`TeX-auto-prepare-hook'.

Signed-off-by: Mosè Giordano 
---
 style/amsthm.el   |2 +-
 style/newfloat.el |2 +-
 style/ntheorem.el |2 +-
 style/theorem.el  |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/style/amsthm.el b/style/amsthm.el
index 5c83724..5deb9e3 100644
--- a/style/amsthm.el
+++ b/style/amsthm.el
@@ -119,7 +119,7 @@ make them available as new environments.  Update
 newthmstyle)))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-amsthm-auto-prepare t)
-(add-hook 'TeX-auto-prepare-hook #'LaTeX-amsthm-auto-cleanup t)
+(add-hook 'TeX-auto-cleanup-hook #'LaTeX-amsthm-auto-cleanup t)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
 (TeX-add-style-hook
diff --git a/style/newfloat.el b/style/newfloat.el
index 4cde32e..e84fad7 100644
--- a/style/newfloat.el
+++ b/style/newfloat.el
@@ -134,7 +134,7 @@ If `caption.el' is loaded, add the new floating environment 
to
 (concat "listof" flt "es"))
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-newfloat-auto-prepare t)
-(add-hook 'TeX-auto-prepare-hook #'LaTeX-newfloat-auto-cleanup t)
+(add-hook 'TeX-auto-cleanup-hook #'LaTeX-newfloat-auto-cleanup t)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
 (TeX-add-style-hook
diff --git a/style/ntheorem.el b/style/ntheorem.el
index 630c09b..068f40d 100644
--- a/style/ntheorem.el
+++ b/style/ntheorem.el
@@ -142,7 +142,7 @@ make them available as new environments.  Update
 (TeX-add-symbols (concat nthm "name"
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-ntheorem-auto-prepare t)
-(add-hook 'TeX-auto-prepare-hook #'LaTeX-ntheorem-auto-cleanup t)
+(add-hook 'TeX-auto-cleanup-hook #'LaTeX-ntheorem-auto-cleanup t)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
 (TeX-add-style-hook
diff --git a/style/theorem.el b/style/theorem.el
index d8466f1..8b4101e 100644
--- a/style/theorem.el
+++ b/style/theorem.el
@@ -111,7 +111,7 @@ make them available as new environments."
 (LaTeX-add-environments (list newthm 'LaTeX-theorem-env-label
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-theorem-auto-prepare t)
-(add-hook 'TeX-auto-prepare-hook #'LaTeX-theorem-auto-cleanup t)
+(add-hook 'TeX-auto-cleanup-hook #'LaTeX-theorem-auto-cleanup t)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
 (TeX-add-style-hook



[elpa] externals/auctex d4b0d5f 67/69: Fix forward sync bug with multi-file documents

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit d4b0d5fdcd83f85a850293e203d9b1a70b146016
Author: Tassilo Horn 
Commit: Tassilo Horn 

Fix forward sync bug with multi-file documents

* tex.el (TeX-pdf-tools-sync-view): Use the current file for the
sync-view call, not always the master file (bug#23083).
---
 tex.el |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tex.el b/tex.el
index e22898f..588848a 100644
--- a/tex.el
+++ b/tex.el
@@ -1268,8 +1268,8 @@ entry in `TeX-view-program-list-builtin'."
#'TeX-source-correlate-handle-TeX-region)
   (if (and TeX-source-correlate-mode
   (fboundp 'pdf-sync-forward-search))
-  (with-current-buffer (or (find-buffer-visiting
-   (concat file "." TeX-default-extension))
+  (with-current-buffer (or (when TeX-current-process-region-p
+(get-file-buffer (TeX-region-file t)))
   (current-buffer))
(pdf-sync-forward-search))
 (let ((pdf (concat file "." (TeX-output-extension



[elpa] externals/auctex a1473f7 33/69: Capture warnings from packages with hyphens in name

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit a1473f773900c02b71ad923a3c743c9515c5b2ab
Author: Mosè Giordano 
Commit: Mosè Giordano 

Capture warnings from packages with hyphens in name

* tex-buf.el (TeX-LaTeX-sentinel-has-warnings): Add hyphen to regexps.
(TeX-parse-error): Ditto.
---
 tex-buf.el |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index aced105..a8ba024 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1395,7 +1395,7 @@ Warnings can be indicated by LaTeX or packages."
   (save-excursion
 (goto-char (point-min))
 (re-search-forward
- "^\\(LaTeX [A-Za-z]*\\|Package [A-Za-z0-9]+ \\)Warning:" nil t)))
+ "^\\(LaTeX [-A-Za-z]*\\|Package [-A-Za-z0-9]+ \\)Warning:" nil t)))
 
 (defun TeX-LaTeX-sentinel-has-bad-boxes ()
   "Return non-nil, if LaTeX output indicates overfull or underfull boxes."
@@ -2270,7 +2270,7 @@ Return non-nil if an error or warning is found."
  "^\\(\\(?:Overfull\\|Underfull\\|Tight\\|Loose\\)\
  .*?[0-9]+--[0-9]+\\)\\|"
  ;; LaTeX warning
- "^\\(\\(?:LaTeX [A-Za-z]*\\|Package [A-Za-z0-9]+ \\)Warning:.*\\)"))
+ "^\\(\\(?:LaTeX [-A-Za-z]*\\|Package [-A-Za-z0-9]+ \\)Warning:.*\\)"))
(error-found nil))
 (while
(cond



[elpa] externals/auctex 00d9438 45/69: Add support for dviout viewer

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 00d94386b6b4d0a7cdf4aef0f82a2952227d5d88
Author: Arash Esbati 
Commit: Mosè Giordano 

Add support for dviout viewer

* doc/changes.texi: Mention support for dviout on Windows.

* tex.el (TeX-view-program-list-builtin): Add support for dviout
on Windows.  This setup works for `TeX-source-correlate-method'
set to (dvi . source-specials).
Reorder " %o" in entry for SumatraPDF.

Signed-off-by: Mosè Giordano 
---
 doc/changes.texi |   11 +++
 tex.el   |5 +++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/doc/changes.texi b/doc/changes.texi
index b0c666b..f13a8b1 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -16,6 +16,17 @@ Parsing of the compilation log has been reworked.  You 
should encounter
 fewer mistaken files while navigating through errors and warnings.
 
 @item
+Added support for dviout viewer on Windows.  Note that this setup works
+when @code{TeX-source-correlate-method} is set to use
+@samp{source-specials} for @acronym{DVI}, e.g.:
+@lisp
+(setq TeX-source-correlate-method
+  '((dvi . source-specials)
+(pdf . synctex)))
+@end lisp
+which is the default.
+
+@item
 Added support for SumatraPDF viewer on Windows.
 
 @item
diff --git a/tex.el b/tex.el
index 3c11786..090965eb 100644
--- a/tex.el
+++ b/tex.el
@@ -1270,9 +1270,10 @@ the requirements are met."
   (cond
((eq system-type 'windows-nt)
 '(("Yap" ("yap -1" (mode-io-correlate " -s %n%b") " %o") "yap")
+  ("dviout" ("dviout -1 %d" (mode-io-correlate "\"# %n %b\"")) "dviout")
   ("SumatraPDF"
-   ("SumatraPDF -reuse-instance %o"
-   (mode-io-correlate " -forward-search \"%b\" %n"))
+   ("SumatraPDF -reuse-instance"
+   (mode-io-correlate " -forward-search \"%b\" %n") " %o")
"SumatraPDF")
   ("dvips and start" "dvips %d -o && start \"\" %f" "dvips")
   ("start" "start \"\" %o")))



[elpa] externals/auctex f1bcbe3 54/69: Improve LaTeX-warnings-regexp

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit f1bcbe3ee6f66bff7f9ffd280829babf28ddf525
Author: Mosè Giordano 
Commit: Mosè Giordano 

Improve LaTeX-warnings-regexp

* tex-buf.el (LaTeX-warnings-regexp): Catch also "LaTeX Font" warnings.
---
 tex-buf.el |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index 2bd6d21..655faeb 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1398,8 +1398,13 @@ Return nil ifs no errors were found."
   (setq TeX-command-next TeX-command-Show))
 nil))
 
+;; This regexp should catch warnings of the type
+;;   LaTeX Warning: ...
+;;   LaTeX Font Warning: ...
+;;   Package xyz123 Warning: ...
+;;   Class xyz123 Warning: ...
 (defvar LaTeX-warnings-regexp
-  "\\(?:LaTeX [-A-Za-z0-9]*\\|\\(?:Class\\|Package\\) [-A-Za-z0-9]+ 
\\)Warning:"
+  "\\(?:LaTeX\\|Class\\|Package\\) [-A-Za-z0-9]* ?Warning:"
   "Regexp matching LaTeX warnings.")
 
 (defun TeX-LaTeX-sentinel-has-warnings ()



[elpa] externals/auctex 188e4b1 66/69: Temporarily bind gc-cons-threshold in time-consuming task

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 188e4b1617dabc896bfc407be3ba538ea8dcabc6
Author: Mosè Giordano 
Commit: Mosè Giordano 

Temporarily bind gc-cons-threshold in time-consuming task

* tex.el (TeX-search-files-by-type): Bind `gc-cons-threshold' to
  1000 during the search, to reduce number of garbage collections
  during the task.
---
 tex.el |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tex.el b/tex.el
index c87e539..e22898f 100644
--- a/tex.el
+++ b/tex.el
@@ -4484,7 +4484,8 @@ in the global directories only and nil in both.
 If optional argument NODIR is non-nil, remove directory part.
 
 If optional argument STRIP is non-nil, remove file extension."
-  (let* ((spec (assq filetype TeX-search-files-type-alist))
+  (let* ((gc-cons-threshold 1000)
+(spec (assq filetype TeX-search-files-type-alist))
 (kpse-var (nth 1 spec))
 (rawdirs (nth 2 spec))
 (exts (nth 3 spec))



[elpa] externals/auctex 57147c7 59/69: Another fix for vertical bad box warnings

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 57147c70646594270973364a0130650d419c9b34
Author: Mosè Giordano 
Commit: Mosè Giordano 

Another fix for vertical bad box warnings

* tex-buf.el (TeX-parse-error): Use different regexps for horizontal and
  vertical bad boxes, they cannot be handled together.
(TeX-warning): Do not move point when a vertical bad box has been found.
* tests/tex/compilation-log.txt: Add a test where the parser used to
  fail to find the file for warnings after a vertical bad box warning.
* tests/tex/error-parsing.el: Update result accordingly.
---
 tests/tex/compilation-log.txt |   14 ++
 tests/tex/error-parsing.el|   12 +++-
 tex-buf.el|   40 ++--
 3 files changed, 55 insertions(+), 11 deletions(-)

diff --git a/tests/tex/compilation-log.txt b/tests/tex/compilation-log.txt
index 3598af4..f3d2b00 100644
--- a/tests/tex/compilation-log.txt
+++ b/tests/tex/compilation-log.txt
@@ -47,6 +47,20 @@ Overfull \hbox (0.93071pt too wide) detected at line 31
  []\T1/jkpl/m/n/10.95 144
 )
 
+(./file  name/with spaces.tex
+chapter 5.
+ [82] [83 <./image/an_image.pdf>] [84] [85] [86] 
(./image/another.tex
+ )
+ 
+Underfull \vbox (badness 3942) has occurred while \output is active [87 
<./image/another.pdf> <./image/another2.pdf>] [88] (./image/beta.tex
+
+) [89] [90 <./image/beta.pdf>]
+Overfull \hbox (13.59138pt too wide) in paragraph at lines 367--368
+[]\T1/pplj/m/n/10.95 Un qua-dri-vet-to-re co-va-rian-te $\OMS/zplm/m/n/10.95 
f\OML/zplm/m/it/10.95 A[]\OMS/zplm/m/n/10.95 g$ \T1/pplj/m/n/10.95 e un 
in-sie-me di quat-tro quan-ti-ta $\OT1/zplm/m/n/10.95 (\OML/zplm/m/it/10.95 
A[]; A[]; A[]; A[]\OT1/zplm/m/n/10.95 )$
+[91] [92]
+
+[93])
+
 LaTeX Warning: There were undefined references.
 
 )
diff --git a/tests/tex/error-parsing.el b/tests/tex/error-parsing.el
index 170c8bf..2d0f282 100644
--- a/tests/tex/error-parsing.el
+++ b/tests/tex/error-parsing.el
@@ -100,7 +100,17 @@ ABD: EveryShipout initializing macros"
  ;; context of the first one.
  (bad-box "./test.lof" 31 "Overfull \\hbox (0.93071pt too wide) 
detected at line 31"
   0 "\n []\\T1/jkpl/m/n/10.95 144" "144" 31 t 1733 nil)
+ ;; The line of this warning ends with a new file opened.  This 
test
+ ;; makes sure point stays exactly at the end of the warning so 
that
+ ;; the next the next warning in the list has the right file
+ ;; (otherwise it would be nil).
+ (bad-box "./file  name/with spaces.tex" nil "Underfull \\vbox 
(badness 3942) has occurred while \\output is active [87 <./image/another.pdf> 
<./image/another2.pdf>]"
+  0 "\nUnderfull \\vbox (badness 3942) has occurred while \\output 
is active [87 <./image/another.pdf> <./image/another2.pdf>]"
+  nil nil t 2142 nil)
+ (bad-box "./file  name/with spaces.tex" 367 "Overfull \\hbox 
(13.59138pt too wide) in paragraph at lines 367--368"
+  0 "\n[]\\T1/pplj/m/n/10.95 Un qua-dri-vet-to-re co-va-rian-te 
$\\OMS/zplm/m/n/10.95 f\\OML/zplm/m/it/10.95 A[]\\OMS/zplm/m/n/10.95 g$ 
\\T1/pplj/m/n/10.95 e un in-sie-me di quat-tro quan-ti-ta $\\OT1/zplm/m/n/10.95 
(\\OML/zplm/m/it/10.95 A[]; A[]; A[]; A[]\\OT1/zplm/m/n/10.95 )$" "$"
+  368 t 2600 nil)
  (warning "./test.tex" nil "LaTeX Warning: There were undefined 
references."
-  0 "LaTeX Warning: There were undefined references.\n" nil nil 
nil 1785 nil)
+  0 "LaTeX Warning: There were undefined references.\n" nil nil 
nil 2667 nil)
 
 ;;; error-parsing.el ends here
diff --git a/tex-buf.el b/tex-buf.el
index 15e9a69..9a3662b 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -2328,9 +2328,12 @@ Return non-nil if an error or warning is found."
  " !\\(?:offset(\\([---0-9]+\\))\\|"
  ;; Hook to change file name
  "name(\\([^)]+\\))\\)\\|"
- ;; LaTeX bad box
- "^\\(\\(?:Overfull\\|Underfull\\|Tight\\|Loose\\)\
- [hv]box.*\\)\\|"
+ ;; Start of LaTeX bad box
+ "^\\(\\(?:Overfull\\|Underfull\\|Tight\\|Loose\\) "
+ ;;   Horizontal bad box
+ "\\(?:hbox.* at lines? [0-9]+\\(?:--[0-9]+\\)?$\\|"
+ ;;   Vertical bad box.  See also `TeX-warning'.
+ "vbox ([ a-z0-9]+) has occurred while output is active 
\\[[^]]+\\]\\)\\)\\|"
  ;; LaTeX warning
  "^\\(" LaTeX-warnings-regexp ".*\\)"))
(error-found nil))
@@ -2586,8 +2589,25 @@ warning."
 line))
 
 ;; Find the context
-(context-start (progn (if bad-box (end-of-line)
-(beginning-of-line))
+(context-start (progn (cond
+   ((and bad-box (string-match "hbox" warning))
+;; Horizontal bad box
+(end-of-line))
+   

[elpa] externals/auctex b4ff376 30/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit b4ff3764a185eb3a5cd229b2d95687b3c470b033
Merge: c6d3152 45ffe1f
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog |7 +++
 tex.el|   14 ++
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2ce2a0c..10cc9de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2014-10-02  Ikumi Keita  
 
+   * tex.el (featurep): Activate mark in the GNU Emacs version of
+   TeX-activate-mark instead of being a no-op.
+   (TeX-insert-dollar): Use set-mark instead of push-mark in order to
+   avoid duplicate marks.
+
+2014-10-02  Ikumi Keita  
+
* texmathp.el (texmathp-tex-commands-default): Move equation*
environment to AMS-LaTeX section.
(texmathp-why): Fix docstring.
diff --git a/tex.el b/tex.el
index 25b7dfa..48dfa5b 100644
--- a/tex.el
+++ b/tex.el
@@ -751,7 +751,8 @@ If POS is nil, use current buffer location."
 (and transient-mark-mode mark-active))
 
   (defun TeX-activate-region ()
-nil)
+(setq deactivate-mark nil)
+(activate-mark))
 
   (defun TeX-overlay-prioritize (start end)
 "Calculate a priority for an overlay extending from START to END.
@@ -5540,18 +5541,18 @@ sign.  With optional ARG, insert that many dollar 
signs."
((and (eq last-command 'TeX-insert-dollar)
 (re-search-forward "\\=\\$\\([^$][^z-a]*[^$]\\)\\$" (mark) t))
(replace-match "$$\\1$$")
-   (push-mark (match-beginning 0) t))
+   (set-mark (match-beginning 0)))
;; \(...\) to \[...\]
((and (eq last-command 'TeX-insert-dollar)
 (re-search-forward "\\=(\\([^z-a]*\\))" (mark) t))
(replace-match "[\\1]")
-   (push-mark (match-beginning 0) t))
+   (set-mark (match-beginning 0)))
;; Strip \[...\] or $$...$$
((and (eq last-command 'TeX-insert-dollar)
 (or (re-search-forward "\\=\\[\\([^z-a]*\\)\\]" (mark) t)
 (re-search-forward "\\=\\$\\$\\([^z-a]*\\)\\$\\$" (mark) t)))
(replace-match "\\1")
-   (push-mark (match-beginning 0) t))
+   (set-mark (match-beginning 0)))
(t
;; We use `save-excursion' because point must be situated before opening
;; symbol.
@@ -5559,10 +5560,7 @@ sign.  With optional ARG, insert that many dollar signs."
(exchange-point-and-mark)
(insert (cdr TeX-electric-math
   ;; Keep the region active.
-  (if (featurep 'xemacs)
- (zmacs-activate-region)
-   (setq activate-mark t
- deactivate-mark nil)))
+  (TeX-activate-region))
  (TeX-electric-math
   (insert (car TeX-electric-math))
   (save-excursion (insert (cdr TeX-electric-math)))



[elpa] externals/auctex 08ae29b 19/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 08ae29ba182d25932719fc149b607e884af11dcf
Merge: 7d4bfac 765c516
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog|   16 +
 doc/auctex.texi  |   64 +
 doc/changes.texi |5 ++-
 latex.el |   43 ++-
 4 files changed, 81 insertions(+), 47 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 806e013..5f71fa0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2014-08-12  Mos� Giordano  
+
+   * latex.el (LaTeX-insert-label): Rename from
+   `LaTeX-auto-insert-label' and mention sections in the doc-string.
+   (LaTeX-label): Update accordingly.
+
+   * doc/auctex.texi (Sectioning): Mention `LaTeX-insert-label'.
+   (Environments): Update `LaTeX-insert-label' name and document use
+   for sectioning commands.
+   (Environments, Completion): Prettify
+   `TeX-complete-expert-commands' documentation by using a table
+   environment.
+
+   * doc/changes.texi: Rename `LaTeX-auto-insert-label' to
+   `LaTeX-insert-label' and mention sections too.
+
 2014-08-11  Mos� Giordano  
 
* tex-buf.el (TeX-command): Keep the frame and the buffer
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 37c7366..d85a4d3 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -734,6 +734,12 @@ Prefix to all section references.
 
 @end deffn
 
+@vindex LaTeX-insert-label
+The @code{LaTeX-insert-label} user option controls whether
+@code{LaTeX-section} should automatically insert a label for the given
+sectioning command.  By default, a label for all sectioning commands
+will be prompted.  @xref{Environments}, for more information.
+
 The precise behavior of @code{LaTeX-section} is defined by the contents
 of @code{LaTeX-section-hook}.
 
@@ -853,33 +859,33 @@ as @samp{equation}, @samp{figure}, @samp{table}, 
etc@dots{}  When you
 insert one of the supported environments with @kbd{C-c C-e}, you will be
 automatically prompted for a label.  If you want to select the
 environments for which to automatically insert or not the label,
-customize the @code{LaTeX-auto-insert-label} variable.
-@defopt LaTeX-auto-insert-label
-Control whether @code{LaTeX-environment} (@kbd{C-c C-e}) should insert a
-label.  If nil, never inserts a label, if t always inserts a label and
-this the default.
+customize the @code{LaTeX-insert-label} variable.
+@defopt LaTeX-insert-label
+Control whether @code{LaTeX-section} (@kbd{C-c C-s}) or
+@code{LaTeX-environment} (@kbd{C-c C-e}) should insert a label.  If nil,
+never insert a label, if t always insert a label and this the default.
 
 This variable may also be a cons cell, to whitelist or blacklist the
-environments for which a label should or should not be inserted.  The
-car can be either nil or t.  In the former case,
-@code{LaTeX-environment} never inserts labels except for the
-environments listed in the cdr; in the latter case
-@code{LaTeX-environment} always inserts labels except for the
-environments listed in the cdr.  In any cases, you can manually insert
-at point a label inside an environment with @kbd{C-c C-m label
-@key{RET}}, as usual.
+sections or environments for which a label should or should not be
+inserted.  The car can be either nil or t.  In the former case,
+@code{LaTeX-section} and @code{LaTeX-environment} never insert labels
+except for the sections and environments listed in the cdr; in the
+latter case those functions always insert labels except for the sections
+and environments listed in the cdr.  In any cases, you can manually
+insert a label at point with @kbd{C-c C-m label @key{RET}}, as usual.
 
 For example, the value
 @lisp
-(t . "equation")
+(t . "paragraph" "equation")
 @end lisp
 makes @AUCTeX{} always prompt you for a label except for the
-@samp{equation} environment.  Instead with the value
+@samp{paragraph} section, and th @samp{equation} environment.  Instead
+with the value
 @lisp
-(nil . "caption" "figure")
+(nil . "part" "chapter" "caption" "figure")
 @end lisp
-you will be prompted for a label only for @samp{caption} and
-@samp{figure} environments.
+you will be prompted for a label only for @samp{part} and @samp{chapter}
+sections, and @samp{caption} and @samp{figure} environments.
 @end defopt
 
 As a default selection, @AUCTeX{} will suggest the environment last
@@ -916,9 +922,14 @@ Complete macros and environments marked as expert commands.
 
 Possible values are nil, t, or a list of style names.
 
-  - nil   Don't complete expert commands (default).
-  - t Always complete expert commands.
-  - (STYLES ...)  Only complete expert commands of STYLES.
+@table @asis
+@item nil
+Don't complete expert commands (default).
+@item t
+Always complete expert commands.
+@item (STYLES @dots{})
+Only complete expert commands of STYLES.
+@end table
 @end defopt
 
 
@@ -1315,9 +1326,14 @@ Comple

[elpa] externals/auctex e4cad1c 46/69: Add support for Atril viewer

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit e4cad1c2af81715a4bfb18d9338886e040fc49c2
Author: Mosè Giordano 
Commit: Mosè Giordano 

Add support for Atril viewer

Suggested by Antoine Levitt.

* tex.el (TeX-evince-dbus-p): Take new arguments to specify desktop
  environment and application names.
(TeX-evince-sync-view-1): Rename from `TeX-evince-sync-view'.  Take new
  arguments to specify desktop environment and application names.
(TeX-atril-sync-view, TeX-evince-sync-view):
(TeX-view-program-select-evince): New functions.
(TeX-view-program-list-builtin): Add Atril entry and use
`TeX-view-program-select-evince' for Atril and Evince.
(TeX-source-correlate-mode): Register for Atril DBUS signal.
* doc/changes.texi: Mention Atril support.
---
 doc/changes.texi |4 ++
 tex.el   |  102 --
 2 files changed, 72 insertions(+), 34 deletions(-)

diff --git a/doc/changes.texi b/doc/changes.texi
index f13a8b1..8c5ff97 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -16,6 +16,10 @@ Parsing of the compilation log has been reworked.  You 
should encounter
 fewer mistaken files while navigating through errors and warnings.
 
 @item
+Added support for Atril viewer.  Forward and inverse search requires
+version 1.9.1 or later to work.
+
+@item
 Added support for dviout viewer on Windows.  Note that this setup works
 when @code{TeX-source-correlate-method} is set to use
 @samp{source-specials} for @acronym{DVI}, e.g.:
diff --git a/tex.el b/tex.el
index 090965eb..76aaeca 100644
--- a/tex.el
+++ b/tex.el
@@ -1178,28 +1178,38 @@ The following built-in predicates are available:
   :group 'TeX-view
   :type '(alist :key-type symbol :value-type (group sexp)))
 
+;; XXX: Atril is a fork of Evince and shares an almost identical interface with
+;; it.  Instead of having different functions for each program, we keep the
+;; original *-evince-* functions and make them accept arguments to specify the
+;; actual name of the program and the desktop environment, that will be used to
+;; set up DBUS communication.
+
 ;; Require dbus at compile time to prevent errors due to `dbus-ignore-errors'
 ;; not being defined.
 (eval-when-compile (and (featurep 'dbusbind)
(require 'dbus nil :no-error)))
-(defun TeX-evince-dbus-p (&rest options)
-  "Return non-nil, if evince is installed and accessible via DBUS.
+(defun TeX-evince-dbus-p (de app &rest options)
+  "Return non-nil, if atril or evince are installed and accessible via DBUS.
 Additional OPTIONS may be given to extend the check.  If none are
 given, only the minimal requirements needed by backward search
 are checked.  If OPTIONS include `:forward', which is currently
 the only option, then additional requirements needed by forward
-search are checked, too."
+search are checked, too.
+
+DE is the name of the desktop environment, either \"gnome\" or
+\"mate\", APP is the name of viewer, either \"evince\" or
+\"atril\"."
   (let ((dbus-debug nil))
 (and (featurep 'dbusbind)
 (require 'dbus nil :no-error)
 (dbus-ignore-errors (dbus-get-unique-name :session))
-(dbus-ping :session "org.gnome.evince.Daemon")
-(executable-find "evince")
+(dbus-ping :session (format "org.%s.%s.Daemon" de app))
+(executable-find app)
 (or (not (memq :forward options))
 (let ((spec (dbus-introspect-get-method
- :session "org.gnome.evince.Daemon"
- "/org/gnome/evince/Daemon"
- "org.gnome.evince.Daemon"
+ :session (format "org.%s.%s.Daemon" de app)
+ (format "/org/%s/%s/Daemon" de app)
+ (format "org.%s.%s.Daemon" de app)
  "FindDocument")))
   ;; FindDocument must exist, and its signature must be (String,
   ;; Boolean, String).  Evince versions between 2.30 and 2.91.x
@@ -1236,19 +1246,23 @@ entry in `TeX-view-program-list-builtin'."
 
 (defvar url-unreserved-chars)
 
-(defun TeX-evince-sync-view ()
+(defun TeX-evince-sync-view-1 (de app)
   "Focus the focused page/paragraph in Evince with the position
 of point in emacs by using Evince's DBUS API.  Used by default
-for the Evince viewer entry in `TeX-view-program-list-builtin' if
-the requirements are met."
+for the Atril or Evince entries in
+`TeX-view-program-list-builtin' if the requirements are met.
+
+DE is the name of the desktop environment, either \"gnome\" or
+\"mate\", APP is the name of viewer, either \"evince\" or
+\"atril\"."
   (require 'url-util)
   (let* ((uri (concat "file://" (url-encode-url
 (expand-file-name
  (concat file "." (TeX-output-extension))
 (owner (dbus-call-method
-:session "org.gnome.evince.Daemon"
-"/org/gnome/evince/Daemon"
-   

[elpa] externals/auctex 8683935 27/69: Merge branch 'master' into simplify-TeX-parse-error

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 868393581e2944e440453fbeffa49a7f3d79ccf0
Merge: 4837aba 25887f8
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into simplify-TeX-parse-error
---
 ChangeLog |  343 +
 bib-cite.el   |1 +
 doc/auctex.texi   |   55 -
 doc/changes.texi  |6 +
 doc/todo.texi |8 +-
 latex.el  |   29 +++--
 style/CJK.el  |3 +-
 style/CJKutf8.el  |3 +-
 style/MinionPro.el|3 +-
 style/acro.el |3 +-
 style/acronym.el  |3 +-
 style/afterpage.el|3 +-
 style/alltt.el|3 +-
 style/alphanum.el |3 +-
 style/amsart.el   |3 +-
 style/amsbook.el  |3 +-
 style/amsbsy.el   |3 +-
 style/amsmath.el  |3 +-
 style/amsopn.el   |6 +-
 style/amssymb.el  |3 +-
 style/amstex.el   |3 +-
 style/amstext.el  |3 +-
 style/amsthm.el   |3 +-
 style/array.el|3 +-
 style/article.el  |3 +-
 style/austrian.el |3 +-
 style/babel.el|3 +-
 style/beamer.el   |3 +-
 style/biblatex.el |3 +-
 style/bigdelim.el |3 +-
 style/bigstrut.el |3 +-
 style/bm.el   |3 +-
 style/book.el |3 +-
 style/booktabs.el |3 +-
 style/bulgarian.el|3 +-
 style/captcont.el |3 +-
 style/comment.el  |3 +-
 style/csquotes.el |3 +-
 style/czech.el|3 +-
 style/danish.el   |3 +-
 style/dinbrief.el |3 +-
 style/dk.el   |3 +-
 style/doc.el  |3 +-
 style/dutch.el|3 +-
 style/emp.el  |3 +-
 style/english.el  |3 +-
 style/epigraph.el |3 +-
 style/epsf.el |3 +-
 style/everysel.el |3 +-
 style/exercise.el |3 +-
 style/fancyhdr.el |3 +-
 style/fancynum.el |3 +-
 style/fancyref.el |3 +-
 style/fancyvrb.el |3 +-
 style/filecontents.el |3 +-
 style/flashcards.el   |3 +-
 style/foils.el|3 +-
 style/fontspec.el |3 +-
 style/footmisc.el |3 +-
 style/francais.el |3 +-
 style/french.el   |3 +-
 style/frenchb.el  |3 +-
 style/german.el   |3 +-
 style/graphics.el |3 +-
 style/graphicx.el |3 +-
 style/harvard.el  |3 +-
 style/hyperref.el |3 +-
 style/icelandic.el|3 +-
 style/imakeidx.el |3 +-
 style/index.el|3 +-
 style/inputenc.el |3 +-
 style/italian.el  |3 +-
 style/j-article.el|3 +-
 style/j-book.el   |3 +-
 style/j-report.el |3 +-
 style/jarticle.el |3 +-
 style/jbook.el|3 +-
 style/jreport.el  |3 +-
 style/jsarticle.el|3 +-
 style/jsbook.el   |3 +-
 style/jura.el |3 +-
 style/jurabib.el  |3 +-
 style/kantlipsum.el   |3 +-
 style/kpfonts.el  |3 +-
 style/latexinfo.el|3 +-
 style/letter.el   |3 +-
 style/lettrine.el |3 +-
 style/lipsum.el   |3 +-
 style/listings.el |3 +-
 style/longtable.el|3 +-
 style/lscape.el   |3 +-
 style/ltx-base.el |3 +-
 style/ltxdoc.el   |3 +-
 style/luacode.el  |3 +-
 style/makeidx.el  |3 +-
 style/mathtools.el|3 +-
 style/mdwlist.el  |3 +-
 style/memoir.el   |3 +-
 style/metalogo.el |3 +-
 style/mflogo.el   |3 +-
 style/multicol.el |3 +-
 style/multido.el  |3 +-
 style/multind.el  |3 +-
 style/multirow.el |3 +-
 style/nameref.el  |3 +-
 style/natbib.el   |3 +-
 style/naustrian.el|3 +-
 style/ngerman.el  |3 +-
 style/nicefrac.el |3 +-
 style/nomencl.el  |3 +-
 style/paralist.el |3 +-
 style/pdfsync.el  |3 +-
 style/placeins.el |3 +-
 style/plext.el|3 +-
 style/plfonts.el  |3 +-
 style/plhb.el |3 +-
 style/polish.el   |3 +-
 style/polski.el   |3 +-
 style/prosper.el  |3 +-
 style/psfig.el|3 +-
 style/pst-grad.el |3 +-
 style/pst-node.el |3 +-
 style/pst-plot.el |3 +-
 style/pst-slpe.el |3 +-
 style/pstricks.el |3 +-
 style/ragged2e.el |3 +-
 style/report.el   |3 +-
 style/ruby.el |3 +-
 style/scrartcl.el |3 +-
 style/scrbase.el  |3 +-
 style/scrbook.el  |3 +-
 style/scrlttr2.el |3 +-
 style/scrpage2.el |3 +-
 style/scrreprt.el |3 +-
 style/setspace.el |3 +-
 style/shortvrb.el |3 +-
 style/siunitx.el  |   23 ++--
 style/slides.el   |3 +-
 style/slovak.el   |3 +-
 style/subfigure.el|3 +-
 style/swedish.el  |3 +-
 style/tabularx.el |3 +-
 style/tabulary.el |3 +-
 style/ulem.el

[elpa] externals/auctex 4357488 68/69: Merge branch 'master' into elpa

2016-03-26 Thread Tassilo Horn
branch: externals/auctex
commit 4357488d261acaff048b1e7a5fbb4c64b450259b
Merge: 0a99c11 d4b0d5f
Author: Tassilo Horn 
Commit: Tassilo Horn 

Merge branch 'master' into elpa
---
 ChangeLog.1   |   21 ++
 Makefile.in   |   57 +-
 build-aux/gitlog-to-auctexlog |  131 +++
 doc/auctex.texi   |  104 +++--
 doc/changes.texi  |   56 +-
 latex.el  |   98 ++---
 style/amsthm.el   |2 +-
 style/enumitem.el |   43 -
 style/icelandic.el|2 +-
 style/longtable.el|   12 +-
 style/newfloat.el |2 +-
 style/ntheorem.el |2 +-
 style/polish.el   |2 +-
 style/polski.el   |2 +-
 style/psfig.el|   20 +-
 style/splitidx.el |  309 +
 style/theorem.el  |2 +-
 tests/latex/latex-filling-in.tex  |4 +
 tests/latex/latex-filling-out.tex |4 +
 tests/tex/compilation-log.txt |   68 ++
 tests/tex/error-parsing.el|  120 ++
 tex-buf.el|  449 +++--
 tex-style.el  |   12 +
 tex.el|  223 +++
 24 files changed, 1513 insertions(+), 232 deletions(-)

diff --git a/ChangeLog.1 b/ChangeLog.1
index dd1f90c..5d991a0 100644
--- a/ChangeLog.1
+++ b/ChangeLog.1
@@ -18315,6 +18315,27 @@
 
* Version 9.1 released.
 
+This file records repository revisions from
+commit c865982cacab289f4480f9145b3438ec06824232 (exclusive) to
+commit df7dbbd3a029f02042b4fa01725c4a1f4502ff56 (inclusive).
+
 ;; Local Variables:
 ;; coding: iso-8859-1
 ;; End:
+
+  Copyright (C) 1994-2016 Free Software Foundation, Inc.
+
+  This file is part of GNU AUCTeX.
+
+  GNU AUCTeX is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  GNU AUCTeX is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with GNU AUCTeX.  If not, see .
diff --git a/Makefile.in b/Makefile.in
index ee9c122..471ff21 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -153,7 +153,8 @@ STYLESRC = style/prosper.el \
   style/vwcol.el style/textpos.el   style/transparent.el \
   style/fontenc.el   style/Alegreya.el  style/gloss-italian.el \
   style/newfloat.el  style/subcaption.el style/AlegreyaSans.el \
-  style/hologo.elstyle/theorem.el   style/ntheorem.el
+  style/hologo.elstyle/theorem.el   style/ntheorem.el \
+  style/splitidx.el
 
 STYLEELC = $(STYLESRC:.el=.elc)
 
@@ -397,6 +398,60 @@ wc:
wc $(AUCSRC) $(STYLESRC)
 
 # --
+# The targets below update the ChangeLog from git log
+# and are intended to be used only by the maintainers.
+# These rules are adapted from GNU Emacs Makefile.
+
+.PHONY: ChangeLog change-history change-history-commit change-history-nocommit
+.PHONY: preferred-branch-is-current unchanged-history-files
+
+CHANGELOG = ChangeLog
+auctexlog = build-aux/gitlog-to-auctexlog
+# The ChangeLog history files are called ChangeLog.1, ChangeLog.2, ...,
+# ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX).  $(CHANGELOG_N) stands for
+# the newest (highest-numbered) ChangeLog history file.
+CHANGELOG_HISTORY_INDEX_MAX = 1
+CHANGELOG_N = ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX)
+
+# Check that we are in a good state for changing history.
+PREFERRED_BRANCH = master
+preferred-branch-is-current:
+   git branch | grep -q '^\* $(PREFERRED_BRANCH)$$'
+unchanged-history-files:
+   x=$$(git diff-files --name-only $(CHANGELOG_N) $(auctexlog)) && \
+ test -z "$$x"
+
+# Convert git commit log to ChangeLog file.  make-dist uses this.
+# I guess this is PHONY so it always updates?
+ChangeLog:
+ ./$(auctexlog) -o $(CHANGELOG) -n $(CHANGELOG_HISTORY_INDEX_MAX)
+
+# Regular expression that matches the newest commit covered by a ChangeLog.
+new_commit_regexp = ^commit [0123456789abcdef]* (inclusive)
+
+# Copy newer commit messages to the start of the ChangeLog history file,
+# and consider them to be older.
+change-history-nocommit: #preferred-branch-is-current unchanged-history-files
+   -rm -f ChangeLog.tmp
+   $(MAKE) ChangeLog CHANGELOG=ChangeLog.tmp
+   sed '/^This file records repository revisions/,$$d' \
+ ChangeLog.tmp > $(CHANGELOG_N).tmp
+   new_commit_line=`grep --text '$(

[elpa] elpa df2c08f: Better ChangeLog generation

2016-03-26 Thread Tassilo Horn
branch: elpa
commit df2c08f427f2e8a49a5634cc5784f3a8dda75b7c
Author: Tassilo Horn 
Commit: Tassilo Horn 

Better ChangeLog generation

* GNUmakefile (IGNORED): Better ChangeLog generation.
---
 GNUmakefile |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/GNUmakefile b/GNUmakefile
index 25e8d26..37d6d18 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -52,7 +52,7 @@ README: doc/intro.texi doc/preview-readme.texi doc/macros.texi
(cd doc; $(MAKEINFO_PLAIN) preview-readme.texi --output -) >> $@
 
 # Commands copied&adapted from autogen.sh and doc/Makefile.in.
-IGNORED:=$(shell ./build-aux/gitlog-to-changelog --since=2015-11-13 > 
ChangeLog && cat ChangeLog.1 >> ChangeLog)
+IGNORED:=$(shell rm ChangeLog && ./build-aux/gitlog-to-auctexlog && cat 
ChangeLog.1 >> ChangeLog)
 AUCTEXDATE:=$(shell LANG=C sed -n '1s/^\([-0-9][-0-9]*\).*/\1/p' ChangeLog)
 THISVERSION:=$(shell sed -n '2,/^[0-9]/s/.*Version \(.*\) released\..*/\1/p' 
ChangeLog)
 LASTVERSION:=$(shell sed -n '/.*Version .* released\./{s/.*Version \(.*\) 
released\..*/\1/p;q}' ChangeLog)



[elpa] externals/auctex updated (f1abcf8 -> df2c08f)

2016-03-26 Thread Tassilo Horn
tsdh pushed a change to branch externals/auctex.

  from  f1abcf8   Upgrade docs for release
  adds  df2c08f   Better ChangeLog generation

No new revisions were added by this update.

Summary of changes:
 GNUmakefile |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)