summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2017-01-03 17:19:36 +0100
committerPhilipp Stephani <phst@google.com>2017-01-03 17:19:36 +0100
commit8dd624c8ac179d5381e00c04358d353866f60f9f (patch)
tree2e225aed5e2477e0c1c1b24aa284adbdf344801a
parent2e2a8068031b79a6cc5502b8d4c9d849ebb1dae0 (diff)
downloademacs-8dd624c8ac179d5381e00c04358d353866f60f9f.tar.gz
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'.
-rw-r--r--lisp/ffap.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/ffap.el b/lisp/ffap.el
index 76e86ef9511..c1fab70fe94 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -792,7 +792,10 @@ specify actions to try creating such a string. A pair matches if either
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)