annotate lisp/prim/advocacy.el @ 100:4be1180a9e89 r20-1b2

Import from CVS: tag r20-1b2
author cvs
date Mon, 13 Aug 2007 09:15:11 +0200
parents 131b0175ea99
children 41ff10fd062f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;; advocacy.el -- blatant XEmacs self promotion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 ;; Copyright (C) 1996 Miranova Systems, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 ;; Copyright (C) 1996 Chuck Thompson <cthomp@xemacs.org>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;; Original Author: Steve L Baur <steve@miranova.com>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 ;; This file is part of XEmacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 ;; XEmacs is free software; you can redistribute it and/or modify it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;; under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;; the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 ;; any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ;; XEmacs is distributed in the hope that it will be useful, but
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ;; General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 ;; You should have received a copy of the GNU General Public License
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 2
diff changeset
20 ;; along with XEmacs; see the file COPYING. If not, write to the
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16
0293115a14e9 Import from CVS: tag r19-15b91
cvs
parents: 2
diff changeset
22 ;; Boston, MA 02111-1307, USA.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 ;;;###autoload
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 (defvar xemacs-praise-sound-file "sounds/im_so_happy.au"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 "The name of an audio file containing something to play
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 when praising XEmacs")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 ;;;###autoload
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 (defvar xemacs-praise-message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 "All Hail XEmacs!\n"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 "What to praise XEmacs with")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 ;;;###autoload
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 (defun praise-be-unto-xemacs (&optional arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 "All Hail XEmacs!"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 (interactive "_p")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 (save-window-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 (let ((count (if (null arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 arg))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 (max-faces (length (face-list))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 (with-output-to-temp-buffer "*Praise*"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 (set-buffer "*Praise*")
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
45 (if (glyphp xemacs-logo)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
46 (let ((p (point)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
47 (insert "\n")
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
48 (indent-to (startup-center-spaces xemacs-logo))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
49 (set-extent-begin-glyph (make-extent (point) (point)) xemacs-logo)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
50 (insert "\n\n")))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 (while (> count 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 (insert-face xemacs-praise-message
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 (get-face (nth (random max-faces) (face-list))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 (setq count (- count 1))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 (let ((sound-file
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
57 (or (and (file-exists-p xemacs-praise-sound-file)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
58 xemacs-praise-sound-file)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
59 (and (file-exists-p
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
60 (concat data-directory xemacs-praise-sound-file))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
61 (concat data-directory xemacs-praise-sound-file)))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 (if (and (device-sound-enabled-p) sound-file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 (sit-for 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 (play-sound-file sound-file))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 (sit-for 10)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 ;;;###autoload
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 (defun praise-be-unto-emacs (&optional arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 (interactive "_p")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 (error "Obsolete function. Use `praise-be-unto-xemacs'."))
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
72 (make-compatible 'praise-be-unto-emacs "use praise-be-unto-xemacs")
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 ;;;###autoload
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 (defun all-hail-xemacs (&optional arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 "All Hail XEmacs!"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 (interactive "_p")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 (praise-be-unto-xemacs arg))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 ;;;###autoload
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 (defun all-hail-emacs (&optional arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 (interactive "_p")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 (error "Obsolete function. Use `all-hail-xemacs'."))
100
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
84 (make-compatible 'all-hail-emacs "use all-hail-xemacs")
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
85
4be1180a9e89 Import from CVS: tag r20-1b2
cvs
parents: 70
diff changeset
86 ;;; advocacy.el ends here