diff options
author | Claudio Bley <claudio.bley@googlemail.com> | 2013-11-01 11:10:13 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2013-11-01 11:10:13 +0200 |
commit | 0e7690deacc3232f1a0bd3902255ffa34292e5cf (patch) | |
tree | 9459348a527f4b61408cefe9f08538460a651669 /lisp/image.el | |
parent | 019c8218f07fd2acca84661be01147c50908d903 (diff) | |
download | emacs-0e7690deacc3232f1a0bd3902255ffa34292e5cf.tar.gz |
Fix handling of comments in NetPBM image files.
src/image.c (pbm_next_char): New function.
(pbm_scan_number): Use it.
lisp/image.el (image-type-header-regexps): Fix the 'pbm' part to
allow comments in pbm files.
Diffstat (limited to 'lisp/image.el')
-rw-r--r-- | lisp/image.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/image.el b/lisp/image.el index 6ce5b82ec48..69d890719d2 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -34,7 +34,10 @@ (defconst image-type-header-regexps `(("\\`/[\t\n\r ]*\\*.*XPM.\\*/" . xpm) - ("\\`P[1-6][[:space:]]+\\(?:#.*[[:space:]]+\\)*[0-9]+[[:space:]]+[0-9]+" . pbm) + ("\\`P[1-6]\\\(?:\ +\\(?:\\(?:#[^\r\n]*[\r\n]\\)?[[:space:]]\\)+\ +\\(?:\\(?:#[^\r\n]*[\r\n]\\)?[0-9]\\)+\ +\\)\\{2\\}" . pbm) ("\\`GIF8[79]a" . gif) ("\\`\x89PNG\r\n\x1a\n" . png) ("\\`[\t\n\r ]*#define \\([a-z0-9_]+\\)_width [0-9]+\n\ |