Commit 23726fba authored by Pontus Freyhult's avatar Pontus Freyhult
Browse files

Use lyskom-aliases instead of runtime test for image functions that

are new in GNU Emacs 21.
parent 827d20d8
2004-10-29 Pontus Freyhult <pont@pontus.its.uu.se>
* lyskom-rest.el (lyskom-format-image): Disabled run time
test for image functions, use aliases instead.
* compatibility.el (display-images-p): New alias.
(put-image): New alias.
(create-image): New alias.
2004-10-29 Pontus Freyhult <pont@soua.net> 2004-10-29 Pontus Freyhult <pont@soua.net>
* lyskom-rest.el (lyskom-format-image): Bugix: Used let instead * lyskom-rest.el (lyskom-format-image): Bugix: Used let instead
......
...@@ -345,6 +345,13 @@ See `walk-windows' for the meaning of MINIBUF and FRAME." ...@@ -345,6 +345,13 @@ See `walk-windows' for the meaning of MINIBUF and FRAME."
windows)) windows))
; ==================================================================
; Image display
(lyskom-function-alias display-images-p () nil)
(lyskom-function-alias put-image (what where) nil)
(lyskom-function-alias create-image (file-or-data) nil)
;;; ================================================================ ;;; ================================================================
;;; Color stuff ;;; Color stuff
......
...@@ -2249,12 +2249,11 @@ in lyskom-messages." ...@@ -2249,12 +2249,11 @@ in lyskom-messages."
(make-extent (point) (point-max)) (make-extent (point) (point-max))
(make-glyph (make-glyph
(make-image-instance (vector imagetype :data imagedata)))) (make-image-instance (vector imagetype :data imagedata))))
(if (not (and (fboundp 'display-images-p) ; GNU Emacs ; GNU Emacs
(fboundp 'put-image) (unless (and (lyskom-display-images-p)
(fboundp 'create-image) (lyskom-put-image
(display-images-p) (lyskom-create-image imagedata imagetype t)
(put-image (create-image imagedata imagetype t) (point-max)))
(point-max))))
(setq msg (lyskom-get-string 'image-no-show)))) (setq msg (lyskom-get-string 'image-no-show))))
; Errors just marks it as a no show ; Errors just marks it as a no show
(error (setq msg (lyskom-get-string 'image-no-show)))) (error (setq msg (lyskom-get-string 'image-no-show))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment