# HG changeset patch # User Joakim # Date 1276506999 -7200 # Node ID 73108272ef0bb99091a9e4a86e1634e86cf66906 # Parent d7a20b755b64c754ed56d69a3158654ef84e22f7 changed looping according to feedback from stefan monnier diff -r d7a20b755b64 -r 73108272ef0b lisp/image.el --- a/lisp/image.el Fri May 14 12:07:01 2010 +0200 +++ b/lisp/image.el Mon Jun 14 11:16:39 2010 +0200 @@ -697,21 +697,17 @@ ;;;###autoload (defun imagemagick-register-types () "Register file types that imagemagick is able to handle." - (let ((im-types (imagemagick-types)) - (im-inhibit imagemagick-types-inhibit)) - (while im-inhibit - (setq im-types (remove (car im-inhibit) im-types)) - (setq im-inhibit (cdr im-inhibit))) - (while im-types - (let - ((extension (downcase (symbol-name (car im-types))))) + (let ((im-types (imagemagick-types))) + (dolist im-inhibit + (setq im-types (remove im-inhibit im-types))) + (dolist im-type im-types + (let ((extension (downcase (symbol-name im-type)))) (push (cons (concat "\\." extension "\\'") 'image-mode) auto-mode-alist) (push (cons (concat "\\." extension "\\'") 'imagemagick) - image-type-file-name-regexps) - (setq im-types (cdr im-types)))))) + image-type-file-name-regexps)))))