unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* defun not loaded?
@ 2004-11-14 17:07 Mike
  2004-11-14 17:14 ` Mike
  0 siblings, 1 reply; 2+ messages in thread
From: Mike @ 2004-11-14 17:07 UTC (permalink / raw)


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. :(

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-11-14 17:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-14 17:07 defun not loaded? Mike
2004-11-14 17:14 ` Mike

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).