emacs-devel
[Top][All Lists]
Advanced

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

Re: master daea9b3 1/2: Read mailcaps again only when necessary


From: Lars Ingebrigtsen
Subject: Re: master daea9b3 1/2: Read mailcaps again only when necessary
Date: Tue, 02 Nov 2021 15:54:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>     (defun mailcap-parse-file (file &optional cache)
>       (unless (file-name-absolute-p file) (setq file (expand-file-name file)))
>       (or (and cache
>                (file-unchanged-p file cache)
>                (gethash (cons file 'mailcap-parse-file) cache))
>           (let ((data <do the actual parsing>))
>             (when cache
>               (puthash (cons file 'mailcap-parse-file) data cache))
>             data)))

That does have the advantage that the package can store the data for
many files in the same place, which is nice.  But the interface doesn't
seem as clear as it could be.

-- 
(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]