From 8dd624c8ac179d5381e00c04358d353866f60f9f Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Tue, 3 Jan 2017 17:19:36 +0100 Subject: [PATCH] Document that functions in 'ffap-alist' can use the match data * lisp/ffap.el (ffap-alist): Document that ffap sets the match data while walking 'ffap-alist'. --- lisp/ffap.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/ffap.el b/lisp/ffap.el index 76e86ef..c1fab70 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -792,7 +792,10 @@ ffap-alist KEY is a symbol, and it equals `major-mode', or KEY is a string, it should match NAME as a regexp. On a match, (FUNCTION NAME) is called and should return a file, an -URL, or nil. If nil, search the alist for further matches.") +URL, or nil. If nil, search the alist for further matches. +While calling FUNCTION, the match data is set according to KEY if KEY +is a string, so that FUNCTION can use `match-string' and friends +to extract substrings.") (put 'ffap-alist 'risky-local-variable t) -- 2.8.0.rc3.226.g39d4020