emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r103059: Merge changes from emacs-23


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103059: Merge changes from emacs-23 branch
Date: Mon, 31 Jan 2011 18:57:36 -0500
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103059 [merge]
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Mon 2011-01-31 18:57:36 -0500
message:
  Merge changes from emacs-23 branch
modified:
  ChangeLog
  configure
  configure.in
  doc/emacs/ChangeLog
  doc/emacs/files.texi
  doc/emacs/search.texi
  doc/lispref/ChangeLog
  doc/lispref/display.texi
  doc/lispref/elisp.texi
  doc/lispref/keymaps.texi
  doc/lispref/vol1.texi
  doc/lispref/vol2.texi
  lisp/ChangeLog
  lisp/emacs-lisp/shadow.el
  lisp/erc/ChangeLog
  lisp/erc/erc-track.el
  lisp/files.el
  lisp/image-dired.el
  lisp/international/quail.el
  lisp/mouse.el
  lisp/msb.el
  lisp/progmodes/cc-cmds.el
  lisp/progmodes/cc-engine.el
  lisp/term/ns-win.el
  src/ChangeLog
  src/image.c
=== modified file 'ChangeLog'
--- a/ChangeLog 2011-01-31 19:36:08 +0000
+++ b/ChangeLog 2011-01-31 23:54:50 +0000
@@ -1,10 +1,15 @@
+2011-01-31  Chong Yidong  <address@hidden>
+
+       * configure.in: Test existence of xaw3d library, not just the
+       header (Bug#7642).
+
 2011-01-31  Eli Zaretskii  <address@hidden>
 
        * lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/strftime.$(O) and
        $(BLD)/time_r.$(O).
        ($(BLD)/dtoastr.$(O)): Depend on $(EMACS_ROOT)/src/s/ms-w32.h and
        $(EMACS_ROOT)/src/m/intel386.h.
-       ($(BLD)/strftime.$(O)): 
+       ($(BLD)/strftime.$(O)):
        ($(BLD)/time_r.$(O)): Define prerequisites.
 
 2011-01-31  Paul Eggert  <address@hidden>

=== modified file 'configure'
--- a/configure 2011-01-31 08:12:52 +0000
+++ b/configure 2011-01-31 23:54:50 +0000
@@ -10595,10 +10595,51 @@
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb 
in -lXaw3d" >&5
+$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
+if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXaw3d  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XawScrollbarSetThumb ();
+int
+main ()
+{
+return XawScrollbarSetThumb ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
+else
+  ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 
$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
+$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
+if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
   emacs_cv_xaw3d=yes
 else
   emacs_cv_xaw3d=no
 fi
+
+else
+  emacs_cv_xaw3d=no
+fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 fi

=== modified file 'configure.in'
--- a/configure.in      2011-01-31 08:12:52 +0000
+++ b/configure.in      2011-01-31 23:54:50 +0000
@@ -2006,7 +2006,8 @@
 #include <X11/Intrinsic.h>
 #include <X11/Xaw3d/Simple.h>],
       [],
-      emacs_cv_xaw3d=yes,
+      [AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb,
+                    emacs_cv_xaw3d=yes, emacs_cv_xaw3d=no)],
       emacs_cv_xaw3d=no)])
   else
     emacs_cv_xaw3d=no

=== modified file 'doc/emacs/ChangeLog'
--- a/doc/emacs/ChangeLog       2011-01-29 14:48:19 +0000
+++ b/doc/emacs/ChangeLog       2011-01-31 23:54:50 +0000
@@ -1,3 +1,11 @@
+2011-01-31  Chong Yidong  <address@hidden>
+
+       * search.texi (Regexps): Copyedits.  Mention character classes
+       (Bug#7809).
+
+       * files.texi (File Aliases): Restore explanatory text from Eli
+       Zaretskii, accidentally removed in 2011-01-08 commit.
+
 2011-01-29  Eli Zaretskii  <address@hidden>
 
        * makefile.w32-in (MAKEINFO): Remove options, leave only program name.

=== modified file 'doc/emacs/files.texi'
--- a/doc/emacs/files.texi      2011-01-25 04:08:28 +0000
+++ b/doc/emacs/files.texi      2011-01-31 23:54:50 +0000
@@ -1183,26 +1183,23 @@
 @cindex directory name abbreviation
 @vindex directory-abbrev-alist
   Sometimes, a directory is ordinarily accessed through a symbolic
-link, and you may want Emacs to preferentially display its ``linked''
-name instead of its truename.  To do this, customize the variable
address@hidden  Each element in this list should have
-the form @code{(@var{from} . @var{to})}, which says to replace
address@hidden with @var{to} when it appears in a directory name.  For
-this feature to work properly, @var{from} and @var{to} should point to
-the same file.  The @var{from} string is actually a regular expression
-(@pxref{Regexps}); it should always start with @samp{\`}, to avoid
-matching to an incorrect part of the original directory name.  The
address@hidden string should be an ordinary absolute directory name.  Do not
-use @samp{~} to stand for a home directory in the @var{to} string;
-Emacs performs these substitutions separately.
-
-  Here's an example, from a system on which file system
address@hidden/home/fsf} and so on are normally accessed through symbolic
-links named @file{/fsf} and so on.
+link, and you may want Emacs to preferentially show its ``linked''
+name.  To do this, customize @code{directory-abbrev-alist}.  Each
+element in this list should have the form @code{(@var{from}
+. @var{to})}, which means to replace @var{from} with @var{to} whenever
address@hidden appears in a directory name.  The @var{from} string is a
+regular expression (@pxref{Regexps}).  It is matched against directory
+names anchored at the first character, and should start with @samp{\`}
+(to support directory names with embedded newlines, which would defeat
address@hidden).  The @var{to} string should be an ordinary absolute
+directory name pointing to the same directory.  Do not use @samp{~} to
+stand for a home directory in the @var{to} string; Emacs performs
+these substitutions separately.  Here's an example, from a system on
+which @file{/home/fsf} is normally accessed through a symbolic link
+named @file{/fsf}:
 
 @example
-(("\\`/home/fsf" . "/fsf")
- ("\\`/home/gd" . "/gd"))
+(("\\`/home/fsf" . "/fsf"))
 @end example
 
 @node Directories

=== modified file 'doc/emacs/search.texi'
--- a/doc/emacs/search.texi     2011-01-25 04:08:28 +0000
+++ b/doc/emacs/search.texi     2011-01-31 23:54:50 +0000
@@ -545,21 +545,20 @@
 @cindex syntax of regexps
 
   This manual describes regular expression features that users
-typically want to use.  There are additional features that are
-mainly used in Lisp programs; see @ref{Regular Expressions,,,
-elisp, The Emacs Lisp Reference Manual}.
+typically use.  @xref{Regular Expressions,,, elisp, The Emacs Lisp
+Reference Manual}, for additional features used mainly in Lisp
+programs.
 
   Regular expressions have a syntax in which a few characters are
 special constructs and the rest are @dfn{ordinary}.  An ordinary
-character is a simple regular expression which matches that same
-character and nothing else.  The special characters are @samp{$},
address@hidden, @samp{.}, @samp{*}, @samp{+}, @samp{?}, @samp{[}, and
address@hidden  The character @samp{]} is special if it ends a character
-alternative (see later).  The character @samp{-} is special inside a
-character alternative.  Any other character appearing in a regular
-expression is ordinary, unless a @samp{\} precedes it.  (When you use
-regular expressions in a Lisp program, each @samp{\} must be doubled,
-see the example near the end of this section.)
+character matches that same character and nothing else.  The special
+characters are @samp{$^.*+?[\}.  The character @samp{]} is special if
+it ends a character alternative (see later).  The character @samp{-}
+is special inside a character alternative.  Any other character
+appearing in a regular expression is ordinary, unless a @samp{\}
+precedes it.  (When you use regular expressions in a Lisp program,
+each @samp{\} must be doubled, see the example near the end of this
+section.)
 
   For example, @samp{f} is not a special character, so it is ordinary, and
 therefore @samp{f} is a regular expression that matches the string
@@ -569,28 +568,27 @@
 also match @samp{F} and @samp{O}, but we consider this a generalization
 of ``the same string,'' rather than an exception.)
 
