diff options
-rw-r--r-- | Makefile | 17 | ||||
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | org-link-edit.el | 12 | ||||
-rw-r--r-- | test-org-link-edit.el | 6 |
4 files changed, 19 insertions, 20 deletions
@@ -1,22 +1,25 @@ LOAD_PATH ?= -BATCH = emacs -Q --batch $(LOAD_PATH) +BATCH = emacs -Q --batch $(LOAD_PATH) -L . -all: org-link-edit-autoloads.el org-link-edit.elc +all: org-link-edit-autoloads.el org-link-edit.elc test-org-link-edit.elc .PHONY: test -test: org-link-edit.elc - @$(BATCH) -L . -l test-org-link-edit \ +test: org-link-edit.elc test-org-link-edit.elc + @$(BATCH) -l test-org-link-edit \ --eval "(ert-run-tests-batch-and-exit '(not (tag interactive)))" .PHONY: clean clean: - $(RM) org-link-edit-autoloads.el org-link-edit.elc + $(RM) org-link-edit-autoloads.el org-link-edit.elc test-org-link-edit.elc %.elc: %.el @$(BATCH) -f batch-byte-compile $< %-autoloads.el: %.el @$(BATCH) --eval \ - "(let (make-backup-files) \ - (update-file-autoloads \"$(CURDIR)/$<\" t \"$(CURDIR)/$@\"))" + "(let ((make-backup-files nil)) \ + (if (fboundp 'loaddefs-generate) \ + (loaddefs-generate default-directory \"$@\" \ + (list \"test-org-link-edit.el\")) \ + (update-file-autoloads \"$(CURDIR)/$<\" t \"$(CURDIR)/$@\")))" @@ -3,9 +3,6 @@ Org Link Edit provides Paredit-inspired slurping and barfing commands for Org link descriptions. The commentary in org-link-edit.el contains more details. -org-link-edit.el is available in Org's contrib directory. See the Org -manual's installation instructions for information on using -contributed packages: <https://orgmode.org/org.html#Installation>. Contributing ------------ @@ -31,4 +28,3 @@ public-inbox [^1] archives at https://inbox.kyleam.com/misc/?q=s%3Aorg-link-edit [^1]: https://public-inbox.org/README -[^2]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Copyright-Assignment.html diff --git a/org-link-edit.el b/org-link-edit.el index a27a13d..b9c7a8e 100644 --- a/org-link-edit.el +++ b/org-link-edit.el @@ -213,10 +213,10 @@ If N is negative, slurp trailing blobs instead of leading blobs." (defun org-link-edit--split-first-blobs (string n) "Split STRING into (N first blobs . other) cons cell. -'N first blobs' contains all text from the start of STRING up to -the start of the N+1 blob. 'other' includes the remaining text +`N first blobs' contains all text from the start of STRING up to +the start of the N+1 blob. `other' includes the remaining text of STRING. If the number of blobs in STRING is fewer than N, -'other' is nil." +`other' is nil." (when (< n 0) (user-error "N cannot be negative")) (with-temp-buffer (insert string) @@ -230,10 +230,10 @@ of STRING. If the number of blobs in STRING is fewer than N, (defun org-link-edit--split-last-blobs (string n) "Split STRING into (other . N last blobs) cons cell. -'N last blobs' contains all text from the end of STRING back to -the end of the N+1 last blob. 'other' includes the remaining +`N last blobs' contains all text from the end of STRING back to +the end of the N+1 last blob. `other' includes the remaining text of STRING. If the number of blobs in STRING is fewer than -N, 'other' is nil." +N, `other' is nil." (when (< n 0) (user-error "N cannot be negative")) (with-temp-buffer (insert string) diff --git a/test-org-link-edit.el b/test-org-link-edit.el index 27f864b..b7be08a 100644 --- a/test-org-link-edit.el +++ b/test-org-link-edit.el @@ -1,4 +1,4 @@ -;;; test-org-link-edit.el --- Tests for org-link-edit.el +;;; test-org-link-edit.el --- Tests for org-link-edit.el -*- lexical-binding: t; -*- ;; Copyright (C) 2015-2020 Kyle Meyer <kyle@kyleam.com> @@ -627,13 +627,13 @@ website" (ert-deftest test-org-link-edit/get-link-data () "Test `org-link-edit--link-data'." ;; Plain link - (cl-multiple-value-bind (beg end link desc) + (cl-multiple-value-bind (_beg _end link desc) (org-test-with-temp-text "https://orgmode.org/" (org-link-edit--link-data)) (should (string= link "https://orgmode.org/")) (should-not desc)) ;; Bracket link - (cl-multiple-value-bind (beg end link desc) + (cl-multiple-value-bind (_beg _end link desc) (org-test-with-temp-text "\[\[https://orgmode.org/\]\[org\]\]" (org-link-edit--link-data)) (should (string= link "https://orgmode.org/")) |