Gnus development mailing list
 help / color / mirror / Atom feed
* X-Face support in XEmacs
@ 1996-03-25 16:05 Pekka Marjola
  1996-03-25 18:08 ` Steven L Baur
  1996-04-03 16:07 ` Mark Borges
  0 siblings, 2 replies; 9+ messages in thread
From: Pekka Marjola @ 1996-03-25 16:05 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 213 bytes --]


Since XEmacs can show X-Face without external processes, shouldn't
something like this be included in gnus-xmas.el? (Coincidentally, I was
planning to rip exactly same code from VM, but never bothered :)

# pema

[-- Attachment #2: gnus-xemacs-x-face.el --]
[-- Type: application/octet-stream, Size: 1159 bytes --]

;; X-Face inline for XEmacs
;; Based on the VM (thanks Kyle) code.
;; glenn@mathcs.emory.edu  1/16/96
(defvar gnus-xface-cache (make-vector 29 0))
(defun gnus-article-x-face-xemacs-inline (beg end)
  "Display X-Face header inline for XEmacs."
	    (let (xf e gl)
	      (make-face 'gnus-xface)
	      (set-face-background 'gnus-xface "white")
	      (set-face-foreground 'gnus-xface "black")

	      (setq xf (concat "X-Face: "
			       (buffer-substring beg end)))
	      (setq gl (intern xf gnus-xface-cache))
	      (if (boundp gl)
		  (setq gl (symbol-value gl))
		(set gl (make-glyph xf))
		(setq gl (symbol-value gl))
		(set-glyph-face gl 'gnus-xface))
	      (goto-char (point-min))
	      (re-search-forward "^From: " nil t)
	      ;; We display the face.
	      (setq e (make-extent (point) (point)))
	      (set-extent-property e 'gnus-xface t)
	      (set-extent-begin-glyph e gl)))

(setq gnus-article-x-face-command 'gnus-article-x-face-xemacs-inline)
;; This hook needs to go after gnus-article-highlight and/or
;; gnus-article-hide-headers-if-wanted (unsure exactly which).
(add-hook 'gnus-article-display-hook 'gnus-article-display-x-face t)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~1996-04-03 16:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-03-25 16:05 X-Face support in XEmacs Pekka Marjola
1996-03-25 18:08 ` Steven L Baur
1996-03-26  7:07   ` Pekka Marjola
1996-03-26  8:17     ` Pekka Marjola
1996-03-26  9:53   ` Jens Lautenbacher
1996-03-27  7:04     ` Pekka Marjola
1996-03-29 18:51       ` Wes Hardaker
1996-04-01  6:51         ` Pekka Marjola
1996-04-03 16:07 ` Mark Borges

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).