diff options
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/image.c b/src/image.c index 73490fe2865..b6cdb6c8290 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | /* Functions for image support on window system. | 1 | /* Functions for image support on window system. |
| 2 | Copyright (C) 1989, 1992-2012 Free Software Foundation, Inc. | 2 | |
| 3 | Copyright (C) 1989, 1992-2012 Free Software Foundation, Inc. | ||
| 3 | 4 | ||
| 4 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 5 | 6 | ||
| @@ -771,10 +772,9 @@ parse_image_spec (Lisp_Object spec, struct image_keyword *keywords, | |||
| 771 | /* Record that we recognized the keyword. If a keywords | 772 | /* Record that we recognized the keyword. If a keywords |
| 772 | was found more than once, it's an error. */ | 773 | was found more than once, it's an error. */ |
| 773 | keywords[i].value = value; | 774 | keywords[i].value = value; |
| 774 | ++keywords[i].count; | ||
| 775 | |||
| 776 | if (keywords[i].count > 1) | 775 | if (keywords[i].count > 1) |
| 777 | return 0; | 776 | return 0; |
| 777 | ++keywords[i].count; | ||
| 778 | 778 | ||
| 779 | /* Check type of value against allowed type. */ | 779 | /* Check type of value against allowed type. */ |
| 780 | switch (keywords[i].type) | 780 | switch (keywords[i].type) |
| @@ -1754,6 +1754,7 @@ lookup_image (struct frame *f, Lisp_Object spec) | |||
| 1754 | `:ascent ASCENT', `:margin MARGIN', `:relief RELIEF', | 1754 | `:ascent ASCENT', `:margin MARGIN', `:relief RELIEF', |
| 1755 | `:background COLOR'. */ | 1755 | `:background COLOR'. */ |
| 1756 | Lisp_Object ascent, margin, relief, bg; | 1756 | Lisp_Object ascent, margin, relief, bg; |
| 1757 | int relief_bound; | ||
| 1757 | 1758 | ||
| 1758 | ascent = image_spec_value (spec, QCascent, NULL); | 1759 | ascent = image_spec_value (spec, QCascent, NULL); |
| 1759 | if (INTEGERP (ascent)) | 1760 | if (INTEGERP (ascent)) |
| @@ -1771,7 +1772,8 @@ lookup_image (struct frame *f, Lisp_Object spec) | |||
| 1771 | } | 1772 | } |
| 1772 | 1773 | ||
| 1773 | relief = image_spec_value (spec, QCrelief, NULL); | 1774 | relief = image_spec_value (spec, QCrelief, NULL); |
| 1774 | if (INTEGERP (relief)) | 1775 | relief_bound = INT_MAX - max (img->hmargin, img->vmargin); |
| 1776 | if (RANGED_INTEGERP (- relief_bound, relief, relief_bound)) | ||
| 1775 | { | 1777 | { |
| 1776 | img->relief = XINT (relief); | 1778 | img->relief = XINT (relief); |
| 1777 | img->hmargin += eabs (img->relief); | 1779 | img->hmargin += eabs (img->relief); |
| @@ -7986,7 +7988,8 @@ their descriptions (http://www.imagemagick.org/script/formats.php). | |||
| 7986 | You can also try the shell command: `identify -list format'. | 7988 | You can also try the shell command: `identify -list format'. |
| 7987 | 7989 | ||
| 7988 | Note that ImageMagick recognizes many file-types that Emacs does not | 7990 | Note that ImageMagick recognizes many file-types that Emacs does not |
| 7989 | recognize as images, such as C. See `imagemagick-types-inhibit'. */) | 7991 | recognize as images, such as C. See `imagemagick-types-enable' |
| 7992 | and `imagemagick-types-inhibit'. */) | ||
| 7990 | (void) | 7993 | (void) |
| 7991 | { | 7994 | { |
| 7992 | Lisp_Object typelist = Qnil; | 7995 | Lisp_Object typelist = Qnil; |