all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Simple lisp question
@ 2003-04-11 16:15 Sebastian Tennant
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Tennant @ 2003-04-11 16:15 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 2+ messages in thread
[parent not found: <mailman.4447.1050078422.21513.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2003-04-11 16:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-11 16:15 Simple lisp question Sebastian Tennant
     [not found] <mailman.4447.1050078422.21513.help-gnu-emacs@gnu.org>
2003-04-11 16:42 ` Benjamin Riefenstahl

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.