www.delorie.com/gnu/docs/emacs-lisp-intro/emacs-lisp-intro_204.html   search  
 
Buy the book!


Programming in Emacs Lisp

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

13. Counting: Repetition and Regexps

Repetition and regular expression searches are powerful tools that you often use when you write code in Emacs Lisp. This chapter illustrates the use of regular expression searches through the construction of word count commands using while loops and recursion.

Counting words  
13.1 The count-words-region Function  Use a regexp, but find a problem.
13.2 Count Words Recursively  Start with case of no words in region.
13.3 Exercise: Counting Punctuation  


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003