comparison lisp/net/eudc-bob.el @ 90203:187d6a1f84f7

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-71 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 485-492) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 92-94) - Merge from emacs--cvs-trunk--0 - Update from CVS
author Miles Bader <miles@gnu.org>
date Fri, 22 Jul 2005 08:27:27 +0000
parents f9a65d7ebd29 fea47ebca4ae
children edf295560b5a
comparison
equal deleted inserted replaced
90202:7597b4a23c3b 90203:187d6a1f84f7
67 (fboundp 'play-sound)] 67 (fboundp 'play-sound)]
68 ,@(cdr (cdr eudc-bob-generic-menu)))) 68 ,@(cdr (cdr eudc-bob-generic-menu))))
69 69
70 (defun eudc-jump-to-event (event) 70 (defun eudc-jump-to-event (event)
71 "Jump to the window and point where EVENT occurred." 71 "Jump to the window and point where EVENT occurred."
72 (if eudc-xemacs-p 72 (if (fboundp 'event-closest-point)
73 (goto-char (event-closest-point event)) 73 (goto-char (event-closest-point event))
74 (set-buffer (window-buffer (posn-window (event-start event)))) 74 (set-buffer (window-buffer (posn-window (event-start event))))
75 (goto-char (posn-point (event-start event))))) 75 (goto-char (posn-point (event-start event)))))
76 76
77 (defun eudc-bob-get-overlay-prop (prop) 77 (defun eudc-bob-get-overlay-prop (prop)
87 (setq overlays (cdr overlays))) 87 (setq overlays (cdr overlays)))
88 value)) 88 value))
89 89
90 (defun eudc-bob-can-display-inline-images () 90 (defun eudc-bob-can-display-inline-images ()
91 "Return non-nil if we can display images inline." 91 "Return non-nil if we can display images inline."
92 (if eudc-xemacs-p 92 (if (fboundp 'console-type)
93 (and (memq (console-type) '(x mswindows)) 93 (and (memq (console-type) '(x mswindows))
94 (fboundp 'make-glyph)) 94 (fboundp 'make-glyph))
95 (and (fboundp 'display-graphic-p) 95 (and (fboundp 'display-graphic-p)
96 (display-graphic-p)))) 96 (display-graphic-p))))
97 97
118 118
119 (defun eudc-bob-display-jpeg (data inline) 119 (defun eudc-bob-display-jpeg (data inline)
120 "Display the JPEG DATA at point. 120 "Display the JPEG DATA at point.
121 If INLINE is non-nil, try to inline the image otherwise simply 121 If INLINE is non-nil, try to inline the image otherwise simply
122 display a button." 122 display a button."
123 (cond (eudc-xemacs-p 123 (cond ((fboundp 'make-glyph)
124 (let ((glyph (if (eudc-bob-can-display-inline-images) 124 (let ((glyph (if (eudc-bob-can-display-inline-images)
125 (make-glyph (list (vector 'jpeg :data data) 125 (make-glyph (list (vector 'jpeg :data data)
126 [string :data "[JPEG Picture]"]))))) 126 [string :data "[JPEG Picture]"])))))
127 (eudc-bob-make-button "[JPEG Picture]" 127 (eudc-bob-make-button "[JPEG Picture]"
128 eudc-bob-image-keymap 128 eudc-bob-image-keymap