all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Emacs developers <emacs-devel@gnu.org>
Subject: Small patch for ffap.el
Date: Tue, 03 Jan 2017 16:24:23 +0000	[thread overview]
Message-ID: <CAArVCkTsB4rodkioPUbFot5WhpMLuBQJgntiPaBqGC-z8M+e=Q@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 166 bytes --]

Hi,

attached is a small patch that documents the fact that functions in
ffap-alist can use the match data. This is already used by ffap.el itself,
e.g. in ffap-rfc.

[-- Attachment #1.2: Type: text/html, Size: 211 bytes --]

[-- Attachment #2: 0001-Document-that-functions-in-ffap-alist-can-use-the-matc.txt --]
[-- Type: text/plain, Size: 1080 bytes --]

From 8dd624c8ac179d5381e00c04358d353866f60f9f Mon Sep 17 00:00:00 2001
From: Philipp Stephani <phst@google.com>
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


             reply	other threads:[~2017-01-03 16:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-03 16:24 Philipp Stephani [this message]
2017-01-03 16:41 ` Small patch for ffap.el John Wiegley
2017-01-03 16:45   ` Kaushal Modi
2017-01-04 10:43   ` Philipp Stephani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAArVCkTsB4rodkioPUbFot5WhpMLuBQJgntiPaBqGC-z8M+e=Q@mail.gmail.com' \
    --to=p.stephani2@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.