all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Small patch for ffap.el
@ 2017-01-03 16:24 Philipp Stephani
  2017-01-03 16:41 ` John Wiegley
  0 siblings, 1 reply; 4+ messages in thread
From: Philipp Stephani @ 2017-01-03 16:24 UTC (permalink / raw)
  To: Emacs developers


[-- 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: Small patch for ffap.el
  2017-01-03 16:24 Small patch for ffap.el Philipp Stephani
@ 2017-01-03 16:41 ` John Wiegley
  2017-01-03 16:45   ` Kaushal Modi
  2017-01-04 10:43   ` Philipp Stephani
  0 siblings, 2 replies; 4+ messages in thread
From: John Wiegley @ 2017-01-03 16:41 UTC (permalink / raw)
  To: Philipp Stephani; +Cc: Emacs developers

>>>>> "PS" == Philipp Stephani <p.stephani2@gmail.com> writes:

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

Thanks, pushed to master.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Small patch for ffap.el
  2017-01-03 16:41 ` John Wiegley
@ 2017-01-03 16:45   ` Kaushal Modi
  2017-01-04 10:43   ` Philipp Stephani
  1 sibling, 0 replies; 4+ messages in thread
From: Kaushal Modi @ 2017-01-03 16:45 UTC (permalink / raw)
  To: Philipp Stephani, Emacs developers

[-- Attachment #1: Type: text/plain, Size: 649 bytes --]

The commit title is literally that.. "Small patch for ffap.el". Definitely
it should be more descriptive than that :)

On Tue, Jan 3, 2017 at 11:41 AM John Wiegley <jwiegley@gmail.com> wrote:

> >>>>> "PS" == Philipp Stephani <p.stephani2@gmail.com> writes:
>
> PS> attached is a small patch that documents the fact that functions in
> PS> ffap-alist can use the match data. This is already used by ffap.el
> itself,
> PS> e.g. in ffap-rfc.
>
> Thanks, pushed to master.
>
> --
> John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
> http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2
>
> --

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 1470 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Small patch for ffap.el
  2017-01-03 16:41 ` John Wiegley
  2017-01-03 16:45   ` Kaushal Modi
@ 2017-01-04 10:43   ` Philipp Stephani
  1 sibling, 0 replies; 4+ messages in thread
From: Philipp Stephani @ 2017-01-04 10:43 UTC (permalink / raw)
  To: Emacs developers

[-- Attachment #1: Type: text/plain, Size: 432 bytes --]

John Wiegley <jwiegley@gmail.com> schrieb am Di., 3. Jan. 2017 um 17:41 Uhr:

> >>>>> "PS" == Philipp Stephani <p.stephani2@gmail.com> writes:
>
> PS> attached is a small patch that documents the fact that functions in
> PS> ffap-alist can use the match data. This is already used by ffap.el
> itself,
> PS> e.g. in ffap-rfc.
>
> Thanks, pushed to master.
>
>
>
Thanks, since this is only a doc fix I've also pushed it to emacs-25.

[-- Attachment #2: Type: text/html, Size: 1014 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-04 10:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-03 16:24 Small patch for ffap.el Philipp Stephani
2017-01-03 16:41 ` John Wiegley
2017-01-03 16:45   ` Kaushal Modi
2017-01-04 10:43   ` Philipp Stephani

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.