From c0915b1a03abeebe6a377d248e7fec47ab604d61 Mon Sep 17 00:00:00 2001 From: Dave Love Date: Fri, 28 Apr 2000 17:23:03 +0000 Subject: [PATCH] (gnus-group-startup-message): Maybe use image in Emacs 21. --- lisp/gnus.el | 47 +++++++++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/lisp/gnus.el b/lisp/gnus.el index 585c338ad..fd581dd72 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -748,8 +748,23 @@ be set in `.emacs' instead." "Insert startup message in current buffer." ;; Insert the message. (erase-buffer) - (insert - (format " %s + (cond + ((and (fboundp 'find-image) + (display-graphic-p) + (let ((image (find-image '((:type xpm :file "gnus.xpm") + (:type xbm :file "gnus.xbm"))))) + (when image + (insert-image image " ") + (goto-char (point-min)) + (while (not (eobp)) + (insert (make-string (/ (max (- (window-width) (or x 35)) 0) 2) + ?\ )) + (forward-line 1)) + (setq gnus-simple-splash nil) + t)))) + (t + (insert + (format " %s _ ___ _ _ _ ___ __ ___ __ _ ___ __ _ ___ __ ___ @@ -769,21 +784,21 @@ be set in `.emacs' instead." __ " - "")) - ;; And then hack it. - (gnus-indent-rigidly (point-min) (point-max) - (/ (max (- (window-width) (or x 46)) 0) 2)) - (goto-char (point-min)) - (forward-line 1) - (let* ((pheight (count-lines (point-min) (point-max))) - (wheight (window-height)) - (rest (- wheight pheight))) - (insert (make-string (max 0 (* 2 (/ rest 3))) ?\n))) - ;; Fontify some. - (put-text-property (point-min) (point-max) 'face 'gnus-splash-face) + "")) + ;; And then hack it. + (gnus-indent-rigidly (point-min) (point-max) + (/ (max (- (window-width) (or x 46)) 0) 2)) + (goto-char (point-min)) + (forward-line 1) + (let* ((pheight (count-lines (point-min) (point-max))) + (wheight (window-height)) + (rest (- wheight pheight))) + (insert (make-string (max 0 (* 2 (/ rest 3))) ?\n))) + ;; Fontify some. + (put-text-property (point-min) (point-max) 'face 'gnus-splash-face) + (setq gnus-simple-splash t))) (goto-char (point-min)) (setq mode-line-buffer-identification (concat " " gnus-version)) - (setq gnus-simple-splash t) (set-buffer-modified-p t)) (eval-when (load) @@ -909,7 +924,7 @@ see the manual for details." "*Method used for archiving messages you've sent. This should be a mail method. -It's probably not a very effective to change this variable once you've +It's probably not very effective to change this variable once you've run Gnus once. After doing that, you must edit this server from the server buffer." :group 'gnus-server -- 2.25.1