[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash dbbf617 281/316: Remove dead code from examples-to
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dash dbbf617 281/316: Remove dead code from examples-to-info.el |
Date: |
Mon, 15 Feb 2021 15:58:17 -0500 (EST) |
branch: externals/dash
commit dbbf617c28e46a950d20a0a1545f54b16c68e493
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>
Remove dead code from examples-to-info.el
* dev/examples-to-info.el (docs--chop-prefix, docs--chop-suffix)
(github-id, function-summary): Remove unused functions.
(function-to-node): Remove redundant conditions.
---
dev/examples-to-info.el | 34 ++--------------------------------
1 file changed, 2 insertions(+), 32 deletions(-)
diff --git a/dev/examples-to-info.el b/dev/examples-to-info.el
index 3b5ff9f..cecf40d 100644
--- a/dev/examples-to-info.el
+++ b/dev/examples-to-info.el
@@ -105,8 +105,8 @@ Based on `describe-function-1'."
it t t))))
(defun function-to-node (function)
- (when (and (stringp function)
- (string-match "^\\(### [[:upper:]][[:alpha:]- ]+\\)$" function))
+ (let ((case-fold-search nil))
+ (string-match "^\\(### [[:upper:]][[:alpha:]- ]+\\)$" function)
(concat (s-replace "### " "* " (match-string 1 function)) "::")))
(defun function-to-info (function)
@@ -128,40 +128,10 @@ Based on `describe-function-1'."
(format-docstring docstring)
(mapconcat 'identity (-take 3 examples) "\n")))))
-(defun docs--chop-prefix (prefix s)
- "Remove PREFIX if it is at the start of S."
- (let ((pos (length prefix)))
- (if (and (>= (length s) (length prefix))
- (string= prefix (substring s 0 pos)))
- (substring s pos)
- s)))
-
-(defun docs--chop-suffix (suffix s)
- "Remove SUFFIX if it is at end of S."
- (let ((pos (- (length suffix))))
- (if (and (>= (length s) (length suffix))
- (string= suffix (substring s pos)))
- (substring s 0 pos)
- s)))
-
-(defun github-id (command-name signature)
- (docs--chop-suffix
- "-"
- (replace-regexp-in-string "[^a-zA-Z0-9-]+" "-" (docs--chop-prefix
- "!"
- (format "%S %S"
command-name signature)))))
-
(defun s-replace (old new s)
"Replace OLD with NEW in S."
(replace-regexp-in-string (regexp-quote old) new s t t))
-(defun function-summary (function)
- (if (stringp function)
- (concat "\n" function "\n")
- (let ((command-name (car function))
- (signature (cadr function)))
- (format "* [%s](#%s) `%s`" command-name (github-id command-name
signature) signature))))
-
(defun simplify-quotes ()
(goto-char (point-min))
(while (re-search-forward (rx (or "'nil" "(quote nil)")) nil t)
- [elpa] externals/dash ce4a344 258/316: Eliminate odd? from examples, (continued)
- [elpa] externals/dash ce4a344 258/316: Eliminate odd? from examples, ELPA Syncer, 2021/02/15
- [elpa] externals/dash f3ae7bb 259/316: Alias -remove-item to remove, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 525ede2 265/316: Improve docstring Markdown formatting, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 4a32a5d 257/316: Write -remove-last in terms of --remove-last, ELPA Syncer, 2021/02/15
- [elpa] externals/dash cbd3b29 268/316: * .elpaignore: Exclude dev/ from GNU ELPA tarball., ELPA Syncer, 2021/02/15
- [elpa] externals/dash 2a10547 271/316: Fix handling nils of -some-->, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 0789fd0 273/316: Fix -some--> docstring and Edebug spec, ELPA Syncer, 2021/02/15
- [elpa] externals/dash e0254c5 274/316: * dash.el (-doto): Fix Edebug spec., ELPA Syncer, 2021/02/15
- [elpa] externals/dash 46e43c0 277/316: Fix long-standing typo in Texinfo generation, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 65eeaf6 278/316: Fix long-standing typo in examples, ELPA Syncer, 2021/02/15
- [elpa] externals/dash dbbf617 281/316: Remove dead code from examples-to-info.el,
ELPA Syncer <=
- [elpa] externals/dash ee9bceb 284/316: Leave Texinfo docstring indentation as is, ELPA Syncer, 2021/02/15
- [elpa] externals/dash a6b16ea 286/316: Localize 'nil -> '() replacement in Texinfo, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 56db327 287/316: Fix printing in Emacs < 27, ELPA Syncer, 2021/02/15
- [elpa] externals/dash d76505d 289/316: Use dash--replace-all in Texinfo format-docstring, ELPA Syncer, 2021/02/15
- [elpa] externals/dash c38b06f 291/316: Port some recent manual changes to README, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 47114ca 290/316: Make manual generation more consistent with README, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 3fa27c4 295/316: Make README's def-example-group more like manual's, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 4043f4e 305/316: Consolidate duplicated change logs in new NEWS.md, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 51d81a5 308/316: Avoid using dash.el functions in macro bodies, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 41b5681 310/316: Merge pull request #369 from blc/gut, ELPA Syncer, 2021/02/15