From 20d3ab3c0ad75690ccb67f206674d2dcaa4ee578 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Thu, 12 Feb 2015 23:43:27 -0500 Subject: Improve split-{first,last}-words docstrings --- org-link-edit.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/org-link-edit.el b/org-link-edit.el index 6c1f1ae..e9538a5 100644 --- a/org-link-edit.el +++ b/org-link-edit.el @@ -179,8 +179,10 @@ words." (defun org-link-edit--split-first-words (string n) "Split STRING into (N first words . other) cons cell. -The N first word contains all text up to the next word. If there -number of words in STRING is fewer than N, 'other' is nil." +'N first words' contains all text from the start of STRING up to +the start of the N+1 word. 'other' includes the remaining text +of STRING. If the number of words in STRING is fewer than N, +'other' is nil." (when (< n 0) (user-error "N cannot be negative")) (with-temp-buffer (insert string) @@ -193,8 +195,9 @@ number of words in STRING is fewer than N, 'other' is nil." (defun org-link-edit--split-last-words (string n) "Split STRING into (other . N last words) cons cell. -The N last words contains all leading text up to the previous -word. If there number of words in STRING is fewer than N, +'N last words' contains all text from the end of STRING back to +the end of the N+1 last word. 'other' includes the remaining text +of STRING. If the number of words in STRING is fewer than N, 'other' is nil." (when (< n 0) (user-error "N cannot be negative")) (with-temp-buffer -- cgit v1.2.3