diff options
| author | Chong Yidong | 2011-01-31 18:54:50 -0500 |
|---|---|---|
| committer | Chong Yidong | 2011-01-31 18:54:50 -0500 |
| commit | 14beddf4711854b01d400f36166dc71eb39435bb (patch) | |
| tree | 04fd96bb0f5dcf5f3aa4e9f39a537edc61038f83 | |
| parent | 2a4466ca2001c29fd654420b081b780981333dc5 (diff) | |
| parent | 113ef437f21c6ea1b65abe668feb86f1622a9f2e (diff) | |
| download | emacs-14beddf4711854b01d400f36166dc71eb39435bb.tar.gz emacs-14beddf4711854b01d400f36166dc71eb39435bb.zip | |
Merge changes from emacs-23 branch
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rwxr-xr-x | configure | 41 | ||||
| -rw-r--r-- | configure.in | 3 | ||||
| -rw-r--r-- | doc/emacs/ChangeLog | 8 | ||||
| -rw-r--r-- | doc/emacs/files.texi | 33 | ||||
| -rw-r--r-- | doc/emacs/search.texi | 113 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 11 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 5 | ||||
| -rw-r--r-- | doc/lispref/elisp.texi | 5 | ||||
| -rw-r--r-- | doc/lispref/keymaps.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/vol1.texi | 5 | ||||
| -rw-r--r-- | doc/lispref/vol2.texi | 5 | ||||
| -rw-r--r-- | lisp/ChangeLog | 48 | ||||
| -rw-r--r-- | lisp/emacs-lisp/shadow.el | 2 | ||||
| -rw-r--r-- | lisp/erc/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/erc/erc-track.el | 1 | ||||
| -rw-r--r-- | lisp/files.el | 41 | ||||
| -rw-r--r-- | lisp/image-dired.el | 18 | ||||
| -rw-r--r-- | lisp/international/quail.el | 2 | ||||
| -rw-r--r-- | lisp/mouse.el | 6 | ||||
| -rw-r--r-- | lisp/msb.el | 3 | ||||
| -rw-r--r-- | lisp/progmodes/cc-cmds.el | 33 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 13 | ||||
| -rw-r--r-- | lisp/term/ns-win.el | 4 | ||||
| -rw-r--r-- | src/ChangeLog | 15 | ||||
| -rw-r--r-- | src/image.c | 220 |
26 files changed, 416 insertions, 233 deletions
| @@ -1,10 +1,15 @@ | |||
| 1 | 2011-01-31 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * configure.in: Test existence of xaw3d library, not just the | ||
| 4 | header (Bug#7642). | ||
| 5 | |||
| 1 | 2011-01-31 Eli Zaretskii <eliz@gnu.org> | 6 | 2011-01-31 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/strftime.$(O) and | 8 | * lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/strftime.$(O) and |
| 4 | $(BLD)/time_r.$(O). | 9 | $(BLD)/time_r.$(O). |
| 5 | ($(BLD)/dtoastr.$(O)): Depend on $(EMACS_ROOT)/src/s/ms-w32.h and | 10 | ($(BLD)/dtoastr.$(O)): Depend on $(EMACS_ROOT)/src/s/ms-w32.h and |
| 6 | $(EMACS_ROOT)/src/m/intel386.h. | 11 | $(EMACS_ROOT)/src/m/intel386.h. |
| 7 | ($(BLD)/strftime.$(O)): | 12 | ($(BLD)/strftime.$(O)): |
| 8 | ($(BLD)/time_r.$(O)): Define prerequisites. | 13 | ($(BLD)/time_r.$(O)): Define prerequisites. |
| 9 | 14 | ||
| 10 | 2011-01-31 Paul Eggert <eggert@cs.ucla.edu> | 15 | 2011-01-31 Paul Eggert <eggert@cs.ucla.edu> |
| @@ -10595,10 +10595,51 @@ main () | |||
| 10595 | } | 10595 | } |
| 10596 | _ACEOF | 10596 | _ACEOF |
| 10597 | if ac_fn_c_try_link "$LINENO"; then : | 10597 | if ac_fn_c_try_link "$LINENO"; then : |
| 10598 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5 | ||
| 10599 | $as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; } | ||
| 10600 | if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then : | ||
| 10601 | $as_echo_n "(cached) " >&6 | ||
| 10602 | else | ||
| 10603 | ac_check_lib_save_LIBS=$LIBS | ||
| 10604 | LIBS="-lXaw3d $LIBS" | ||
| 10605 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 10606 | /* end confdefs.h. */ | ||
| 10607 | |||
| 10608 | /* Override any GCC internal prototype to avoid an error. | ||
| 10609 | Use char because int might match the return type of a GCC | ||
| 10610 | builtin and then its argument prototype would still apply. */ | ||
| 10611 | #ifdef __cplusplus | ||
| 10612 | extern "C" | ||
| 10613 | #endif | ||
| 10614 | char XawScrollbarSetThumb (); | ||
| 10615 | int | ||
| 10616 | main () | ||
| 10617 | { | ||
| 10618 | return XawScrollbarSetThumb (); | ||
| 10619 | ; | ||
| 10620 | return 0; | ||
| 10621 | } | ||
| 10622 | _ACEOF | ||
| 10623 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 10624 | ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes | ||
| 10625 | else | ||
| 10626 | ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no | ||
| 10627 | fi | ||
| 10628 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 10629 | conftest$ac_exeext conftest.$ac_ext | ||
| 10630 | LIBS=$ac_check_lib_save_LIBS | ||
| 10631 | fi | ||
| 10632 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5 | ||
| 10633 | $as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; } | ||
| 10634 | if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then : | ||
| 10598 | emacs_cv_xaw3d=yes | 10635 | emacs_cv_xaw3d=yes |
| 10599 | else | 10636 | else |
| 10600 | emacs_cv_xaw3d=no | 10637 | emacs_cv_xaw3d=no |
| 10601 | fi | 10638 | fi |
| 10639 | |||
| 10640 | else | ||
| 10641 | emacs_cv_xaw3d=no | ||
| 10642 | fi | ||
| 10602 | rm -f core conftest.err conftest.$ac_objext \ | 10643 | rm -f core conftest.err conftest.$ac_objext \ |
| 10603 | conftest$ac_exeext conftest.$ac_ext | 10644 | conftest$ac_exeext conftest.$ac_ext |
| 10604 | fi | 10645 | fi |
diff --git a/configure.in b/configure.in index 315840e0146..58e445b98a6 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -2006,7 +2006,8 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then | |||
| 2006 | #include <X11/Intrinsic.h> | 2006 | #include <X11/Intrinsic.h> |
| 2007 | #include <X11/Xaw3d/Simple.h>], | 2007 | #include <X11/Xaw3d/Simple.h>], |
| 2008 | [], | 2008 | [], |
| 2009 | emacs_cv_xaw3d=yes, | 2009 | [AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb, |
| 2010 | emacs_cv_xaw3d=yes, emacs_cv_xaw3d=no)], | ||
| 2010 | emacs_cv_xaw3d=no)]) | 2011 | emacs_cv_xaw3d=no)]) |
| 2011 | else | 2012 | else |
| 2012 | emacs_cv_xaw3d=no | 2013 | emacs_cv_xaw3d=no |
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index c5b31d70139..961fa9fb491 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2011-01-31 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * search.texi (Regexps): Copyedits. Mention character classes | ||
| 4 | (Bug#7809). | ||
| 5 | |||
| 6 | * files.texi (File Aliases): Restore explanatory text from Eli | ||
| 7 | Zaretskii, accidentally removed in 2011-01-08 commit. | ||
| 8 | |||
| 1 | 2011-01-29 Eli Zaretskii <eliz@gnu.org> | 9 | 2011-01-29 Eli Zaretskii <eliz@gnu.org> |
| 2 | 10 | ||
| 3 | * makefile.w32-in (MAKEINFO): Remove options, leave only program name. | 11 | * makefile.w32-in (MAKEINFO): Remove options, leave only program name. |
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 0ebf59a9f37..40bd065610c 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi | |||
| @@ -1183,26 +1183,23 @@ implies the effect of @code{find-file-existing-other-name}. | |||
| 1183 | @cindex directory name abbreviation | 1183 | @cindex directory name abbreviation |
| 1184 | @vindex directory-abbrev-alist | 1184 | @vindex directory-abbrev-alist |
| 1185 | Sometimes, a directory is ordinarily accessed through a symbolic | 1185 | Sometimes, a directory is ordinarily accessed through a symbolic |
| 1186 | link, and you may want Emacs to preferentially display its ``linked'' | 1186 | link, and you may want Emacs to preferentially show its ``linked'' |
| 1187 | name instead of its truename. To do this, customize the variable | 1187 | name. To do this, customize @code{directory-abbrev-alist}. Each |
| 1188 | @code{directory-abbrev-alist}. Each element in this list should have | 1188 | element in this list should have the form @code{(@var{from} |
| 1189 | the form @code{(@var{from} . @var{to})}, which says to replace | 1189 | . @var{to})}, which means to replace @var{from} with @var{to} whenever |
| 1190 | @var{from} with @var{to} when it appears in a directory name. For | 1190 | @var{from} appears in a directory name. The @var{from} string is a |
| 1191 | this feature to work properly, @var{from} and @var{to} should point to | 1191 | regular expression (@pxref{Regexps}). It is matched against directory |
| 1192 | the same file. The @var{from} string is actually a regular expression | 1192 | names anchored at the first character, and should start with @samp{\`} |
| 1193 | (@pxref{Regexps}); it should always start with @samp{\`}, to avoid | 1193 | (to support directory names with embedded newlines, which would defeat |
| 1194 | matching to an incorrect part of the original directory name. The | 1194 | @samp{^}). The @var{to} string should be an ordinary absolute |
| 1195 | @var{to} string should be an ordinary absolute directory name. Do not | 1195 | directory name pointing to the same directory. Do not use @samp{~} to |
| 1196 | use @samp{~} to stand for a home directory in the @var{to} string; | 1196 | stand for a home directory in the @var{to} string; Emacs performs |
| 1197 | Emacs performs these substitutions separately. | 1197 | these substitutions separately. Here's an example, from a system on |
| 1198 | 1198 | which @file{/home/fsf} is normally accessed through a symbolic link | |
| 1199 | Here's an example, from a system on which file system | 1199 | named @file{/fsf}: |
| 1200 | @file{/home/fsf} and so on are normally accessed through symbolic | ||
| 1201 | links named @file{/fsf} and so on. | ||
| 1202 | 1200 | ||
| 1203 | @example | 1201 | @example |
| 1204 | (("\\`/home/fsf" . "/fsf") | 1202 | (("\\`/home/fsf" . "/fsf")) |
| 1205 | ("\\`/home/gd" . "/gd")) | ||
| 1206 | @end example | 1203 | @end example |
| 1207 | 1204 | ||
| 1208 | @node Directories | 1205 | @node Directories |
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 99fde1d7a04..df0579ab9ea 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi | |||
| @@ -545,21 +545,20 @@ Search}. | |||
| 545 | @cindex syntax of regexps | 545 | @cindex syntax of regexps |
| 546 | 546 | ||
| 547 | This manual describes regular expression features that users | 547 | This manual describes regular expression features that users |
| 548 | typically want to use. There are additional features that are | 548 | typically use. @xref{Regular Expressions,,, elisp, The Emacs Lisp |
| 549 | mainly used in Lisp programs; see @ref{Regular Expressions,,, | 549 | Reference Manual}, for additional features used mainly in Lisp |
| 550 | elisp, The Emacs Lisp Reference Manual}. | 550 | programs. |
| 551 | 551 | ||
| 552 | Regular expressions have a syntax in which a few characters are | 552 | Regular expressions have a syntax in which a few characters are |
| 553 | special constructs and the rest are @dfn{ordinary}. An ordinary | 553 | special constructs and the rest are @dfn{ordinary}. An ordinary |
| 554 | character is a simple regular expression which matches that same | 554 | character matches that same character and nothing else. The special |
| 555 | character and nothing else. The special characters are @samp{$}, | 555 | characters are @samp{$^.*+?[\}. The character @samp{]} is special if |
| 556 | @samp{^}, @samp{.}, @samp{*}, @samp{+}, @samp{?}, @samp{[}, and | 556 | it ends a character alternative (see later). The character @samp{-} |
| 557 | @samp{\}. The character @samp{]} is special if it ends a character | 557 | is special inside a character alternative. Any other character |
| 558 | alternative (see later). The character @samp{-} is special inside a | 558 | appearing in a regular expression is ordinary, unless a @samp{\} |
| 559 | character alternative. Any other character appearing in a regular | 559 | precedes it. (When you use regular expressions in a Lisp program, |
| 560 | expression is ordinary, unless a @samp{\} precedes it. (When you use | 560 | each @samp{\} must be doubled, see the example near the end of this |
| 561 | regular expressions in a Lisp program, each @samp{\} must be doubled, | 561 | section.) |
| 562 | see the example near the end of this section.) | ||
| 563 | 562 | ||
| 564 | For example, @samp{f} is not a special character, so it is ordinary, and | 563 | For example, @samp{f} is not a special character, so it is ordinary, and |
| 565 | therefore @samp{f} is a regular expression that matches the string | 564 | 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 | |||
| 569 | also match @samp{F} and @samp{O}, but we consider this a generalization | 568 | also match @samp{F} and @samp{O}, but we consider this a generalization |
| 570 | of ``the same string,'' rather than an exception.) | 569 | of ``the same string,'' rather than an exception.) |
| 571 | 570 | ||
| 572 | Any two regular expressions @var{a} and @var{b} can be concatenated. The | 571 | Any two regular expressions @var{a} and @var{b} can be concatenated. |
| 573 | result is a regular expression which matches a string if @var{a} matches | 572 | The result is a regular expression which matches a string if @var{a} |
| 574 | some amount of the beginning of that string and @var{b} matches the rest of | 573 | matches some amount of the beginning of that string and @var{b} |
| 575 | the string.@refill | 574 | matches the rest of the string. For example, concatenating the |
| 576 | 575 | regular expressions @samp{f} and @samp{o} gives the regular expression | |
| 577 | As a simple example, we can concatenate the regular expressions @samp{f} | 576 | @samp{fo}, which matches only the string @samp{fo}. Still trivial. |
| 578 | and @samp{o} to get the regular expression @samp{fo}, which matches only | 577 | To do something nontrivial, you need to use one of the special |
| 579 | the string @samp{fo}. Still trivial. To do something nontrivial, you | 578 | characters. Here is a list of them. |
| 580 | need to use one of the special characters. Here is a list of them. | ||
| 581 | 579 | ||
| 582 | @table @asis | 580 | @table @asis |
| 583 | @item @kbd{.}@: @r{(Period)} | 581 | @item @kbd{.}@: @r{(Period)} |
| 584 | is a special character that matches any single character except a newline. | 582 | is a special character that matches any single character except a |
| 585 | Using concatenation, we can make regular expressions like @samp{a.b}, which | 583 | newline. For example, the regular expressions @samp{a.b} matches any |
| 586 | matches any three-character string that begins with @samp{a} and ends with | 584 | three-character string that begins with @samp{a} and ends with |
| 587 | @samp{b}.@refill | 585 | @samp{b}. |
| 588 | 586 | ||
| 589 | @item @kbd{*} | 587 | @item @kbd{*} |
| 590 | is not a construct by itself; it is a postfix operator that means to | 588 | is not a construct by itself; it is a postfix operator that means to |
| 591 | match the preceding regular expression repetitively as many times as | 589 | match the preceding regular expression repetitively any number of |
| 592 | possible. Thus, @samp{o*} matches any number of @samp{o}s (including no | 590 | times, as many times as possible. Thus, @samp{o*} matches any number |
| 593 | @samp{o}s). | 591 | of @samp{o}s, including no @samp{o}s. |
| 594 | 592 | ||
| 595 | @samp{*} always applies to the @emph{smallest} possible preceding | 593 | @samp{*} always applies to the @emph{smallest} possible preceding |
| 596 | expression. Thus, @samp{fo*} has a repeating @samp{o}, not a repeating | 594 | 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 | |||
| 609 | 607 | ||
| 610 | @item @kbd{+} | 608 | @item @kbd{+} |
| 611 | is a postfix operator, similar to @samp{*} except that it must match | 609 | is a postfix operator, similar to @samp{*} except that it must match |
| 612 | the preceding expression at least once. So, for example, @samp{ca+r} | 610 | the preceding expression at least once. Thus, @samp{ca+r} matches the |
| 613 | matches the strings @samp{car} and @samp{caaaar} but not the string | 611 | strings @samp{car} and @samp{caaaar} but not the string @samp{cr}, |
| 614 | @samp{cr}, whereas @samp{ca*r} matches all three strings. | 612 | whereas @samp{ca*r} matches all three strings. |
| 615 | 613 | ||
| 616 | @item @kbd{?} | 614 | @item @kbd{?} |
| 617 | is a postfix operator, similar to @samp{*} except that it can match the | 615 | is a postfix operator, similar to @samp{*} except that it can match |
| 618 | preceding expression either once or not at all. For example, | 616 | the preceding expression either once or not at all. Thus, @samp{ca?r} |
| 619 | @samp{ca?r} matches @samp{car} or @samp{cr}; nothing else. | 617 | matches @samp{car} or @samp{cr}, and nothing else. |
| 620 | 618 | ||
| 621 | @item @kbd{*?}, @kbd{+?}, @kbd{??} | 619 | @item @kbd{*?}, @kbd{+?}, @kbd{??} |
| 622 | @cindex non-greedy regexp matching | 620 | @cindex non-greedy regexp matching |
| 623 | are non-greedy variants of the operators above. The normal operators | 621 | are non-@dfn{greedy} variants of the operators above. The normal |
| 624 | @samp{*}, @samp{+}, @samp{?} are @dfn{greedy} in that they match as | 622 | operators @samp{*}, @samp{+}, @samp{?} match as much as they can, as |
| 625 | much as they can, as long as the overall regexp can still match. With | 623 | long as the overall regexp can still match. With a following |
| 626 | a following @samp{?}, they are non-greedy: they will match as little | 624 | @samp{?}, they will match as little as possible. |
| 627 | as possible. | ||
| 628 | 625 | ||
| 629 | Thus, both @samp{ab*} and @samp{ab*?} can match the string @samp{a} | 626 | Thus, both @samp{ab*} and @samp{ab*?} can match the string @samp{a} |
| 630 | and the string @samp{abbbb}; but if you try to match them both against | 627 | 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 | |||
| 640 | starting at the first @samp{a}, it does. | 637 | starting at the first @samp{a}, it does. |
| 641 | 638 | ||
| 642 | @item @kbd{\@{@var{n}\@}} | 639 | @item @kbd{\@{@var{n}\@}} |
| 643 | is a postfix operator that specifies repetition @var{n} times---that | 640 | is a postfix operator specifying @var{n} repetitions---that is, the |
| 644 | is, the preceding regular expression must match exactly @var{n} times | 641 | preceding regular expression must match exactly @var{n} times in a |
| 645 | in a row. For example, @samp{x\@{4\@}} matches the string @samp{xxxx} | 642 | row. For example, @samp{x\@{4\@}} matches the string @samp{xxxx} and |
| 646 | and nothing else. | 643 | nothing else. |
| 647 | 644 | ||
| 648 | @item @kbd{\@{@var{n},@var{m}\@}} | 645 | @item @kbd{\@{@var{n},@var{m}\@}} |
| 649 | is a postfix operator that specifies repetition between @var{n} and | 646 | is a postfix operator specifying between @var{n} and @var{m} |
| 650 | @var{m} times---that is, the preceding regular expression must match | 647 | repetitions---that is, the preceding regular expression must match at |
| 651 | at least @var{n} times, but no more than @var{m} times. If @var{m} is | 648 | least @var{n} times, but no more than @var{m} times. If @var{m} is |
| 652 | omitted, then there is no upper limit, but the preceding regular | 649 | omitted, then there is no upper limit, but the preceding regular |
| 653 | expression must match at least @var{n} times.@* @samp{\@{0,1\@}} is | 650 | expression must match at least @var{n} times.@* @samp{\@{0,1\@}} is |
| 654 | equivalent to @samp{?}. @* @samp{\@{0,\@}} is equivalent to | 651 | equivalent to @samp{?}. @* @samp{\@{0,\@}} is equivalent to |
| 655 | @samp{*}. @* @samp{\@{1,\@}} is equivalent to @samp{+}. | 652 | @samp{*}. @* @samp{\@{1,\@}} is equivalent to @samp{+}. |
| 656 | 653 | ||
| 657 | @item @kbd{[ @dots{} ]} | 654 | @item @kbd{[ @dots{} ]} |
| 658 | is a @dfn{character set}, which begins with @samp{[} and is terminated | 655 | is a @dfn{character set}, beginning with @samp{[} and terminated by |
| 659 | by @samp{]}. In the simplest case, the characters between the two | 656 | @samp{]}. |
| 660 | brackets are what this set can match. | ||
| 661 | 657 | ||
| 662 | Thus, @samp{[ad]} matches either one @samp{a} or one @samp{d}, and | 658 | In the simplest case, the characters between the two brackets are what |
| 663 | @samp{[ad]*} matches any string composed of just @samp{a}s and @samp{d}s | 659 | this set can match. Thus, @samp{[ad]} matches either one @samp{a} or |
| 664 | (including the empty string), from which it follows that @samp{c[ad]*r} | 660 | one @samp{d}, and @samp{[ad]*} matches any string composed of just |
| 665 | matches @samp{cr}, @samp{car}, @samp{cdr}, @samp{caddaar}, etc. | 661 | @samp{a}s and @samp{d}s (including the empty string). It follows that |
| 662 | @samp{c[ad]*r} matches @samp{cr}, @samp{car}, @samp{cdr}, | ||
| 663 | @samp{caddaar}, etc. | ||
| 666 | 664 | ||
| 667 | You can also include character ranges in a character set, by writing the | 665 | You can also include character ranges in a character set, by writing the |
| 668 | starting and ending characters with a @samp{-} between them. Thus, | 666 | starting and ending characters with a @samp{-} between them. Thus, |
| @@ -671,9 +669,12 @@ intermixed freely with individual characters, as in @samp{[a-z$%.]}, | |||
| 671 | which matches any lower-case @acronym{ASCII} letter or @samp{$}, @samp{%} or | 669 | which matches any lower-case @acronym{ASCII} letter or @samp{$}, @samp{%} or |
| 672 | period. | 670 | period. |
| 673 | 671 | ||
| 674 | Note that the usual regexp special characters are not special inside a | 672 | You can also include certain special @dfn{character classes} in a |
| 675 | character set. A completely different set of special characters exists | 673 | character set. A @samp{[:} and balancing @samp{:]} enclose a |
| 676 | inside character sets: @samp{]}, @samp{-} and @samp{^}. | 674 | character class inside a character alternative. For instance, |
| 675 | @samp{[[:alnum:]]} matches any letter or digit. @xref{Char Classes,,, | ||
| 676 | elisp, The Emacs Lisp Reference Manual}, for a list of character | ||
| 677 | classes. | ||
| 677 | 678 | ||
| 678 | To include a @samp{]} in a character set, you must make it the first | 679 | To include a @samp{]} in a character set, you must make it the first |
| 679 | character. For example, @samp{[]a]} matches @samp{]} or @samp{a}. To | 680 | character. For example, @samp{[]a]} matches @samp{]} or @samp{a}. To |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index be8803d4cb2..063ea78c09a 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2011-01-28 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * vol1.texi (Top): | ||
| 4 | * vol2.texi (Top): | ||
| 5 | * elisp.texi (Top): | ||
| 6 | * display.texi (Display Property): Shorten the menu description of | ||
| 7 | the "Other Display Specs" node (Bug#7816). | ||
| 8 | |||
| 9 | * keymaps.texi (Defining Menus): Add "menu item" and "extended | ||
| 10 | menu item" concept index entries (Bug#7805). | ||
| 11 | |||
| 1 | 2011-01-29 Eli Zaretskii <eliz@gnu.org> | 12 | 2011-01-29 Eli Zaretskii <eliz@gnu.org> |
| 2 | 13 | ||
| 3 | * makefile.w32-in (texinfodir): New variable. | 14 | * makefile.w32-in (texinfodir): New variable. |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 9bc80a77742..80a035aa346 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -3657,9 +3657,8 @@ display specifications and what they mean. | |||
| 3657 | * Replacing Specs:: Display specs that replace the text. | 3657 | * Replacing Specs:: Display specs that replace the text. |
| 3658 | * Specified Space:: Displaying one space with a specified width. | 3658 | * Specified Space:: Displaying one space with a specified width. |
| 3659 | * Pixel Specification:: Specifying space width or height in pixels. | 3659 | * Pixel Specification:: Specifying space width or height in pixels. |
| 3660 | * Other Display Specs:: Displaying an image; magnifying text; moving it | 3660 | * Other Display Specs:: Displaying an image; adjusting the height, |
| 3661 | up or down on the page; adjusting the width | 3661 | spacing, and other properties of text. |
| 3662 | of spaces within text. | ||
| 3663 | * Display Margins:: Displaying text or images to the side of the main text. | 3662 | * Display Margins:: Displaying text or images to the side of the main text. |
| 3664 | @end menu | 3663 | @end menu |
| 3665 | 3664 | ||
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 0214bb9d10c..ad7931d45b4 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi | |||
| @@ -1330,9 +1330,8 @@ The @code{display} Property | |||
| 1330 | * Replacing Specs:: Display specs that replace the text. | 1330 | * Replacing Specs:: Display specs that replace the text. |
| 1331 | * Specified Space:: Displaying one space with a specified width. | 1331 | * Specified Space:: Displaying one space with a specified width. |
| 1332 | * Pixel Specification:: Specifying space width or height in pixels. | 1332 | * Pixel Specification:: Specifying space width or height in pixels. |
| 1333 | * Other Display Specs:: Displaying an image; magnifying text; moving it | 1333 | * Other Display Specs:: Displaying an image; adjusting the height, |
| 1334 | up or down on the page; adjusting the width | 1334 | spacing, and other properties of text. |
| 1335 | of spaces within text. | ||
| 1336 | * Display Margins:: Displaying text or images to the side of | 1335 | * Display Margins:: Displaying text or images to the side of |
| 1337 | the main text. | 1336 | the main text. |
| 1338 | 1337 | ||
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index a9a30abd1ed..4a2964b9b6c 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi | |||
| @@ -1972,6 +1972,7 @@ feature. | |||
| 1972 | @cindex defining menus | 1972 | @cindex defining menus |
| 1973 | @cindex menu prompt string | 1973 | @cindex menu prompt string |
| 1974 | @cindex prompt string (of menu) | 1974 | @cindex prompt string (of menu) |
| 1975 | @cindex menu item | ||
| 1975 | 1976 | ||
| 1976 | A keymap acts as a menu if it has an @dfn{overall prompt string}, | 1977 | A keymap acts as a menu if it has an @dfn{overall prompt string}, |
| 1977 | which is a string that appears as an element of the keymap. | 1978 | 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 | |||
| 2073 | @node Extended Menu Items | 2074 | @node Extended Menu Items |
| 2074 | @subsubsection Extended Menu Items | 2075 | @subsubsection Extended Menu Items |
| 2075 | @kindex menu-item | 2076 | @kindex menu-item |
| 2077 | @cindex extended menu item | ||
| 2076 | 2078 | ||
| 2077 | An extended-format menu item is a more flexible and also cleaner | 2079 | An extended-format menu item is a more flexible and also cleaner |
| 2078 | alternative to the simple format. You define an event type with a | 2080 | alternative to the simple format. You define an event type with a |
diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi index 93e6cc31ec2..ad8ff0819ca 100644 --- a/doc/lispref/vol1.texi +++ b/doc/lispref/vol1.texi | |||
| @@ -1351,9 +1351,8 @@ The @code{display} Property | |||
| 1351 | * Replacing Specs:: Display specs that replace the text. | 1351 | * Replacing Specs:: Display specs that replace the text. |
| 1352 | * Specified Space:: Displaying one space with a specified width. | 1352 | * Specified Space:: Displaying one space with a specified width. |
| 1353 | * Pixel Specification:: Specifying space width or height in pixels. | 1353 | * Pixel Specification:: Specifying space width or height in pixels. |
| 1354 | * Other Display Specs:: Displaying an image; magnifying text; moving it | 1354 | * Other Display Specs:: Displaying an image; adjusting the height, |
| 1355 | up or down on the page; adjusting the width | 1355 | spacing, and other properties of text. |
| 1356 | of spaces within text. | ||
| 1357 | * Display Margins:: Displaying text or images to the side of | 1356 | * Display Margins:: Displaying text or images to the side of |
| 1358 | the main text. | 1357 | the main text. |
| 1359 | 1358 | ||
diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi index 6833e5219f3..7832b3a8614 100644 --- a/doc/lispref/vol2.texi +++ b/doc/lispref/vol2.texi | |||
| @@ -1350,9 +1350,8 @@ The @code{display} Property | |||
| 1350 | * Replacing Specs:: Display specs that replace the text. | 1350 | * Replacing Specs:: Display specs that replace the text. |
| 1351 | * Specified Space:: Displaying one space with a specified width. | 1351 | * Specified Space:: Displaying one space with a specified width. |
| 1352 | * Pixel Specification:: Specifying space width or height in pixels. | 1352 | * Pixel Specification:: Specifying space width or height in pixels. |
| 1353 | * Other Display Specs:: Displaying an image; magnifying text; moving it | 1353 | * Other Display Specs:: Displaying an image; adjusting the height, |
| 1354 | up or down on the page; adjusting the width | 1354 | spacing, and other properties of text. |
| 1355 | of spaces within text. | ||
| 1356 | * Display Margins:: Displaying text or images to the side of | 1355 | * Display Margins:: Displaying text or images to the side of |
| 1357 | the main text. | 1356 | the main text. |
| 1358 | 1357 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 00460741961..b2e5e98016e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,51 @@ | |||
| 1 | 2011-01-31 Alan Mackenzie <acm@muc.de> | ||
| 2 | |||
| 3 | * progmodes/cc-cmds.el (c-forward-over-illiterals): Continue | ||
| 4 | parsing if we encounter a naked # (Bug#7595). | ||
| 5 | (c-beginning-of-statement): Avoid loop in locating the beginning | ||
| 6 | of a macro. | ||
| 7 | |||
| 8 | 2011-01-31 Chong Yidong <cyd@stupidchicken.com> | ||
| 9 | |||
| 10 | * files.el (copy-directory): Fix arguments to recursive call. | ||
| 11 | |||
| 12 | 2011-01-31 Chong Yidong <cyd@stupidchicken.com> | ||
| 13 | |||
| 14 | * files.el (copy-directory): If destination is an existing | ||
| 15 | directory, copy into a subdirectory there. | ||
| 16 | |||
| 17 | 2011-01-31 Andreas Schwab <schwab@linux-m68k.org> | ||
| 18 | |||
| 19 | * emacs-lisp/shadow.el (load-path-shadows-find): Ignore leim-list | ||
| 20 | files. | ||
| 21 | |||
| 22 | 2011-01-31 Chong Yidong <cyd@stupidchicken.com> | ||
| 23 | |||
| 24 | * image-dired.el (image-dired-mouse-display-image): No-op if no | ||
| 25 | file is found (Bug#7817). | ||
| 26 | |||
| 27 | * mouse.el (mouse-menu-non-singleton): Doc fix (Bug#7801). | ||
| 28 | |||
| 29 | 2011-01-31 Kenichi Handa <handa@m17n.org> | ||
| 30 | |||
| 31 | * international/quail.el (quail-keyboard-layout-alist): Remove | ||
| 32 | superfluous SPC for "pc105-uk" (bug#7927). | ||
| 33 | |||
| 34 | 2011-01-31 Glenn Morris <rgm@gnu.org> | ||
| 35 | |||
| 36 | * msb.el (msb-menu-bar-update-buffers): Update for changed | ||
| 37 | argument handling of menu-bar-select-frame. (Bug#7902) | ||
| 38 | |||
| 39 | 2011-01-31 Chong Yidong <cyd@stupidchicken.com> | ||
| 40 | |||
| 41 | * progmodes/cc-engine.el (c-forward-<>-arglist-recur): Set a limit | ||
| 42 | to the recursion depth (Bug#7722). | ||
| 43 | |||
| 44 | 2011-01-31 Roy Liu <carsomyr@gmail.com> (tiny change) | ||
| 45 | |||
| 46 | * term/ns-win.el (ns-find-file): Expand ns-input-file with | ||
| 47 | command-line-default-directory (Bug#7872). | ||
| 48 | |||
| 1 | 2011-01-31 Stefan Monnier <monnier@iro.umontreal.ca> | 49 | 2011-01-31 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 50 | ||
| 3 | * progmodes/compile.el (compilation--flush-directory-cache): | 51 | * progmodes/compile.el (compilation--flush-directory-cache): |
diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el index c5bad3bd40f..d5bba20b1cd 100644 --- a/lisp/emacs-lisp/shadow.el +++ b/lisp/emacs-lisp/shadow.el | |||
| @@ -115,7 +115,7 @@ See the documentation for `list-load-path-shadows' for further information." | |||
| 115 | ;; FILE now contains the current file name, with no suffix. | 115 | ;; FILE now contains the current file name, with no suffix. |
| 116 | (unless (or (member file files-seen-this-dir) | 116 | (unless (or (member file files-seen-this-dir) |
| 117 | ;; Ignore these files. | 117 | ;; Ignore these files. |
| 118 | (member file '("subdirs"))) | 118 | (member file '("subdirs" "leim-list"))) |
| 119 | ;; File has not been seen yet in this directory. | 119 | ;; File has not been seen yet in this directory. |
| 120 | ;; This test prevents us declaring that XXX.el shadows | 120 | ;; This test prevents us declaring that XXX.el shadows |
| 121 | ;; XXX.elc (or vice-versa) when they are in the same directory. | 121 | ;; XXX.elc (or vice-versa) when they are in the same directory. |
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 879dd228562..ee81bc48693 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-01-31 Antoine Levitt <antoine.levitt@gmail.com> (tiny change) | ||
| 2 | |||
| 3 | * erc-track.el (track): Don't reset erc-modified-channels-object | ||
| 4 | each time erc-track-mode is activated. | ||
| 5 | |||
| 1 | 2011-01-13 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2011-01-13 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * erc.el (erc-mode): | 8 | * erc.el (erc-mode): |
diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el index b15cdb023a6..de920eb9c33 100644 --- a/lisp/erc/erc-track.el +++ b/lisp/erc/erc-track.el | |||
| @@ -648,7 +648,6 @@ module, otherwise the keybindings will not do anything useful." | |||
| 648 | (add-hook 'erc-send-completed-hook 'erc-user-is-active) | 648 | (add-hook 'erc-send-completed-hook 'erc-user-is-active) |
| 649 | (add-hook 'erc-server-001-functions 'erc-user-is-active)) | 649 | (add-hook 'erc-server-001-functions 'erc-user-is-active)) |
| 650 | (erc-track-add-to-mode-line erc-track-position-in-mode-line) | 650 | (erc-track-add-to-mode-line erc-track-position-in-mode-line) |
| 651 | (setq erc-modified-channels-object (erc-modified-channels-object nil)) | ||
| 652 | (erc-update-mode-line) | 651 | (erc-update-mode-line) |
| 653 | (if (featurep 'xemacs) | 652 | (if (featurep 'xemacs) |
| 654 | (defadvice switch-to-buffer (after erc-update (&rest args) activate) | 653 | (defadvice switch-to-buffer (after erc-update (&rest args) activate) |
diff --git a/lisp/files.el b/lisp/files.el index 7abf5361bb4..8b42eaaddb8 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -4855,22 +4855,35 @@ this happens by default." | |||
| 4855 | ;; Compute target name. | 4855 | ;; Compute target name. |
| 4856 | (setq directory (directory-file-name (expand-file-name directory)) | 4856 | (setq directory (directory-file-name (expand-file-name directory)) |
| 4857 | newname (directory-file-name (expand-file-name newname))) | 4857 | newname (directory-file-name (expand-file-name newname))) |
| 4858 | (if (not (file-directory-p newname)) (make-directory newname parents)) | 4858 | |
| 4859 | (if (not (file-directory-p newname)) | ||
| 4860 | ;; If NEWNAME is not an existing directory, create it; that | ||
| 4861 | ;; is where we will copy the files of DIRECTORY. | ||
| 4862 | (make-directory newname parents) | ||
| 4863 | ;; If NEWNAME is an existing directory, we will copy into | ||
| 4864 | ;; NEWNAME/[DIRECTORY-BASENAME]. | ||
| 4865 | (setq newname (expand-file-name | ||
| 4866 | (file-name-nondirectory | ||
| 4867 | (directory-file-name directory)) | ||
| 4868 | newname)) | ||
| 4869 | (and (file-exists-p newname) | ||
| 4870 | (not (file-directory-p newname)) | ||
| 4871 | (error "Cannot overwrite non-directory %s with a directory" | ||
| 4872 | newname)) | ||
| 4873 | (make-directory newname t)) | ||
| 4859 | 4874 | ||
| 4860 | ;; Copy recursively. | 4875 | ;; Copy recursively. |
| 4861 | (mapc | 4876 | (dolist (file |
| 4862 | (lambda (file) | 4877 | ;; We do not want to copy "." and "..". |
| 4863 | (let ((target (expand-file-name | 4878 | (directory-files directory 'full |
| 4864 | (file-name-nondirectory file) newname)) | 4879 | directory-files-no-dot-files-regexp)) |
| 4865 | (attrs (file-attributes file))) | 4880 | (if (file-directory-p file) |
| 4866 | (cond ((file-directory-p file) | 4881 | (copy-directory file newname keep-time parents) |
| 4867 | (copy-directory file target keep-time parents)) | 4882 | (let ((target (expand-file-name (file-name-nondirectory file) newname)) |
| 4868 | ((stringp (car attrs)) ; Symbolic link | 4883 | (attrs (file-attributes file))) |
| 4869 | (make-symbolic-link (car attrs) target t)) | 4884 | (if (stringp (car attrs)) ; Symbolic link |
| 4870 | (t | 4885 | (make-symbolic-link (car attrs) target t) |
| 4871 | (copy-file file target t keep-time))))) | 4886 | (copy-file file target t keep-time))))) |
| 4872 | ;; We do not want to copy "." and "..". | ||
| 4873 | (directory-files directory 'full directory-files-no-dot-files-regexp)) | ||
| 4874 | 4887 | ||
| 4875 | ;; Set directory attributes. | 4888 | ;; Set directory attributes. |
| 4876 | (set-file-modes newname (file-modes directory)) | 4889 | (set-file-modes newname (file-modes directory)) |
diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 8c26b699568..8fa6963b3d7 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el | |||
| @@ -2194,15 +2194,15 @@ matching tag will be marked in the dired buffer." | |||
| 2194 | Track this in associated dired buffer if `image-dired-track-movement' is | 2194 | Track this in associated dired buffer if `image-dired-track-movement' is |
| 2195 | non-nil." | 2195 | non-nil." |
| 2196 | (interactive "e") | 2196 | (interactive "e") |
| 2197 | (let (file) | 2197 | (mouse-set-point event) |
| 2198 | (mouse-set-point event) | 2198 | (goto-char (posn-point (event-end event))) |
| 2199 | (goto-char (posn-point (event-end event))) | 2199 | (let ((file (image-dired-original-file-name))) |
| 2200 | (setq file (image-dired-original-file-name)) | 2200 | (when file |
| 2201 | (if image-dired-track-movement | 2201 | (if image-dired-track-movement |
| 2202 | (image-dired-track-original-file)) | 2202 | (image-dired-track-original-file)) |
| 2203 | (image-dired-create-display-image-buffer) | 2203 | (image-dired-create-display-image-buffer) |
| 2204 | (display-buffer image-dired-display-image-buffer) | 2204 | (display-buffer image-dired-display-image-buffer) |
| 2205 | (image-dired-display-image file))) | 2205 | (image-dired-display-image file)))) |
| 2206 | 2206 | ||
| 2207 | (defun image-dired-mouse-select-thumbnail (event) | 2207 | (defun image-dired-mouse-select-thumbnail (event) |
| 2208 | "Use mouse EVENT to select thumbnail image. | 2208 | "Use mouse EVENT to select thumbnail image. |
diff --git a/lisp/international/quail.el b/lisp/international/quail.el index c5842740dbf..2174beb19c9 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el | |||
| @@ -662,7 +662,7 @@ This layout is almost the same as that of VT100, | |||
| 662 | ") | 662 | ") |
| 663 | '("pc105-uk" . "\ | 663 | '("pc105-uk" . "\ |
| 664 | \ | 664 | \ |
| 665 | `\2541!2\"3\2434$5%6^7&8*9(0)-_=+ \ | 665 | `\2541!2\"3\2434$5%6^7&8*9(0)-_=+ \ |
| 666 | qQwWeErRtTyYuUiIoOpP[{]} \ | 666 | qQwWeErRtTyYuUiIoOpP[{]} \ |
| 667 | aAsSdDfFgGhHjJkKlL;:'@#~ \ | 667 | aAsSdDfFgGhHjJkKlL;:'@#~ \ |
| 668 | \\|zZxXcCvVbBnNmM,<.>/? \ | 668 | \\|zZxXcCvVbBnNmM,<.>/? \ |
diff --git a/lisp/mouse.el b/lisp/mouse.el index c572263f3ba..c0b86d45028 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -201,9 +201,9 @@ items `Turn Off' and `Help'." | |||
| 201 | newmap)) | 201 | newmap)) |
| 202 | 202 | ||
| 203 | (defun mouse-menu-non-singleton (menubar) | 203 | (defun mouse-menu-non-singleton (menubar) |
| 204 | "Given menu keymap, | 204 | "Return menu keybar MENUBAR, or a lone submenu inside it. |
| 205 | if it defines exactly one submenu, return just that submenu. | 205 | If MENUBAR defines exactly one submenu, return just that submenu. |
| 206 | Otherwise return the whole menu." | 206 | Otherwise, return MENUBAR." |
| 207 | (if menubar | 207 | (if menubar |
| 208 | (let (submap) | 208 | (let (submap) |
| 209 | (map-keymap | 209 | (map-keymap |
diff --git a/lisp/msb.el b/lisp/msb.el index fb9de914abf..1f84ef78164 100644 --- a/lisp/msb.el +++ b/lisp/msb.el | |||
| @@ -1114,7 +1114,8 @@ variable `msb-menu-cond'." | |||
| 1114 | (list (frame-parameter frame 'name) | 1114 | (list (frame-parameter frame 'name) |
| 1115 | (frame-parameter frame 'name) | 1115 | (frame-parameter frame 'name) |
| 1116 | (cons nil nil)) | 1116 | (cons nil nil)) |
| 1117 | 'menu-bar-select-frame)) | 1117 | `(lambda () |
| 1118 | (interactive) (menu-bar-select-frame ,frame)))) | ||
| 1118 | frames))))) | 1119 | frames))))) |
| 1119 | (setcdr global-buffers-menu-map | 1120 | (setcdr global-buffers-menu-map |
| 1120 | (if (and buffers-menu frames-menu) | 1121 | (if (and buffers-menu frames-menu) |
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 327ebea40cc..ec913e05c7e 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el | |||
| @@ -2440,13 +2440,15 @@ function does not require the declaration to contain a brace block." | |||
| 2440 | (goto-char last) | 2440 | (goto-char last) |
| 2441 | (throw 'done '(nil . nil))) | 2441 | (throw 'done '(nil . nil))) |
| 2442 | 2442 | ||
| 2443 | ;; Stop if we encounter a preprocessor line. | 2443 | ;; Stop if we encounter a preprocessor line. Continue if we |
| 2444 | ((and (not macro-end) | 2444 | ;; hit a naked # |
| 2445 | ((and c-opt-cpp-prefix | ||
| 2446 | (not macro-end) | ||
| 2445 | (eq (char-after) ?#) | 2447 | (eq (char-after) ?#) |
| 2446 | (= (point) (c-point 'boi))) | 2448 | (= (point) (c-point 'boi))) |
| 2447 | (goto-char last) | 2449 | (if (= (point) here) ; Not a macro, therefore naked #. |
| 2448 | ;(throw 'done (cons (eq (point) here) 'macro-boundary))) ; Changed 2003/3/26 | 2450 | (forward-char) |
| 2449 | (throw 'done '(t . macro-boundary))) | 2451 | (throw 'done '(t . macro-boundary)))) |
| 2450 | 2452 | ||
| 2451 | ;; Stop after a ';', '}', or "};" | 2453 | ;; Stop after a ';', '}', or "};" |
| 2452 | ((looking-at ";\\|};?") | 2454 | ((looking-at ";\\|};?") |
| @@ -2560,14 +2562,21 @@ be more \"DWIM:ey\"." | |||
| 2560 | (c-backward-syntactic-ws)) | 2562 | (c-backward-syntactic-ws)) |
| 2561 | (or (bobp) (c-after-statement-terminator-p))))))) | 2563 | (or (bobp) (c-after-statement-terminator-p))))))) |
| 2562 | ;; Are we about to move backwards into or out of a | 2564 | ;; Are we about to move backwards into or out of a |
| 2563 | ;; preprocessor command? If so, locate it's beginning. | 2565 | ;; preprocessor command? If so, locate its beginning. |
| 2564 | (when (eq (cdr res) 'macro-boundary) | 2566 | (when (eq (cdr res) 'macro-boundary) |
| 2565 | (save-excursion | 2567 | (setq macro-fence |
| 2566 | (beginning-of-line) | 2568 | (save-excursion |
| 2567 | (setq macro-fence | 2569 | (if macro-fence |
| 2568 | (and (not (bobp)) | 2570 | (progn |
| 2569 | (progn (c-skip-ws-backward) (c-beginning-of-macro)) | 2571 | (end-of-line) |
| 2570 | (point))))) | 2572 | (and (not (eobp)) |
| 2573 | (progn (c-skip-ws-forward) | ||
| 2574 | (c-beginning-of-macro)) | ||
| 2575 | (progn (c-end-of-macro) | ||
| 2576 | (point)))) | ||
| 2577 | (and (not (eobp)) | ||
| 2578 | (c-beginning-of-macro) | ||
| 2579 | (progn (c-end-of-macro) (point))))))) | ||
| 2571 | ;; Are we about to move backwards into a literal? | 2580 | ;; Are we about to move backwards into a literal? |
| 2572 | (when (memq (cdr res) '(macro-boundary literal)) | 2581 | (when (memq (cdr res) '(macro-boundary literal)) |
| 2573 | (setq range (c-ascertain-preceding-literal))) | 2582 | (setq range (c-ascertain-preceding-literal))) |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 406ee1a91d9..f90d29bf009 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -5371,6 +5371,8 @@ comment at the start of cc-engine.el for more info." | |||
| 5371 | ;; cc-mode requires cc-fonts. | 5371 | ;; cc-mode requires cc-fonts. |
| 5372 | (declare-function c-fontify-recorded-types-and-refs "cc-fonts" ()) | 5372 | (declare-function c-fontify-recorded-types-and-refs "cc-fonts" ()) |
| 5373 | 5373 | ||
| 5374 | (defvar c-forward-<>-arglist-recur-depth) | ||
| 5375 | |||
| 5374 | (defun c-forward-<>-arglist (all-types) | 5376 | (defun c-forward-<>-arglist (all-types) |
| 5375 | ;; The point is assumed to be at a "<". Try to treat it as the open | 5377 | ;; The point is assumed to be at a "<". Try to treat it as the open |
| 5376 | ;; paren of an angle bracket arglist and move forward to the | 5378 | ;; 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." | |||
| 5396 | ;; If `c-record-type-identifiers' is set then activate | 5398 | ;; If `c-record-type-identifiers' is set then activate |
| 5397 | ;; recording of any found types that constitute an argument in | 5399 | ;; recording of any found types that constitute an argument in |
| 5398 | ;; the arglist. | 5400 | ;; the arglist. |
| 5399 | (c-record-found-types (if c-record-type-identifiers t))) | 5401 | (c-record-found-types (if c-record-type-identifiers t)) |
| 5402 | (c-forward-<>-arglist-recur--depth 0)) | ||
| 5400 | (if (catch 'angle-bracket-arglist-escape | 5403 | (if (catch 'angle-bracket-arglist-escape |
| 5401 | (setq c-record-found-types | 5404 | (setq c-record-found-types |
| 5402 | (c-forward-<>-arglist-recur all-types))) | 5405 | (c-forward-<>-arglist-recur all-types))) |
| @@ -5413,6 +5416,14 @@ comment at the start of cc-engine.el for more info." | |||
| 5413 | nil))) | 5416 | nil))) |
| 5414 | 5417 | ||
| 5415 | (defun c-forward-<>-arglist-recur (all-types) | 5418 | (defun c-forward-<>-arglist-recur (all-types) |
| 5419 | |||
| 5420 | ;; Temporary workaround for Bug#7722. | ||
| 5421 | (when (boundp 'c-forward-<>-arglist-recur--depth) | ||
| 5422 | (if (> c-forward-<>-arglist-recur--depth 200) | ||
| 5423 | (error "Max recursion depth reached in <> arglist") | ||
| 5424 | (setq c-forward-<>-arglist-recur--depth | ||
| 5425 | (1+ c-forward-<>-arglist-recur--depth)))) | ||
| 5426 | |||
| 5416 | ;; Recursive part of `c-forward-<>-arglist'. | 5427 | ;; Recursive part of `c-forward-<>-arglist'. |
| 5417 | ;; | 5428 | ;; |
| 5418 | ;; This function might do hidden buffer changes. | 5429 | ;; This function might do hidden buffer changes. |
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index 6286b83258b..712929ecec0 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el | |||
| @@ -487,7 +487,9 @@ unless the current buffer is a scratch buffer." | |||
| 487 | (defun ns-find-file () | 487 | (defun ns-find-file () |
| 488 | "Do a `find-file' with the `ns-input-file' as argument." | 488 | "Do a `find-file' with the `ns-input-file' as argument." |
| 489 | (interactive) | 489 | (interactive) |
| 490 | (let* ((f (file-truename (pop ns-input-file))) | 490 | (let* ((f (file-truename |
| 491 | (expand-file-name (pop ns-input-file) | ||
| 492 | command-line-default-directory))) | ||
| 491 | (file (find-file-noselect f)) | 493 | (file (find-file-noselect f)) |
| 492 | (bufwin1 (get-buffer-window file 'visible)) | 494 | (bufwin1 (get-buffer-window file 'visible)) |
| 493 | (bufwin2 (get-buffer-window "*scratch*" 'visibile))) | 495 | (bufwin2 (get-buffer-window "*scratch*" 'visibile))) |
diff --git a/src/ChangeLog b/src/ChangeLog index 7c4401c1c81..2353116c8bd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2011-01-31 Andreas Schwab <schwab@linux-m68k.org> | ||
| 2 | |||
| 3 | * image.c (DEF_IMGLIB_FN): Add parameter rettype, use it instead | ||
| 4 | of int. All uses adjusted. | ||
| 5 | (PNG_JMPBUF, png_load, jpeg_load, tiff_load, gif_load) | ||
| 6 | (svg_load_image): Remove casts. | ||
| 7 | |||
| 8 | 2011-01-31 Chong Yidong <cyd@stupidchicken.com> | ||
| 9 | |||
| 10 | * image.c (fn_png_longjmp, fn_png_set_longjmp_fn): New png | ||
| 11 | function definitions for compiling with libpng-1.5. | ||
| 12 | (PNG_LONGJMP, PNG_JMPBUF): New macros for libpng-1.5. | ||
| 13 | (my_png_error, png_load): Use them. Suggested by Thomas Klausner | ||
| 14 | (Bug#7908). | ||
| 15 | |||
| 1 | 2011-01-31 Eli Zaretskii <eliz@gnu.org> | 16 | 2011-01-31 Eli Zaretskii <eliz@gnu.org> |
| 2 | 17 | ||
| 3 | * s/ms-w32.h (HAVE_STRFTIME): Don't define. | 18 | * s/ms-w32.h (HAVE_STRFTIME): Don't define. |
diff --git a/src/image.c b/src/image.c index d533d7edee6..3b846bcc400 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -1896,7 +1896,7 @@ mark_image_cache (struct image_cache *c) | |||
| 1896 | #ifdef HAVE_NTGUI | 1896 | #ifdef HAVE_NTGUI |
| 1897 | 1897 | ||
| 1898 | /* Macro for defining functions that will be loaded from image DLLs. */ | 1898 | /* Macro for defining functions that will be loaded from image DLLs. */ |
| 1899 | #define DEF_IMGLIB_FN(func,args) int (FAR CDECL *fn_##func)args | 1899 | #define DEF_IMGLIB_FN(rettype,func,args) rettype (FAR CDECL *fn_##func)args |
| 1900 | 1900 | ||
| 1901 | /* Macro for loading those image functions from the library. */ | 1901 | /* Macro for loading those image functions from the library. */ |
| 1902 | #define LOAD_IMGLIB_FN(lib,func) { \ | 1902 | #define LOAD_IMGLIB_FN(lib,func) { \ |
| @@ -3251,12 +3251,12 @@ xpm_free_colors (Display *dpy, Colormap cmap, Pixel *pixels, int npixels, void * | |||
| 3251 | 3251 | ||
| 3252 | /* XPM library details. */ | 3252 | /* XPM library details. */ |
| 3253 | 3253 | ||
| 3254 | DEF_IMGLIB_FN (XpmFreeAttributes, (XpmAttributes *)); | 3254 | DEF_IMGLIB_FN (void, XpmFreeAttributes, (XpmAttributes *)); |
| 3255 | DEF_IMGLIB_FN (XpmCreateImageFromBuffer, (Display *, char *, xpm_XImage **, | 3255 | DEF_IMGLIB_FN (int, XpmCreateImageFromBuffer, (Display *, char *, xpm_XImage **, |
| 3256 | xpm_XImage **, XpmAttributes *)); | 3256 | xpm_XImage **, XpmAttributes *)); |
| 3257 | DEF_IMGLIB_FN (XpmReadFileToImage, (Display *, char *, xpm_XImage **, | 3257 | DEF_IMGLIB_FN (int, XpmReadFileToImage, (Display *, char *, xpm_XImage **, |
| 3258 | xpm_XImage **, XpmAttributes *)); | 3258 | xpm_XImage **, XpmAttributes *)); |
| 3259 | DEF_IMGLIB_FN (XImageFree, (xpm_XImage *)); | 3259 | DEF_IMGLIB_FN (void, XImageFree, (xpm_XImage *)); |
| 3260 | 3260 | ||
| 3261 | static int | 3261 | static int |
| 3262 | init_xpm_functions (Lisp_Object libraries) | 3262 | init_xpm_functions (Lisp_Object libraries) |
| @@ -5419,31 +5419,36 @@ png_image_p (Lisp_Object object) | |||
| 5419 | #ifdef HAVE_NTGUI | 5419 | #ifdef HAVE_NTGUI |
| 5420 | /* PNG library details. */ | 5420 | /* PNG library details. */ |
| 5421 | 5421 | ||
| 5422 | DEF_IMGLIB_FN (png_get_io_ptr, (png_structp)); | 5422 | DEF_IMGLIB_FN (png_voidp, png_get_io_ptr, (png_structp)); |
| 5423 | DEF_IMGLIB_FN (png_sig_cmp, (png_bytep, png_size_t, png_size_t)); | 5423 | DEF_IMGLIB_FN (int, png_sig_cmp, (png_bytep, png_size_t, png_size_t)); |
| 5424 | DEF_IMGLIB_FN (png_create_read_struct, (png_const_charp, png_voidp, | 5424 | DEF_IMGLIB_FN (png_structp, png_create_read_struct, (png_const_charp, png_voidp, |
| 5425 | png_error_ptr, png_error_ptr)); | 5425 | png_error_ptr, png_error_ptr)); |
| 5426 | DEF_IMGLIB_FN (png_create_info_struct, (png_structp)); | 5426 | DEF_IMGLIB_FN (png_infop, png_create_info_struct, (png_structp)); |
| 5427 | DEF_IMGLIB_FN (png_destroy_read_struct, (png_structpp, png_infopp, png_infopp)); | 5427 | DEF_IMGLIB_FN (void, png_destroy_read_struct, (png_structpp, png_infopp, png_infopp)); |
| 5428 | DEF_IMGLIB_FN (png_set_read_fn, (png_structp, png_voidp, png_rw_ptr)); | 5428 | DEF_IMGLIB_FN (void, png_set_read_fn, (png_structp, png_voidp, png_rw_ptr)); |
| 5429 | DEF_IMGLIB_FN (png_set_sig_bytes, (png_structp, int)); | 5429 | DEF_IMGLIB_FN (void, png_set_sig_bytes, (png_structp, int)); |
| 5430 | DEF_IMGLIB_FN (png_read_info, (png_structp, png_infop)); | 5430 | DEF_IMGLIB_FN (void, png_read_info, (png_structp, png_infop)); |
| 5431 | DEF_IMGLIB_FN (png_get_IHDR, (png_structp, png_infop, | 5431 | DEF_IMGLIB_FN (png_uint_32, png_get_IHDR, (png_structp, png_infop, |
| 5432 | png_uint_32 *, png_uint_32 *, | 5432 | png_uint_32 *, png_uint_32 *, |
| 5433 | int *, int *, int *, int *, int *)); | 5433 | int *, int *, int *, int *, int *)); |
| 5434 | DEF_IMGLIB_FN (png_get_valid, (png_structp, png_infop, png_uint_32)); | 5434 | DEF_IMGLIB_FN (png_uint_32, png_get_valid, (png_structp, png_infop, png_uint_32)); |
| 5435 | DEF_IMGLIB_FN (png_set_strip_16, (png_structp)); | 5435 | DEF_IMGLIB_FN (void, png_set_strip_16, (png_structp)); |
| 5436 | DEF_IMGLIB_FN (png_set_expand, (png_structp)); | 5436 | DEF_IMGLIB_FN (void, png_set_expand, (png_structp)); |
| 5437 | DEF_IMGLIB_FN (png_set_gray_to_rgb, (png_structp)); | 5437 | DEF_IMGLIB_FN (void, png_set_gray_to_rgb, (png_structp)); |
| 5438 | DEF_IMGLIB_FN (png_set_background, (png_structp, png_color_16p, | 5438 | DEF_IMGLIB_FN (void, png_set_background, (png_structp, png_color_16p, |
| 5439 | int, int, double)); | 5439 | int, int, double)); |
| 5440 | DEF_IMGLIB_FN (png_get_bKGD, (png_structp, png_infop, png_color_16p *)); | 5440 | DEF_IMGLIB_FN (png_uint_32, png_get_bKGD, (png_structp, png_infop, png_color_16p *)); |
| 5441 | DEF_IMGLIB_FN (png_read_update_info, (png_structp, png_infop)); | 5441 | DEF_IMGLIB_FN (void, png_read_update_info, (png_structp, png_infop)); |
| 5442 | DEF_IMGLIB_FN (png_get_channels, (png_structp, png_infop)); | 5442 | DEF_IMGLIB_FN (png_byte, png_get_channels, (png_structp, png_infop)); |
| 5443 | DEF_IMGLIB_FN (png_get_rowbytes, (png_structp, png_infop)); | 5443 | DEF_IMGLIB_FN (png_size_t, png_get_rowbytes, (png_structp, png_infop)); |
| 5444 | DEF_IMGLIB_FN (png_read_image, (png_structp, png_bytepp)); | 5444 | DEF_IMGLIB_FN (void, png_read_image, (png_structp, png_bytepp)); |
| 5445 | DEF_IMGLIB_FN (png_read_end, (png_structp, png_infop)); | 5445 | DEF_IMGLIB_FN (void, png_read_end, (png_structp, png_infop)); |
| 5446 | DEF_IMGLIB_FN (png_error, (png_structp, png_const_charp)); | 5446 | DEF_IMGLIB_FN (void, png_error, (png_structp, png_const_charp)); |
| 5447 | |||
| 5448 | #if (PNG_LIBPNG_VER >= 10500) | ||
| 5449 | DEF_IMGLIB_FN (void, png_longjmp, (png_structp, int)); | ||
| 5450 | DEF_IMGLIB_FN (jmp_buf *, png_set_longjmp_fn, (png_structp, png_longjmp_ptr, size_t)); | ||
| 5451 | #endif /* libpng version >= 1.5 */ | ||
| 5447 | 5452 | ||
| 5448 | static int | 5453 | static int |
| 5449 | init_png_functions (Lisp_Object libraries) | 5454 | init_png_functions (Lisp_Object libraries) |
| @@ -5475,6 +5480,12 @@ init_png_functions (Lisp_Object libraries) | |||
| 5475 | LOAD_IMGLIB_FN (library, png_read_image); | 5480 | LOAD_IMGLIB_FN (library, png_read_image); |
| 5476 | LOAD_IMGLIB_FN (library, png_read_end); | 5481 | LOAD_IMGLIB_FN (library, png_read_end); |
| 5477 | LOAD_IMGLIB_FN (library, png_error); | 5482 | LOAD_IMGLIB_FN (library, png_error); |
| 5483 | |||
| 5484 | #if (PNG_LIBPNG_VER >= 10500) | ||
| 5485 | LOAD_IMGLIB_FN (library, png_longjmp); | ||
| 5486 | LOAD_IMGLIB_FN (library, png_set_longjmp_fn); | ||
| 5487 | #endif /* libpng version >= 1.5 */ | ||
| 5488 | |||
| 5478 | return 1; | 5489 | return 1; |
| 5479 | } | 5490 | } |
| 5480 | #else | 5491 | #else |
| @@ -5501,8 +5512,24 @@ init_png_functions (Lisp_Object libraries) | |||
| 5501 | #define fn_png_read_end png_read_end | 5512 | #define fn_png_read_end png_read_end |
| 5502 | #define fn_png_error png_error | 5513 | #define fn_png_error png_error |
| 5503 | 5514 | ||
| 5515 | #if (PNG_LIBPNG_VER >= 10500) | ||
| 5516 | #define fn_png_longjmp png_longjmp | ||
| 5517 | #define fn_png_set_longjmp_fn png_set_longjmp_fn | ||
| 5518 | #endif /* libpng version >= 1.5 */ | ||
| 5519 | |||
| 5504 | #endif /* HAVE_NTGUI */ | 5520 | #endif /* HAVE_NTGUI */ |
| 5505 | 5521 | ||
| 5522 | |||
| 5523 | #if (PNG_LIBPNG_VER < 10500) | ||
| 5524 | #define PNG_LONGJMP(ptr) (longjmp ((ptr)->jmpbuf, 1)) | ||
| 5525 | #define PNG_JMPBUF(ptr) ((ptr)->jmpbuf) | ||
| 5526 | #else | ||
| 5527 | /* In libpng version 1.5, the jmpbuf member is hidden. (Bug#7908) */ | ||
| 5528 | #define PNG_LONGJMP(ptr) (fn_png_longjmp ((ptr), 1)) | ||
| 5529 | #define PNG_JMPBUF(ptr) \ | ||
| 5530 | (*fn_png_set_longjmp_fn((ptr), longjmp, sizeof (jmp_buf))) | ||
| 5531 | #endif | ||
| 5532 | |||
| 5506 | /* Error and warning handlers installed when the PNG library | 5533 | /* Error and warning handlers installed when the PNG library |
| 5507 | is initialized. */ | 5534 | is initialized. */ |
| 5508 | 5535 | ||
| @@ -5513,7 +5540,7 @@ my_png_error (png_struct *png_ptr, const char *msg) | |||
| 5513 | /* Avoid compiler warning about deprecated direct access to | 5540 | /* Avoid compiler warning about deprecated direct access to |
| 5514 | png_ptr's fields in libpng versions 1.4.x. */ | 5541 | png_ptr's fields in libpng versions 1.4.x. */ |
| 5515 | image_error ("PNG error: %s", build_string (msg), Qnil); | 5542 | image_error ("PNG error: %s", build_string (msg), Qnil); |
| 5516 | longjmp (png_ptr->jmpbuf, 1); | 5543 | PNG_LONGJMP (png_ptr); |
| 5517 | } | 5544 | } |
| 5518 | 5545 | ||
| 5519 | 5546 | ||
| @@ -5644,19 +5671,17 @@ png_load (struct frame *f, struct image *img) | |||
| 5644 | tbr.bytes += sizeof (sig); | 5671 | tbr.bytes += sizeof (sig); |
| 5645 | } | 5672 | } |
| 5646 | 5673 | ||
| 5647 | /* Initialize read and info structs for PNG lib. Casting return | 5674 | /* Initialize read and info structs for PNG lib. */ |
| 5648 | value avoids a GCC warning on W32. */ | 5675 | png_ptr = fn_png_create_read_struct (PNG_LIBPNG_VER_STRING, |
| 5649 | png_ptr = (png_structp)fn_png_create_read_struct (PNG_LIBPNG_VER_STRING, | 5676 | NULL, my_png_error, |
| 5650 | NULL, my_png_error, | 5677 | my_png_warning); |
| 5651 | my_png_warning); | ||
| 5652 | if (!png_ptr) | 5678 | if (!png_ptr) |
| 5653 | { | 5679 | { |
| 5654 | if (fp) fclose (fp); | 5680 | if (fp) fclose (fp); |
| 5655 | return 0; | 5681 | return 0; |
| 5656 | } | 5682 | } |
| 5657 | 5683 | ||
| 5658 | /* Casting return value avoids a GCC warning on W32. */ | 5684 | info_ptr = fn_png_create_info_struct (png_ptr); |
| 5659 | info_ptr = (png_infop)fn_png_create_info_struct (png_ptr); | ||
| 5660 | if (!info_ptr) | 5685 | if (!info_ptr) |
| 5661 | { | 5686 | { |
| 5662 | fn_png_destroy_read_struct (&png_ptr, NULL, NULL); | 5687 | fn_png_destroy_read_struct (&png_ptr, NULL, NULL); |
| @@ -5664,8 +5689,7 @@ png_load (struct frame *f, struct image *img) | |||
| 5664 | return 0; | 5689 | return 0; |
| 5665 | } | 5690 | } |
| 5666 | 5691 | ||
| 5667 | /* Casting return value avoids a GCC warning on W32. */ | 5692 | end_info = fn_png_create_info_struct (png_ptr); |
| 5668 | end_info = (png_infop)fn_png_create_info_struct (png_ptr); | ||
| 5669 | if (!end_info) | 5693 | if (!end_info) |
| 5670 | { | 5694 | { |
| 5671 | fn_png_destroy_read_struct (&png_ptr, &info_ptr, NULL); | 5695 | fn_png_destroy_read_struct (&png_ptr, &info_ptr, NULL); |
| @@ -5675,7 +5699,7 @@ png_load (struct frame *f, struct image *img) | |||
| 5675 | 5699 | ||
| 5676 | /* Set error jump-back. We come back here when the PNG library | 5700 | /* Set error jump-back. We come back here when the PNG library |
| 5677 | detects an error. */ | 5701 | detects an error. */ |
| 5678 | if (setjmp (png_ptr->jmpbuf)) | 5702 | if (setjmp (PNG_JMPBUF (png_ptr))) |
| 5679 | { | 5703 | { |
| 5680 | error: | 5704 | error: |
| 5681 | if (png_ptr) | 5705 | if (png_ptr) |
| @@ -6028,14 +6052,14 @@ jpeg_image_p (Lisp_Object object) | |||
| 6028 | #ifdef HAVE_NTGUI | 6052 | #ifdef HAVE_NTGUI |
| 6029 | 6053 | ||
| 6030 | /* JPEG library details. */ | 6054 | /* JPEG library details. */ |
| 6031 | DEF_IMGLIB_FN (jpeg_CreateDecompress, (j_decompress_ptr, int, size_t)); | 6055 | DEF_IMGLIB_FN (void, jpeg_CreateDecompress, (j_decompress_ptr, int, size_t)); |
| 6032 | DEF_IMGLIB_FN (jpeg_start_decompress, (j_decompress_ptr)); | 6056 | DEF_IMGLIB_FN (boolean, jpeg_start_decompress, (j_decompress_ptr)); |
| 6033 | DEF_IMGLIB_FN (jpeg_finish_decompress, (j_decompress_ptr)); | 6057 | DEF_IMGLIB_FN (boolean, jpeg_finish_decompress, (j_decompress_ptr)); |
| 6034 | DEF_IMGLIB_FN (jpeg_destroy_decompress, (j_decompress_ptr)); | 6058 | DEF_IMGLIB_FN (void, jpeg_destroy_decompress, (j_decompress_ptr)); |
| 6035 | DEF_IMGLIB_FN (jpeg_read_header, (j_decompress_ptr, boolean)); | 6059 | DEF_IMGLIB_FN (int, jpeg_read_header, (j_decompress_ptr, boolean)); |
| 6036 | DEF_IMGLIB_FN (jpeg_read_scanlines, (j_decompress_ptr, JSAMPARRAY, JDIMENSION)); | 6060 | DEF_IMGLIB_FN (JDIMENSION, jpeg_read_scanlines, (j_decompress_ptr, JSAMPARRAY, JDIMENSION)); |
| 6037 | DEF_IMGLIB_FN (jpeg_std_error, (struct jpeg_error_mgr *)); | 6061 | DEF_IMGLIB_FN (struct jpeg_error_mgr *, jpeg_std_error, (struct jpeg_error_mgr *)); |
| 6038 | DEF_IMGLIB_FN (jpeg_resync_to_restart, (j_decompress_ptr, int)); | 6062 | DEF_IMGLIB_FN (boolean, jpeg_resync_to_restart, (j_decompress_ptr, int)); |
| 6039 | 6063 | ||
| 6040 | static int | 6064 | static int |
| 6041 | init_jpeg_functions (Lisp_Object libraries) | 6065 | init_jpeg_functions (Lisp_Object libraries) |
| @@ -6335,9 +6359,8 @@ jpeg_load (struct frame *f, struct image *img) | |||
| 6335 | } | 6359 | } |
| 6336 | 6360 | ||
| 6337 | /* Customize libjpeg's error handling to call my_error_exit when an | 6361 | /* Customize libjpeg's error handling to call my_error_exit when an |
| 6338 | error is detected. This function will perform a longjmp. | 6362 | error is detected. This function will perform a longjmp. */ |
| 6339 | Casting return value avoids a GCC warning on W32. */ | 6363 | cinfo.err = fn_jpeg_std_error (&mgr.pub); |
| 6340 | cinfo.err = (struct jpeg_error_mgr *)fn_jpeg_std_error (&mgr.pub); | ||
| 6341 | mgr.pub.error_exit = my_error_exit; | 6364 | mgr.pub.error_exit = my_error_exit; |
| 6342 | 6365 | ||
| 6343 | if ((rc = setjmp (mgr.setjmp_buffer)) != 0) | 6366 | if ((rc = setjmp (mgr.setjmp_buffer)) != 0) |
| @@ -6561,17 +6584,17 @@ tiff_image_p (Lisp_Object object) | |||
| 6561 | #ifdef HAVE_NTGUI | 6584 | #ifdef HAVE_NTGUI |
| 6562 | 6585 | ||
| 6563 | /* TIFF library details. */ | 6586 | /* TIFF library details. */ |
| 6564 | DEF_IMGLIB_FN (TIFFSetErrorHandler, (TIFFErrorHandler)); | 6587 | DEF_IMGLIB_FN (TIFFErrorHandler, TIFFSetErrorHandler, (TIFFErrorHandler)); |
| 6565 | DEF_IMGLIB_FN (TIFFSetWarningHandler, (TIFFErrorHandler)); | 6588 | DEF_IMGLIB_FN (TIFFErrorHandler, TIFFSetWarningHandler, (TIFFErrorHandler)); |
| 6566 | DEF_IMGLIB_FN (TIFFOpen, (const char *, const char *)); | 6589 | DEF_IMGLIB_FN (TIFF *, TIFFOpen, (const char *, const char *)); |
| 6567 | DEF_IMGLIB_FN (TIFFClientOpen, (const char *, const char *, thandle_t, | 6590 | DEF_IMGLIB_FN (TIFF *, TIFFClientOpen, (const char *, const char *, thandle_t, |
| 6568 | TIFFReadWriteProc, TIFFReadWriteProc, | 6591 | TIFFReadWriteProc, TIFFReadWriteProc, |
| 6569 | TIFFSeekProc, TIFFCloseProc, TIFFSizeProc, | 6592 | TIFFSeekProc, TIFFCloseProc, TIFFSizeProc, |
| 6570 | TIFFMapFileProc, TIFFUnmapFileProc)); | 6593 | TIFFMapFileProc, TIFFUnmapFileProc)); |
| 6571 | DEF_IMGLIB_FN (TIFFGetField, (TIFF *, ttag_t, ...)); | 6594 | DEF_IMGLIB_FN (int, TIFFGetField, (TIFF *, ttag_t, ...)); |
| 6572 | DEF_IMGLIB_FN (TIFFReadRGBAImage, (TIFF *, uint32, uint32, uint32 *, int)); | 6595 | DEF_IMGLIB_FN (int, TIFFReadRGBAImage, (TIFF *, uint32, uint32, uint32 *, int)); |
| 6573 | DEF_IMGLIB_FN (TIFFClose, (TIFF *)); | 6596 | DEF_IMGLIB_FN (void, TIFFClose, (TIFF *)); |
| 6574 | DEF_IMGLIB_FN (TIFFSetDirectory, (TIFF *, tdir_t)); | 6597 | DEF_IMGLIB_FN (int, TIFFSetDirectory, (TIFF *, tdir_t)); |
| 6575 | 6598 | ||
| 6576 | static int | 6599 | static int |
| 6577 | init_tiff_functions (Lisp_Object libraries) | 6600 | init_tiff_functions (Lisp_Object libraries) |
| @@ -6754,9 +6777,8 @@ tiff_load (struct frame *f, struct image *img) | |||
| 6754 | return 0; | 6777 | return 0; |
| 6755 | } | 6778 | } |
| 6756 | 6779 | ||
| 6757 | /* Try to open the image file. Casting return value avoids a | 6780 | /* Try to open the image file. */ |
| 6758 | GCC warning on W32. */ | 6781 | tiff = fn_TIFFOpen (SDATA (file), "r"); |
| 6759 | tiff = (TIFF *)fn_TIFFOpen (SSDATA (file), "r"); | ||
| 6760 | if (tiff == NULL) | 6782 | if (tiff == NULL) |
| 6761 | { | 6783 | { |
| 6762 | image_error ("Cannot open `%s'", file, Qnil); | 6784 | image_error ("Cannot open `%s'", file, Qnil); |
| @@ -6776,16 +6798,14 @@ tiff_load (struct frame *f, struct image *img) | |||
| 6776 | memsrc.len = SBYTES (specified_data); | 6798 | memsrc.len = SBYTES (specified_data); |
| 6777 | memsrc.index = 0; | 6799 | memsrc.index = 0; |
| 6778 | 6800 | ||
| 6779 | /* Casting arguments return value avoids a GCC warning on W32. */ | 6801 | tiff = fn_TIFFClientOpen ("memory_source", "r", &memsrc, |
| 6780 | tiff = (TIFF *)fn_TIFFClientOpen ("memory_source", "r", | 6802 | (TIFFReadWriteProc) tiff_read_from_memory, |
| 6781 | (thandle_t) &memsrc, | 6803 | (TIFFReadWriteProc) tiff_write_from_memory, |
| 6782 | (TIFFReadWriteProc) tiff_read_from_memory, | 6804 | tiff_seek_in_memory, |
| 6783 | (TIFFReadWriteProc) tiff_write_from_memory, | 6805 | tiff_close_memory, |
| 6784 | tiff_seek_in_memory, | 6806 | tiff_size_of_memory, |
| 6785 | tiff_close_memory, | 6807 | tiff_mmap_memory, |
| 6786 | tiff_size_of_memory, | 6808 | tiff_unmap_memory); |
| 6787 | tiff_mmap_memory, | ||
| 6788 | tiff_unmap_memory); | ||
| 6789 | 6809 | ||
| 6790 | if (!tiff) | 6810 | if (!tiff) |
| 6791 | { | 6811 | { |
| @@ -7014,10 +7034,10 @@ gif_image_p (Lisp_Object object) | |||
| 7014 | #ifdef HAVE_NTGUI | 7034 | #ifdef HAVE_NTGUI |
| 7015 | 7035 | ||
| 7016 | /* GIF library details. */ | 7036 | /* GIF library details. */ |
| 7017 | DEF_IMGLIB_FN (DGifCloseFile, (GifFileType *)); | 7037 | DEF_IMGLIB_FN (int, DGifCloseFile, (GifFileType *)); |
| 7018 | DEF_IMGLIB_FN (DGifSlurp, (GifFileType *)); | 7038 | DEF_IMGLIB_FN (int, DGifSlurp, (GifFileType *)); |
| 7019 | DEF_IMGLIB_FN (DGifOpen, (void *, InputFunc)); | 7039 | DEF_IMGLIB_FN (GifFileType *, DGifOpen, (void *, InputFunc)); |
| 7020 | DEF_IMGLIB_FN (DGifOpenFileName, (const char *)); | 7040 | DEF_IMGLIB_FN (GifFileType *, DGifOpenFileName, (const char *)); |
| 7021 | 7041 | ||
| 7022 | static int | 7042 | static int |
| 7023 | init_gif_functions (Lisp_Object libraries) | 7043 | init_gif_functions (Lisp_Object libraries) |
| @@ -7110,9 +7130,8 @@ gif_load (struct frame *f, struct image *img) | |||
| 7110 | return 0; | 7130 | return 0; |
| 7111 | } | 7131 | } |
| 7112 | 7132 | ||
| 7113 | /* Open the GIF file. Casting return value avoids a GCC warning | 7133 | /* Open the GIF file. */ |
| 7114 | on W32. */ | 7134 | gif = fn_DGifOpenFileName (SDATA (file)); |
| 7115 | gif = (GifFileType *)fn_DGifOpenFileName (SDATA (file)); | ||
| 7116 | if (gif == NULL) | 7135 | if (gif == NULL) |
| 7117 | { | 7136 | { |
| 7118 | image_error ("Cannot open `%s'", file, Qnil); | 7137 | image_error ("Cannot open `%s'", file, Qnil); |
| @@ -7133,8 +7152,7 @@ gif_load (struct frame *f, struct image *img) | |||
| 7133 | memsrc.len = SBYTES (specified_data); | 7152 | memsrc.len = SBYTES (specified_data); |
| 7134 | memsrc.index = 0; | 7153 | memsrc.index = 0; |
| 7135 | 7154 | ||
| 7136 | /* Casting return value avoids a GCC warning on W32. */ | 7155 | gif = fn_DGifOpen (&memsrc, gif_read_from_memory); |
| 7137 | gif = (GifFileType *) fn_DGifOpen (&memsrc, gif_read_from_memory); | ||
| 7138 | if (!gif) | 7156 | if (!gif) |
| 7139 | { | 7157 | { |
| 7140 | image_error ("Cannot open memory source `%s'", img->spec, Qnil); | 7158 | image_error ("Cannot open memory source `%s'", img->spec, Qnil); |
| @@ -7982,25 +8000,25 @@ svg_image_p (Lisp_Object object) | |||
| 7982 | #ifdef HAVE_NTGUI | 8000 | #ifdef HAVE_NTGUI |
| 7983 | 8001 | ||
| 7984 | /* SVG library functions. */ | 8002 | /* SVG library functions. */ |
| 7985 | DEF_IMGLIB_FN (rsvg_handle_new); | 8003 | DEF_IMGLIB_FN (RsvgHandle *, rsvg_handle_new); |
| 7986 | DEF_IMGLIB_FN (rsvg_handle_get_dimensions); | 8004 | DEF_IMGLIB_FN (void, rsvg_handle_get_dimensions); |
| 7987 | DEF_IMGLIB_FN (rsvg_handle_write); | 8005 | DEF_IMGLIB_FN (gboolean, rsvg_handle_write); |
| 7988 | DEF_IMGLIB_FN (rsvg_handle_close); | 8006 | DEF_IMGLIB_FN (gboolean, rsvg_handle_close); |
| 7989 | DEF_IMGLIB_FN (rsvg_handle_get_pixbuf); | 8007 | DEF_IMGLIB_FN (GdkPixbuf *, rsvg_handle_get_pixbuf); |
| 7990 | DEF_IMGLIB_FN (rsvg_handle_free); | 8008 | DEF_IMGLIB_FN (void, rsvg_handle_free); |
| 7991 | 8009 | ||
| 7992 | DEF_IMGLIB_FN (gdk_pixbuf_get_width); | 8010 | DEF_IMGLIB_FN (int, gdk_pixbuf_get_width); |
| 7993 | DEF_IMGLIB_FN (gdk_pixbuf_get_height); | 8011 | DEF_IMGLIB_FN (int, gdk_pixbuf_get_height); |
| 7994 | DEF_IMGLIB_FN (gdk_pixbuf_get_pixels); | 8012 | DEF_IMGLIB_FN (guchar *, gdk_pixbuf_get_pixels); |
| 7995 | DEF_IMGLIB_FN (gdk_pixbuf_get_rowstride); | 8013 | DEF_IMGLIB_FN (int, gdk_pixbuf_get_rowstride); |
| 7996 | DEF_IMGLIB_FN (gdk_pixbuf_get_colorspace); | 8014 | DEF_IMGLIB_FN (GdkColorspace, gdk_pixbuf_get_colorspace); |
| 7997 | DEF_IMGLIB_FN (gdk_pixbuf_get_n_channels); | 8015 | DEF_IMGLIB_FN (int, gdk_pixbuf_get_n_channels); |
| 7998 | DEF_IMGLIB_FN (gdk_pixbuf_get_has_alpha); | 8016 | DEF_IMGLIB_FN (gboolean, gdk_pixbuf_get_has_alpha); |
| 7999 | DEF_IMGLIB_FN (gdk_pixbuf_get_bits_per_sample); | 8017 | DEF_IMGLIB_FN (int, gdk_pixbuf_get_bits_per_sample); |
| 8000 | 8018 | ||
| 8001 | DEF_IMGLIB_FN (g_type_init); | 8019 | DEF_IMGLIB_FN (void, g_type_init); |
| 8002 | DEF_IMGLIB_FN (g_object_unref); | 8020 | DEF_IMGLIB_FN (void, g_object_unref); |
| 8003 | DEF_IMGLIB_FN (g_error_free); | 8021 | DEF_IMGLIB_FN (void, g_error_free); |
| 8004 | 8022 | ||
| 8005 | Lisp_Object Qgdk_pixbuf, Qglib, Qgobject; | 8023 | Lisp_Object Qgdk_pixbuf, Qglib, Qgobject; |
| 8006 | 8024 | ||
| @@ -8147,7 +8165,7 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * | |||
| 8147 | gnome type library functions. */ | 8165 | gnome type library functions. */ |
| 8148 | fn_g_type_init (); | 8166 | fn_g_type_init (); |
| 8149 | /* Make a handle to a new rsvg object. */ | 8167 | /* Make a handle to a new rsvg object. */ |
| 8150 | rsvg_handle = (RsvgHandle *) fn_rsvg_handle_new (); | 8168 | rsvg_handle = fn_rsvg_handle_new (); |
| 8151 | 8169 | ||
| 8152 | /* Parse the contents argument and fill in the rsvg_handle. */ | 8170 | /* Parse the contents argument and fill in the rsvg_handle. */ |
| 8153 | fn_rsvg_handle_write (rsvg_handle, contents, size, &error); | 8171 | fn_rsvg_handle_write (rsvg_handle, contents, size, &error); |
| @@ -8167,14 +8185,14 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * | |||
| 8167 | 8185 | ||
| 8168 | /* We can now get a valid pixel buffer from the svg file, if all | 8186 | /* We can now get a valid pixel buffer from the svg file, if all |
| 8169 | went ok. */ | 8187 | went ok. */ |
| 8170 | pixbuf = (GdkPixbuf *) fn_rsvg_handle_get_pixbuf (rsvg_handle); | 8188 | pixbuf = fn_rsvg_handle_get_pixbuf (rsvg_handle); |
| 8171 | if (!pixbuf) goto rsvg_error; | 8189 | if (!pixbuf) goto rsvg_error; |
| 8172 | fn_g_object_unref (rsvg_handle); | 8190 | fn_g_object_unref (rsvg_handle); |
| 8173 | 8191 | ||
| 8174 | /* Extract some meta data from the svg handle. */ | 8192 | /* Extract some meta data from the svg handle. */ |
| 8175 | width = fn_gdk_pixbuf_get_width (pixbuf); | 8193 | width = fn_gdk_pixbuf_get_width (pixbuf); |
| 8176 | height = fn_gdk_pixbuf_get_height (pixbuf); | 8194 | height = fn_gdk_pixbuf_get_height (pixbuf); |
| 8177 | pixels = (const guint8 *) fn_gdk_pixbuf_get_pixels (pixbuf); | 8195 | pixels = fn_gdk_pixbuf_get_pixels (pixbuf); |
| 8178 | rowstride = fn_gdk_pixbuf_get_rowstride (pixbuf); | 8196 | rowstride = fn_gdk_pixbuf_get_rowstride (pixbuf); |
| 8179 | 8197 | ||
| 8180 | /* Validate the svg meta data. */ | 8198 | /* Validate the svg meta data. */ |