Make gnus-html work for XEmacs.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 3 Sep 2010 02:25:36 +0000 (02:25 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 3 Sep 2010 02:25:36 +0000 (02:25 +0000)
lisp/ChangeLog
lisp/gnus-html.el
lisp/gnus-util.el
lisp/lpath.el

index 2543c95..b993c53 100644 (file)
@@ -1,5 +1,14 @@
 2010-09-03  Katsumi Yamaoka  <yamaoka@jpl.org>
 
+       * lpath.el: Fbind device-on-window-system-p for Emacs 21.
+
+       * 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 711cd38..399676f 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 417cf6c..7cdb70a 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))
index 8e6c27e..107fcce 100644 (file)
     (maybe-fbind
      '(clear-string
        coding-system-aliasee coding-system-from-name custom-autoload
-       delete-annotation delete-extent device-connection dfw-device
-       events-to-keys find-face font-lock-set-defaults get-char-table
-       glyph-height glyph-width help-buffer int-to-char ldap-search-entries
-       mail-aliases-setup make-annotation make-event make-glyph
-       make-network-process map-extents message-xmas-redefine put-char-table
-       run-mode-hooks set-extent-property set-itimer-function
-       set-keymap-default-binding temp-directory time-to-seconds ucs-to-char
-       unicode-precedence-list unicode-to-char url-generic-parse-url
-       url-http-file-exists-p valid-image-instantiator-format-p
-       vcard-pretty-print w3-coding-system-for-mime-charset window-pixel-edges
-       window-pixel-height window-pixel-width))
+       delete-annotation delete-extent device-connection
+       device-on-window-system-p dfw-device events-to-keys find-face
+       font-lock-set-defaults get-char-table glyph-height glyph-width
+       help-buffer int-to-char ldap-search-entries mail-aliases-setup
+       make-annotation make-event make-glyph make-network-process map-extents
+       message-xmas-redefine put-char-table run-mode-hooks set-extent-property
+       set-itimer-function set-keymap-default-binding temp-directory
+       time-to-seconds ucs-to-char unicode-precedence-list unicode-to-char
+       url-generic-parse-url url-http-file-exists-p
+       valid-image-instantiator-format-p vcard-pretty-print
+       w3-coding-system-for-mime-charset window-pixel-edges window-pixel-height
+       window-pixel-width))
     (maybe-bind
      '(completion-styles
        eudc-protocol filladapt-mode help-echo-owns-message itimer-list