From: Emanuel Berg <incal@dataswamp.org>
To: emacs-devel@gnu.org
Subject: Re: how to speed up Lisp devel time
Date: Fri, 09 Aug 2024 18:19:58 +0200 [thread overview]
Message-ID: <87ttft3byp.fsf@dataswamp.org> (raw)
In-Reply-To: CADs++6iHRK8+a0BRYA0pemsy9fU=yE_P5AH+a1XY9FN-RUuavw@mail.gmail.com
Eduardo Ochs wrote:
>> (interactive [...]
>
> Can you show the complete function?
Sure, see the seven test cases as well.
;; -----------------------------------------------------------------------
;; Scale, `draw-scale'
;; ~~~~~~~~~~~~~~~~~~~
;;
;; (draw-scale) 0......7......14.....21.....28.....35...
;; (draw-scale 10 3) 0..3..6..9.
;; (draw-scale 16 4 1) 1...5...9...13..
;; M-x draw-scale RET 0......7......14.....21.....28.....35...
;; C-u M-x draw-scale RET 0.2.4
;; C-u 1 draw-scale RET 0.
;; C-u 300 M-x draw-scale RET 0.........10........20........30........
;; -----------------------------------------------------------------------
(require 'cl-lib)
(defun draw-scale (&optional end step i)
(interactive (if (numberp current-prefix-arg)
(list current-prefix-arg)
current-prefix-arg))
(unless end
(setq end 73))
(unless step
(setq step (min 10 (max 2 (/ end 10)))))
(unless i
(setq i 0))
(unless (and (numberp i) (<= 0 i)
(numberp end) (< 0 end)
(numberp step) (< 0 step))
(error "Bogus indata"))
(cl-loop
with cur = i
for dig = (format "%s" (if (zerop (% (- cur i) step)) cur "."))
while (<= cur end) do
(insert dig)
(cl-incf cur (length dig))))
--
underground experts united
https://dataswamp.org/~incal
next prev parent reply other threads:[~2024-08-09 16:19 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-09 7:16 how to speed up Lisp devel time Emanuel Berg
2024-08-09 7:24 ` Eli Zaretskii
2024-08-09 7:39 ` Emanuel Berg
2024-08-09 10:43 ` Eli Zaretskii
2024-08-09 11:18 ` Emanuel Berg
2024-08-09 12:02 ` Eli Zaretskii
2024-08-09 13:54 ` Emanuel Berg
2024-08-09 14:58 ` Eli Zaretskii
2024-08-09 16:03 ` Emanuel Berg
2024-08-09 16:16 ` Emanuel Berg
2024-08-09 17:54 ` Eli Zaretskii
2024-08-09 18:56 ` Christopher Dimech
2024-08-09 21:57 ` Emanuel Berg
2024-08-09 21:47 ` Emanuel Berg
2024-08-09 17:27 ` Yuri Khan
2024-08-09 21:21 ` Emanuel Berg
2024-08-10 2:14 ` Emanuel Berg
2024-08-10 6:01 ` Yuri Khan
2024-08-10 6:08 ` Emanuel Berg
2024-08-10 6:44 ` Yuri Khan
2024-08-10 7:22 ` Emanuel Berg
2024-08-10 7:51 ` Emanuel Berg
2024-08-10 4:32 ` Emanuel Berg
2024-08-10 5:58 ` Eli Zaretskii
2024-08-09 14:59 ` Eduardo Ochs
2024-08-09 16:19 ` Emanuel Berg [this message]
2024-08-09 18:00 ` Eli Zaretskii
2024-08-09 18:54 ` Christopher Dimech
2024-08-09 22:17 ` Emanuel Berg
2024-08-09 22:00 ` Emanuel Berg
2024-08-09 8:24 ` Emanuel Berg
2024-08-09 10:36 ` Christopher Dimech
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ttft3byp.fsf@dataswamp.org \
--to=incal@dataswamp.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).