unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Mike <mikee@mikee.ath.cx>
Subject: Re: defun not loaded?
Date: Sun, 14 Nov 2004 17:14:57 -0000	[thread overview]
Message-ID: <10pf4kh8oudv558@corp.supernews.com> (raw)
In-Reply-To: 10pf467nsdo2o45@corp.supernews.com

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

      reply	other threads:[~2004-11-14 17:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-14 17:07 defun not loaded? Mike
2004-11-14 17:14 ` Mike [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10pf4kh8oudv558@corp.supernews.com \
    --to=mikee@mikee.ath.cx \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).