-  Any two regular expressions @var{a} and @var{b} can be concatenated.  The
-result is a regular expression which matches a string if @var{a} matches
-some amount of the beginning of that string and @var{b} matches the rest of
-the address@hidden
-
-  As a simple example, we can concatenate the regular expressions @samp{f}
-and @samp{o} to get the regular expression @samp{fo}, which matches only
-the string @samp{fo}.  Still trivial.  To do something nontrivial, you
-need to use one of the special characters.  Here is a list of them.
+  Any two regular expressions @var{a} and @var{b} can be concatenated.
+The result is a regular expression which matches a string if @var{a}
+matches some amount of the beginning of that string and @var{b}
+matches the rest of the string.  For example, concatenating the
+regular expressions @samp{f} and @samp{o} gives the regular expression
address@hidden, which matches only the string @samp{fo}.  Still trivial.
+To do something nontrivial, you need to use one of the special
+characters.  Here is a list of them.
 
 @table @asis
 @item @kbd{.}@: @r{(Period)}
-is a special character that matches any single character except a newline.
-Using concatenation, we can make regular expressions like @samp{a.b}, which
-matches any three-character string that begins with @samp{a} and ends with
address@hidden@refill
+is a special character that matches any single character except a
+newline.  For example, the regular expressions @samp{a.b} matches any
+three-character string that begins with @samp{a} and ends with
address@hidden
 
 @item @kbd{*}
 is not a construct by itself; it is a postfix operator that means to
-match the preceding regular expression repetitively as many times as
-possible.  Thus, @samp{o*} matches any number of @samp{o}s (including no
address@hidden).
+match the preceding regular expression repetitively any number of
+times, as many times as possible.  Thus, @samp{o*} matches any number
+of @samp{o}s, including no @samp{o}s.
 
 @samp{*} always applies to the @emph{smallest} possible preceding
 expression.  Thus, @samp{fo*} has a repeating @samp{o}, not a repeating
@@ -609,22 +607,21 @@
 
 @item @kbd{+}
 is a postfix operator, similar to @samp{*} except that it must match
-the preceding expression at least once.  So, for example, @samp{ca+r}
-matches the strings @samp{car} and @samp{caaaar} but not the string
address@hidden, whereas @samp{ca*r} matches all three strings.
+the preceding expression at least once.  Thus, @samp{ca+r} matches the
+strings @samp{car} and @samp{caaaar} but not the string @samp{cr},
+whereas @samp{ca*r} matches all three strings.
 
 @item @kbd{?}
-is a postfix operator, similar to @samp{*} except that it can match the
-preceding expression either once or not at all.  For example,
address@hidden matches @samp{car} or @samp{cr}; nothing else.
+is a postfix operator, similar to @samp{*} except that it can match
+the preceding expression either once or not at all.  Thus, @samp{ca?r}
+matches @samp{car} or @samp{cr}, and nothing else.
 
 @item @kbd{*?}, @kbd{+?}, @kbd{??}
 @cindex non-greedy regexp matching
-are non-greedy variants of the operators above.  The normal operators
address@hidden, @samp{+}, @samp{?} are @dfn{greedy} in that they match as
-much as they can, as long as the overall regexp can still match.  With
-a following @samp{?}, they are non-greedy: they will match as little
-as possible.
+are address@hidden variants of the operators above.  The normal
+operators @samp{*}, @samp{+}, @samp{?} match as much as they can, as
+long as the overall regexp can still match.  With a following
address@hidden, they will match as little as possible.
 
 Thus, both @samp{ab*} and @samp{ab*?} can match the string @samp{a}
 and the string @samp{abbbb}; but if you try to match them both against
@@ -640,29 +637,30 @@
 starting at the first @samp{a}, it does.
 
 @item @address@hidden@address@hidden
-is a postfix operator that specifies repetition @var{n} times---that
-is, the preceding regular expression must match exactly @var{n} times
-in a row.  For example, @address@hidden@}} matches the string @samp{xxxx}
-and nothing else.
+is a postfix operator specifying @var{n} repetitions---that is, the
+preceding regular expression must match exactly @var{n} times in a
+row.  For example, @address@hidden@}} matches the string @samp{xxxx} and
+nothing else.
 
 @item @address@hidden@var{n},@address@hidden
-is a postfix operator that specifies repetition between @var{n} and
address@hidden times---that is, the preceding regular expression must match
-at least @var{n} times, but no more than @var{m} times.  If @var{m} is
+is a postfix operator specifying between @var{n} and @var{m}
+repetitions---that is, the preceding regular expression must match at
+least @var{n} times, but no more than @var{m} times.  If @var{m} is
 omitted, then there is no upper limit, but the preceding regular
 expression must match at least @var{n} address@hidden 
@address@hidden,address@hidden is
 equivalent to @samp{?}. @* @address@hidden,address@hidden is equivalent to
 @samp{*}. @* @address@hidden,address@hidden is equivalent to @samp{+}.
 
 @item @kbd{[ @dots{} ]}
-is a @dfn{character set}, which begins with @samp{[} and is terminated
-by @samp{]}.  In the simplest case, the characters between the two
-brackets are what this set can match.
+is a @dfn{character set}, beginning with @samp{[} and terminated by
address@hidden
 
-Thus, @samp{[ad]} matches either one @samp{a} or one @samp{d}, and
address@hidden matches any string composed of just @samp{a}s and @samp{d}s
-(including the empty string), from which it follows that @samp{c[ad]*r}
-matches @samp{cr}, @samp{car}, @samp{cdr}, @samp{caddaar}, etc.
+In the simplest case, the characters between the two brackets are what
+this set can match.  Thus, @samp{[ad]} matches either one @samp{a} or
+one @samp{d}, and @samp{[ad]*} matches any string composed of just
address@hidden and @samp{d}s (including the empty string).  It follows that
address@hidden matches @samp{cr}, @samp{car}, @samp{cdr},
address@hidden, etc.
 
 You can also include character ranges in a character set, by writing the
 starting and ending characters with a @samp{-} between them.  Thus,
@@ -671,9 +669,12 @@
 which matches any lower-case @acronym{ASCII} letter or @samp{$}, @samp{%} or
 period.
 
-Note that the usual regexp special characters are not special inside a
-character set.  A completely different set of special characters exists
-inside character sets: @samp{]}, @samp{-} and @samp{^}.
+You can also include certain special @dfn{character classes} in a
+character set.  A @samp{[:} and balancing @samp{:]} enclose a
+character class inside a character alternative.  For instance,
address@hidden:alnum:]]} matches any letter or digit.  @xref{Char Classes,,,
+elisp, The Emacs Lisp Reference Manual}, for a list of character
+classes.
 
 To include a @samp{]} in a character set, you must make it the first
 character.  For example, @samp{[]a]} matches @samp{]} or @samp{a}.  To

