From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mike Newsgroups: gmane.emacs.help Subject: Re: defun not loaded? Date: Sun, 14 Nov 2004 17:14:57 -0000 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <10pf4kh8oudv558@corp.supernews.com> References: <10pf467nsdo2o45@corp.supernews.com> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1100452598 19182 80.91.229.6 (14 Nov 2004 17:16:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 14 Nov 2004 17:16:38 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 14 18:16:33 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CTNzN-0003WR-00 for ; Sun, 14 Nov 2004 18:16:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTO81-0002Is-Km for geh-help-gnu-emacs@m.gmane.org; Sun, 14 Nov 2004 12:25:29 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!tethys.csu.net!nntp.csufresno.edu!sn-xit-03!sn-xit-08!sn-post-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: slrn/0.9.7.4 (Linux) Original-X-Complaints-To: abuse@supernews.com Original-Lines: 40 Original-Xref: shelby.stanford.edu gnu.emacs.help:126574 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:21969 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:21969 In article <10pf467nsdo2o45@corp.supernews.com>, Mike wrote: > I'm re-learning elisp and am working on a function to help > some cow-orkers. The code loads the (defvar...) but not > the (defun...). Why is this? I'm using emacs 21 on RHFC2. > > ;;; global variables that control how wincap works > (defvar *window-capture-file* "~/.wincap.log" > "Filename to capture window contents to.") > (defvar *window-capture-order* 'cron > "Write new items to the *window-capture-file* in 'cron order (the default) > or in 'reverse-cron order") > (defvar *window-capture-lines-gap* 2 > "How many blank lines between captures?") > (defvar *window-capture-insert-lines* nil > "Place lines of ='s in the gap between captures if non-nil.") > (defvar *window-capture-line-string* "=============================================" > "The line string to insert if *window-capture-insert-lines* is non-nil.") > (defvar *window-capture-insert-timestamp* nil > "Place a timestamp at the beginning of each capture if non-nil.") > (defvar *window-capture-save-often* nil > "If non-nil, save the capture buffer with each capture.") > > ;;; the wincap function itself > (defun wincap (&optional file) > "When invoked copy the contents of the current buffer from (window-min) > through (window-max) to the file named by *window-capture-file*. The > optional argument to this function 'file' can be used to send the capture > to a different file." > (let* ((fn (or file *window-capture-file*)) > (bufname (concat "*wincap: " fn "*")) > (buf (get-file-buffer fn)) > (text (buffer-substring (window-min) (window-max)))) > .... > ))) > > Pasting into vi messed up my formatting. :( Found it, I didn't have a (interactive) after my docstring. Mike