#! /usr/bin/perl


###############################################################################
#
# Add the 'gnats' tools into emacs
#
$emacsfile = "/etc/site-start.el";	# provided by 'init'

sub addemacs_die {
	die "Cannot add 'gnats' tools to emacs site-start: $!\n";
}

#
# Append to the emacs site-start file
#
open(EMACS,">>$emacsfile") || addemacs_die;
print EMACS <<END;

; ----- Gnats-Load-Start -----
(autoload 'edit-pr "gnats"
   "Command to edit a problem report." t)
(autoload 'view-pr "gnats"
   "Command to view a problem report." t)
(autoload 'unlock-pr "gnats"
   "Unlock a problem report." t)
(autoload 'query-pr "gnats"
   "Command to query information about problem reports." t)
(autoload 'send-pr-mode "send-pr"
   "Major mode for sending problem reports." t)
(autoload 'send-pr "send-pr"
   "Command to create and send a problem report." t)
; -----  Gnats-Load-End  -----
END
close(EMACS);
