# HG changeset patch # User Juanma Barranquero # Date 1166546574 0 # Node ID 3fb128bfa8b40cccb2e145bd93a3e0602d9495a7 # Parent c751765838ca5a2ec61645db10796cf794751e42 (image-type-header-regexps): Be more specific detecting `pbm' and `png' files. Use non-capturing parenthesis for `tiff' regexp. diff -r c751765838ca -r 3fb128bfa8b4 lisp/image.el --- a/lisp/image.el Tue Dec 19 16:14:54 2006 +0000 +++ b/lisp/image.el Tue Dec 19 16:42:54 2006 +0000 @@ -35,11 +35,11 @@ (defconst image-type-header-regexps '(("\\`/[\t\n\r ]*\\*.*XPM.\\*/" . xpm) - ("\\`P[1-6]" . pbm) + ("\\`P[1-6][[:space:]]+\\(?:#.*[[:space:]]+\\)*[0-9]+[[:space:]]+[0-9]+" . pbm) ("\\`GIF8" . gif) - ("\\`\211PNG\r\n" . png) + ("\\`\x89PNG\r\n\x1a\n" . png) ("\\`[\t\n\r ]*#define" . xbm) - ("\\`\\(MM\0\\*\\|II\\*\0\\)" . tiff) + ("\\`\\(?:MM\0\\*\\|II\\*\0\\)" . tiff) ("\\`[\t\n\r ]*%!PS" . postscript) ("\\`\xff\xd8" . (image-jpeg-p . jpeg))) "Alist of (REGEXP . IMAGE-TYPE) pairs used to auto-detect image types.