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

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

Re: how-many to number?


From: Albert Reiner
Subject: Re: how-many to number?
Date: 28 Sep 2005 16:00:38 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

["rgb" <rbielaws@i1.net>, 28 Sep 2005 06:35:26 -0700]:
> C-h f how-many <ret>
> 
> Print and return number of matches for regexp following point.
> When called from Lisp and interactive is omitted or nil, *just return
> the number, do not print it*; if interactive is t, the function behaves
> in all respects has if it had been called interactively.

Thanks; I don't get this on GNU Emacs 21.3.1 (i386-redhat-linux-gnu, X
toolkit, Xaw3d scroll bars) of 2005-02-04 on bugs.build.redhat.com:

,----[ C-h f how-many RET ]
| how-many is an interactive compiled Lisp function in `replace'.
| (how-many REGEXP &optional RSTART REND)
| 
| Print number of matches for REGEXP following point.
| 
| If REGEXP contains upper case characters (excluding those preceded by `\'),
| the matching is case-sensitive.
| 
| Second and third arg RSTART and REND specify the region to operate on.
| 
| Interactively, in Transient Mark mode when the mark is active, operate
| on the contents of the region.  Otherwise, operate from point to the
| end of the buffer.
`----

So I guess that changed recently.  My current work-around:

    (read (how-many "\\b\\w+\\b" (point-min) (point-max)))

, which is ugly but seems to work.

Thanks for your help,

Albert.


reply via email to

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