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

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

Re: How to count number of C-u prefixes?


From: Emanuel Berg
Subject: Re: How to count number of C-u prefixes?
Date: Fri, 04 Feb 2022 16:07:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Jean Louis wrote:

> Thanks for lively help from Sweden.

Np :)

> (defun hyperscope-by-text-query (&optional prefix query)
>   "Search `hyobjects_text' column for QUERY.
>
> User may invoke C-u PREFIX for multiple queries to be searched in
> the text."

Oh, oh! Incorrect order of argument mentioned in docstring ...

Also instead of C-u use \\[universal-argument].

> (let* ((times (if (= prefix 1) 1 (log prefix 4)))

What, when prefix is 1 one has it C-u 0 times :)

You just need (log prefix 4), if prefix is 1 that will be

  (log 1 4) ; 0

since always x^0 = 1

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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