summaryrefslogtreecommitdiff
path: root/lisp/info.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/info.el')
-rw-r--r--lisp/info.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/info.el b/lisp/info.el
index 182ad8563aa..65cd7eddcfd 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1595,17 +1595,20 @@ escaped (\\\",\\\\)."
""))
(image (if (file-exists-p image-file)
(create-image image-file)
- "[broken image]")))
+ (or (cdr (assoc-string "text" parameter-alist))
+ (and src (concat "[broken image:" src "]"))
+ "[broken image]"))))
(if (not (get-text-property start 'display))
(add-text-properties
- start (point) `(display ,image rear-nonsticky (display)))))
+ start (point)
+ `(display ,image rear-nonsticky (display)
+ help-echo ,(cdr (assoc-string "alt" parameter-alist))))))
;; text-only display, show alternative text if provided, or
;; otherwise a clue that there's meant to be a picture
(delete-region start (point))
(insert (or (cdr (assoc-string "text" parameter-alist))
(cdr (assoc-string "alt" parameter-alist))
- (and src
- (concat "[image:" src "]"))
+ (and src (concat "[image:" src "]"))
"[image]"))))))
(set-buffer-modified-p nil)))