all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sebastian Tennant <seb@albert.vcisp.net>
Subject: Simple lisp question
Date: Fri, 11 Apr 2003 17:15:09 +0100	[thread overview]
Message-ID: <C3E1FD9A-6C38-11D7-8EAD-00039392CAFA@albert.vcisp.net> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1040 bytes --]

Hu gnus.

What is wrong with this simple code, (taken directly from O'Reilly's 
Learning Gnu Emacs)?

	(defun count-words-buffer ()
	  (let ((count 0))
	    (goto-char (point-min))
	    (while (< (point) (point-max))
	      (forward-word 1)
	      (setq count (+ 1 count)))
	    (message "Buffer contains %d words." count)))
	
	(count-words-buffer)*
	
	--1-:**-F1  wordcount.el      [(Lisp 
Interaction)]--L10--All---------------


With point at * (above), C-j to evaluate achieves nothing.  Below is 
the backtrace buffer output.


	Debugger entered--Lisp error: (void-function count-words-buffer)
	  (count-words-buffer)
	  eval((count-words-buffer))
	  eval-last-sexp-1(t)
	  eval-last-sexp(t)
	  eval-print-last-sexp()
	  call-interactively(eval-print-last-sexp)
	
	-:%*-F1  *Backtrace*       
[(Debugger)]--L2-All----------------------------

Learning Gnu Emacs (2nd edition) is written for Emacs v. 19.30.  I'm 
running v. 21.2.  Can things have changed that much?

Seb.


"War is not the answer..." - Marvin Gaye - 'What's Going On?'

[-- Attachment #1.2: Type: text/enriched, Size: 1443 bytes --]

Hu gnus.


What is wrong with this simple code, (taken directly from O'Reilly's
<italic>Learning Gnu Emacs</italic>)? 


<fontfamily><param>Courier</param><color><param>9291,0000,9493</param><smaller>	(defun
count-words-buffer ()

	  (let ((count 0))

	    (goto-char (point-min))

	    (while (<< (point) (point-max))

	      (forward-word 1)

	      (setq count (+ 1 count)))

	    (message "Buffer contains %d words." count)))

	

	(count-words-buffer)*

	

	--1-:**-F1  wordcount.el      [(Lisp
Interaction)]--L10--All---------------


</smaller></color></fontfamily>

With point at * (above), C-j to evaluate achieves nothing.  Below is
the backtrace buffer output.  



<fontfamily><param>Courier</param><color><param>9291,0000,9493</param><smaller>	Debugger
entered--Lisp error: (void-function count-words-buffer)

	  (count-words-buffer)

	  eval((count-words-buffer))

	  eval-last-sexp-1(t)

	  eval-last-sexp(t)

	  eval-print-last-sexp()

	  call-interactively(eval-print-last-sexp)

	

	-:%*-F1  *Backtrace*      
[(Debugger)]--L2-All----------------------------

</smaller></color></fontfamily>

<italic>Learning Gnu Emacs </italic>(2nd edition) is written for Emacs
v. 19.30.  I'm running v. 21.2.  Can things have changed that much?


Seb.


<italic><color><param>FFFF,2727,4242</param>

</color></italic><color><param>FFFF,2727,4242</param>"War is not the
answer..." - Marvin Gaye -<italic> 'What's Going On?'</italic></color>

[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

             reply	other threads:[~2003-04-11 16:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-11 16:15 Sebastian Tennant [this message]
     [not found] <mailman.4447.1050078422.21513.help-gnu-emacs@gnu.org>
2003-04-11 16:42 ` Simple lisp question Benjamin Riefenstahl

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

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

  git send-email \
    --in-reply-to=C3E1FD9A-6C38-11D7-8EAD-00039392CAFA@albert.vcisp.net \
    --to=seb@albert.vcisp.net \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.