=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2011-01-29 14:48:19 +0000
+++ b/doc/lispref/ChangeLog     2011-01-31 23:54:50 +0000
@@ -1,3 +1,14 @@
+2011-01-28  Chong Yidong  <address@hidden>
+
+       * vol1.texi (Top):
+       * vol2.texi (Top):
+       * elisp.texi (Top):
+       * display.texi (Display Property): Shorten the menu description of
+       the "Other Display Specs" node (Bug#7816).
+
+       * keymaps.texi (Defining Menus): Add "menu item" and "extended
+       menu item" concept index entries (Bug#7805).
+
 2011-01-29  Eli Zaretskii  <address@hidden>
 
        * makefile.w32-in (texinfodir): New variable.

=== modified file 'doc/lispref/display.texi'
--- a/doc/lispref/display.texi  2011-01-25 04:08:28 +0000
+++ b/doc/lispref/display.texi  2011-01-31 23:54:50 +0000
@@ -3657,9 +3657,8 @@
 * Replacing Specs::      Display specs that replace the text.
 * Specified Space::      Displaying one space with a specified width.
 * Pixel Specification::  Specifying space width or height in pixels.
-* Other Display Specs::  Displaying an image; magnifying text; moving it
-                          up or down on the page; adjusting the width
-                          of spaces within text.
+* Other Display Specs::     Displaying an image; adjusting the height,
+                              spacing, and other properties of text.
 * Display Margins::     Displaying text or images to the side of the main text.
 @end menu
 

=== modified file 'doc/lispref/elisp.texi'
--- a/doc/lispref/elisp.texi    2011-01-25 04:08:28 +0000
+++ b/doc/lispref/elisp.texi    2011-01-31 23:54:50 +0000
@@ -1330,9 +1330,8 @@
 * Replacing Specs::         Display specs that replace the text.
 * Specified Space::         Displaying one space with a specified width.
 * Pixel Specification::     Specifying space width or height in pixels.
-* Other Display Specs::     Displaying an image; magnifying text; moving it
-                              up or down on the page; adjusting the width
-                              of spaces within text.
+* Other Display Specs::     Displaying an image; adjusting the height,
+                              spacing, and other properties of text.
 * Display Margins::         Displaying text or images to the side of
                               the main text.
 

=== modified file 'doc/lispref/keymaps.texi'
--- a/doc/lispref/keymaps.texi  2011-01-25 04:08:28 +0000
+++ b/doc/lispref/keymaps.texi  2011-01-31 23:54:50 +0000
@@ -1972,6 +1972,7 @@
 @cindex defining menus
 @cindex menu prompt string
 @cindex prompt string (of menu)
address@hidden menu item
 
 A keymap acts as a menu if it has an @dfn{overall prompt string},
 which is a string that appears as an element of the keymap.
@@ -2073,6 +2074,7 @@
 @node Extended Menu Items
 @subsubsection Extended Menu Items
 @kindex menu-item
address@hidden extended menu item
 
   An extended-format menu item is a more flexible and also cleaner
 alternative to the simple format.  You define an event type with a

=== modified file 'doc/lispref/vol1.texi'
--- a/doc/lispref/vol1.texi     2011-01-25 04:08:28 +0000
+++ b/doc/lispref/vol1.texi     2011-01-31 23:54:50 +0000
@@ -1351,9 +1351,8 @@
 * Replacing Specs::         Display specs that replace the text.
 * Specified Space::         Displaying one space with a specified width.
 * Pixel Specification::     Specifying space width or height in pixels.
-* Other Display Specs::     Displaying an image; magnifying text; moving it
-                              up or down on the page; adjusting the width
-                              of spaces within text.
+* Other Display Specs::     Displaying an image; adjusting the height,
+                              spacing, and other properties of text.
 * Display Margins::         Displaying text or images to the side of
                               the main text.
 

=== modified file 'doc/lispref/vol2.texi'
--- a/doc/lispref/vol2.texi     2011-01-25 04:08:28 +0000
+++ b/doc/lispref/vol2.texi     2011-01-31 23:54:50 +0000
@@ -1350,9 +1350,8 @@
 * Replacing Specs::         Display specs that replace the text.
 * Specified Space::         Displaying one space with a specified width.
 * Pixel Specification::     Specifying space width or height in pixels.
-* Other Display Specs::     Displaying an image; magnifying text; moving it
-                              up or down on the page; adjusting the width
-                              of spaces within text.
+* Other Display Specs::     Displaying an image; adjusting the height,
+                              spacing, and other properties of text.
 * Display Margins::         Displaying text or images to the side of
                               the main text.
 

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-01-31 20:44:45 +0000
+++ b/lisp/ChangeLog    2011-01-31 23:54:50 +0000
@@ -1,3 +1,51 @@
+2011-01-31  Alan Mackenzie  <address@hidden>
+
+       * progmodes/cc-cmds.el (c-forward-over-illiterals): Continue
+       parsing if we encounter a naked # (Bug#7595).
+       (c-beginning-of-statement): Avoid loop in locating the beginning
+       of a macro.
+
+2011-01-31  Chong Yidong  <address@hidden>
+
+       * files.el (copy-directory): Fix arguments to recursive call.
+
+2011-01-31  Chong Yidong  <address@hidden>
+
+       * files.el (copy-directory): If destination is an existing
+       directory, copy into a subdirectory there.
+
+2011-01-31  Andreas Schwab  <address@hidden>
+
+       * emacs-lisp/shadow.el (load-path-shadows-find): Ignore leim-list
+       files.
+
+2011-01-31  Chong Yidong  <address@hidden>
+
+       * image-dired.el (image-dired-mouse-display-image): No-op if no
+       file is found (Bug#7817).
+
+       * mouse.el (mouse-menu-non-singleton): Doc fix (Bug#7801).
+
+2011-01-31  Kenichi Handa  <address@hidden>
+
+       * international/quail.el (quail-keyboard-layout-alist): Remove
+       superfluous SPC for "pc105-uk" (bug#7927).
+
+2011-01-31  Glenn Morris  <address@hidden>
+
+       * msb.el (msb-menu-bar-update-buffers): Update for changed
+       argument handling of menu-bar-select-frame.  (Bug#7902)
+
+2011-01-31  Chong Yidong  <address@hidden>
+
+       * progmodes/cc-engine.el (c-forward-<>-arglist-recur): Set a limit
+       to the recursion depth (Bug#7722).
+
+2011-01-31  Roy Liu  <address@hidden>  (tiny change)
+
+       * term/ns-win.el (ns-find-file): Expand ns-input-file with
+       command-line-default-directory (Bug#7872).
+
 2011-01-31  Stefan Monnier  <address@hidden>
 
        * progmodes/compile.el (compilation--flush-directory-cache):

=== modified file 'lisp/emacs-lisp/shadow.el'
--- a/lisp/emacs-lisp/shadow.el 2011-01-25 04:08:28 +0000
+++ b/lisp/emacs-lisp/shadow.el 2011-01-31 23:54:50 +0000
@@ -115,7 +115,7 @@
          ;; FILE now contains the current file name, with no suffix.
          (unless (or (member file files-seen-this-dir)
                      ;; Ignore these files.
-                     (member file '("subdirs")))
+                     (member file '("subdirs" "leim-list")))
            ;; File has not been seen yet in this directory.
            ;; This test prevents us declaring that XXX.el shadows
            ;; XXX.elc (or vice-versa) when they are in the same directory.

=== modified file 'lisp/erc/ChangeLog'
--- a/lisp/erc/ChangeLog        2011-01-25 04:08:28 +0000
+++ b/lisp/erc/ChangeLog        2011-01-31 23:54:50 +0000
@@ -1,3 +1,8 @@
+2011-01-31  Antoine Levitt  <address@hidden>  (tiny change)
+
+       * erc-track.el (track): Don't reset erc-modified-channels-object
+       each time erc-track-mode is activated.
+
 2011-01-13  Stefan Monnier  <address@hidden>
 
        * erc.el (erc-mode):

=== modified file 'lisp/erc/erc-track.el'
--- a/lisp/erc/erc-track.el     2011-01-25 04:08:28 +0000
+++ b/lisp/erc/erc-track.el     2011-01-31 23:54:50 +0000
@@ -648,7 +648,6 @@
           (add-hook 'erc-send-completed-hook 'erc-user-is-active)
           (add-hook 'erc-server-001-functions 'erc-user-is-active))
        (erc-track-add-to-mode-line erc-track-position-in-mode-line)
-       (setq erc-modified-channels-object (erc-modified-channels-object nil))
        (erc-update-mode-line)
        (if (featurep 'xemacs)
           (defadvice switch-to-buffer (after erc-update (&rest args) activate)

=== modified file 'lisp/files.el'
--- a/lisp/files.el     2011-01-25 04:08:28 +0000
+++ b/lisp/files.el     2011-01-31 23:54:50 +0000
@@ -4855,22 +4855,35 @@
       ;; Compute target name.
       (setq directory (directory-file-name (expand-file-name directory))
            newname   (directory-file-name (expand-file-name newname)))
-      (if (not (file-directory-p newname)) (make-directory newname parents))
+
+      (if (not (file-directory-p newname))
+         ;; If NEWNAME is not an existing directory, create it; that
+         ;; is where we will copy the files of DIRECTORY.
+         (make-directory newname parents)
+       ;; If NEWNAME is an existing directory, we will copy into
+       ;; NEWNAME/[DIRECTORY-BASENAME].
+       (setq newname (expand-file-name
+                      (file-name-nondirectory
+                       (directory-file-name directory))
+                      newname))
+       (and (file-exists-p newname)
+            (not (file-directory-p newname))
+            (error "Cannot overwrite non-directory %s with a directory"
+                   newname))
+       (make-directory newname t))
 
       ;; Copy recursively.
-      (mapc
-       (lambda (file)
-        (let ((target (expand-file-name
-                       (file-name-nondirectory file) newname))
-              (attrs (file-attributes file)))
-          (cond ((file-directory-p file)
-                 (copy-directory file target keep-time parents))
-                ((stringp (car attrs)) ; Symbolic link
-                 (make-symbolic-link (car attrs) target t))
-                (t
-                 (copy-file file target t keep-time)))))
-       ;; We do not want to copy "." and "..".
-       (directory-files        directory 'full 
directory-files-no-dot-files-regexp))
+      (dolist (file
+              ;; We do not want to copy "." and "..".
+              (directory-files directory 'full
+                               directory-files-no-dot-files-regexp))
+       (if (file-directory-p file)
+           (copy-directory file newname keep-time parents)
+         (let ((target (expand-file-name (file-name-nondirectory file) 
newname))
+               (attrs (file-attributes file)))
+           (if (stringp (car attrs)) ; Symbolic link
+               (make-symbolic-link (car attrs) target t)
+             (copy-file file target t keep-time)))))
 
       ;; Set directory attributes.
       (set-file-modes newname (file-modes directory))

=== modified file 'lisp/image-dired.el'
--- a/lisp/image-dired.el       2011-01-25 04:08:28 +0000
+++ b/lisp/image-dired.el       2011-01-31 23:54:50 +0000
@@ -2194,15 +2194,15 @@
 Track this in associated dired buffer if `image-dired-track-movement' is
 non-nil."
   (interactive "e")
-  (let (file)
-    (mouse-set-point event)
-    (goto-char (posn-point (event-end event)))
-    (setq file (image-dired-original-file-name))
-    (if image-dired-track-movement
-        (image-dired-track-original-file))
-    (image-dired-create-display-image-buffer)
-    (display-buffer image-dired-display-image-buffer)
-    (image-dired-display-image file)))
+  (mouse-set-point event)
+  (goto-char (posn-point (event-end event)))
+  (let ((file (image-dired-original-file-name)))
+    (when file
+      (if image-dired-track-movement
+         (image-dired-track-original-file))
+      (image-dired-create-display-image-buffer)
+      (display-buffer image-dired-display-image-buffer)
+      (image-dired-display-image file))))
 
 (defun image-dired-mouse-select-thumbnail (event)
   "Use mouse EVENT to select thumbnail image.

=== modified file 'lisp/international/quail.el'
--- a/lisp/international/quail.el       2011-01-25 04:08:28 +0000
+++ b/lisp/international/quail.el       2011-01-31 23:54:50 +0000
@@ -662,7 +662,7 @@
                               ")
    '("pc105-uk" . "\
                               \
-`\2541!2\"3\2434$5%6^7&8*9(0)-_=+     \
+`\2541!2\"3\2434$5%6^7&8*9(0)-_=+    \
   qQwWeErRtTyYuUiIoOpP[{]}    \
   aAsSdDfFgGhHjJkKlL;:'@#~    \
 \\|zZxXcCvVbBnNmM,<.>/?        \

=== modified file 'lisp/mouse.el'
--- a/lisp/mouse.el     2011-01-25 04:08:28 +0000
+++ b/lisp/mouse.el     2011-01-31 23:54:50 +0000
@@ -201,9 +201,9 @@
     newmap))
 
 (defun mouse-menu-non-singleton (menubar)
-  "Given menu keymap,
-if it defines exactly one submenu, return just that submenu.
-Otherwise return the whole menu."
+  "Return menu keybar MENUBAR, or a lone submenu inside it.
+If MENUBAR defines exactly one submenu, return just that submenu.
+Otherwise, return MENUBAR."
   (if menubar
       (let (submap)
         (map-keymap

=== modified file 'lisp/msb.el'
--- a/lisp/msb.el       2011-01-27 07:54:04 +0000
+++ b/lisp/msb.el       2011-01-31 23:54:50 +0000
@@ -1114,7 +1114,8 @@
                     (list (frame-parameter frame 'name)
                           (frame-parameter frame 'name)
                           (cons nil nil))
-                    'menu-bar-select-frame))
+                     `(lambda ()
+                        (interactive) (menu-bar-select-frame ,frame))))
                  frames)))))
       (setcdr global-buffers-menu-map
              (if (and buffers-menu frames-menu)

=== modified file 'lisp/progmodes/cc-cmds.el'
--- a/lisp/progmodes/cc-cmds.el 2011-01-26 08:36:39 +0000
+++ b/lisp/progmodes/cc-cmds.el 2011-01-31 23:54:50 +0000
@@ -2440,13 +2440,15 @@
          (goto-char last)
          (throw 'done '(nil . nil)))
 
-        ;; Stop if we encounter a preprocessor line.
-        ((and (not macro-end)
+        ;; Stop if we encounter a preprocessor line.  Continue if we
+        ;; hit a naked #
+        ((and c-opt-cpp-prefix
+              (not macro-end)
               (eq (char-after) ?#)
               (= (point) (c-point 'boi)))
-         (goto-char last)
-         ;(throw 'done (cons (eq (point) here) 'macro-boundary))) ; Changed 
2003/3/26
-         (throw 'done '(t . macro-boundary)))
+         (if (= (point) here)          ; Not a macro, therefore naked #.
+             (forward-char)
+           (throw 'done '(t . macro-boundary))))
 
         ;; Stop after a ';', '}', or "};"
         ((looking-at ";\\|};?")
@@ -2560,14 +2562,21 @@
                                    (c-backward-syntactic-ws))
                                  (or (bobp) 
(c-after-statement-terminator-p)))))))
                ;; Are we about to move backwards into or out of a
-               ;; preprocessor command?  If so, locate it's beginning.
+               ;; preprocessor command?  If so, locate its beginning.
                (when (eq (cdr res) 'macro-boundary)
-                 (save-excursion
-                   (beginning-of-line)
-                   (setq macro-fence
-                         (and (not (bobp))
-                              (progn (c-skip-ws-backward) 
(c-beginning-of-macro))
-                              (point)))))
+                 (setq macro-fence
+                       (save-excursion
+                         (if macro-fence
+                             (progn
+                               (end-of-line)
+                               (and (not (eobp))
+                                    (progn (c-skip-ws-forward)
+                                           (c-beginning-of-macro))
+                                    (progn (c-end-of-macro)
+                                           (point))))
+                           (and (not (eobp))
+                                (c-beginning-of-macro)
+                                (progn (c-end-of-macro) (point)))))))
                ;; Are we about to move backwards into a literal?
                (when (memq (cdr res) '(macro-boundary literal))
                  (setq range (c-ascertain-preceding-literal)))

=== modified file 'lisp/progmodes/cc-engine.el'
--- a/lisp/progmodes/cc-engine.el       2011-01-25 04:08:28 +0000
+++ b/lisp/progmodes/cc-engine.el       2011-01-31 23:54:50 +0000
@@ -5371,6 +5371,8 @@
 ;; cc-mode requires cc-fonts.
 (declare-function c-fontify-recorded-types-and-refs "cc-fonts" ())
 
+(defvar c-forward-<>-arglist-recur-depth)
+
 (defun c-forward-<>-arglist (all-types)
   ;; The point is assumed to be at a "<".  Try to treat it as the open
   ;; paren of an angle bracket arglist and move forward to the
@@ -5396,7 +5398,8 @@
        ;; If `c-record-type-identifiers' is set then activate
        ;; recording of any found types that constitute an argument in
        ;; the arglist.
-       (c-record-found-types (if c-record-type-identifiers t)))
+       (c-record-found-types (if c-record-type-identifiers t))
+       (c-forward-<>-arglist-recur--depth 0))
     (if (catch 'angle-bracket-arglist-escape
          (setq c-record-found-types
                (c-forward-<>-arglist-recur all-types)))
@@ -5413,6 +5416,14 @@
       nil)))
 
 (defun c-forward-<>-arglist-recur (all-types)
+
+  ;; Temporary workaround for Bug#7722.
+  (when (boundp 'c-forward-<>-arglist-recur--depth)
+    (if (> c-forward-<>-arglist-recur--depth 200)
+       (error "Max recursion depth reached in <> arglist")
+      (setq c-forward-<>-arglist-recur--depth
+           (1+ c-forward-<>-arglist-recur--depth))))
+
   ;; Recursive part of `c-forward-<>-arglist'.
   ;;
   ;; This function might do hidden buffer changes.

=== modified file 'lisp/term/ns-win.el'
--- a/lisp/term/ns-win.el       2011-01-26 08:36:39 +0000
+++ b/lisp/term/ns-win.el       2011-01-31 23:54:50 +0000
@@ -487,7 +487,9 @@
 (defun ns-find-file ()
   "Do a `find-file' with the `ns-input-file' as argument."
   (interactive)
-  (let* ((f (file-truename (pop ns-input-file)))
+  (let* ((f (file-truename
+            (expand-file-name (pop ns-input-file)
+                              command-line-default-directory)))
          (file (find-file-noselect f))
          (bufwin1 (get-buffer-window file 'visible))
          (bufwin2 (get-buffer-window "*scratch*" 'visibile)))

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-01-31 20:00:40 +0000
+++ b/src/ChangeLog     2011-01-31 23:54:50 +0000
@@ -1,3 +1,18 @@
+2011-01-31  Andreas Schwab  <address@hidden>
+
+       * image.c (DEF_IMGLIB_FN): Add parameter rettype, use it instead
+       of int.  All uses adjusted.
+       (PNG_JMPBUF, png_load, jpeg_load, tiff_load, gif_load)
+       (svg_load_image): Remove casts.
+
+2011-01-31  Chong Yidong  <address@hidden>
+
+       * image.c (fn_png_longjmp, fn_png_set_longjmp_fn): New png
+       function definitions for compiling with libpng-1.5.
+       (PNG_LONGJMP, PNG_JMPBUF): New macros for libpng-1.5.
+       (my_png_error, png_load): Use them.  Suggested by Thomas Klausner
+       (Bug#7908).
+
 2011-01-31  Eli Zaretskii  <address@hidden>
 
        * s/ms-w32.h (HAVE_STRFTIME): Don't define.

=== modified file 'src/image.c'
--- a/src/image.c       2011-01-30 22:17:44 +0000
+++ b/src/image.c       2011-01-31 23:54:50 +0000
@@ -1896,7 +1896,7 @@
 #ifdef HAVE_NTGUI
 
 /* Macro for defining functions that will be loaded from image DLLs.  */
-#define DEF_IMGLIB_FN(func,args) int (FAR CDECL *fn_##func)args
+#define DEF_IMGLIB_FN(rettype,func,args) rettype (FAR CDECL *fn_##func)args
 
 /* Macro for loading those image functions from the library.  */
 #define LOAD_IMGLIB_FN(lib,func) {                                     \
@@ -3251,12 +3251,12 @@
 
 /* XPM library details.  */
 
-DEF_IMGLIB_FN (XpmFreeAttributes, (XpmAttributes *));
-DEF_IMGLIB_FN (XpmCreateImageFromBuffer, (Display *, char *, xpm_XImage **,
+DEF_IMGLIB_FN (void, XpmFreeAttributes, (XpmAttributes *));
+DEF_IMGLIB_FN (int, XpmCreateImageFromBuffer, (Display *, char *, xpm_XImage 
**,
                                          xpm_XImage **, XpmAttributes *));
-DEF_IMGLIB_FN (XpmReadFileToImage, (Display *, char *, xpm_XImage **,
+DEF_IMGLIB_FN (int, XpmReadFileToImage, (Display *, char *, xpm_XImage **,
                                    xpm_XImage **, XpmAttributes *));
-DEF_IMGLIB_FN (XImageFree, (xpm_XImage *));
+DEF_IMGLIB_FN (void, XImageFree, (xpm_XImage *));
 
 static int
 init_xpm_functions (Lisp_Object libraries)
@@ -5419,31 +5419,36 @@
 #ifdef HAVE_NTGUI
 /* PNG library details.  */
 
-DEF_IMGLIB_FN (png_get_io_ptr, (png_structp));
-DEF_IMGLIB_FN (png_sig_cmp, (png_bytep, png_size_t, png_size_t));
-DEF_IMGLIB_FN (png_create_read_struct, (png_const_charp, png_voidp,
-                                       png_error_ptr, png_error_ptr));
-DEF_IMGLIB_FN (png_create_info_struct, (png_structp));
-DEF_IMGLIB_FN (png_destroy_read_struct, (png_structpp, png_infopp, 
png_infopp));
-DEF_IMGLIB_FN (png_set_read_fn, (png_structp, png_voidp, png_rw_ptr));
-DEF_IMGLIB_FN (png_set_sig_bytes, (png_structp, int));
-DEF_IMGLIB_FN (png_read_info, (png_structp, png_infop));
-DEF_IMGLIB_FN (png_get_IHDR, (png_structp, png_infop,
+DEF_IMGLIB_FN (png_voidp, png_get_io_ptr, (png_structp));
+DEF_IMGLIB_FN (int, png_sig_cmp, (png_bytep, png_size_t, png_size_t));
+DEF_IMGLIB_FN (png_structp, png_create_read_struct, (png_const_charp, 
png_voidp,
+                                                    png_error_ptr, 
png_error_ptr));
+DEF_IMGLIB_FN (png_infop, png_create_info_struct, (png_structp));
+DEF_IMGLIB_FN (void, png_destroy_read_struct, (png_structpp, png_infopp, 
png_infopp));
+DEF_IMGLIB_FN (void, png_set_read_fn, (png_structp, png_voidp, png_rw_ptr));
+DEF_IMGLIB_FN (void, png_set_sig_bytes, (png_structp, int));
+DEF_IMGLIB_FN (void, png_read_info, (png_structp, png_infop));
+DEF_IMGLIB_FN (png_uint_32, png_get_IHDR, (png_structp, png_infop,
                              png_uint_32 *, png_uint_32 *,
                              int *, int *, int *, int *, int *));
-DEF_IMGLIB_FN (png_get_valid, (png_structp, png_infop, png_uint_32));
-DEF_IMGLIB_FN (png_set_strip_16, (png_structp));
-DEF_IMGLIB_FN (png_set_expand, (png_structp));
-DEF_IMGLIB_FN (png_set_gray_to_rgb, (png_structp));
-DEF_IMGLIB_FN (png_set_background, (png_structp, png_color_16p,
+DEF_IMGLIB_FN (png_uint_32, png_get_valid, (png_structp, png_infop, 
png_uint_32));
+DEF_IMGLIB_FN (void, png_set_strip_16, (png_structp));
+DEF_IMGLIB_FN (void, png_set_expand, (png_structp));
+DEF_IMGLIB_FN (void, png_set_gray_to_rgb, (png_structp));
+DEF_IMGLIB_FN (void, png_set_background, (png_structp, png_color_16p,
                                    int, int, double));
-DEF_IMGLIB_FN (png_get_bKGD, (png_structp, png_infop, png_color_16p *));
-DEF_IMGLIB_FN (png_read_update_info, (png_structp, png_infop));
-DEF_IMGLIB_FN (png_get_channels, (png_structp, png_infop));
-DEF_IMGLIB_FN (png_get_rowbytes, (png_structp, png_infop));
-DEF_IMGLIB_FN (png_read_image, (png_structp, png_bytepp));
-DEF_IMGLIB_FN (png_read_end, (png_structp, png_infop));
-DEF_IMGLIB_FN (png_error, (png_structp, png_const_charp));
+DEF_IMGLIB_FN (png_uint_32, png_get_bKGD, (png_structp, png_infop, 
png_color_16p *));
+DEF_IMGLIB_FN (void, png_read_update_info, (png_structp, png_infop));
+DEF_IMGLIB_FN (png_byte, png_get_channels, (png_structp, png_infop));
+DEF_IMGLIB_FN (png_size_t, png_get_rowbytes, (png_structp, png_infop));
+DEF_IMGLIB_FN (void, png_read_image, (png_structp, png_bytepp));
+DEF_IMGLIB_FN (void, png_read_end, (png_structp, png_infop));
+DEF_IMGLIB_FN (void, png_error, (png_structp, png_const_charp));
+
+#if (PNG_LIBPNG_VER >= 10500)
+DEF_IMGLIB_FN (void, png_longjmp, (png_structp, int));
+DEF_IMGLIB_FN (jmp_buf *, png_set_longjmp_fn, (png_structp, png_longjmp_ptr, 
size_t));
+#endif /* libpng version >= 1.5 */
 
 static int
 init_png_functions (Lisp_Object libraries)
@@ -5475,6 +5480,12 @@
   LOAD_IMGLIB_FN (library, png_read_image);
   LOAD_IMGLIB_FN (library, png_read_end);
   LOAD_IMGLIB_FN (library, png_error);
+
+#if (PNG_LIBPNG_VER >= 10500)
+  LOAD_IMGLIB_FN (library, png_longjmp);
+  LOAD_IMGLIB_FN (library, png_set_longjmp_fn);
+#endif /* libpng version >= 1.5 */
+
   return 1;
 }
 #else
@@ -5501,8 +5512,24 @@
 #define fn_png_read_end                        png_read_end
 #define fn_png_error                   png_error
 
+#if (PNG_LIBPNG_VER >= 10500)
+#define fn_png_longjmp                 png_longjmp
+#define fn_png_set_longjmp_fn          png_set_longjmp_fn
+#endif /* libpng version >= 1.5 */
+
 #endif /* HAVE_NTGUI */
 
+
+#if (PNG_LIBPNG_VER < 10500)
+#define PNG_LONGJMP(ptr) (longjmp ((ptr)->jmpbuf, 1))
+#define PNG_JMPBUF(ptr) ((ptr)->jmpbuf)
+#else
+/* In libpng version 1.5, the jmpbuf member is hidden. (Bug#7908)  */
+#define PNG_LONGJMP(ptr) (fn_png_longjmp ((ptr), 1))
+#define PNG_JMPBUF(ptr) \
+  (*fn_png_set_longjmp_fn((ptr), longjmp, sizeof (jmp_buf)))
+#endif
+
 /* Error and warning handlers installed when the PNG library
    is initialized.  */
 
@@ -5513,7 +5540,7 @@
   /* Avoid compiler warning about deprecated direct access to
      png_ptr's fields in libpng versions 1.4.x.  */
   image_error ("PNG error: %s", build_string (msg), Qnil);
-  longjmp (png_ptr->jmpbuf, 1);
+  PNG_LONGJMP (png_ptr);
 }
 
 
@@ -5644,19 +5671,17 @@
       tbr.bytes += sizeof (sig);
     }
 
-  /* Initialize read and info structs for PNG lib.  Casting return
-     value avoids a GCC warning on W32.  */
-  png_ptr = (png_structp)fn_png_create_read_struct (PNG_LIBPNG_VER_STRING,
-                                                   NULL, my_png_error,
-                                                   my_png_warning);
+  /* Initialize read and info structs for PNG lib.  */
+  png_ptr = fn_png_create_read_struct (PNG_LIBPNG_VER_STRING,
+                                      NULL, my_png_error,
+                                      my_png_warning);
   if (!png_ptr)
     {
       if (fp) fclose (fp);
       return 0;
     }
 
-  /* Casting return value avoids a GCC warning on W32.  */
-  info_ptr = (png_infop)fn_png_create_info_struct (png_ptr);
+  info_ptr = fn_png_create_info_struct (png_ptr);
   if (!info_ptr)
     {
       fn_png_destroy_read_struct (&png_ptr, NULL, NULL);
@@ -5664,8 +5689,7 @@
       return 0;
     }
 
-  /* Casting return value avoids a GCC warning on W32.  */
-  end_info = (png_infop)fn_png_create_info_struct (png_ptr);
+  end_info = fn_png_create_info_struct (png_ptr);
   if (!end_info)
     {
       fn_png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
@@ -5675,7 +5699,7 @@
 
   /* Set error jump-back.  We come back here when the PNG library
      detects an error.  */
-  if (setjmp (png_ptr->jmpbuf))
+  if (setjmp (PNG_JMPBUF (png_ptr)))
     {
     error:
       if (png_ptr)
@@ -6028,14 +6052,14 @@
 #ifdef HAVE_NTGUI
 
 /* JPEG library details.  */
-DEF_IMGLIB_FN (jpeg_CreateDecompress, (j_decompress_ptr, int, size_t));
-DEF_IMGLIB_FN (jpeg_start_decompress, (j_decompress_ptr));
-DEF_IMGLIB_FN (jpeg_finish_decompress, (j_decompress_ptr));
-DEF_IMGLIB_FN (jpeg_destroy_decompress, (j_decompress_ptr));
-DEF_IMGLIB_FN (jpeg_read_header, (j_decompress_ptr, boolean));
-DEF_IMGLIB_FN (jpeg_read_scanlines, (j_decompress_ptr, JSAMPARRAY, 
JDIMENSION));
-DEF_IMGLIB_FN (jpeg_std_error, (struct jpeg_error_mgr *));
-DEF_IMGLIB_FN (jpeg_resync_to_restart, (j_decompress_ptr, int));
+DEF_IMGLIB_FN (void, jpeg_CreateDecompress, (j_decompress_ptr, int, size_t));
+DEF_IMGLIB_FN (boolean, jpeg_start_decompress, (j_decompress_ptr));
+DEF_IMGLIB_FN (boolean, jpeg_finish_decompress, (j_decompress_ptr));
+DEF_IMGLIB_FN (void, jpeg_destroy_decompress, (j_decompress_ptr));
+DEF_IMGLIB_FN (int, jpeg_read_header, (j_decompress_ptr, boolean));
+DEF_IMGLIB_FN (JDIMENSION, jpeg_read_scanlines, (j_decompress_ptr, JSAMPARRAY, 
JDIMENSION));
+DEF_IMGLIB_FN (struct jpeg_error_mgr *, jpeg_std_error, (struct jpeg_error_mgr 
*));
+DEF_IMGLIB_FN (boolean, jpeg_resync_to_restart, (j_decompress_ptr, int));
 
 static int
 init_jpeg_functions (Lisp_Object libraries)
@@ -6335,9 +6359,8 @@
     }
 
   /* Customize libjpeg's error handling to call my_error_exit when an
-     error is detected.  This function will perform a longjmp.
-     Casting return value avoids a GCC warning on W32.  */
-  cinfo.err = (struct jpeg_error_mgr *)fn_jpeg_std_error (&mgr.pub);
+     error is detected.  This function will perform a longjmp.  */
+  cinfo.err = fn_jpeg_std_error (&mgr.pub);
   mgr.pub.error_exit = my_error_exit;
 
   if ((rc = setjmp (mgr.setjmp_buffer)) != 0)
@@ -6561,17 +6584,17 @@
 #ifdef HAVE_NTGUI
 
 /* TIFF library details.  */
-DEF_IMGLIB_FN (TIFFSetErrorHandler, (TIFFErrorHandler));
-DEF_IMGLIB_FN (TIFFSetWarningHandler, (TIFFErrorHandler));
-DEF_IMGLIB_FN (TIFFOpen, (const char *, const char *));
-DEF_IMGLIB_FN (TIFFClientOpen, (const char *, const char *, thandle_t,
+DEF_IMGLIB_FN (TIFFErrorHandler, TIFFSetErrorHandler, (TIFFErrorHandler));
+DEF_IMGLIB_FN (TIFFErrorHandler, TIFFSetWarningHandler, (TIFFErrorHandler));
+DEF_IMGLIB_FN (TIFF *, TIFFOpen, (const char *, const char *));
+DEF_IMGLIB_FN (TIFF *, TIFFClientOpen, (const char *, const char *, thandle_t,
                                TIFFReadWriteProc, TIFFReadWriteProc,
                                TIFFSeekProc, TIFFCloseProc, TIFFSizeProc,
                                TIFFMapFileProc, TIFFUnmapFileProc));
-DEF_IMGLIB_FN (TIFFGetField, (TIFF *, ttag_t, ...));
-DEF_IMGLIB_FN (TIFFReadRGBAImage, (TIFF *, uint32, uint32, uint32 *, int));
-DEF_IMGLIB_FN (TIFFClose, (TIFF *));
-DEF_IMGLIB_FN (TIFFSetDirectory, (TIFF *, tdir_t));
+DEF_IMGLIB_FN (int, TIFFGetField, (TIFF *, ttag_t, ...));
+DEF_IMGLIB_FN (int, TIFFReadRGBAImage, (TIFF *, uint32, uint32, uint32 *, 
int));
+DEF_IMGLIB_FN (void, TIFFClose, (TIFF *));
+DEF_IMGLIB_FN (int, TIFFSetDirectory, (TIFF *, tdir_t));
 
 static int
 init_tiff_functions (Lisp_Object libraries)
@@ -6754,9 +6777,8 @@
          return 0;
        }
 
-      /* Try to open the image file.  Casting return value avoids a
-        GCC warning on W32.  */
-      tiff = (TIFF *)fn_TIFFOpen (SSDATA (file), "r");
+      /* Try to open the image file.  */
+      tiff = fn_TIFFOpen (SDATA (file), "r");
       if (tiff == NULL)
        {
          image_error ("Cannot open `%s'", file, Qnil);
@@ -6776,16 +6798,14 @@
       memsrc.len = SBYTES (specified_data);
       memsrc.index = 0;
 
-      /* Casting arguments return value avoids a GCC warning on W32.  */
-      tiff = (TIFF *)fn_TIFFClientOpen ("memory_source", "r",
-                                       (thandle_t) &memsrc,
-                                       (TIFFReadWriteProc) 
tiff_read_from_memory,
-                                       (TIFFReadWriteProc) 
tiff_write_from_memory,
-                                       tiff_seek_in_memory,
-                                       tiff_close_memory,
-                                       tiff_size_of_memory,
-                                       tiff_mmap_memory,
-                                       tiff_unmap_memory);
+      tiff = fn_TIFFClientOpen ("memory_source", "r", &memsrc,
+                               (TIFFReadWriteProc) tiff_read_from_memory,
+                               (TIFFReadWriteProc) tiff_write_from_memory,
+                               tiff_seek_in_memory,
+                               tiff_close_memory,
+                               tiff_size_of_memory,
+                               tiff_mmap_memory,
+                               tiff_unmap_memory);
 
       if (!tiff)
        {
@@ -7014,10 +7034,10 @@
 #ifdef HAVE_NTGUI
 
 /* GIF library details.  */
-DEF_IMGLIB_FN (DGifCloseFile, (GifFileType *));
-DEF_IMGLIB_FN (DGifSlurp, (GifFileType *));
-DEF_IMGLIB_FN (DGifOpen, (void *, InputFunc));
-DEF_IMGLIB_FN (DGifOpenFileName, (const char *));
+DEF_IMGLIB_FN (int, DGifCloseFile, (GifFileType *));
+DEF_IMGLIB_FN (int, DGifSlurp, (GifFileType *));
+DEF_IMGLIB_FN (GifFileType *, DGifOpen, (void *, InputFunc));
+DEF_IMGLIB_FN (GifFileType *, DGifOpenFileName, (const char *));
 
 static int
 init_gif_functions (Lisp_Object libraries)
@@ -7110,9 +7130,8 @@
          return 0;
        }
 
-      /* Open the GIF file.  Casting return value avoids a GCC warning
-        on W32.  */
-      gif = (GifFileType *)fn_DGifOpenFileName (SDATA (file));
+      /* Open the GIF file.  */
+      gif = fn_DGifOpenFileName (SDATA (file));
       if (gif == NULL)
        {
          image_error ("Cannot open `%s'", file, Qnil);
@@ -7133,8 +7152,7 @@
       memsrc.len = SBYTES (specified_data);
       memsrc.index = 0;
 
-      /* Casting return value avoids a GCC warning on W32.  */
-      gif = (GifFileType *) fn_DGifOpen (&memsrc, gif_read_from_memory);
+      gif = fn_DGifOpen (&memsrc, gif_read_from_memory);
       if (!gif)
        {
          image_error ("Cannot open memory source `%s'", img->spec, Qnil);
@@ -7982,25 +8000,25 @@
 #ifdef HAVE_NTGUI
 
 /* SVG library functions.  */
-DEF_IMGLIB_FN (rsvg_handle_new);
-DEF_IMGLIB_FN (rsvg_handle_get_dimensions);
-DEF_IMGLIB_FN (rsvg_handle_write);
-DEF_IMGLIB_FN (rsvg_handle_close);
-DEF_IMGLIB_FN (rsvg_handle_get_pixbuf);
-DEF_IMGLIB_FN (rsvg_handle_free);
-
-DEF_IMGLIB_FN (gdk_pixbuf_get_width);
-DEF_IMGLIB_FN (gdk_pixbuf_get_height);
-DEF_IMGLIB_FN (gdk_pixbuf_get_pixels);
-DEF_IMGLIB_FN (gdk_pixbuf_get_rowstride);
-DEF_IMGLIB_FN (gdk_pixbuf_get_colorspace);
-DEF_IMGLIB_FN (gdk_pixbuf_get_n_channels);
-DEF_IMGLIB_FN (gdk_pixbuf_get_has_alpha);
-DEF_IMGLIB_FN (gdk_pixbuf_get_bits_per_sample);
-
-DEF_IMGLIB_FN (g_type_init);
-DEF_IMGLIB_FN (g_object_unref);
-DEF_IMGLIB_FN (g_error_free);
+DEF_IMGLIB_FN (RsvgHandle *, rsvg_handle_new);
+DEF_IMGLIB_FN (void, rsvg_handle_get_dimensions);
+DEF_IMGLIB_FN (gboolean, rsvg_handle_write);
+DEF_IMGLIB_FN (gboolean, rsvg_handle_close);
+DEF_IMGLIB_FN (GdkPixbuf *, rsvg_handle_get_pixbuf);
+DEF_IMGLIB_FN (void, rsvg_handle_free);
+
+DEF_IMGLIB_FN (int, gdk_pixbuf_get_width);
+DEF_IMGLIB_FN (int, gdk_pixbuf_get_height);
+DEF_IMGLIB_FN (guchar *, gdk_pixbuf_get_pixels);
+DEF_IMGLIB_FN (int, gdk_pixbuf_get_rowstride);
+DEF_IMGLIB_FN (GdkColorspace, gdk_pixbuf_get_colorspace);
+DEF_IMGLIB_FN (int, gdk_pixbuf_get_n_channels);
+DEF_IMGLIB_FN (gboolean, gdk_pixbuf_get_has_alpha);
+DEF_IMGLIB_FN (int, gdk_pixbuf_get_bits_per_sample);
+
+DEF_IMGLIB_FN (void, g_type_init);
+DEF_IMGLIB_FN (void, g_object_unref);
+DEF_IMGLIB_FN (void, g_error_free);
 
 Lisp_Object Qgdk_pixbuf, Qglib, Qgobject;
 
@@ -8147,7 +8165,7 @@
      gnome type library functions.  */
   fn_g_type_init ();
   /* Make a handle to a new rsvg object.  */
-  rsvg_handle = (RsvgHandle *) fn_rsvg_handle_new ();
+  rsvg_handle = fn_rsvg_handle_new ();
 
   /* Parse the contents argument and fill in the rsvg_handle.  */
   fn_rsvg_handle_write (rsvg_handle, contents, size, &error);
@@ -8167,14 +8185,14 @@
 
   /* We can now get a valid pixel buffer from the svg file, if all
      went ok.  */
-  pixbuf = (GdkPixbuf *) fn_rsvg_handle_get_pixbuf (rsvg_handle);
+  pixbuf = fn_rsvg_handle_get_pixbuf (rsvg_handle);
   if (!pixbuf) goto rsvg_error;
   fn_g_object_unref (rsvg_handle);
 
   /* Extract some meta data from the svg handle.  */
   width     = fn_gdk_pixbuf_get_width (pixbuf);
   height    = fn_gdk_pixbuf_get_height (pixbuf);
-  pixels    = (const guint8 *) fn_gdk_pixbuf_get_pixels (pixbuf);
+  pixels    = fn_gdk_pixbuf_get_pixels (pixbuf);
   rowstride = fn_gdk_pixbuf_get_rowstride (pixbuf);
 
   /* Validate the svg meta data.  */


reply via email to

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