mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-21 18:23:59 +00:00
Merge changes from emacs-23 branch
This commit is contained in:
commit
14beddf471
@ -1,10 +1,15 @@
|
||||
2011-01-31 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* configure.in: Test existence of xaw3d library, not just the
|
||||
header (Bug#7642).
|
||||
|
||||
2011-01-31 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* 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 <eggert@cs.ucla.edu>
|
||||
|
41
configure
vendored
41
configure
vendored
@ -10595,10 +10595,51 @@ main ()
|
||||
}
|
||||
_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
|
||||
|
@ -2006,7 +2006,8 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
|
||||
#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
|
||||
|
@ -1,3 +1,11 @@
|
||||
2011-01-31 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* 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 <eliz@gnu.org>
|
||||
|
||||
* makefile.w32-in (MAKEINFO): Remove options, leave only program name.
|
||||
|
@ -1183,26 +1183,23 @@ implies the effect of @code{find-file-existing-other-name}.
|
||||
@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
|
||||
@code{directory-abbrev-alist}. Each element in this list should have
|
||||
the form @code{(@var{from} . @var{to})}, which says to replace
|
||||
@var{from} 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
|
||||
@var{to} 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
|
||||
@file{/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
|
||||
@var{from} 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
|
||||
@samp{^}). 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
|
||||
|
@ -545,21 +545,20 @@ Search}.
|
||||
@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{$},
|
||||
@samp{^}, @samp{.}, @samp{*}, @samp{+}, @samp{?}, @samp{[}, and
|
||||
@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.)
|
||||
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 @@ only @samp{o}. (When case distinctions are being ignored, these regexps
|
||||
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 string.@refill
|
||||
|
||||
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
|
||||
@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.
|
||||
|
||||
@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
|
||||
@samp{b}.@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
|
||||
@samp{b}.
|
||||
|
||||
@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
|
||||
@samp{o}s).
|
||||
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 @@ With this choice, the rest of the regexp matches successfully.@refill
|
||||
|
||||
@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
|
||||
@samp{cr}, 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,
|
||||
@samp{ca?r} 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
|
||||
@samp{*}, @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 non-@dfn{greedy} 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
|
||||
@samp{?}, 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 @@ a newline, it matches the whole string. Since it @emph{can} match
|
||||
starting at the first @samp{a}, it does.
|
||||
|
||||
@item @kbd{\@{@var{n}\@}}
|
||||
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, @samp{x\@{4\@}} 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, @samp{x\@{4\@}} matches the string @samp{xxxx} and
|
||||
nothing else.
|
||||
|
||||
@item @kbd{\@{@var{n},@var{m}\@}}
|
||||
is a postfix operator that specifies repetition between @var{n} and
|
||||
@var{m} 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} times.@* @samp{\@{0,1\@}} is
|
||||
equivalent to @samp{?}. @* @samp{\@{0,\@}} is equivalent to
|
||||
@samp{*}. @* @samp{\@{1,\@}} 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
|
||||
@samp{]}.
|
||||
|
||||
Thus, @samp{[ad]} matches either one @samp{a} or one @samp{d}, and
|
||||
@samp{[ad]*} 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
|
||||
@samp{a}s and @samp{d}s (including the empty string). It follows that
|
||||
@samp{c[ad]*r} matches @samp{cr}, @samp{car}, @samp{cdr},
|
||||
@samp{caddaar}, 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 @@ intermixed freely with individual characters, as in @samp{[a-z$%.]},
|
||||
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,
|
||||
@samp{[[: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
|
||||
|
@ -1,3 +1,14 @@
|
||||
2011-01-28 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* 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 <eliz@gnu.org>
|
||||
|
||||
* makefile.w32-in (texinfodir): New variable.
|
||||
|
@ -3657,9 +3657,8 @@ display specifications and what they mean.
|
||||
* 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
|
||||
|
||||
|
@ -1330,9 +1330,8 @@ The @code{display} Property
|
||||
* 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.
|
||||
|
||||
|
@ -1972,6 +1972,7 @@ feature.
|
||||
@cindex defining menus
|
||||
@cindex menu prompt string
|
||||
@cindex prompt string (of menu)
|
||||
@cindex 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 @@ of menus in advance. To force recalculation of the menu bar, call
|
||||
@node Extended Menu Items
|
||||
@subsubsection Extended Menu Items
|
||||
@kindex menu-item
|
||||
@cindex 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
|
||||
|
@ -1351,9 +1351,8 @@ The @code{display} Property
|
||||
* 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.
|
||||
|
||||
|
@ -1350,9 +1350,8 @@ The @code{display} Property
|
||||
* 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.
|
||||
|
||||
|
@ -1,3 +1,51 @@
|
||||
2011-01-31 Alan Mackenzie <acm@muc.de>
|
||||
|
||||
* 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 <cyd@stupidchicken.com>
|
||||
|
||||
* files.el (copy-directory): Fix arguments to recursive call.
|
||||
|
||||
2011-01-31 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* files.el (copy-directory): If destination is an existing
|
||||
directory, copy into a subdirectory there.
|
||||
|
||||
2011-01-31 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* emacs-lisp/shadow.el (load-path-shadows-find): Ignore leim-list
|
||||
files.
|
||||
|
||||
2011-01-31 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* 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 <handa@m17n.org>
|
||||
|
||||
* international/quail.el (quail-keyboard-layout-alist): Remove
|
||||
superfluous SPC for "pc105-uk" (bug#7927).
|
||||
|
||||
2011-01-31 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* msb.el (msb-menu-bar-update-buffers): Update for changed
|
||||
argument handling of menu-bar-select-frame. (Bug#7902)
|
||||
|
||||
2011-01-31 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* progmodes/cc-engine.el (c-forward-<>-arglist-recur): Set a limit
|
||||
to the recursion depth (Bug#7722).
|
||||
|
||||
2011-01-31 Roy Liu <carsomyr@gmail.com> (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 <monnier@iro.umontreal.ca>
|
||||
|
||||
* progmodes/compile.el (compilation--flush-directory-cache):
|
||||
|
@ -115,7 +115,7 @@ See the documentation for `list-load-path-shadows' for further information."
|
||||
;; 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.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2011-01-31 Antoine Levitt <antoine.levitt@gmail.com> (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 <monnier@iro.umontreal.ca>
|
||||
|
||||
* erc.el (erc-mode):
|
||||
|
@ -648,7 +648,6 @@ module, otherwise the keybindings will not do anything useful."
|
||||
(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)
|
||||
|
@ -4855,22 +4855,35 @@ this happens by default."
|
||||
;; 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))
|
||||
|
@ -2194,15 +2194,15 @@ matching tag will be marked in the dired buffer."
|
||||
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.
|
||||
|
@ -662,7 +662,7 @@ This layout is almost the same as that of VT100,
|
||||
")
|
||||
'("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,<.>/? \
|
||||
|
@ -201,9 +201,9 @@ items `Turn Off' and `Help'."
|
||||
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
|
||||
|
@ -1114,7 +1114,8 @@ variable `msb-menu-cond'."
|
||||
(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)
|
||||
|
@ -2440,13 +2440,15 @@ function does not require the declaration to contain a brace block."
|
||||
(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 @@ be more \"DWIM:ey\"."
|
||||
(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)))
|
||||
|
@ -5371,6 +5371,8 @@ comment at the start of cc-engine.el for more info."
|
||||
;; 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 @@ comment at the start of cc-engine.el for more info."
|
||||
;; 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 @@ comment at the start of cc-engine.el for more info."
|
||||
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.
|
||||
|
@ -487,7 +487,9 @@ unless the current buffer is a scratch buffer."
|
||||
(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)))
|
||||
|
@ -1,3 +1,18 @@
|
||||
2011-01-31 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* 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 <cyd@stupidchicken.com>
|
||||
|
||||
* 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 <eliz@gnu.org>
|
||||
|
||||
* s/ms-w32.h (HAVE_STRFTIME): Don't define.
|
||||
|
216
src/image.c
216
src/image.c
@ -1896,7 +1896,7 @@ mark_image_cache (struct image_cache *c)
|
||||
#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_free_colors (Display *dpy, Colormap cmap, Pixel *pixels, int npixels, void *
|
||||
|
||||
/* 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 @@ png_image_p (Lisp_Object object)
|
||||
#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 @@ init_png_functions (Lisp_Object libraries)
|
||||
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 @@ init_png_functions (Lisp_Object libraries)
|
||||
#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 @@ my_png_error (png_struct *png_ptr, const char *msg)
|
||||
/* 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 @@ png_load (struct frame *f, struct image *img)
|
||||
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 @@ png_load (struct frame *f, struct image *img)
|
||||
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 @@ png_load (struct frame *f, struct image *img)
|
||||
|
||||
/* 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 @@ jpeg_image_p (Lisp_Object object)
|
||||
#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 @@ jpeg_load (struct frame *f, struct image *img)
|
||||
}
|
||||
|
||||
/* 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 @@ tiff_image_p (Lisp_Object object)
|
||||
#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 @@ tiff_load (struct frame *f, struct image *img)
|
||||
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 @@ tiff_load (struct frame *f, struct image *img)
|
||||
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 @@ gif_image_p (Lisp_Object object)
|
||||
#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 @@ gif_load (struct frame *f, struct image *img)
|
||||
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 @@ gif_load (struct frame *f, struct image *img)
|
||||
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 @@ svg_image_p (Lisp_Object object)
|
||||
#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 (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 (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 (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 (g_type_init);
|
||||
DEF_IMGLIB_FN (g_object_unref);
|
||||
DEF_IMGLIB_FN (g_error_free);
|
||||
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 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. *
|
||||
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 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. *
|
||||
|
||||
/* 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. */
|
||||
|
Loading…
Reference in New Issue
Block a user