From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mike Newsgroups: gmane.emacs.help Subject: defun not loaded? Date: Sun, 14 Nov 2004 17:07:19 -0000 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <10pf467nsdo2o45@corp.supernews.com> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1100452295 18421 80.91.229.6 (14 Nov 2004 17:11:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 14 Nov 2004 17:11:35 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 14 18:11:27 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 1CTNuQ-0003Dh-00 for ; Sun, 14 Nov 2004 18:11:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTO35-0001Ux-Fk for geh-help-gnu-emacs@m.gmane.org; Sun, 14 Nov 2004 12:20:23 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!sn-xit-02!sn-xit-01!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: 35 Original-Xref: shelby.stanford.edu gnu.emacs.help:126572 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:21967 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:21967 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. :(