CVS update by stephent packages/xemacs-packages/guided-tour
.cvsignore ChangeLog
xemacs-cvs at xemacs.org
xemacs-cvs at xemacs.org
Sat May 5 11:19:52 EDT 2007
User: stephent
Date: 07/05/05 17:19:52
Added: packages/xemacs-packages/guided-tour .cvsignore ChangeLog
Makefile emacs-slides-1.odp emacs-slides-1.pdf
emacs-slides-2.odp emacs-slides-2.pdf
emacs-slides-3.odp emacs-slides-3.pdf
guided-tour.el package-info.in
Log:
New package: guided-tour. <87slabcmt7.fsf at uwakimon.sk.tsukuba.ac.jp>
Revision Changes Path
1.1 XEmacs/packages/xemacs-packages/guided-tour/.cvsignore
Index: .cvsignore
===================================================================
#.*#
.#*
*~
*.elc
1.1 XEmacs/packages/xemacs-packages/guided-tour/ChangeLog
Index: ChangeLog
===================================================================
2007-05-03 Stephen J. Turnbull <stephen at xemacs.org>
Create package.
* emacs-slides-1.odp:
* emacs-slides-2.odp:
* emacs-slides-3.odp:
* emacs-slides-1.pdf:
* emacs-slides-2.pdf:
* emacs-slides-3.pdf:
Import Phil Sung's "Guided Tour" content, from
http://stuff.mit.edu/iap/emacs/ @2007-02-18T09:15.
Note: Phil graciously licensed these to XEmacs under the MIT/X11
license allowing us to use *these versions only* in any way we
might want to inside of XEmacs (specifically, we can freely use
this content in our Texinfo manuals), but asks that we distribute
only under the GPL or GFDL or both. The content is copyright-
assigned to the FSF, and is publicly licensed only under the GPL
and GFDL (as of this writing). When in doubt as to the intent of
the permissions for use of content, ask Phil first, don't rely on
the letter of the law or licenses.
* package-info.in:
* Makefile:
* ChangeLog:
New. Package infrastructure.
* guided-tour.el:
New. Menuing infrastructure.
1.1 XEmacs/packages/xemacs-packages/guided-tour/Makefile
Index: Makefile
===================================================================
# Makefile for the Guided Tour to Emacs
# This file is part of XEmacs.
# XEmacs is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version.
# XEmacs is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
# You should have received a copy of the GNU General Public License
# along with XEmacs; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
VERSION = 0.50
AUTHOR_VERSION =
MAINTAINER = XEmacs Development Team <xemacs-beta at xemacs.org>
PACKAGE = guided-tour
PKG_TYPE = regular
REQUIRES =
CATEGORY = standard
ELCS = guided-tour.elc
DATA_FILES = emacs-slides-1.pdf emacs-slides-2.pdf emacs-slides-3.pdf \
emacs-slides-1.odp emacs-slides-2.odp emacs-slides-3.odp
DATA_DEST = guided-tour
include ../../XEmacs.rules
1.1 XEmacs/packages/xemacs-packages/guided-tour/emacs-slides-1.odp
<<Binary file>>
1.1 XEmacs/packages/xemacs-packages/guided-tour/emacs-slides-1.pdf
<<Binary file>>
1.1 XEmacs/packages/xemacs-packages/guided-tour/emacs-slides-2.odp
<<Binary file>>
1.1 XEmacs/packages/xemacs-packages/guided-tour/emacs-slides-2.pdf
<<Binary file>>
1.1 XEmacs/packages/xemacs-packages/guided-tour/emacs-slides-3.odp
<<Binary file>>
1.1 XEmacs/packages/xemacs-packages/guided-tour/emacs-slides-3.pdf
<<Binary file>>
1.1 XEmacs/packages/xemacs-packages/guided-tour/guided-tour.el
Index: guided-tour.el
===================================================================
;;; guided-tour.el --- functions for viewing Phil Sung's Emacs Guided Tour
;; Copyright 2007 Free Software Foundation, Inc.
;; Author: Stephen J. Turnbull <stephen at xemacs.org>
;; Maintainer: XEmacs Development Team
;; Created: 2007-05-02
;; Keywords: doc
;; The permissions notice is contained in the function
;; `guided-tour-about' at the end of this file. Under the terms
;; granted, you may modify that function, but the appropriate
;; permissions notice must remain in this file somewhere.
;;; Synched up with: Not in FSF.
;;; Commentary:
;; Thanks to Jason Spiro and Phil Sung for making substantial effort
;; to make this content as useful to XEmacs as possible.
;;; Code:
;; Variables
(defgroup guided-tour nil "Phil Sung's Emacs Guided Tour")
(defcustom guided-tour-odp-viewer "ooimpress"
"Path to program able to view Open Document Format presentations.
Program is invoked in a shell, so PATH is searched."
:type '(choice string
(const "ooimpress")
(const "open" :doc "Useful on Mac OS X"))
:group 'guided-tour)
(defcustom guided-tour-pdf-viewer "xpdf"
"Path to program able to view Portable Document Format documents.
Program is invoked in a shell, so PATH is searched."
:type '(choice string
(const "xpdf")
(const "gv")
(const "open" :doc "Useful on Mac OS X"))
:group 'guided-tour)
(defconst guided-tour-submenu
'("A Guided Tour of Emacs"
["Guided Tour, Part %_1 (OOo)" guided-tour-odp-1]
["Guided Tour, Part %_2 (OOo)" guided-tour-odp-2]
["Guided Tour, Part %_3 (OOo)" guided-tour-odp-3]
["Guided Tour, Part %_1 (PDF)" guided-tour-pdf-1]
["Guided Tour, Part %_2 (PDF)" guided-tour-pdf-2]
["Guided Tour, Part %_3 (PDF)" guided-tour-pdf-3]
["About COPYING the Tour" guided-tour-about])
"The submenu for Phil Sung's \"Guided Tour of Emacs\".")
(defvar guided-tour-insinuate-menubar nil
"If non-nil, inhibits insinuation of the menubar.
Note that if you make this nil and reinsinuate, you are responsible for
removing any existing instances of the submenu.")
;; Functions
;; Helper functions
;; #### this probably should move to help.el or menubar-items.el
(defun guided-tour-find-menubar-help-menu (&optional menubar)
"Return the Help submenu for MENUBAR if present, else nil."
(assoc "%_Help" (or menubar default-menubar)))
(defun guided-tour-about-xemacs-index (menu)
"Return the (zero-based) index of the About XEmacs item in MENU.
Returns nil if not present."
;; #### Of course we should actually search for it....
;; Does easy-menu provide functions for this? It should....
(let ((item (cadr menu)))
(if (and (vectorp item) (eq 'about-xemacs (aref item 1)))
0
nil)))
;; Initialization
;;;###autoload
(defun guided-tour-insinuate-menubar ()
"Add Phil Sung's Guided Tour of Emacs to the default menubar."
(unless guided-tour-insinuate-menubar
(setq guided-tour-insinuate-menubar t)
(let* ((help (guided-tour-find-menubar-help-menu)))
(setcdr help (nconc (if (eq 0 (guided-tour-about-xemacs-index help))
(list (cadr help) guided-tour-submenu)
(list guided-tour-submenu (cadr help)))
(cddr help))))))
;; Is this OK? Don't see how it really hurts.
;;;###autoload
(guided-tour-insinuate-menubar)
;; The Guided Tour
(defun guided-tour (type part)
"Start the Guided Tour with TYPE viewer, in Part PART."
(interactive "sWhich format? \nnWhich part? ")
(let ((viewer (symbol-value (intern (concat "guided-tour-" type "-viewer"))))
(file (format "emacs-slides-%d.%s" part type)))
(message "\
`M-x guided-tour-about RET' for FAQ and licensing.")
(shell-command (format "%s %s" viewer (or (locate-data-file file) file)))))
(defun guided-tour-odp-1 ()
"Start up the Guided Tour of Emacs, part 1, as an Open Office presentation."
(interactive)
(guided-tour "odp" 1))
(defun guided-tour-odp-2 ()
"Start up the Guided Tour of Emacs, part 2, as an Open Office presentation."
(interactive)
(guided-tour "odp" 2))
(defun guided-tour-odp-3 ()
"Start up the Guided Tour of Emacs, part 3, as an Open Office presentation."
(interactive)
(guided-tour "odp" 3))
(defun guided-tour-pdf-1 ()
"Start up the Guided Tour of Emacs, part 1, in a PDF viewer."
(interactive)
(guided-tour "pdf" 1))
(defun guided-tour-pdf-2 ()
"Start up the Guided Tour of Emacs, part 2, in a PDF viewer."
(interactive)
(guided-tour "pdf" 2))
(defun guided-tour-pdf-3 ()
"Start up the Guided Tour of Emacs, part 3, in a PDF viewer."
(interactive)
(guided-tour "pdf" 3))
(defun guided-tour-about ()
"Document the Guided Tour."
(interactive)
(with-displaying-temp-buffer "*About the Guided Tour of Emacs*"
(princ "\
A Guided Tour of Emacs
Phil Sung
This is the XEmacs package of the Guided Tour of Emacs.
The slides are by Phil Sung. That's the important part. Send kudos to Phil.
The XEmacs package is by Stephen Turnbull. Direct complaints about packaging
to Steve via the XEmacs Developers mailing list <xemacs-beta at xemacs.org>.
The FAQ follows the permissions notice.
Copyright 2007 The Free Software Foundation Inc.
The Guided Tour, is both free software and free content.
You can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation;
either version 2, or (at your option) any later version published by
the Free Software Foundation.
You can redistribute it and/or modify it under the terms of GNU Free
Documentation License; either version 1.2, or (at your option) any
later version published by the Free Software Foundation.
A verbatim or modified version can be redistributed under both
licenses simultaneously, which is the authors' preferred method.
The Guided Tour is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License and/or the GNU Free Documentation License for more
details.
FAQ
Q1. I select a tour from the menu, but nothing happens!
A1. You probably need to configure a viewer. C-h v guided-tour-pdf-viewer RET
or C-h v guided-tour-odp-viewer RET.
"
;; #### Find web, C-h, and maybe file locations for licenses, then add above.
;; You should have received a copy of the GNU General Public License
;; along with XEmacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
)))
;;; guided-tour.el ends here
1.1 XEmacs/packages/xemacs-packages/guided-tour/package-info.in
Index: package-info.in
===================================================================
(guided-tour
(standards-version 1.1
version VERSION
author-version AUTHOR_VERSION
date DATE
build-date BUILD_DATE
maintainer MAINTAINER
distribution xemacs
priority high
category CATEGORY
dump nil
description "Phil Sung's Guided Tour of Emacs."
filename FILENAME
md5sum MD5SUM
size SIZE
provides (guided-tour)
requires (REQUIRES)
type regular
))
More information about the XEmacs-CVS
mailing list