emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/dash eedc2af 279/316: Fix docstring Texinfo generation


From: ELPA Syncer
Subject: [elpa] externals/dash eedc2af 279/316: Fix docstring Texinfo generation
Date: Mon, 15 Feb 2021 15:58:17 -0500 (EST)

branch: externals/dash
commit eedc2affad34471bd99b5fae56c6127c99eed3a2
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>

    Fix docstring Texinfo generation
    
    * dev/examples-to-info.el (format-docstring): Generalize @-quoting
    by doing it first.  Use \< and \> in place of \b for better word
    boundary detection.  Mark all replacements as fixed and literal.
    * dash.texi: Regenerate.
---
 dash.texi               | 12 ++++++------
 dev/examples-to-info.el |  9 +++++----
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/dash.texi b/dash.texi
index eeae650..8a502c0 100644
--- a/dash.texi
+++ b/dash.texi
@@ -2064,8 +2064,8 @@ Return a list of ((-filter @var{pred} @var{list}) 
(-remove @var{pred} @var{list}
 
 @anchor{-partition}
 @defun -partition (n list)
-Return a new list with the items in @var{list} grouped into @var{n-}sized 
sublists.
-If there are not enough items to make the last group @var{n-}sized,
+Return a new list with the items in @var{list} grouped into @var{n}-sized 
sublists.
+If there are not enough items to make the last group @var{n}-sized,
 those items are discarded.
 
 @example
@@ -2086,7 +2086,7 @@ those items are discarded.
 
 @anchor{-partition-all}
 @defun -partition-all (n list)
-Return a new list with the items in @var{list} grouped into @var{n-}sized 
sublists.
+Return a new list with the items in @var{list} grouped into @var{n}-sized 
sublists.
 The last group may contain less than @var{n} items.
 
 @example
@@ -2107,8 +2107,8 @@ The last group may contain less than @var{n} items.
 
 @anchor{-partition-in-steps}
 @defun -partition-in-steps (n step list)
-Return a new list with the items in @var{list} grouped into @var{n-}sized 
sublists at offsets @var{step} apart.
-If there are not enough items to make the last group @var{n-}sized,
+Return a new list with the items in @var{list} grouped into @var{n}-sized 
sublists at offsets @var{step} apart.
+If there are not enough items to make the last group @var{n}-sized,
 those items are discarded.
 
 @example
@@ -2129,7 +2129,7 @@ those items are discarded.
 
 @anchor{-partition-all-in-steps}
 @defun -partition-all-in-steps (n step list)
-Return a new list with the items in @var{list} grouped into @var{n-}sized 
sublists at offsets @var{step} apart.
+Return a new list with the items in @var{list} grouped into @var{n}-sized 
sublists at offsets @var{step} apart.
 The last groups may contain less than @var{n} items.
 
 @example
diff --git a/dev/examples-to-info.el b/dev/examples-to-info.el
index 6814931..3b5ff9f 100644
--- a/dev/examples-to-info.el
+++ b/dev/examples-to-info.el
@@ -94,10 +94,11 @@ Based on `describe-function-1'."
 (defun format-docstring (docstring)
   (let (case-fold-search)
     (--> docstring
-      (replace-regexp-in-string "\\b\\([A-Z][A-Z-]*[0-9]*\\)\\b" 
'quote-and-downcase it t)
-      (replace-regexp-in-string "`\\([^ ]+\\)'" 'unquote-and-link it t)
-      (replace-regexp-in-string "{,@}" "{,@@}" it t)
-      (replace-regexp-in-string "^  " "    " it)
+      (replace-regexp-in-string "@" "@@" it t t)
+      (replace-regexp-in-string "\\<\\([A-Z][A-Z-]*[0-9]*\\)\\>"
+                                #'quote-and-downcase it t t)
+      (replace-regexp-in-string "`\\([^ ]+\\)'" #'unquote-and-link it t t)
+      (replace-regexp-in-string "^  " "    " it t t)
       (replace-regexp-in-string
        "\\.\\.\\.\\($\\)?"
        (lambda (_) (if (match-beginning 1) "@enddots{}" "@dots{}"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]