Re: [AUCTeX-devel] fancyhdr.el + fancynum.el

2013-02-13 Thread Tassilo Horn
Mads Jensen  writes:

Hi Mads,

>> But there are some nitpicks wrt. fancyhdr.el.  Please fix those and
>> send an improved patch.
>> 
>> - `fancyhdr-fancy-positions' is used only in one position, so no need to
>>   have a defvar for it.  Also, if the variable was needed, it should
>>   have a name matching the conventions, e.g.,
>>   `LaTeX-fancyhdr-fancy-positions'.
>
> Removed, and put inside the function with a suitable comment similar
> to the one for the variable.

Good.

>> - Now that the parser supports pagestyles, you should add the fancy
>>   and fancyplain pagestyles provided by fancyhdr.  See
>>   `LaTeX-add-pagestyles'.
>
> Yep, plainly forgot :-( Thanks for reminding me.

You're welcome.

>> - `TeX-arg-fancyhdr-position': The first line of the docstring should be
>>   one complete sentence.  I suggest "Promt for a fancyhdr position."
>>   You should also document all arguments.  Have a look at the other
>>   TeX-arg-* functions.
>
> Documented as requested.

Except that you've missed the OPTIONAL argument. ;-)
I've done that for you now.

The changes are committed.  Thanks!

Bye,
Tassilo

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


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

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/14 07:17:45

