]> git.eshelyaron.com Git - emacs.git/commitdiff
Make gnus-html work for XEmacs.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 3 Sep 2010 02:29:03 +0000 (02:29 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 3 Sep 2010 02:29:03 +0000 (02:29 +0000)
lisp/gnus/ChangeLog
lisp/gnus/gnus-html.el
lisp/gnus/gnus-util.el

index 2ce91eedc3e6c0a768c2a32e5f5eaab9b249d5c2..55b59c8d6bce9df037e3925fa9ca55dd3a10618e 100644 (file)
@@ -1,5 +1,12 @@
 2010-09-03  Katsumi Yamaoka  <yamaoka@jpl.org>
 
+       * gnus-html.el (gnus-html-put-image): Use gnus-graphic-display-p,
+       glyph-width and glyph-height instead of display-graphic-p and
+       image-size for XEmacs.
+
+       * gnus-util.el (gnus-graphic-display-p): Use device-on-window-system-p
+       for XEmacs.
+
        * gnus-ems.el (gnus-set-process-plist, gnus-process-plist): Change name
        of symbol that holds plist data.
        (gnus-process-plist): Remove plist of process after getting it.
index 711cd3810d4bd4694c4bc3b3c40c5201162d2ab6..399676f06002030e10efc815de762320065f762a 100644 (file)
@@ -242,11 +242,13 @@ fit these criteria."
        (gnus-html-schedule-image-fetching buffer images)))))
 
 (defun gnus-html-put-image (file point string)
-  (when (display-graphic-p)
+  (when (gnus-graphic-display-p)
     (let* ((image (ignore-errors
                   (gnus-create-image file)))
          (size (and image
-                    (image-size image t))))
+                    (if (featurep 'xemacs)
+                        (cons (glyph-width image) (glyph-height image))
+                      (image-size image t)))))
       (save-excursion
        (goto-char point)
        (if (and image
index 417cf6cdf84055773a5008da39a4518222ed88fd..7cdb70a3580dcb7b7ec00f7c1bbfa854a3719cfd 100644 (file)
@@ -1580,11 +1580,9 @@ SPEC is a predicate specifier that contains stuff like `or', `and',
    (car (symbol-value history))))
 
 (defun gnus-graphic-display-p ()
-  (or (and (fboundp 'display-graphic-p)
-          (display-graphic-p))
-      ;;;!!!This is bogus.  Fixme!
-      (and (featurep 'xemacs)
-          t)))
+  (if (featurep 'xemacs)
+      (device-on-window-system-p)
+    (display-graphic-p)))
 
 (put 'gnus-parse-without-error 'lisp-indent-function 0)
 (put 'gnus-parse-without-error 'edebug-form-spec '(body))