summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorGregory Heytings <gregory@heytings.org>2021-11-01 14:51:57 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2021-11-01 14:51:57 +0100
commitdaea9b3b44a4dc09017c3d2d5b8eaa4c68cdd2b0 (patch)
tree700b380dd3566886993346417b467f17d22ddf86 /lisp/emacs-lisp
parent453d104602a04521afd46b57c05462b6bc74305b (diff)
downloademacs-daea9b3b44a4dc09017c3d2d5b8eaa4c68cdd2b0.tar.gz
emacs-daea9b3b44a4dc09017c3d2d5b8eaa4c68cdd2b0.tar.bz2
emacs-daea9b3b44a4dc09017c3d2d5b8eaa4c68cdd2b0.zip
Read mailcaps again only when necessary
* doc/lispref/files.texi (File Attributes): Document it. * lisp/files.el (file-has-changed-p): New function. (file-has-changed-p--hash-table): Internal variable used by the new function (bug#51523). * lisp/emacs-lisp/shortdoc.el (file): Mention it. * lisp/net/mailcap.el (mailcap-parse-mailcaps): Read mailcaps again only when at least one of the mailcap files has changed. Fixes bug#51523.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/shortdoc.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el
index daf362dd88b..c3d6c742940 100644
--- a/lisp/emacs-lisp/shortdoc.el
+++ b/lisp/emacs-lisp/shortdoc.el
@@ -358,6 +358,9 @@ There can be any number of :example/:result elements."
(file-newer-than-file-p
:no-eval (file-newer-than-file-p "/tmp/foo" "/tmp/bar")
:eg-result nil)
+ (file-has-changed-p
+ :no-eval (file-has-changed-p "/tmp/foo")
+ :eg-result t)
(file-equal-p
:no-eval (file-equal-p "/tmp/foo" "/tmp/bar")
:eg-result nil)