Index: style/fancyhdr.el
===
RCS file: /sources/auctex/auctex/style/fancyhdr.el,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- style/fancyhdr.el   14 Feb 2013 07:14:52 -  1.1
+++ style/fancyhdr.el   14 Feb 2013 07:17:45 -  1.2
@@ -89,8 +89,10 @@
 ;; the list of positions differs between the macros
 (defun TeX-arg-fancyhdr-position (optional &optional prompt collection)
   "Prompt for a fancyhdr position with completion.
-If non-nil, PROMPT is used as the prompt.  If non-nil, COLLECTION
-is used as the completion list for the position."
+If OPTIONAL is non-nil, insert the resulting value as an optional
+argument, otherwise as a mandatory one.  If non-nil, PROMPT is
+used as the prompt.  If non-nil, COLLECTION is used as the
+completion list for the position."
   (let* ((positions (if (not collection)
 ;; Standard positions with no restrictions.  Lower-case
 ;; versions, and reverse versions (e.g., OC) are left

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


Re: [AUCTeX-devel] subfigure.el update

2013-02-13 Thread Tassilo Horn
Mads Jensen  writes:

> Trivial patch with a few new commands and lengths (there was
> previously a TODO).
>
> 2013-02-13  Mads Jensen  
>
>   * style/subfigure.el ("subfigure"): Collapsed the two regular
>   expressions for completion.  Added lengths, and commands for
>   fonts.  Expanded copyright range.

Committed with minor modifications to the ChangeLog entry.  The
copyright range expansion was not inside ("subfigure").

It's best do write ChangeLog entries by modifying one part of the code
(the copyright range, a function, a variable) at a time, followed by
`M-x add-change-log-entry'.  Then emacs will do the right thing for you.

Alternatively, you can modify the code first and thereafter use `M-x
vc-dir RET ~/path/to/auctex' to view the status of the files.  Then hit
`=' on any modified file to get a diff.  In the diff, you can hit RET on
every change to jump to the position in the changed file, and then you
can do `M-x add-change-log-entry' again.

Bye,
Tassilo


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


Re: [AUCTeX-devel] Add `unit' type for the parser in siunitx.el

2013-02-13 Thread Mosè Giordano
Hi Tassilo,

2013/2/13 Tassilo Horn :
> If you have a sample tex file plus a recipe how to reproduce the error,
> I could check myself.  E.g. a tex file using siunitx with some custom
> unit definitions, and then I change it not to use siunitx and revert the
> buffer, so that I hit the undefined function error.
LaTeX source code:

\documentclass{article}

\usepackage{siunitx}

\DeclareSIUnit\parsec{pc}
\DeclareSIUnit\lightyear{ly}

Save the buffer, parsed file will be written with this content

(TeX-add-style-hook
 "test"
 (lambda ()
(TeX-run-style-hooks
 "latex2e"
 ""
 "article"
 "art10"
 "siunitx")
(LaTeX-add-siunitx-units
 "\\parsec"
 "\\lightyear")))

Comment or remove `\usepackage{siunitx}', then save the buffer.
Parsed file will be written, with `LaTeX-add-siunitx-units' function
but without `siunitx' hook.  Close Emacs, then reopen Emacs and the
LaTeX source.  Result: error message in the echo area
  Symbol's function definition is void: LaTeX-add-siunitx-units

Thanks for your help!

Bye,
Mosè Giordano

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


Re: [AUCTeX-devel] fancyhdr.el + fancynum.el

2013-02-13 Thread Mads Jensen
On 2013-02-13 20:34, Tassilo Horn wrote:
> I've committed fancynum.el.

Thank you :-)

> But there are some nitpicks wrt. fancyhdr.el.  Please fix those and send
> an improved patch.
> 
> - `fancyhdr-fancy-positions' is used only in one position, so no need to
>   have a defvar for it.  Also, if the variable was needed, it should
>   have a name matching the conventions, e.g.,
>   `LaTeX-fancyhdr-fancy-positions'.

Removed, and put inside the function with a suitable comment similar to
the one for the variable.

> - Now that the parser supports pagestyles, you should add the fancy and
>   fancyplain pagestyles provided by fancyhdr.  See
>   `LaTeX-add-pagestyles'.

Yep, plainly forgot :-( Thanks for reminding me.

> - `TeX-arg-fancyhdr-position': The first line of the docstring should be
>   one complete sentence.  I suggest "Promt for a fancyhdr position."
>   You should also document all arguments.  Have a look at the other
>   TeX-arg-* functions.

Documented as requested.

As requested, a patch for Makefile.in is also provided.

2013-02-14  Mads Jensen  

* Makefile.in (STYLESRC): Activate new style fancyhdr.el.

* style/fancyhdr.el: New style.
-- 
Med Venlig Hilsen / Kind Regards,
Mads Jensen
Rubinsteinsvej 31,st.th
DK-2450 Kbh. SV
Denmark
+45 6168 8518
My brain is my second favorite organ.
  -- Woody Allen
Index: Makefile.in
===
RCS file: /sources/auctex/auctex/Makefile.in,v
retrieving revision 1.182
diff -u -u -r1.182 Makefile.in
--- Makefile.in	13 Feb 2013 19:59:18 -	1.182
+++ Makefile.in	13 Feb 2013 23:12:40 -
@@ -129,7 +129,7 @@
 	   style/multirow.el  style/imakeidx.el  style/afterpage.el \
 	   style/longtable.el style/lipsum.elstyle/kantlipsum.el \
 	   style/memoir.elstyle/placeins.el  style/nameref.el \
-	   style/fancynum.el  style/filecontents.el
+	   style/fancynum.el  style/fancyhdr.el	 style/filecontents.el
 STYLEELC = $(STYLESRC:.el=.elc)
 
 CLEANFILES = $(AUCELC) $(STYLEELC) $(MULEELC)

;;; fancyhdr.el --- AUCTeX style for `fancyhdr.sty'

;; Copyright (C) 2012, 2013 Free Software Foundation, Inc.

;; Author: Mads Jensen 
;; Maintainer: auctex-devel@gnu.org
;; 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 `fancyhdr.sty', version 3.2

;;; Code:

(TeX-add-style-hook
 "fancyhdr"
 (lambda ()
   (TeX-add-symbols
'("lhead" t)
'("lfoot" t)
'("chead" t)
'("cfoot" t)
'("rhead" t)
'("rfoot" t)
'("nouppercase" t)
'("MakeUppercase" t)
'("fancyhead" [ TeX-arg-fancyhdr-position ] t)
'("fancyfoot" [ TeX-arg-fancyhdr-position ] t)
'("fancyheadoffset"
  [ (TeX-arg-fancyhdr-position
 "Position" ("LO" "LE" "L" "RE" "RO" "R" "0")) ] t)
'("fancyfootoffset"
  [ (TeX-arg-fancyhdr-position
 "Position" ("LO" "LE" "L" "RE" "RO" "R" "O")) ] t)
'("fancyhfoffset"
  [ (TeX-arg-fancyhdr-position "Position" ("E" "O" "L" "R")) ] t)
'("fancypagestyle" TeX-arg-pagestyle t)

"headrulewidth" "footrulewidth" "plainfootrulewidth"
"plainheadrulewidth" "leftmark" "rightmark"
;; the manual does not mention any subsubsectionmark (!)
"chaptermark" "sectionmark" "subsectionmark" "paragraphmark"
"subparagraphmark" "footrule" "headrule")

   ;; `fancyhdr.sty' supplies these two pagestyles
   (LaTeX-add-pagestyles "fancy" "fancyplain")

   ;; Fontification
   (when (and (featurep 'font-latex)
	  (eq TeX-install-font-lock 'font-latex-setup))
 (font-latex-add-keywords '(("fancyhead" "[{")
("fancyfoot" "[{")
("lhead" "{")
("lfoot" "{")
("chead" "{")
("cfoot" "{")
("rhead" "{")
("rfoot" "{")
("fancyheadoffset" "[{")
("fancyfootoffset" "[{")
("fancypagestyle" "{{")) 'function)
 (font-latex-add-keywords '(("headrulewidth" "")
("footrulewidth" "")
("plainheadrulewidth" "")
("plainf

[AUCTeX-devel] subfigure.el update

2013-02-13 Thread Mads Jensen
Trivial patch with a few new commands and lengths (there was previously
a TODO).

2013-02-13  Mads Jensen  

* style/subfigure.el ("subfigure"): Collapsed the two regular
expressions for completion.  Added lengths, and commands for
fonts.  Expanded copyright range.
-- 
Med Venlig Hilsen / Kind Regards,
Mads Jensen
Rubinsteinsvej 31,st.th
DK-2450 Kbh. SV
Denmark
+45 6168 8518
My brain is my second favorite organ.
  -- Woody Allen
Index: subfigure.el
===
RCS file: /sources/auctex/auctex/style/subfigure.el,v
retrieving revision 1.6
diff -u -u -r1.6 subfigure.el
--- subfigure.el	3 Feb 2008 14:53:29 -	1.6
+++ subfigure.el	13 Feb 2013 22:40:57 -
@@ -1,6 +1,6 @@
 ;;; subfigure.el --- AUCTeX style file for subfigure.sty
 
-;; Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2005, 2013 Free Software Foundation, Inc.
 
 ;; Author: Reiner Steib  
 ;; Maintainer: auctex-devel@gnu.org
@@ -25,7 +25,7 @@
 
 ;;; Commentary:
 
-;; AUCTeX style file for subfigure.sty
+;; AUCTeX style file for `subfigure.sty'
 
 ;;; Code:
 
@@ -33,18 +33,23 @@
  "subfigure"
  (lambda ()
(TeX-add-symbols
-'("subfigure"  [ "list entry" ] [ "sub caption" ] "figure")
-'("subtable"   [ "list entry" ] [ "sub caption" ] "figure")
+'("subfigure"  [ "List entry" ] [ "Sub caption" ] "Figure")
+'("subtable"   [ "List entry" ] [ "Sub caption" ] "Figure")
 '("Subref" TeX-arg-label)
-'("subref" TeX-arg-label))
-   ;; TODO: add \subfig* lengths
+'("subref" TeX-arg-label)
+'("subcapsize" 0)
+'("subcapfont" 0)
+'("subcaplabelfont" 0)
+
+   (LaTeX-add-lengths "subfigtopskip" "subfigcapskip" "subfigcaptopadj"
+  "subfigbottomskip" "subfigcapmargin" "subfiglabelskip")
 
;; Install completion for labels:
(setq TeX-complete-list
 	 (append
-	  '(("subref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")
-	("Subref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}"))
+	  '(("[Ss]ubref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}")))
 	  TeX-complete-list))
+
;; Fontification
(when (and (featurep 'font-latex)
 	  (eq TeX-install-font-lock 'font-latex-setup))


signature.asc
Description: OpenPGP digital signature
___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Hyperref and nameref

2013-02-13 Thread Tassilo Horn
Mads Jensen  writes:

Hi Mads,

>>> I sent a patch to auctex.texi to document `TeX-complete-list',
>>> `LaTeX-item-list' and `LaTeX-after-insert-env-hooks' about a month
>>> ago.  Shouldn't this be mentioned in the manual?
>> 
>> Oh, I must have overlooked it.  Could you please tell me the message id
>> of the mail?
>
> Do you mean this
>  ? I
> posted the message on 13th of January.

Ah, thanks.  I'll have a look, but now I gotta go to bed.

> If you want, I can also just repost it.

No need to.

>> There's nothing a user has to do (at least with respect to AUCTeX).
>> If she configures Evince as Viewer and there's a dbus session bus and
>> emacs has dbus support, AUCTeX simply uses that to do
>> forward/backward search.
>
> OK. But I don't think dbus is necessarily started by default on all
> systems, so it still might be nice to mention that it's a possibility.

Hm, yes, one could add a sentence to (info "(auctex)I/O Correlation").

Bye,
Tassilo


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


Re: [AUCTeX-devel] Insert two dollars when typing one

2013-02-13 Thread Tassilo Horn
Mosè Giordano  writes:

>> Does that play well with `TeX-math-close-double-dollar'?  I'm not
>> completely sure if closing of single or double dollars and placement
>> of point should be controlled by the same variables.  What's the
>> result of typing $$$ when both variables are t?
>
> If both variables are t, first `$' will insert `$$' and put point in
> the middle.  If one move a character forward (ie, after the second
> `$') and press another time `$' it will close the first `$$',
> considered as opening display math because this comes first in `cond'
> clauses.  This seems to me reasonable.

Hm, well, $$x$ resulting in $$x$$ would also be reasonable in that
case.  But since one shouldn't use $$...$$ anyway, I have no strong
opinion here.

> If one thinks will use one construct (`$...$' or `$$...$$') more often
> than the other probably won't set both variable to t, so if one use
> only LaTeX and no plain TeX probably will completely ignore
> `TeX-math-close-double-dollar' and use only
> `TeX-math-close-single-dollar'.

Agreed.

> I'm sending patches with your suggestions.  I've documented in
> `auctex.texi' also some other recent changes.

Thanks a lot!  It's committed

Bye,
Tassilo


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


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

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 20:10:27

Index: tex.el
===
RCS file: /sources/auctex/auctex/tex.el,v
retrieving revision 5.706
retrieving revision 5.707
diff -u -b -r5.706 -r5.707
--- tex.el  12 Feb 2013 07:54:40 -  5.706
+++ tex.el  13 Feb 2013 20:10:27 -  5.707
@@ -5110,6 +5110,13 @@
   :group 'TeX-macro
   :type 'boolean)
 
+(defcustom TeX-math-close-single-dollar nil
+  "If non-nil, when outside math mode insert opening and closing dollar
+signs for TeX inline equation and put the point between them, just by
+typing a single `$'."
+  :group 'TeX-macro
+  :type 'boolean)
+
 (defun TeX-insert-dollar (&optional arg)
   "Insert dollar sign.
 
@@ -5148,7 +5155,7 @@
(save-excursion
  (goto-char (cdr texmathp-why))
  (if (pos-visible-in-window-p)
- (sit-for 1)
+ (sit-for blink-matching-delay)
(message "Matches %s"
 (buffer-substring
  (point) (progn (end-of-line) (point
@@ -5158,7 +5165,16 @@
   (insert "$")))
(t
 ;; Just somewhere in the text.
-(insert "$")))
+(if TeX-math-close-single-dollar
+   (progn
+ (insert "$$")
+ (if blink-matching-paren
+ (progn
+   (backward-char 2)
+   (sit-for blink-matching-delay)
+   (forward-char))
+   (backward-char)))
+  (insert "$"
   (TeX-math-input-method-off))
 
 (defvar TeX-math-input-method-off-regexp

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


[AUCTeX-diffs] Changes to auctex/ChangeLog,v

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 20:10:27

Index: ChangeLog
===
RCS file: /sources/auctex/auctex/ChangeLog,v
retrieving revision 5.1839
retrieving revision 5.1840
diff -u -b -r5.1839 -r5.1840
--- ChangeLog   13 Feb 2013 19:59:18 -  5.1839
+++ ChangeLog   13 Feb 2013 20:10:27 -  5.1840
@@ -1,3 +1,18 @@
+2013-02-13  Mosè Giordano  
+
+   * doc/auctex.texi (Quotes): Document
+   `TeX-math-close-single-dollar'.
+   (Selecting a Command): Remove reference to
+   `LaTeX-biblatex-use-Biber'.
+   (Parsing Files): Document `LaTeX-auto-index-regexp-list',
+   `LaTeX-auto-class-regexp-list',
+   `LaTeX-auto-pagestyle-regexp-list',
+   `LaTeX-auto-counter-regexp-list', `LaTeX-auto-length-regexp-list',
+   `LaTeX-auto-savebox-regexp-list'.
+
+   * tex.el (TeX-math-close-single-dollar): New variable.
+   (TeX-insert-dollar): Use it.
+
 2013-02-13  Tassilo Horn  
 
* Makefile.in (STYLESRC): Activate new style filecontents.el.

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


[AUCTeX-commit] auctex ChangeLog tex.el doc/auctex.texi

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 20:10:27

Modified files:
.  : ChangeLog tex.el 
doc: auctex.texi 

Log message:
* doc/auctex.texi (Quotes): Document
`TeX-math-close-single-dollar'.
(Selecting a Command): Remove reference to
`LaTeX-biblatex-use-Biber'.
(Parsing Files): Document `LaTeX-auto-index-regexp-list',
`LaTeX-auto-class-regexp-list',
`LaTeX-auto-pagestyle-regexp-list',
`LaTeX-auto-counter-regexp-list', `LaTeX-auto-length-regexp-list',
`LaTeX-auto-savebox-regexp-list'.

* tex.el (TeX-math-close-single-dollar): New variable.
(TeX-insert-dollar): Use it.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/auctex/ChangeLog?cvsroot=auctex&r1=5.1839&r2=5.1840
http://cvs.savannah.gnu.org/viewcvs/auctex/tex.el?cvsroot=auctex&r1=5.706&r2=5.707
http://cvs.savannah.gnu.org/viewcvs/auctex/doc/auctex.texi?cvsroot=auctex&r1=1.319&r2=1.320

___
auctex-commit mailing list
auctex-com...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-commit


[AUCTeX-diffs] Changes to auctex/doc/auctex.texi,v

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 20:10:27

Index: doc/auctex.texi
===
RCS file: /sources/auctex/auctex/doc/auctex.texi,v
retrieving revision 1.319
retrieving revision 1.320
diff -u -b -r1.319 -r1.320
--- doc/auctex.texi 13 Feb 2013 19:08:52 -  1.319
+++ doc/auctex.texi 13 Feb 2013 20:10:27 -  1.320
@@ -397,10 +397,10 @@
 
 In @AUCTeX{}, dollar signs should match like they do in @TeX{}.  This
 has been partially implemented, we assume dollar signs always match
-within a paragraph.  The first @samp{$} you insert in a paragraph will
-do nothing special.  The second @samp{$} will match the first.  This
-will be indicated by moving the cursor temporarily over the first dollar
-sign.
+within a paragraph.  By default, the first @samp{$} you insert in a
+paragraph will do nothing special.  The second @samp{$} will match the
+first.  This will be indicated by moving the cursor temporarily over the
+first dollar sign.
 
 @deffn Command TeX-insert-dollar @var{arg}
 @kindex $
@@ -410,6 +410,11 @@
 Ensure double dollar signs match up correctly by inserting extra dollar
 signs when needed if @code{TeX-math-close-double-dollar} is non-nil.
 
+If @var{TeX-math-close-single-dollar} is non-nil, when outside math mode
+the function insert the opening and closing dollar signs for @TeX{}
+inline formula and put the point between them just by typing a single
+@samp{$}.
+
 With optional @var{arg}, insert that many dollar signs.
 @end deffn
 
@@ -422,6 +427,14 @@
 dollar signs.
 @end defopt
 
+@defopt TeX-math-close-single-dollar
+Control the insertion of dollar signs for delimiting inline math.  If
+the variable is non-nil and you enter a dollar sign outside math mode
+@AUCTeX{} will automatically insert the opening and closing dollar signs
+and put the point between them.  If the variable
+@code{blink-matching-paren} is non-nil the opening dollar will blink.
+@end defopt
+
 @subheading Braces
 
 To avoid unbalanced braces, it is useful to insert them pairwise.  You
@@ -2420,11 +2433,11 @@
 
 @cindex Biber
 @cindex biblatex
-@vindex LaTeX-biblatex-use-Biber
 In case you use biblatex in a document, @AUCTeX{} switches from
-Bib@TeX{} to Biber for bibliography processing.  In case you want to
-keep using Bib@TeX{}, set the variable @code{LaTeX-biblatex-use-Biber}
-to nil.
+Bib@TeX{} to Biber for bibliography processing.  If you have enabled
+automatic parsing, @AUCTeX{} checks the value of @samp{backend} option
+given to biblatex at load time to decide whether to use Bib@TeX{} or
+Biber.
 
 After confirming a command to execute, @AUCTeX{} will try to save any
 buffers related to the document, and check if the document needs to be
@@ -3232,6 +3245,30 @@
 Only parse @LaTeX{} labels.
 @end defvr
 
+@defvr Constant LaTeX-auto-index-regexp-list
+Only parse @LaTeX{} index and glossary entries.
+@end defvr
+
+@defvr Constant LaTeX-auto-class-regexp-list
+Only parse macros in @LaTeX{} classes and packages.
+@end defvr
+
+@defvr Constant LaTeX-auto-pagestyle-regexp-list
+Only parse @LaTeX{} pagestyles.
+@end defvr
+
+@defvr Constant LaTeX-auto-counter-regexp-list
+Only parse @LaTeX{} counters.
+@end defvr
+
+@defvr Constant LaTeX-auto-length-regexp-list
+Only parse @LaTeX{} lengths.
+@end defvr
+
+@defvr Constant LaTeX-auto-savebox-regexp-list
+Only parse @LaTeX{} saveboxes.
+@end defvr
+
 @defvr Constant LaTeX-auto-regexp-list
 Parse common @LaTeX{} commands.
 @end defvr

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


Re: [AUCTeX-devel] Hyperref and nameref

2013-02-13 Thread Mads Jensen
On 2013-02-13 20:13, Tassilo Horn wrote:
>> I sent a patch to auctex.texi to document `TeX-complete-list',
>> `LaTeX-item-list' and `LaTeX-after-insert-env-hooks' about a month
>> ago.  Shouldn't this be mentioned in the manual?
> 
> Oh, I must have overlooked it.  Could you please tell me the message id
> of the mail?

Do you mean this
 ? I
posted the message on 13th of January. If you want, I can also just
repost it.

> There's nothing a user has to do (at least with respect to AUCTeX).  If
> she configures Evince as Viewer and there's a dbus session bus and emacs
> has dbus support, AUCTeX simply uses that to do forward/backward search.

OK. But I don't think dbus is necessarily started by default on all
systems, so it still might be nice to mention that it's a possibility.

> Bye,
> Tassilo
-- 
Med Venlig Hilsen / Kind Regards,
Mads Jensen
Rubinsteinsvej 31,st.th
DK-2450 Kbh. SV
Denmark
+45 6168 8518
My brain is my second favorite organ.
  -- Woody Allen



signature.asc
Description: OpenPGP digital signature
___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] filecontents.el + minor suggestions

2013-02-13 Thread Tassilo Horn
Mads Jensen  writes:

> New style.  I considered including this functionality into
> `LaTeX-env-contents' by checking for filecontents in
> `TeX-active-styles', but it seems that code relevant for a specific
> package should be kept in a style file, and nowhere else?

Yep.

Did you actually test your filecontents.el?  For me, it signaled an
error.  I've fixed and committed the style.

Bye,
Tassilo

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


[AUCTeX-diffs] Changes to auctex/Makefile.in,v

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 19:59:18

Index: Makefile.in
===
RCS file: /sources/auctex/auctex/Makefile.in,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -b -r1.181 -r1.182
--- Makefile.in 13 Feb 2013 19:33:22 -  1.181
+++ Makefile.in 13 Feb 2013 19:59:18 -  1.182
@@ -129,7 +129,7 @@
   style/multirow.el  style/imakeidx.el  style/afterpage.el \
   style/longtable.el style/lipsum.elstyle/kantlipsum.el \
   style/memoir.elstyle/placeins.el  style/nameref.el \
-  style/fancynum.el
+  style/fancynum.el  style/filecontents.el
 STYLEELC = $(STYLESRC:.el=.elc)
 
 CLEANFILES = $(AUCELC) $(STYLEELC) $(MULEELC)

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


[AUCTeX-diffs] Changes to style/filecontents.el

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 19:59:18

Index: style/filecontents.el
===
RCS file: style/filecontents.el
diff -N style/filecontents.el
--- /dev/null   1 Jan 1970 00:00:00 -
+++ style/filecontents.el   13 Feb 2013 19:59:18 -  1.1
@@ -0,0 +1,54 @@
+;;; filecontents.el --- AUCTeX style for `filecontents.sty'
+
+;; Copyright (C) 2013 Free Software Foundation, Inc.
+
+;; Author: Mads Jensen 
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 2013-01-01
+;; 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 `filecontents.sty'.  The package removes the two
+;; constraints that `filecontents' from LaTeX2e has, namely that the 
environment
+;; must be before the documentclass (or \begin{document} according to some
+;; sources), and that existing files are not overwritten.
+
+;;; Code:
+
+(TeX-add-style-hook
+ "filecontents"
+ (lambda ()
+   (LaTeX-add-environments
+'("filecontents" LaTeX-env-filecontents)
+'("filecontents*" LaTeX-env-filecontents
+
+(defun LaTeX-env-filecontents (environment)
+  "Insert ENVIRONMENT with filename for contents."
+  (LaTeX-insert-environment environment
+   (concat TeX-grop
+   (read-string "File: ")
+   TeX-grcl))
+  (delete-horizontal-space))
+
+(defvar LaTeX-filecontents-package-options nil
+  "Package options for filecontents.")
+
+;; filecontents.el ends here

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


[AUCTeX-commit] auctex ChangeLog Makefile.in style/filecontents.el

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 19:59:18

Modified files:
.  : ChangeLog Makefile.in 
Added files:
style  : filecontents.el 

Log message:
* Makefile.in (STYLESRC): Activate new style filecontents.el.

* style/filecontents.el: New style.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/auctex/ChangeLog?cvsroot=auctex&r1=5.1838&r2=5.1839
http://cvs.savannah.gnu.org/viewcvs/auctex/Makefile.in?cvsroot=auctex&r1=1.181&r2=1.182
http://cvs.savannah.gnu.org/viewcvs/auctex/style/filecontents.el?cvsroot=auctex&rev=1.1

___
auctex-commit mailing list
auctex-com...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-commit


[AUCTeX-diffs] Changes to auctex/ChangeLog,v

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 19:59:18

Index: ChangeLog
===
RCS file: /sources/auctex/auctex/ChangeLog,v
retrieving revision 5.1838
retrieving revision 5.1839
diff -u -b -r5.1838 -r5.1839
--- ChangeLog   13 Feb 2013 19:33:22 -  5.1838
+++ ChangeLog   13 Feb 2013 19:59:18 -  5.1839
@@ -1,5 +1,13 @@
 2013-02-13  Tassilo Horn  
 
+   * Makefile.in (STYLESRC): Activate new style filecontents.el.
+
+2013-01-23  Mads Jensen  
+
+   * style/filecontents.el: New style.
+
+2013-02-13  Tassilo Horn  
+
* Makefile.in (STYLESRC): Activate new style fancynum.el.
 
 2013-02-08  Mads Jensen  

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


Re: [AUCTeX-devel] fancyhdr.el + fancynum.el

2013-02-13 Thread Tassilo Horn
Hi Mads,

I've committed fancynum.el.

But there are some nitpicks wrt. fancyhdr.el.  Please fix those and send
an improved patch.

- `fancyhdr-fancy-positions' is used only in one position, so no need to
  have a defvar for it.  Also, if the variable was needed, it should
  have a name matching the conventions, e.g.,
  `LaTeX-fancyhdr-fancy-positions'.

- Now that the parser supports pagestyles, you should add the fancy and
  fancyplain pagestyles provided by fancyhdr.  See
  `LaTeX-add-pagestyles'.

- `TeX-arg-fancyhdr-position': The first line of the docstring should be
  one complete sentence.  I suggest "Promt for a fancyhdr position."
  You should also document all arguments.  Have a look at the other
  TeX-arg-* functions.

Bye,
Tassilo

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


[AUCTeX-diffs] Changes to auctex/ChangeLog,v

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 19:33:22

Index: ChangeLog
===
RCS file: /sources/auctex/auctex/ChangeLog,v
retrieving revision 5.1837
retrieving revision 5.1838
diff -u -b -r5.1837 -r5.1838
--- ChangeLog   13 Feb 2013 19:08:52 -  5.1837
+++ ChangeLog   13 Feb 2013 19:33:22 -  5.1838
@@ -1,5 +1,13 @@
 2013-02-13  Tassilo Horn  
 
+   * Makefile.in (STYLESRC): Activate new style fancynum.el.
+
+2013-02-08  Mads Jensen  
+
+   * style/fancynum.el: New style.
+
+2013-02-13  Tassilo Horn  
+
* Makefile.in (STYLESRC): Activate new style nameref.el.
 
 2013-02-13  Mads Jensen  

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


[AUCTeX-diffs] Changes to style/fancynum.el

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 19:33:22

Index: style/fancynum.el
===
RCS file: style/fancynum.el
diff -N style/fancynum.el
--- /dev/null   1 Jan 1970 00:00:00 -
+++ style/fancynum.el   13 Feb 2013 19:33:22 -  1.1
@@ -0,0 +1,46 @@
+;;; fancynum.el --- AUCTeX style for `fancynum.sty'
+
+;; Copyright (C) 2013 Free Software Foundation, Inc.
+
+;; Author: Mads Jensen 
+;; Maintainer: auctex-devel@gnu.org
+;; 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 `fancynum.sty'
+
+;;; Code:
+
+(TeX-add-style-hook
+ "fancynum"
+ (lambda ()
+   (TeX-add-symbols
+'("fnum" t)
+'("setfnumdsym" t)
+'("setfnummsym" t)
+'("setfnumgsym" t
+
+(defvar LaTeX-fancynum-package-options
+  '("english" "french" "tight" "loose" "commas" "thinspaces" "plain")
+  "Package options for fancynum.")
+
+;; fancynum.el ends here
+

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


[AUCTeX-commit] auctex ChangeLog Makefile.in style/fancynum.el

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 19:33:22

Modified files:
.  : ChangeLog Makefile.in 
Added files:
style  : fancynum.el 

Log message:
* Makefile.in (STYLESRC): Activate new style fancynum.el.

* style/fancynum.el: New style.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/auctex/ChangeLog?cvsroot=auctex&r1=5.1837&r2=5.1838
http://cvs.savannah.gnu.org/viewcvs/auctex/Makefile.in?cvsroot=auctex&r1=1.180&r2=1.181
http://cvs.savannah.gnu.org/viewcvs/auctex/style/fancynum.el?cvsroot=auctex&rev=1.1

___
auctex-commit mailing list
auctex-com...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-commit


[AUCTeX-diffs] Changes to auctex/Makefile.in,v

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 19:33:22

Index: Makefile.in
===
RCS file: /sources/auctex/auctex/Makefile.in,v
retrieving revision 1.180
retrieving revision 1.181
diff -u -b -r1.180 -r1.181
--- Makefile.in 13 Feb 2013 19:08:52 -  1.180
+++ Makefile.in 13 Feb 2013 19:33:22 -  1.181
@@ -128,7 +128,8 @@
   style/lscape.elstyle/epigraph.el  style/mflogo.el \
   style/multirow.el  style/imakeidx.el  style/afterpage.el \
   style/longtable.el style/lipsum.elstyle/kantlipsum.el \
-  style/memoir.elstyle/placeins.el  style/nameref.el
+  style/memoir.elstyle/placeins.el  style/nameref.el \
+  style/fancynum.el
 STYLEELC = $(STYLESRC:.el=.elc)
 
 CLEANFILES = $(AUCELC) $(STYLEELC) $(MULEELC)

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


Re: [AUCTeX-devel] Insert two dollars when typing one

2013-02-13 Thread Mosè Giordano
Hi Tassilo,

2013/2/13 Tassilo Horn :
>> +(defcustom TeX-math-close-single-dollar nil
>> +  "If non-nil, when outside math mode insert opening and closing dollar
>> +signs for TeX inline equation and put the point between them, just by
>> +typing a single `$'."
>> +  :group 'TeX-macro
>> +  :type 'boolean)
>
> Does that play well with `TeX-math-close-double-dollar'?  I'm not
> completely sure if closing of single or double dollars and placement of
> point should be controlled by the same variables.  What's the result of
> typing $$$ when both variables are t?
If both variables are t, first `$' will insert `$$' and put point in
the middle.  If one move a character forward (ie, after the second
`$') and press another time `$' it will close the first `$$',
considered as opening display math because this comes first in `cond'
clauses.  This seems to me reasonable.

If one thinks will use one construct (`$...$' or `$$...$$') more often
than the other probably won't set both variable to t, so if one use
only LaTeX and no plain TeX probably will completely ignore
`TeX-math-close-double-dollar' and use only
`TeX-math-close-single-dollar'.

I'm sending patches with your suggestions.  I've documented in
`auctex.texi' also some other recent changes.  ChangeLog entry:

2013-02-13  Mosè Giordano  

* doc/auctex.texi (Quotes): Document
`TeX-math-close-single-dollar'.
(Selecting a Command): Remove reference to
`LaTeX-biblatex-use-Biber'.
(Parsing Files): Document `LaTeX-auto-index-regexp-list',
`LaTeX-auto-class-regexp-list',
`LaTeX-auto-pagestyle-regexp-list',
`LaTeX-auto-counter-regexp-list', `LaTeX-auto-length-regexp-list',
`LaTeX-auto-savebox-regexp-list'.

* tex.el (TeX-math-close-single-dollar): New variable.
(TeX-insert-dollar): Use it.


Bye,
Mosè Giordano


tex.el.patch
Description: Binary data


auctex.texi.patch
Description: Binary data
___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Hyperref and nameref

2013-02-13 Thread Tassilo Horn
Mads Jensen  writes:

Hi Mads,

>>> The hyperref package also contains the `nameref' macro which can be
>>> used to get names of the referenced section (or chapter, part).
>> 
>> Doesn't hyperref just include the nameref package which you can also
>> get and use separately?  In that case, there should be a nameref.el,
>> and hyperref.el just runs its style hook.
>
> Yes, I just had a look at the source code.  Please accept the patch
> for this :-)

Committed with slightly modified ChangeLog entry.  BTW, when you provide
a new style, please also activate it in Makefile.in (STYLESRC).

> Please also accept the trivial patch for auctex.texi

Fine as well and committed.

> I sent a patch to auctex.texi to document `TeX-complete-list',
> `LaTeX-item-list' and `LaTeX-after-insert-env-hooks' about a month
> ago.  Shouldn't this be mentioned in the manual?

Oh, I must have overlooked it.  Could you please tell me the message id
of the mail?

> I haven't configured this, but since AUCTeX now supports dbus, I think
> it would be nice to document how to get this configured.

There's nothing a user has to do (at least with respect to AUCTeX).  If
she configures Evince as Viewer and there's a dbus session bus and emacs
has dbus support, AUCTeX simply uses that to do forward/backward search.

Bye,
Tassilo

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


[AUCTeX-diffs] Changes to auctex/Makefile.in,v

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 19:08:53

Index: Makefile.in
===
RCS file: /sources/auctex/auctex/Makefile.in,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -b -r1.179 -r1.180
--- Makefile.in 21 Jan 2013 11:59:28 -  1.179
+++ Makefile.in 13 Feb 2013 19:08:52 -  1.180
@@ -128,7 +128,7 @@
   style/lscape.elstyle/epigraph.el  style/mflogo.el \
   style/multirow.el  style/imakeidx.el  style/afterpage.el \
   style/longtable.el style/lipsum.elstyle/kantlipsum.el \
-  style/memoir.elstyle/placeins.el
+  style/memoir.elstyle/placeins.el  style/nameref.el
 STYLEELC = $(STYLESRC:.el=.elc)
 
 CLEANFILES = $(AUCELC) $(STYLEELC) $(MULEELC)

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


[AUCTeX-diffs] Changes to style/nameref.el

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 19:08:53

Index: style/nameref.el
===
RCS file: style/nameref.el
diff -N style/nameref.el
--- /dev/null   1 Jan 1970 00:00:00 -
+++ style/nameref.el13 Feb 2013 19:08:52 -  1.1
@@ -0,0 +1,51 @@
+;;; nameref.el --- AUCTeX style for `nameref.sty'
+
+;; Copyright (C) 2013 Free Software Foundation, Inc.
+
+;; Author: Mads Jensen 
+;; Maintainer: auctex-devel@gnu.org
+;; 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 `nameref.sty'
+
+;;; Code:
+
+(TeX-add-style-hook
+ "nameref"
+ (lambda ()
+   (TeX-add-symbols
+'("nameref" TeX-arg-label))
+   
+   (setq TeX-complete-list
+ (append '(("nameref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}"))
+ TeX-complete-list))
+   
+   ;, 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 '(("nameref" "{")) 'reference
+
+(defvar LaTeX-nameref-package-options nil
+  "Package options for nameref.")
+
+;; nameref.el ends here

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


[AUCTeX-commit] auctex ChangeLog Makefile.in doc/auctex.texi st...

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 19:08:53

Modified files:
.  : ChangeLog Makefile.in 
doc: auctex.texi 
style  : hyperref.el 
Added files:
style  : nameref.el 

Log message:
* Makefile.in (STYLESRC): Activate new style nameref.el.

* doc/auctex.texi (Adding Macros): Mention that `TeX-arg-savebox'
now supports completion.

* style/nameref.el: New style.

* style/hyperref.el ("hyperref"): Run nameref style hook because
hyperref activates nameref.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/auctex/ChangeLog?cvsroot=auctex&r1=5.1836&r2=5.1837
http://cvs.savannah.gnu.org/viewcvs/auctex/Makefile.in?cvsroot=auctex&r1=1.179&r2=1.180
http://cvs.savannah.gnu.org/viewcvs/auctex/doc/auctex.texi?cvsroot=auctex&r1=1.318&r2=1.319
http://cvs.savannah.gnu.org/viewcvs/auctex/style/hyperref.el?cvsroot=auctex&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/auctex/style/nameref.el?cvsroot=auctex&rev=1.1

___
auctex-commit mailing list
auctex-com...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-commit


[AUCTeX-diffs] Changes to auctex/doc/auctex.texi,v

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 19:08:53

Index: doc/auctex.texi
===
RCS file: /sources/auctex/auctex/doc/auctex.texi,v
retrieving revision 1.318
retrieving revision 1.319
diff -u -b -r1.318 -r1.319
--- doc/auctex.texi 25 Jan 2013 08:07:07 -  1.318
+++ doc/auctex.texi 13 Feb 2013 19:08:52 -  1.319
@@ -3934,7 +3934,7 @@
 Prompt for a @LaTeX{} counter completing with known counters.
 
 @item TeX-arg-savebox
-Prompt for a @LaTeX{} savebox.
+Prompt for a @LaTeX{} savebox completing with known saveboxes.
 
 @item TeX-arg-file
 Prompt for a filename in the current directory, and use it without the

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


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

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 19:08:53

Index: style/hyperref.el
===
RCS file: /sources/auctex/auctex/style/hyperref.el,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- style/hyperref.el   27 Dec 2012 19:59:45 -  1.3
+++ style/hyperref.el   13 Feb 2013 19:08:52 -  1.4
@@ -1,6 +1,6 @@
 ;;; hyperref.el --- AUCTeX style for `hyperref.sty' v6.83m
 
-;; Copyright (C) 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2008, 2013 Free Software Foundation, Inc.
 
 ;; Author: Ralf Angeli 
 ;; Maintainer: auctex-devel@gnu.org
@@ -156,8 +156,10 @@
 (TeX-add-style-hook
  "hyperref"
  (lambda ()
-   ;; hyperref.sty loads url.sty
-   (TeX-run-style-hooks "url")
+   ;; hyperref loads nameref and url (+ some other packages which do not have
+   ;; style hooks)
+   (TeX-run-style-hooks "url" "nameref")
+
(TeX-add-symbols
 '("hypersetup" (TeX-arg-key-val LaTeX-hyperref-package-options))
 '("href" [ (TeX-arg-key-val LaTeX-hyperref-href-options) ] "URL" "Text")

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


[AUCTeX-diffs] Changes to auctex/ChangeLog,v

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 19:08:53

Index: ChangeLog
===
RCS file: /sources/auctex/auctex/ChangeLog,v
retrieving revision 5.1836
retrieving revision 5.1837
diff -u -b -r5.1836 -r5.1837
--- ChangeLog   13 Feb 2013 14:19:19 -  5.1836
+++ ChangeLog   13 Feb 2013 19:08:52 -  5.1837
@@ -1,3 +1,17 @@
+2013-02-13  Tassilo Horn  
+
+   * Makefile.in (STYLESRC): Activate new style nameref.el.
+
+2013-02-13  Mads Jensen  
+
+   * doc/auctex.texi (Adding Macros): Mention that `TeX-arg-savebox'
+   now supports completion.
+
+   * style/nameref.el: New style.
+
+   * style/hyperref.el ("hyperref"): Run nameref style hook because
+   hyperref activates nameref.
+
 2013-02-10  Mosè Giordano  
 
 * style/siunitx.el ("siunitx-unit"): New type for the parser.

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


Re: [AUCTeX-devel] Hyperref and nameref

2013-02-13 Thread Mads Jensen
On 2013-02-12 13:08, Tassilo Horn wrote:
>> The hyperref package also contains the `nameref' macro which can be
>> used to get names of the referenced section (or chapter, part).
> 
> Doesn't hyperref just include the nameref package which you can also get
> and use separately?  In that case, there should be a nameref.el, and
> hyperref.el just runs its style hook.

Yes, I just had a look at the source code. Please accept the patch for
this :-) hyperref also supports backref, and I've started making a style
file for this, as well, but haven't finished yet.

Please also accept the trivial patch for auctex.texi

ChangeLog entry:

2013-02-13  Mads Jensen  

* doc/auctex.texi (Adding Macros): Mention that TeX-arg-savebox
now supports completion.

* style/hyperref.el ("hyperref"): Added support nameref by running  
the
style hook.

* style/nameref.el: New style.

I sent a patch to auctex.texi to document `TeX-complete-list',
`LaTeX-item-list' and `LaTeX-after-insert-env-hooks' about a month ago.
Shouldn't this be mentioned in the manual? I haven't configured this,
but since AUCTeX now supports dbus, I think it would be nice to document
how to get this configured.
-- 
Med Venlig Hilsen / Kind Regards,
Mads Jensen
Rubinsteinsvej 31,st.th
DK-2450 Kbh. SV
Denmark
+45 6168 8518
My brain is my second favorite organ.
  -- Woody Allen
Index: hyperref.el
===
RCS file: /sources/auctex/auctex/style/hyperref.el,v
retrieving revision 1.3
diff -u -u -r1.3 hyperref.el
--- hyperref.el	27 Dec 2012 19:59:45 -	1.3
+++ hyperref.el	13 Feb 2013 18:41:29 -
@@ -1,6 +1,6 @@
 ;;; hyperref.el --- AUCTeX style for `hyperref.sty' v6.83m
 
-;; Copyright (C) 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2008, 2013 Free Software Foundation, Inc.
 
 ;; Author: Ralf Angeli 
 ;; Maintainer: auctex-devel@gnu.org
@@ -156,8 +156,10 @@
 (TeX-add-style-hook
  "hyperref"
  (lambda ()
-   ;; hyperref.sty loads url.sty
-   (TeX-run-style-hooks "url")
+   ;; hyperref loads nameref and url (+ some other packages which do not have
+   ;; style hooks)
+   (TeX-run-style-hooks "url" "nameref")
+
(TeX-add-symbols
 '("hypersetup" (TeX-arg-key-val LaTeX-hyperref-package-options))
 '("href" [ (TeX-arg-key-val LaTeX-hyperref-href-options) ] "URL" "Text")
;;; nameref.el --- AUCTeX style for `nameref.sty'

;; Copyright (C) 2013 Free Software Foundation, Inc.

;; Author: Mads Jensen 
;; Maintainer: auctex-devel@gnu.org
;; 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 `nameref.sty'

;;; Code:

(TeX-add-style-hook
 "nameref"
 (lambda ()
   (TeX-add-symbols
'("nameref" TeX-arg-label))
   
   (setq TeX-complete-list
 (append '(("nameref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-label-list "}"))
 TeX-complete-list))
   
   ;, 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 '(("nameref" "{")) 'reference

(defvar LaTeX-nameref-package-options nil
  "Package options for nameref.")

;; nameref.el ends here
Index: auctex.texi
===
RCS file: /sources/auctex/auctex/doc/auctex.texi,v
retrieving revision 1.318
diff -u -u -r1.318 auctex.texi
--- auctex.texi	25 Jan 2013 08:07:07 -	1.318
+++ auctex.texi	13 Feb 2013 18:49:23 -
@@ -3934,7 +3934,7 @@
 Prompt for a @LaTeX{} counter completing with known counters.
 
 @item TeX-arg-savebox
-Prompt for a @LaTeX{} savebox.
+Prompt for a @LaTeX{} savebox completing with known saveboxes.
 
 @item TeX-arg-file
 Prompt for a filename in the current directory, and use it without the


signature.asc
Description: OpenPGP digital signature
___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Add `unit' type for the parser in siunitx.el

2013-02-13 Thread Tassilo Horn
Mosè Giordano  writes:

>>> Do you have alternative suggestions for this?
>>
>> IMO, it would make sense to simply discard all auto-parsed
>> information in case loading the auto/foo.el signals an error.
> Good idea, but for now I'm not able to implement it :-)
> I tried to put
>   (run-hooks 'TeX-auto-cleanup-hook)
> in `tex.el' inside a `condition-case' (you suggested to use this
> function), but it didn't work.  I don't know where to catch the error.
>  I have to study the code better.

If you have a sample tex file plus a recipe how to reproduce the error,
I could check myself.  E.g. a tex file using siunitx with some custom
unit definitions, and then I change it not to use siunitx and revert the
buffer, so that I hit the undefined function error.

>> And I have one more question: The new type for the parser is for
>> siunitx units.  However, LaTeX-siunitx-regexp says it matches unit,
>> power, prefix, and qualifier definitions.  Is that all the same,
>> e.g., may I provide a qualifier where a power was expected?  Or
>> should there be a individual parser type for each siunitx thingy?
>
> I want to provide completion in minibuffer for all macros that can be
> used in the mandatory argument to `\si' and the second mandatory
> argument to `\SI'.  I called the type `unit' because they are almost
> all units or their abbreviations.  Powers, prefixes and qualifiers are
> usually a minority, but in my opinion they can be regarded all as the
> same thing.  I don't believe a different parser for each of these
> macros would be somehow more useful.

Ok, thanks for clarifying.

Bye,
Tassilo

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


Re: [AUCTeX-devel] Add `unit' type for the parser in siunitx.el

2013-02-13 Thread Mosè Giordano
Hi Tassilo,

2013/2/13 Tassilo Horn :
>> The idea of using `TeX-auto-store-pre-string' came to me when thinking
>> about a way to store in parsed file the options given to packages at
>> load time.
>
> I don't see how storing package options is related to your
> `TeX-auto-store-pre-string'.
My idea (just an idea, no code for now) was to create a variable,
`LaTeX--provided-package-options' as you suggested, and write
it to parsed file using `TeX-auto-store-pre-string'.  Maybe, a proof
of concept by me can make it clearer.

By now, the only information written to parsed file are those in
`TeX-auto-parser'.  The `TeX-auto-store-pre-string' workaround would
allow style file authors to write in parsed file also arbitrary code.
This code may contain information that should be remembered between
sessions (eg, the definition of a new type for the parser, as in my
original code) or for some other purposes I can't foresee.

>> Do you have alternative suggestions for this?
>
> IMO, it would make sense to simply discard all auto-parsed information
> in case loading the auto/foo.el signals an error.
Good idea, but for now I'm not able to implement it :-)
I tried to put
  (run-hooks 'TeX-auto-cleanup-hook)
in `tex.el' inside a `condition-case' (you suggested to use this
function), but it didn't work.  I don't know where to catch the error.
 I have to study the code better.

>> If they are OK, can my changes without `TeX-auto-store-pre-string' be
>> committed?  I'm sending the last patch for `siunitx.el' without those
>> lines.
>
> Yes, I did so.  I made a small change in that LaTeX-siunitx-regexp is
> just the regex now [not a list (regex 1 LaTeX-auto-siunitx-unit)].  The
> latter is created at the call to `TeX-auto-add-regexp' in the lambda
> being the style hook for siunitx.
Thanks!

> And I have one more question: The new type for the parser is for siunitx
> units.  However, LaTeX-siunitx-regexp says it matches unit, power,
> prefix, and qualifier definitions.  Is that all the same, e.g., may I
> provide a qualifier where a power was expected?  Or should there be a
> individual parser type for each siunitx thingy?
I want to provide completion in minibuffer for all macros that can be
used in the mandatory argument to `\si' and the second mandatory
argument to `\SI'.  I called the type `unit' because they are almost
all units or their abbreviations.  Powers, prefixes and qualifiers are
usually a minority, but in my opinion they can be regarded all as the
same thing.  I don't believe a different parser for each of these
macros would be somehow more useful.

Bye,
Mosè Giordano

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


Re: [AUCTeX-devel] Insert two dollars when typing one

2013-02-13 Thread Tassilo Horn
Mosè Giordano  writes:

Hi!

> I'd like to be able to insert two dollar signs and put the point
> between them when I type `$' outside math mode.

I'd accept such a (backward-compatible) change, but here's some
nitpicking.

> +(defcustom TeX-math-close-single-dollar nil
> +  "If non-nil, when outside math mode insert opening and closing dollar
> +signs for TeX inline equation and put the point between them, just by
> +typing a single `$'."
> +  :group 'TeX-macro
> +  :type 'boolean)

Does that play well with `TeX-math-close-double-dollar'?  I'm not
completely sure if closing of single or double dollars and placement of
point should be controlled by the same variables.  What's the result of
typing $$$ when both variables are t?

>  (defun TeX-insert-dollar (&optional arg)
>"Insert dollar sign.
>  
> @@ -5158,7 +5165,16 @@
>(insert "$")))
> (t
>  ;; Just somewhere in the text.
> -(insert "$")))
> +(if TeX-math-close-single-dollar
> + (progn
> +   (insert "$$")
> +   (if blink-matching-paren
> +   (progn
> + (backward-char 2)
> + (sit-for 1)

Use `blink-matching-delay' instead of hard-coding 1.  Please change the
other `sit-for' that's already there, too.

> + (forward-char))
> + (backward-char)))
> +  (insert "$"
>(TeX-math-input-method-off))

And such a user-visible change needs some documentation below the node
(info "(auctex)Quotes").

Bye,
Tassilo


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


Re: [AUCTeX-devel] Add `unit' type for the parser in siunitx.el

2013-02-13 Thread Tassilo Horn
Mosè Giordano  writes:

Hi Mosè,

>> That doesn't sound like the right solution.  Too much fuzz for such
>> an uncommon use-case, IMHO.
>>
>> Maybe the style hooks should be run inside a `condition-case', and in
>> case of an error we simply run `TeX-normal-mode'?
>
> Yes, I know it's not a common case, indeed I didn't notice this in my
> first tests.  But when it comes it can be annoying for a user that
> don't know what's happened since buffer is not even switched to the
> LaTeX source.

Sure it's annoying and should be improved.

> The idea of using `TeX-auto-store-pre-string' came to me when thinking
> about a way to store in parsed file the options given to packages at
> load time.

I don't see how storing package options is related to your
`TeX-auto-store-pre-string'.

> Do you have alternative suggestions for this?

IMO, it would make sense to simply discard all auto-parsed information
in case loading the auto/foo.el signals an error.

> If they are OK, can my changes without `TeX-auto-store-pre-string' be
> committed?  I'm sending the last patch for `siunitx.el' without those
> lines.

Yes, I did so.  I made a small change in that LaTeX-siunitx-regexp is
just the regex now [not a list (regex 1 LaTeX-auto-siunitx-unit)].  The
latter is created at the call to `TeX-auto-add-regexp' in the lambda
being the style hook for siunitx.

And I have one more question: The new type for the parser is for siunitx
units.  However, LaTeX-siunitx-regexp says it matches unit, power,
prefix, and qualifier definitions.  Is that all the same, e.g., may I
provide a qualifier where a power was expected?  Or should there be a
individual parser type for each siunitx thingy?

Bye,
Tassilo

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


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

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 14:19:20

Index: style/siunitx.el
===
RCS file: /sources/auctex/auctex/style/siunitx.el,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- style/siunitx.el28 Jan 2013 08:22:10 -  1.3
+++ style/siunitx.el13 Feb 2013 14:19:20 -  1.4
@@ -1,4 +1,4 @@
-;;; siunitx.el --- AUCTeX style for `siunitx.sty' version 2.5o.
+;;; siunitx.el --- AUCTeX style for `siunitx.sty' version 2.5p.
 
 ;; Copyright (C) 2012-2013 Free Software Foundation, Inc.
 
@@ -25,10 +25,71 @@
 
 ;;; Commentary:
 
-;; This file adds support for `siunitx.sty' version 2.5o.
+;; This file adds support for `siunitx.sty' version 2.5p.
 
 ;;; Code:
 
+(TeX-auto-add-type "siunitx-unit" "LaTeX")
+
+;; Self Parsing -- see (info "(auctex)Hacking the Parser").  
`\\(?:\\[.*\\]\\)?'
+;; matches possible options (actually used only by `DeclareSIUnit' macro),
+;; wrapped in `[...]'.
+(defvar LaTeX-siunitx-regexp
+  (concat "Declare"
+ 
"\\(?: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
+  "Temporary for parsing siunitx macro definitions.")
+
+(defun LaTeX-siunitx-prepare ()
+  "Clear `LaTex-auto-siunitx-unit' before use."
+  (setq LaTeX-auto-siunitx-unit nil))
+
+(defun LaTeX-siunitx-cleanup ()
+  "Move symbols from `LaTeX-auto-siunitx-unit' to `LaTeX-siunitx-unit-list'."
+  (mapcar (lambda (symbol)
+   (add-to-list 'LaTeX-siunitx-unit-list (list symbol)))
+ LaTeX-auto-siunitx-unit))
+
+;; FIXME: This does not seem to work unless one does a manual reparse.
+(add-hook 'TeX-auto-prepare-hook 'LaTeX-siunitx-prepare)
+(add-hook 'TeX-auto-cleanup-hook 'LaTeX-siunitx-cleanup)
+
+(defun TeX-arg-siunitx-unit (optional &optional prompt initial-input 
definition)
+  "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 the chosen unit to the list of defined units."
+  ;; Remove  key bindings in minibuffer and set completion
+  ;; separator to .
+  (let ((space-completion (lookup-key minibuffer-local-completion-map " "))
+   (space-must-match (lookup-key minibuffer-local-must-match-map " "))
+   (crm-separator " "))
+(define-key minibuffer-local-completion-map " " nil)
+(define-key minibuffer-local-must-match-map " " nil)
+(let ((unit (mapconcat 'identity
+  (completing-read-multiple
+   (TeX-argument-prompt optional prompt "Unit")
+   (LaTeX-siunitx-unit-list) nil nil initial-input)
+  crm-separator)))
+  (if (and definition (not (string-equal "" unit)))
+ (LaTeX-add-siunitx-units unit))
+  (TeX-argument-insert unit optional))
+  ;; Restore  key bindings in minibuffer.
+  (define-key minibuffer-local-completion-map " " space-completion)
+  (define-key minibuffer-local-must-match-map " " space-must-match)))
+
+(defun TeX-arg-define-siunitx-unit (optional &optional prompt)
+  "Prompt for a LaTeX siunitx unit, prefix, power, and qualifier.
+If OPTIONAL is non-nil, insert the resulting value as an optional
+argument, otherwise as a mandatory one.  Use PROMPT as the prompt
+string."
+  (TeX-arg-siunitx-unit optional prompt "\\" t))
+
 (defvar LaTeX-siunitx-package-options
   '(;; Detecting fonts
 ("detect-all")
@@ -202,6 +263,7 @@
 (TeX-add-style-hook
  "siunitx"
  (lambda ()
+   (TeX-auto-add-regexp `(,LaTeX-siunitx-regexp 1 LaTeX-auto-siunitx-unit))
(TeX-add-symbols
 ;; Numbers
 '("ang" [ (TeX-arg-key-val LaTeX-siunitx-package-options) ] "Angle")
@@ -209,293 +271,303 @@
 '("numlist" [ (TeX-arg-key-val LaTeX-siunitx-package-options) ] "Numbers")
 '("numrange" [ (TeX-arg-key-val LaTeX-siunitx-package-options) ] "Number 
1" "Number 2")
 ;; Units
-'("si" [ (TeX-arg-key-val LaTeX-siunitx-package-options) ] "Unit")
-'("SI" [ (TeX-arg-key-val LaTeX-siunitx-package-options) ] "Value" [ 
"Pre-unit"] "Unit")
-'("SIlist" [ (TeX-arg-key-val LaTeX-siunitx-package-options) ] "Values" 
"Unit")
-'("SIrange" [ (TeX-arg-key-val LaTeX-siunitx-package-options) ] "Value 1" 
"Value 2" "Unit")
+'("si" [ (TeX-arg-key-val LaTeX-siunitx-package-options) ] 
TeX-arg-siunitx-unit)
+'("SI" [ (TeX-arg-key-val LaTeX-siunitx-package-options) ] "Value" [ 
"Pre-unit"] TeX-arg-siunitx-unit)
+'("SIlist" [ (TeX-arg-key-val LaTeX-siunitx-package-options) ] "Values" 
TeX-arg-siunitx-unit)
+

[AUCTeX-diffs] Changes to auctex/ChangeLog,v

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 14:19:20

Index: ChangeLog
===
RCS file: /sources/auctex/auctex/ChangeLog,v
retrieving revision 5.1835
retrieving revision 5.1836
diff -u -b -r5.1835 -r5.1836
--- ChangeLog   12 Feb 2013 07:54:39 -  5.1835
+++ ChangeLog   13 Feb 2013 14:19:19 -  5.1836
@@ -1,3 +1,21 @@
+2013-02-10  Mosè Giordano  
+
+* style/siunitx.el ("siunitx-unit"): New type for the parser.
+(LaTeX-siunitx-regexp): New variable.
+(LaTeX-auto-siunitx-unit): New variable.
+(LaTeX-siunitx-prepare): New function.
+(LaTeX-siunitx-cleanup): New function.
+(TeX-auto-prepare-hook): Add `LaTeX-siunitx-prepare' function.
+(TeX-auto-cleanup-hook): Add `LaTeX-siunitx-cleanup' function.
+(TeX-arg-siunitx-unit): New function.
+(TeX-arg-define-siunitx-unit): New function.
+("siunitx"): Add `LaTeX-siunitx-regexp' to list of regexps used
+   for parsing.
+("siunitx"): Use `TeX-arg-siunitx-unit' and
+   `TeX-arg-define-siunitx-unit' functions.
+("siunitx"): Use `LaTeX-add-siunitx-units' for adding siunitx unit
+   macros to the list of known units.
+
 2013-02-08  Mosè Giordano  
 
* style/biblatex.el: Update copyright range.

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


[AUCTeX-commit] auctex ChangeLog style/siunitx.el

2013-02-13 Thread Tassilo Horn
CVSROOT:/sources/auctex
Module name:auctex
Changes by: Tassilo Horn  13/02/13 14:19:20

Modified files:
.  : ChangeLog 
style  : siunitx.el 

Log message:
* style/siunitx.el ("siunitx-unit"): New type for the parser.
(LaTeX-siunitx-regexp): New variable.
(LaTeX-auto-siunitx-unit): New variable.
(LaTeX-siunitx-prepare): New function.
(LaTeX-siunitx-cleanup): New function.
(TeX-auto-prepare-hook): Add `LaTeX-siunitx-prepare' function.
(TeX-auto-cleanup-hook): Add `LaTeX-siunitx-cleanup' function.
(TeX-arg-siunitx-unit): New function.
(TeX-arg-define-siunitx-unit): New function.
("siunitx"): Add `LaTeX-siunitx-regexp' to list of regexps used
for parsing.
("siunitx"): Use `TeX-arg-siunitx-unit' and
`TeX-arg-define-siunitx-unit' functions.
("siunitx"): Use `LaTeX-add-siunitx-units' for adding siunitx unit
macros to the list of known units.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/auctex/ChangeLog?cvsroot=auctex&r1=5.1835&r2=5.1836
http://cvs.savannah.gnu.org/viewcvs/auctex/style/siunitx.el?cvsroot=auctex&r1=1.3&r2=1.4

___
auctex-commit mailing list
auctex-com...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-commit


[AUCTeX-devel] Insert two dollars when typing one

2013-02-13 Thread Mosè Giordano
Hi all,

I'd like to be able to insert two dollar signs and put the point
between them when I type `$' outside math mode.  It seems I'm not the
only having this wish, see for example
http://stackoverflow.com/q/10367524
http://tex.stackexchange.com/q/75697
http://tex.stackexchange.com/a/24789
http://www.rouquier.org/jb/programmation/.emacs
Many people use code that don't know anything about TeX syntax and
usually don't check if point is inside or outside math mode.  I'm
sending a patch to do this in AUCTeX, of course I'm not changing the
default behaviour of `TeX-insert-dollar'.  If `blink-matching-paren'
is non-nil, the opening dollar blinks for a second, like when closing
`$...$' or `$$...$$'.

2013-02-13  Mosè Giordano  

* tex.el (TeX-math-close-single-dollar): New variable.
(TeX-insert-dollar): Use it.


Bye,
Mosè Giordano


tex.el.patch
Description: Binary data
___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


Re: [AUCTeX-devel] Add `unit' type for the parser in siunitx.el

2013-02-13 Thread Mosè Giordano
Hi Tassilo,

2013/2/12 Tassilo Horn :
> That doesn't sound like the right solution.  Too much fuzz for such an
> uncommon use-case, IMHO.
>
> Maybe the style hooks should be run inside a `condition-case', and in
> case of an error we simply run `TeX-normal-mode'?
Yes, I know it's not a common case, indeed I didn't notice this in my
first tests.  But when it comes it can be annoying for a user that
don't know what's happened since buffer is not even switched to the
LaTeX source.

The idea of using `TeX-auto-store-pre-string' came to me when thinking
about a way to store in parsed file the options given to packages at
load time.  Do you have alternative suggestions for this?

If they are OK, can my changes without `TeX-auto-store-pre-string' be
committed?  I'm sending the last patch for `siunitx.el' without those
lines.

2013-02-10  Mosè Giordano  

* style/siunitx.el ("siunitx-unit"): New type for the parser.
(LaTeX-siunitx-regexp): New variable.
(LaTeX-auto-siunitx-unit): New variable.
(LaTeX-siunitx-prepare): New function.
(LaTeX-siunitx-cleanup): New function.
(TeX-auto-prepare-hook): Add `LaTeX-siunitx-prepare' function.
(TeX-auto-cleanup-hook): Add `LaTeX-siunitx-cleanup' function.
(TeX-arg-siunitx-unit): New function.
(TeX-arg-define-siunitx-unit): New function.
("siunitx"): Add `LaTeX-siunitx-regexp' to list of regexps used for
parsing.
("siunitx"): Use `TeX-arg-siunitx-unit' and
`TeX-arg-define-siunitx-unit' functions.
("siunitx"): Use `LaTeX-add-siunitx-units' for adding siunitx unit
macros to the list of known units.


Bye,
Mosè Giordano


siunitx.el.patch
Description: Binary data
___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel