summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-02-14 20:53:29 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2011-02-14 20:53:29 -0800
commitbb55f713d2e4ea089a861a257d7d000432642ce9 (patch)
tree92cf79666025c70a6541e87cb47ab8299c5f92af
parent8017fd6b81ed07c1ff3adf7494c867f9a2b034a9 (diff)
downloademacs-bb55f713d2e4ea089a861a257d7d000432642ce9.tar.gz
Merge from gnulib.
-rw-r--r--ChangeLog16
-rw-r--r--doc/misc/ChangeLog5
-rw-r--r--doc/misc/texinfo.tex280
-rw-r--r--lib/gettext.h6
-rw-r--r--lib/ignore-value.h8
5 files changed, 191 insertions, 124 deletions
diff --git a/ChangeLog b/ChangeLog
index 9dcdff187a5..e5b3b2e8b08 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2011-02-15 Paul Eggert <eggert@cs.ucla.edu>
+
+ Merge from gnulib.
+
+ 2011-02-13 Bruno Haible <bruno@clisp.org>
+
+ Consistent macro naming for macros that use GCC __attribute__.
+ * lib/ignore-value.h (_GL_ATTRIBUTE_DEPRECATED): Renamed from
+ ATTRIBUTE_DEPRECATED.
+
+ 2011-02-12 Bruno Haible <bruno@clisp.org>
+
+ setlocale: Prefer gnulib's override over libintl's override.
+ * lib/gettext.h (setlocale): Redefine to rpl_setlocale if
+ GNULIB_defined_setlocale is set.
+
2011-02-13 Glenn Morris <rgm@gnu.org>
* make-dist: Exclude generated file src/globals.h.
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 684fe9c468f..20463724c79 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-15 Paul Eggert <eggert@cs.ucla.edu>
+
+ Merge from gnulib.
+ * texinfo.tex: Update to version 2011-02-14.11.
+
2011-02-13 Michael Albinus <michael.albinus@gmx.de>
* tramp.texi (History): Remove IMAP support.
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index 1fe8a1872f6..4467c1e860f 100644
--- a/doc/misc/texinfo.tex
+++ b/doc/misc/texinfo.tex
@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2011-02-07.16}
+\def\texinfoversion{2011-02-14.11}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -158,6 +158,7 @@
\def\spaceisspace{\catcode`\ =\spacecat}
% sometimes characters are active, so we need control sequences.
+\chardef\ampChar = `\&
\chardef\colonChar = `\:
\chardef\commaChar = `\,
\chardef\dashChar = `\-
@@ -547,7 +548,7 @@
}
\def\inenvironment#1{%
\ifx#1\empty
- out of any environment%
+ outside of any environment%
\else
in environment \expandafter\string#1%
\fi
@@ -2491,22 +2492,8 @@ end
\codex
}
}
-% Handle @url similarly to \code, but allows line breaks after .#?/ (only).
-{
- \catcode`\.=\active \catcode`\#=\active
- \catcode`\?=\active \catcode`\/=\active
- %
- \global\def\urefcode{\begingroup
- \setupmarkupstyle{code}%
- \catcode\dotChar=\active \catcode\hashChar=\active
- \catcode\questChar=\active \catcode\slashChar=\active
- \let.\urefcodedot
- \let#\urefcodehash
- \let?\urefcodequestion
- \let/\urefcodeslash
- \codex
- }
-}
+
+\def\codex #1{\tclose{#1}\endgroup}
\def\realdash{-}
\def\codedash{-\discretionary{}{}{}}
@@ -2521,25 +2508,6 @@ end
\discretionary{}{}{}}%
{\_}%
}
-% we put a little stretch before and after the breakable chars, to help
-% line breaking of long url's. The unequal skips make look better in
-% cmtt at least, especially for dots.
-\def\urefprestretch{\nobreak \hskip0pt plus.13em }
-\def\urefpoststretch{\allowbreak \hskip0pt plus.1em }
-\def\urefcodedot{\urefprestretch .\urefpoststretch}
-\def\urefcodehash{\urefprestretch \#\urefpoststretch}
-\def\urefcodequestion{\urefprestretch ?\urefpoststretch}
-\def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
-{
- \catcode`\/=\active
- \global\def\urefcodeslashfinish{%
- \urefprestretch \slashChar
- % Allow line break only after the final / in a sequence of
- % slashes, to avoid line break between the slashes in http://.
- \ifx\next/\else \urefpoststretch \fi
- }
-}
-\def\codex #1{\tclose{#1}\endgroup}
% An additional complication: the above will allow breaks after, e.g.,
% each of the four underscores in __typeof__. This is undesirable in
@@ -2563,59 +2531,14 @@ end
\fi\fi
}
-% @kbd is like @code, except that if the argument is just one @key command,
-% then @kbd has no effect.
-\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
-
-% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
-% `example' (@kbd uses ttsl only inside of @example and friends),
-% or `code' (@kbd uses normal tty font always).
-\parseargdef\kbdinputstyle{%
- \def\txiarg{#1}%
- \ifx\txiarg\worddistinct
- \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
- \else\ifx\txiarg\wordexample
- \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
- \else\ifx\txiarg\wordcode
- \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
- \else
- \errhelp = \EMsimple
- \errmessage{Unknown @kbdinputstyle option `\txiarg'}%
- \fi\fi\fi
-}
-\def\worddistinct{distinct}
-\def\wordexample{example}
-\def\wordcode{code}
-
-% Default is `distinct'.
-\kbdinputstyle distinct
-
-\def\xkey{\key}
-\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
-\ifx\one\xkey\ifx\threex\three \key{#2}%
-\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
-\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
-
-% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
-\let\indicateurl=\code
-\let\env=\code
-\let\command=\code
-
-% @clicksequence{File @click{} Open ...}
-\def\clicksequence#1{\begingroup #1\endgroup}
-
-% @clickstyle @arrow (by default)
-\parseargdef\clickstyle{\def\click{#1}}
-\def\click{\arrow}
-
% @uref (abbreviation for `urlref') takes an optional (comma-separated)
% second argument specifying the text to display and an optional third
% arg as text to display instead of (rather than in addition to) the url
-% itself. First (mandatory) arg is the url. Perhaps eventually put in
-% a hypertex \special here.
-%
-\def\uref#1{\douref #1,,,\finish}
-\def\douref#1,#2,#3,#4\finish{\begingroup
+% itself. First (mandatory) arg is the url.
+% (This \urefnobreak definition isn't used now, leaving it for a while
+% for comparison.)
+\def\urefnobreak#1{\dourefnobreak #1,,,\finish}
+\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup
\unsepspaces
\pdfurl{#1}%
\setbox0 = \hbox{\ignorespaces #3}%
@@ -2636,7 +2559,11 @@ end
\endlink
\endgroup}
-\def\nouref#1,#2,#3,#4\finish{\begingroup % doesn't work in @example
+% This \urefbreak definition is the active one.
+\def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
+\let\uref=\urefbreak
+\def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
+\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
\unsepspaces
\pdfurl{#1}%
\setbox0 = \hbox{\ignorespaces #3}%
@@ -2648,18 +2575,87 @@ end
\ifpdf
\unhbox0 % PDF: 2nd arg given, show only it
\else
- % \empty at the end of \scantokens arg gets rid of
- % trailing newline (and ultimate spurious whitespace).
- \unhbox0\ (\urefcode{\scantokens{#1\empty}})% DVI: 2nd arg given,
- % show both it and url
+ \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url
\fi
\else
- \urefcode{\scantokens{#1\empty}}% only url given, so show it
+ \urefcode{#1}% only url given, so show it
\fi
\fi
\endlink
\endgroup}
+% Allow line breaks around only a few characters (only).
+\def\urefcatcodes{%
+ \catcode\ampChar=\active \catcode\dotChar=\active
+ \catcode\hashChar=\active \catcode\questChar=\active
+ \catcode\slashChar=\active
+}
+{
+ \urefcatcodes
+ %
+ \global\def\urefcode{\begingroup
+ \setupmarkupstyle{code}%
+ \urefcatcodes
+ \let&\urefcodeamp
+ \let.\urefcodedot
+ \let#\urefcodehash
+ \let?\urefcodequest
+ \let/\urefcodeslash
+ \codex
+ }
+ %
+ % By default, they are just regular characters.
+ \global\def&{\normalamp}
+ \global\def.{\normaldot}
+ \global\def#{\normalhash}
+ \global\def?{\normalquest}
+ \global\def/{\normalslash}
+}
+
+% we put a little stretch before and after the breakable chars, to help
+% line breaking of long url's. The unequal skips make look better in
+% cmtt at least, especially for dots.
+\def\urefprestretch{\urefprebreak \hskip0pt plus.13em }
+\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em }
+%
+\def\urefcodeamp{\urefprestretch \&\urefpoststretch}
+\def\urefcodedot{\urefprestretch .\urefpoststretch}
+\def\urefcodehash{\urefprestretch \#\urefpoststretch}
+\def\urefcodequest{\urefprestretch ?\urefpoststretch}
+\def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
+{
+ \catcode`\/=\active
+ \global\def\urefcodeslashfinish{%
+ \urefprestretch \slashChar
+ % Allow line break only after the final / in a sequence of
+ % slashes, to avoid line break between the slashes in http://.
+ \ifx\next/\else \urefpoststretch \fi
+ }
+}
+
+% One more complication: by default we'll break after the special
+% characters, but some people like to break before the special chars, so
+% allow that. Also allow no breaking at all, for manual control.
+%
+\parseargdef\urefbreakstyle{%
+ \def\txiarg{#1}%
+ \ifx\txiarg\wordnone
+ \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak}
+ \else\ifx\txiarg\wordbefore
+ \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak}
+ \else\ifx\txiarg\wordafter
+ \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak}
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @urefbreakstyle setting `\txiarg'}%
+ \fi\fi\fi
+}
+\def\wordafter{after}
+\def\wordbefore{before}
+\def\wordnone{none}
+
+\urefbreakstyle after
+
% @url synonym for @uref, since that's how everyone uses it.
%
\let\url=\uref
@@ -2681,6 +2677,51 @@ end
\let\email=\uref
\fi
+% @kbd is like @code, except that if the argument is just one @key command,
+% then @kbd has no effect.
+\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
+
+% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
+% `example' (@kbd uses ttsl only inside of @example and friends),
+% or `code' (@kbd uses normal tty font always).
+\parseargdef\kbdinputstyle{%
+ \def\txiarg{#1}%
+ \ifx\txiarg\worddistinct
+ \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
+ \else\ifx\txiarg\wordexample
+ \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
+ \else\ifx\txiarg\wordcode
+ \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @kbdinputstyle setting `\txiarg'}%
+ \fi\fi\fi
+}
+\def\worddistinct{distinct}
+\def\wordexample{example}
+\def\wordcode{code}
+
+% Default is `distinct'.
+\kbdinputstyle distinct
+
+\def\xkey{\key}
+\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
+\ifx\one\xkey\ifx\threex\three \key{#2}%
+\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
+
+% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
+\let\indicateurl=\code
+\let\env=\code
+\let\command=\code
+
+% @clicksequence{File @click{} Open ...}
+\def\clicksequence#1{\begingroup #1\endgroup}
+
+% @clickstyle @arrow (by default)
+\parseargdef\clickstyle{\def\click{#1}}
+\def\click{\arrow}
+
% Typeset a dimension, e.g., `in' or `pt'. The only reason for the
% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
%
@@ -5677,6 +5718,8 @@ end
%
\def\sectionheading#1#2#3#4{%
{%
+ \checkenv{}% should not be in an environment.
+ %
% Switch to the right set of fonts.
\csname #2fonts\endcsname \rmisbold
%
@@ -9305,24 +9348,15 @@ directory should work if nowhere else does.}
\catcode`\^^? = 14
% Define macros to output various characters with catcode for normal text.
-\catcode`\"=\other
-\catcode`\~=\other
-\catcode`\^=\other
-\catcode`\_=\other
-\catcode`\|=\other
-\catcode`\<=\other
-\catcode`\>=\other
-\catcode`\+=\other
-\catcode`\$=\other
-\def\normaldoublequote{"}
-\def\normaltilde{~}
-\def\normalcaret{^}
-\def\normalunderscore{_}
-\def\normalverticalbar{|}
-\def\normalless{<}
-\def\normalgreater{>}
-\def\normalplus{+}
-\def\normaldollar{$}%$ font-lock fix
+\catcode`\"=\other \def\normaldoublequote{"}
+\catcode`\$=\other \def\normaldollar{$}%$ font-lock fix
+\catcode`\+=\other \def\normalplus{+}
+\catcode`\<=\other \def\normalless{<}
+\catcode`\>=\other \def\normalgreater{>}
+\catcode`\^=\other \def\normalcaret{^}
+\catcode`\_=\other \def\normalunderscore{_}
+\catcode`\|=\other \def\normalverticalbar{|}
+\catcode`\~=\other \def\normaltilde{~}
% This macro is used to make a character print one way in \tt
% (where it can probably be output as-is), and another way in other fonts,
@@ -9415,16 +9449,16 @@ directory should work if nowhere else does.}
% the literal character `\'.
%
@def@normalturnoffactive{%
- @let\=@normalbackslash
@let"=@normaldoublequote
- @let~=@normaltilde
+ @let$=@normaldollar %$ font-lock fix
+ @let+=@normalplus
+ @let<=@normalless
+ @let>=@normalgreater
+ @let\=@normalbackslash
@let^=@normalcaret
@let_=@normalunderscore
@let|=@normalverticalbar
- @let<=@normalless
- @let>=@normalgreater
- @let+=@normalplus
- @let$=@normaldollar %$ font-lock fix
+ @let~=@normaltilde
@markupsetuplqdefault
@markupsetuprqdefault
@unsepspaces
@@ -9456,10 +9490,16 @@ directory should work if nowhere else does.}
% Say @foo, not \foo, in error messages.
@escapechar = `@@
+% These (along with & and #) are made active for url-breaking, so need
+% active definitions as the normal characters.
+@def@normaldot{.}
+@def@normalquest{?}
+@def@normalslash{/}
+
% These look ok in all fonts, so just make them not special.
-@catcode`@& = @other
-@catcode`@# = @other
-@catcode`@% = @other
+@catcode`@& = @other @def@normalamp{&}
+@catcode`@# = @other @def@normalhash{#}
+@catcode`@% = @other @def@normalpercent{%}
@c Finally, make ` and ' active, so that txicodequoteundirected and
@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we
diff --git a/lib/gettext.h b/lib/gettext.h
index eb74aecb9a8..458e3322177 100644
--- a/lib/gettext.h
+++ b/lib/gettext.h
@@ -93,6 +93,12 @@
#endif
+/* Prefer gnulib's setlocale override over libintl's setlocale override. */
+#ifdef GNULIB_defined_setlocale
+# undef setlocale
+# define setlocale rpl_setlocale
+#endif
+
/* A pseudo function call that serves as a marker for the automated
extraction of messages, but does not call gettext(). The run-time
translation is done at a different place in the code.
diff --git a/lib/ignore-value.h b/lib/ignore-value.h
index 5e683bbb533..f021a1ac8ea 100644
--- a/lib/ignore-value.h
+++ b/lib/ignore-value.h
@@ -35,13 +35,13 @@
#ifndef _GL_IGNORE_VALUE_H
# define _GL_IGNORE_VALUE_H
-# ifndef ATTRIBUTE_DEPRECATED
+# ifndef _GL_ATTRIBUTE_DEPRECATED
/* The __attribute__((__deprecated__)) feature
is available in gcc versions 3.1 and newer. */
# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 1)
-# define ATTRIBUTE_DEPRECATED /* empty */
+# define _GL_ATTRIBUTE_DEPRECATED /* empty */
# else
-# define ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
+# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
# endif
# endif
@@ -56,7 +56,7 @@
/* ignore_value works for scalars, pointers and aggregates;
deprecate ignore_ptr. */
-static inline void ATTRIBUTE_DEPRECATED
+static inline void _GL_ATTRIBUTE_DEPRECATED
ignore_ptr (void *p) { (void) p; } /* deprecated: use ignore_value */
#endif