From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.help Subject: Re: how to interactive to emacs Date: Sun, 19 Mar 2006 13:34:48 +0100 Organization: Organization?!? Message-ID: <85slpe62af.fsf@lola.goethe.zz> References: <1142771167.371441.289120@u72g2000cwu.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1142772049 28993 80.91.229.2 (19 Mar 2006 12:40:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 19 Mar 2006 12:40:49 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 19 13:40:43 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FKxD9-0004bB-1P for geh-help-gnu-emacs@m.gmane.org; Sun, 19 Mar 2006 13:40:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FKxD8-0000ds-B7 for geh-help-gnu-emacs@m.gmane.org; Sun, 19 Mar 2006 07:40:42 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.news.ucla.edu!news.maxwell.syr.edu!newsfeed.icl.net!colt.net!peernews3.colt.net!newsfeed.stueberl.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!news.arcor.de!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:3/1RAThqdxbItQ7gC+kiWKJZd2Y= Original-Lines: 27 Original-NNTP-Posting-Date: 19 Mar 2006 13:34:49 MET Original-NNTP-Posting-Host: 954a4b16.newsread2.arcor-online.net Original-X-Trace: DXC=H9f^P_l2hCA:BTg1DiO7HBQ5U85hF6f; DjW\KbG]kaMHQ>n?D9BSA]LUFBi^Tl=5HI1_LiI6ENVaM3>5MOK`O=RKGD5P List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:33878 Archived-At: "hallen" writes: > 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. Your "interactive" form is incompatible with the actual argument list of count-word-buffer. It arranges for count-word-buffer to be called with one argument. Remove the "p" from the form if you don't want to actually use a potential prefix argument. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum