help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to interactive to emacs


From: hallen
Subject: how to interactive to emacs
Date: 19 Mar 2006 04:26:07 -0800
User-agent: G2/0.2

I am get a function to count the words in a buffer
-----------------count.el
(defun count-word-buffer()
  "couont the number of words in the current buffer;
 priny a message in the minibuffer with the result"
  (interactive "p")
  (save-excursion
   (let ((count 0))
     (goto-char (point-min))
     (while (< (point) (point-max))
       (forward-word 1)
       (setq count(1+ count)))
     (message "This buffer total contains %d words" count)))
------------------
i  can use in the emacs-lisp mode .so how can i interactive it to emacs
so that i can use the count-word-buffer function for all the emacs
buffer.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]