From: Lars Ingebrigtsen Date: Thu, 11 Feb 2016 03:51:49 +0000 (+1100) Subject: Don't use image-map if it isn't defined X-Git-Tag: emacs-26.0.90~2648 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=395f2ad689825f83702cbadc16b9da83493a9929;p=emacs.git Don't use image-map if it isn't defined * lisp/net/shr.el (shr-image-map): Only use image-map as a parent if it's defined (bug#22614). --- diff --git a/lisp/net/shr.el b/lisp/net/shr.el index b1f2f0794a7..46aea79c327 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -189,11 +189,10 @@ and other things: (define-key map "\r" 'shr-browse-url) map)) -(defvar image-map nil) ;in case image.el is not pre-loaded - (defvar shr-image-map (let ((map (copy-keymap shr-map))) - (set-keymap-parent map image-map) + (when (boundp 'image-map) + (set-keymap-parent map image-map)) map)) ;; Public functions and commands.