;;; guided-tour.el --- functions for viewing Phil Sung's Emacs Guided Tour
-;; Copyright 2007 Free Software Foundation, Inc.
+;; Copyright 2007 Free Software Foundation, Inc.
;; Author: Stephen J. Turnbull <email@example.com>
;; Maintainer: XEmacs Development Team
+;; Last-Modified: 2008-03-19
;; The permissions notice is contained in the function `guided-tour-about'
["About COPYING the Tour" guided-tour-about])
"The submenu for the \"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
+(defvar guided-tour-insinuate-menubar load-user-init-file-p
+ "If nil, the function `guided-tour-insinuate-menubar' exits immediately.
+Guards against multiple insinuations of the menu into the menubar.
+Note that if you make this t and reinsinuate, you are responsible for
removing any existing instances of the submenu.")
(defun guided-tour-insinuate-menubar ()
- "Add the Guided Tour of Emacs to the default menubar."
- (unless guided-tour-insinuate-menubar
- (setq guided-tour-insinuate-menubar t)
+ "Add the Guided Tour of Emacs to the default menubar.
+This is normally done at startup if the user's init file was loaded.
+To inhibit, set `guided-tour-insinuate-menubar' to nil in your init file.
+If called interactively, insinuates menubar unconditionally \(warning:
+that means even if the Guided Tour item is already present)."
+ (when (or guided-tour-insinuate-menubar (interactive-p))
+ (setq guided-tour-insinuate-menubar nil)
(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)
;; Is this OK? Don't see how it really hurts.
(defun guided-tour (type part)
"Start the Guided Tour with TYPE viewer, in Part PART."
(interactive "sWhich format? \nnWhich part? ")
(defun guided-tour-about ()
"Document the Guided Tour."
- (with-displaying-temp-buffer "*About the Guided Tour of Emacs*"
+ ;; for 21.4 compatibility
+ (with-displaying-help-buffer (lambda () (princ "\
to Steve via the XEmacs Developers mailing list <firstname.lastname@example.org>.
The FAQ follows the permissions notice.
-Copyright 2007 The Free Software Foundation Inc.
+Copyright 2007 The Free Software Foundation Inc.
-The Guided Tour
, is both free software and free content.
+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;
Q2.4 Will an HTML version be included in the future?
A2.4 Patches welcome! Ask about how to contribute to the XEmacs package, or
lobby for inclusion of new/updated content at <email@example.com>.
+ "*About the Guided Tour of Emacs*")))
;;; guided-tour.el ends here