CVS update by stephent packages/xemacs-packages/guided-tour, guided-tour.el ...

xemacs-cvs at xemacs.org xemacs-cvs at xemacs.org
Wed Mar 19 18:53:13 EDT 2008


  User: stephent
  Date: 08/03/19 23:53:13

  Modified:    packages/xemacs-packages/guided-tour ChangeLog
                        guided-tour.el
Log:
Fix bogus console messages at XEmacs startup. <87iqzi9v5n.fsf at uwakimon.sk.tsukuba.ac.jp>

Revision  Changes    Path
1.4       +14 -0     XEmacs/packages/xemacs-packages/guided-tour/ChangeLog

Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/guided-tour/ChangeLog,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- ChangeLog	2007/05/07 07:01:26	1.3
+++ ChangeLog	2008/03/19 22:53:12	1.4
@@ -1,3 +1,17 @@
+2008-03-20  Stephen J. Turnbull  <stephen at xemacs.org>
+
+	Suppress messages to stderr at XEmacs startup.
+	Allow user to suppress menu insinuation and guided tour load.
+
+	* guided-tour.el: Update copyright notice.
+	(guided-tour-insinuate-menubar): Change sense of
+	boolean, improve default, and fixup documentation.
+	(guided-tour-insinuate-menubar): Make function unconditional if
+	interactive.  Fixup for change in control variable.  Add to
+	`after-init-hook' instead of calling from auto-autoloads.el.
+	(guided-tour): Mark with autoload cookie.
+	(guided-tour-about): Fix typo, update copyright.
+
 2007-05-07  Norbert Koch  <viteno at xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 0.51 released.



1.3       +24 -14    XEmacs/packages/xemacs-packages/guided-tour/guided-tour.el

Index: guided-tour.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/guided-tour/guided-tour.el,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- guided-tour.el	2007/05/05 15:42:36	1.2
+++ guided-tour.el	2008/03/19 22:53:12	1.3
@@ -1,10 +1,11 @@
 ;;; guided-tour.el --- functions for viewing Phil Sung's Emacs Guided Tour
 
-;; Copyright 2007 Free Software Foundation, Inc.
+;; Copyright 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Stephen J. Turnbull <stephen at xemacs.org>
 ;; Maintainer: XEmacs Development Team
 ;; Created: 2007-05-02
+;; Last-Modified: 2008-03-19
 ;; Keywords: doc
 
 ;; The permissions notice is contained in the function `guided-tour-about'
@@ -66,9 +67,10 @@ Program is invoked in a shell, so PATH i
     ["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.")
 
 ;; Functions
@@ -94,9 +96,14 @@ Returns nil if not present."
 
 ;;;###autoload
 (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)."
+  (interactive)
+  (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)
@@ -105,10 +112,11 @@ Returns nil if not present."
 
 ;; Is this OK?  Don't see how it really hurts.
 ;;;###autoload
-(guided-tour-insinuate-menubar)
+(add-one-shot-hook 'after-init-hook #'guided-tour-insinuate-menubar)
 
 ;; The Guided Tour
 
+;;;###autoload
 (defun guided-tour (type part)
   "Start the Guided Tour with TYPE viewer, in Part PART."
   (interactive "sWhich format? \nnWhich part? ")
@@ -151,8 +159,8 @@ Returns nil if not present."
 (defun guided-tour-about ()
   "Document the Guided Tour."
   (interactive)
-  (with-displaying-temp-buffer "*About the Guided Tour of Emacs*"
-    (princ "\
+  ;; for 21.4 compatibility
+  (with-displaying-help-buffer (lambda () (princ "\
 
 			A Guided Tour of Emacs
 			      Phil Sung
@@ -163,9 +171,9 @@ The XEmacs package is by Stephen Turnbul
 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.
+Copyright 2007, 2008 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;
@@ -213,7 +221,9 @@ A2.3  Yes, at Phil's site and at gnu.org
 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 <xemacs-beta at xemacs.org>.
-"
-)))
+")
+				 "*About the Guided Tour of Emacs*")))
+
+(provide 'guided-tour)
 
 ;;; guided-tour.el ends here





More information about the XEmacs-CVS mailing list