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

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

bug#52209: 28.0.60; [PATCH] date-to-time fails on pure dates


From: Lars Ingebrigtsen
Subject: bug#52209: 28.0.60; [PATCH] date-to-time fails on pure dates
Date: Sun, 20 Feb 2022 13:25:16 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

(Resending because bug report was archived.)

Bob Rogers <rogers-emacs@rgrjr.homedns.org> writes:

> Here's what I have for this phase of the plan; let me know what you
> think.  It took longer than expected because it became a project unto
> itself, and so my procrastinator kicked in, making it longer still.  :-/

:-)

Have you benchmarked your new implementation versus the current one?
It's important that the parsing is performant, otherwise it'd slow down
many things that parse a large number of date strings.

Some minor comments about the code:

> +(defsubst ietf-drums-date--ignore-char? (char)
> +  ;; Ignore whitespace and commas.
> +  (or (eq char ?\ ) (eq char ?\t) (eq char ?\r) (eq char ?\n) (eq char ?,)))

In Emacs Lisp, we don't use Scheme-style predicate names -- we use -p
instead.

> +(defun ietf-drums-date--tokenize-string (string &optional comment-eof?)

And the same with booleans -- we don't use foo? for those, but just foo.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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