[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/embark 8e7c53a8ec: Further tweaks to target finder docu
From: |
ELPA Syncer |
Subject: |
[elpa] externals/embark 8e7c53a8ec: Further tweaks to target finder documentation |
Date: |
Sun, 19 Feb 2023 12:57:39 -0500 (EST) |
branch: externals/embark
commit 8e7c53a8ec6969a8d54a22c7cb76f15e2e7fa3f9
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>
Further tweaks to target finder documentation
These come from the discussion in #601
---
README.org | 2 +-
embark.el | 6 ++++--
embark.texi | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/README.org b/README.org
index 9c87a4e0bf..5866d3799c 100644
--- a/README.org
+++ b/README.org
@@ -791,7 +791,7 @@ You can be as fancy as you want with the recognized syntax.
Here, to
keep the example simple, I'll assume the link matches the regexp
=wikipedia:[[:alnum:]_]+=. We will write a function that looks for a
match surrounding point, and returns a dotted list of the form ='(url
-actual-url-of-the-page start . end)= where =start= and =end= are the buffer
+URL-OF-THE-PAGE START . END)= where =START= and =END= are the buffer
positions bounding the target, and are used by Embark to highlight it
if you have =embark-highlight-indicator= included in the list
=embark-indicators=. (There are a couple of other options for the return
diff --git a/embark.el b/embark.el
index 3258772581..0cd7db48b0 100644
--- a/embark.el
+++ b/embark.el
@@ -181,7 +181,7 @@ or a list of such symbols."
embark-target-defun-at-point
embark-target-prog-heading-at-point)
"List of functions to determine the target in current context.
-Each function should take no arguments and return either:
+Each function should take no arguments and return one of:
1. a cons (TYPE . TARGET) where TARGET is a string and TYPE is a
symbol (which is looked up in `embark-keymap-alist' to
@@ -191,7 +191,9 @@ Each function should take no arguments and return either:
START and END are the buffer positions bounding TARGET, used
for highlighting; or
-3. a possibly empty list of targets, each of type 1 or 2."
+3. a possibly empty list of targets, each of type 1 or 2 (in
+ particular if a target finder does not find any targets, it
+ should return nil)."
:type 'hook)
(defcustom embark-transformer-alist
diff --git a/embark.texi b/embark.texi
index 54ceed9ebe..7b90eda7b6 100644
--- a/embark.texi
+++ b/embark.texi
@@ -966,7 +966,7 @@ You can be as fancy as you want with the recognized syntax.
Here, to
keep the example simple, I'll assume the link matches the regexp
@samp{wikipedia:[[:alnum:]_]+}. We will write a function that looks for a
match surrounding point, and returns a dotted list of the form @samp{'(url
-actual-url-of-the-page start . end)} where @samp{start} and @samp{end} are the
buffer
+URL-OF-THE-PAGE START . END)} where @samp{START} and @samp{END} are the buffer
positions bounding the target, and are used by Embark to highlight it
if you have @samp{embark-highlight-indicator} included in the list
@samp{embark-indicators}. (There are a couple of other options for the return
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/embark 8e7c53a8ec: Further tweaks to target finder documentation,
ELPA Syncer <=