aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/lispref/display.texi10
-rw-r--r--etc/NEWS4
-rw-r--r--lisp/image.el4
-rw-r--r--lisp/net/shr.el4
-rw-r--r--src/ChangeLog5
-rw-r--r--src/image.c12
-rw-r--r--src/nsmenu.m4
7 files changed, 25 insertions, 18 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index f2fd51e6ae5..0f296bf31c5 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -4664,12 +4664,12 @@ and if @code{:height} is set it will have precedence over
4664wish. @code{:max-width} and @code{:max-height} will always preserve 4664wish. @code{:max-width} and @code{:max-height} will always preserve
4665the aspect ratio. 4665the aspect ratio.
4666 4666
4667@item :content-type 4667@item :format
4668ImageMagick tries to auto-detect the image type, but it isn't always 4668ImageMagick tries to auto-detect the image type, but it isn't always
4669able to. By using @code{:content-type}, we can give ImageMagick a 4669able to. By using @code{:format-type}, we can give ImageMagick a hint
4670hint to try to help it. It's used in conjuction with the 4670to try to help it. It's used in conjuction with the
4671@code{image-content-type-suffixes} variable, which provides a mapping 4671@code{image-format-suffixes} variable, which provides a mapping from
4672from content types to file name suffixes. This is then given to 4672content types to file name suffixes. This is then given to
4673ImageMagick as a file name hint. 4673ImageMagick as a file name hint.
4674 4674
4675@item :rotation 4675@item :rotation
diff --git a/etc/NEWS b/etc/NEWS
index 80310ea19a1..ef76f308303 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -897,8 +897,8 @@ treated as images.
897keywords. 897keywords.
898 898
899*** Some data types aren't auto-detected by ImageMagick. Adding 899*** Some data types aren't auto-detected by ImageMagick. Adding
900:content-type to `create-image' may help if the content type is in the 900:format to `create-image' may help if the content type is in the
901new variable `image-content-type-suffixes'. 901new variable `image-format-suffixes'.
902 902
903** Minibuffer 903** Minibuffer
904 904
diff --git a/lisp/image.el b/lisp/image.el
index de69490f5b6..d213c5d6d79 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -99,11 +99,11 @@ AUTODETECT can be
99 - maybe auto-detect only if the image type is available 99 - maybe auto-detect only if the image type is available
100 (see `image-type-available-p').") 100 (see `image-type-available-p').")
101 101
102(defvar image-content-type-suffixes 102(defvar image-format-suffixes
103 '((image/x-icon "ico")) 103 '((image/x-icon "ico"))
104 "Alist of MIME Content-Type headers to file name suffixes. 104 "Alist of MIME Content-Type headers to file name suffixes.
105This is used as a hint by the ImageMagick library when detecting 105This is used as a hint by the ImageMagick library when detecting
106image types. If `create-image' is called with a :content-type 106image types. If `create-image' is called with a :format
107matching found in this alist, the ImageMagick library will be 107matching found in this alist, the ImageMagick library will be
108told that the data would have this suffix if saved to a file.") 108told that the data would have this suffix if saved to a file.")
109 109
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index ed47c502e11..3283712bf0a 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -747,7 +747,7 @@ element is the data blob and the second element is the content-type."
747 (image (cond 747 (image (cond
748 ((eq size 'original) 748 ((eq size 'original)
749 (create-image data nil t :ascent 100 749 (create-image data nil t :ascent 100
750 :content-type content-type)) 750 :format content-type))
751 ((eq size 'full) 751 ((eq size 'full)
752 (ignore-errors 752 (ignore-errors
753 (shr-rescale-image data t content-type))) 753 (shr-rescale-image data t content-type)))
@@ -791,7 +791,7 @@ If FORCE, rescale the image anyway."
791 (- (nth 2 edges) (nth 0 edges)))) 791 (- (nth 2 edges) (nth 0 edges))))
792 :max-height (truncate (* shr-max-image-proportion 792 :max-height (truncate (* shr-max-image-proportion
793 (- (nth 3 edges) (nth 1 edges)))) 793 (- (nth 3 edges) (nth 1 edges))))
794 :content-type content-type)))) 794 :format content-type))))
795 795
796;; url-cache-extract autoloads url-cache. 796;; url-cache-extract autoloads url-cache.
797(declare-function url-cache-create-filename "url-cache" (url)) 797(declare-function url-cache-create-filename "url-cache" (url))
diff --git a/src/ChangeLog b/src/ChangeLog
index af76a0c3780..0c0583684dc 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12013-08-13 Jan Djärv <jan.h.d@swipnet.se>
2
3 * nsmenu.m (x_activate_menubar): Check for OSX >= 10.5
4 (trackingNotification:): Call ns_check_menu_open only for OSX >= 10.5.
5
12013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org> 62013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 7
3 * image.c (imagemagick_filename_hint): Check for errors in the 8 * image.c (imagemagick_filename_hint): Check for errors in the
diff --git a/src/image.c b/src/image.c
index 4974903fed7..e767d5447d1 100644
--- a/src/image.c
+++ b/src/image.c
@@ -551,7 +551,6 @@ static Lisp_Object QCheuristic_mask;
551static Lisp_Object QCcolor_symbols; 551static Lisp_Object QCcolor_symbols;
552static Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask, QCgeometry; 552static Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask, QCgeometry;
553static Lisp_Object QCcrop, QCrotation; 553static Lisp_Object QCcrop, QCrotation;
554static Lisp_Object QCcontent_type;
555 554
556/* Other symbols. */ 555/* Other symbols. */
557 556
@@ -7741,7 +7740,7 @@ enum imagemagick_keyword_index
7741 IMAGEMAGICK_WIDTH, 7740 IMAGEMAGICK_WIDTH,
7742 IMAGEMAGICK_MAX_HEIGHT, 7741 IMAGEMAGICK_MAX_HEIGHT,
7743 IMAGEMAGICK_MAX_WIDTH, 7742 IMAGEMAGICK_MAX_WIDTH,
7744 IMAGEMAGICK_CONTENT_TYPE, 7743 IMAGEMAGICK_FORMAT,
7745 IMAGEMAGICK_ROTATION, 7744 IMAGEMAGICK_ROTATION,
7746 IMAGEMAGICK_CROP, 7745 IMAGEMAGICK_CROP,
7747 IMAGEMAGICK_LAST 7746 IMAGEMAGICK_LAST
@@ -7766,7 +7765,7 @@ static struct image_keyword imagemagick_format[IMAGEMAGICK_LAST] =
7766 {":width", IMAGE_INTEGER_VALUE, 0}, 7765 {":width", IMAGE_INTEGER_VALUE, 0},
7767 {":max-height", IMAGE_INTEGER_VALUE, 0}, 7766 {":max-height", IMAGE_INTEGER_VALUE, 0},
7768 {":max-width", IMAGE_INTEGER_VALUE, 0}, 7767 {":max-width", IMAGE_INTEGER_VALUE, 0},
7769 {":content-type", IMAGE_SYMBOL_VALUE, 0}, 7768 {":format", IMAGE_SYMBOL_VALUE, 0},
7770 {":rotation", IMAGE_NUMBER_VALUE, 0}, 7769 {":rotation", IMAGE_NUMBER_VALUE, 0},
7771 {":crop", IMAGE_DONT_CHECK_VALUE_TYPE, 0} 7770 {":crop", IMAGE_DONT_CHECK_VALUE_TYPE, 0}
7772 }; 7771 };
@@ -7851,15 +7850,15 @@ imagemagick_error (MagickWand *wand)
7851static char* 7850static char*
7852imagemagick_filename_hint (Lisp_Object spec) 7851imagemagick_filename_hint (Lisp_Object spec)
7853{ 7852{
7854 Lisp_Object content_type = image_spec_value (spec, QCcontent_type, NULL); 7853 Lisp_Object format = image_spec_value (spec, intern (":format"), NULL);
7855 Lisp_Object symbol = intern ("image-content-type-suffixes"); 7854 Lisp_Object symbol = intern ("image-format-suffixes");
7856 Lisp_Object val; 7855 Lisp_Object val;
7857 char *name, *prefix = "/tmp/foo."; 7856 char *name, *prefix = "/tmp/foo.";
7858 7857
7859 if (NILP (Fboundp (symbol))) 7858 if (NILP (Fboundp (symbol)))
7860 return NULL; 7859 return NULL;
7861 7860
7862 val = Fassq (content_type, Fsymbol_value (symbol)); 7861 val = Fassq (format, Fsymbol_value (symbol));
7863 if (! CONSP (val)) 7862 if (! CONSP (val))
7864 return NULL; 7863 return NULL;
7865 7864
@@ -9155,7 +9154,6 @@ non-numeric, there is no explicit limit on the size of images. */);
9155 DEFSYM (Qpostscript, "postscript"); 9154 DEFSYM (Qpostscript, "postscript");
9156 DEFSYM (QCmax_width, ":max-width"); 9155 DEFSYM (QCmax_width, ":max-width");
9157 DEFSYM (QCmax_height, ":max-height"); 9156 DEFSYM (QCmax_height, ":max-height");
9158 DEFSYM (QCcontent_type, ":content-type");
9159#ifdef HAVE_GHOSTSCRIPT 9157#ifdef HAVE_GHOSTSCRIPT
9160 ADD_IMAGE_TYPE (Qpostscript); 9158 ADD_IMAGE_TYPE (Qpostscript);
9161 DEFSYM (QCloader, ":loader"); 9159 DEFSYM (QCloader, ":loader");
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 2850f0ed97d..3266d76450c 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -504,9 +504,11 @@ void
504x_activate_menubar (struct frame *f) 504x_activate_menubar (struct frame *f)
505{ 505{
506#ifdef NS_IMPL_COCOA 506#ifdef NS_IMPL_COCOA
507#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
507 ns_update_menubar (f, true, nil); 508 ns_update_menubar (f, true, nil);
508 ns_check_pending_open_menu (); 509 ns_check_pending_open_menu ();
509#endif 510#endif
511#endif
510} 512}
511 513
512 514
@@ -563,7 +565,9 @@ extern NSString *NSMenuDidBeginTrackingNotification;
563 /* Update menu in menuNeedsUpdate only while tracking menus. */ 565 /* Update menu in menuNeedsUpdate only while tracking menus. */
564 trackingMenu = ([notification name] == NSMenuDidBeginTrackingNotification 566 trackingMenu = ([notification name] == NSMenuDidBeginTrackingNotification
565 ? 1 : 0); 567 ? 1 : 0);
568#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
566 if (! trackingMenu) ns_check_menu_open (nil); 569 if (! trackingMenu) ns_check_menu_open (nil);
570#endif
567} 571}
568 572
569#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 573#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5