diff options
| author | Lars Ingebrigtsen | 2016-02-11 14:51:49 +1100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-02-11 14:51:49 +1100 |
| commit | 395f2ad689825f83702cbadc16b9da83493a9929 (patch) | |
| tree | 2cacdf10dc119e9df2ca117a46024d306c64f5fe | |
| parent | 980836d80e2447d8922f0f6cf287a12a6c914e8b (diff) | |
| download | emacs-395f2ad689825f83702cbadc16b9da83493a9929.tar.gz emacs-395f2ad689825f83702cbadc16b9da83493a9929.zip | |
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).
| -rw-r--r-- | lisp/net/shr.el | 5 |
1 files changed, 2 insertions, 3 deletions
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: | |||
| 189 | (define-key map "\r" 'shr-browse-url) | 189 | (define-key map "\r" 'shr-browse-url) |
| 190 | map)) | 190 | map)) |
| 191 | 191 | ||
| 192 | (defvar image-map nil) ;in case image.el is not pre-loaded | ||
| 193 | |||
| 194 | (defvar shr-image-map | 192 | (defvar shr-image-map |
| 195 | (let ((map (copy-keymap shr-map))) | 193 | (let ((map (copy-keymap shr-map))) |
| 196 | (set-keymap-parent map image-map) | 194 | (when (boundp 'image-map) |
| 195 | (set-keymap-parent map image-map)) | ||
| 197 | map)) | 196 | map)) |
| 198 | 197 | ||
| 199 | ;; Public functions and commands. | 198 | ;; Public functions and commands. |