|
From: | Emanuel Berg |
Subject: | Re: How to count number of C-u prefixes? |
Date: | Fri, 04 Feb 2022 15:30:34 +0100 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Jean Louis wrote: > I would like this function to give me number of times I have > pressed C-u, and here is the attempt to solve it: > > (defun how-many-times (&optional prefix query) > (interactive "p") > (let* ((times (if (> prefix 1) (1+ (/ (sqrt prefix) 4)) 1))) > (message "Times %s" times))) (defun how-many-times (&optional times) (interactive "p") (message "Super-Jean: %d" (log times 4)) ) -- underground experts united https://dataswamp.org/~incal
[Prev in Thread] | Current Thread | [Next in Thread] |