summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2019-03-24 20:44:13 -0400
committerKyle Meyer <kyle@kyleam.com>2019-03-24 20:44:13 -0400
commitd9afed12f4ce6ea1abe41c2029a7b77205a0269d (patch)
treefb85f7b821e490322cf7f3184ab2e866ae0abc22
parent3a2ef56195c8f05179ae8f68ade65c725b352c89 (diff)
parent355eb9e08e981fb886354d1f9ca159a48a9b736b (diff)
downloadorg-mode-d9afed12f4ce6ea1abe41c2029a7b77205a0269d.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/org-datetree.el9
-rw-r--r--lisp/org-pcomplete.el2
-rw-r--r--lisp/org.el4
3 files changed, 8 insertions, 7 deletions
diff --git a/lisp/org-datetree.el b/lisp/org-datetree.el
index aea2c8d..b4797de 100644
--- a/lisp/org-datetree.el
+++ b/lisp/org-datetree.el
@@ -138,15 +138,16 @@ will be built under the headline at point."
"^\\*+[ \t]+%d-%02d-\\([0123][0-9]\\) \\w+$"
year month day))))
-(defun org-datetree--find-create (regex year &optional month day insert)
- "Find the datetree matched by REGEX for YEAR, MONTH, or DAY.
-REGEX is passed to `format' with YEAR, MONTH, and DAY as
+(defun org-datetree--find-create
+ (regex-template year &optional month day insert)
+ "Find the datetree matched by REGEX-TEMPLATE for YEAR, MONTH, or DAY.
+REGEX-TEMPLATE is passed to `format' with YEAR, MONTH, and DAY as
arguments. Match group 1 is compared against the specified date
component. If INSERT is non-nil and there is no match then it is
inserted into the buffer."
(when (or month day)
(org-narrow-to-subtree))
- (let ((re (format regex year month day))
+ (let ((re (format regex-template year month day))
match)
(goto-char (point-min))
(while (and (setq match (re-search-forward re nil t))
diff --git a/lisp/org-pcomplete.el b/lisp/org-pcomplete.el
index 3bfd810..5a7fb57 100644
--- a/lisp/org-pcomplete.el
+++ b/lisp/org-pcomplete.el
@@ -93,7 +93,7 @@ The return value is a string naming the thing at point."
(cons "file-option" nil))
;; Link abbreviation.
((save-excursion
- (skip-chars-backward "A-Za-z0-9-_")
+ (skip-chars-backward "-A-Za-z0-9_")
(and (eq ?\[ (char-before))
(eq ?\[ (char-before (1- (point))))))
(cons "link" nil))
diff --git a/lisp/org.el b/lisp/org.el
index 37e8abe..0a129d6 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -17512,7 +17512,7 @@ this numeric value."
(unless inc (setq inc 1))
(let ((pos (point))
(beg (skip-chars-backward "-+^/*0-9eE."))
- (end (skip-chars-forward "-+^/*0-9eE^.")) nap)
+ (end (skip-chars-forward "-+^/*0-9eE.")) nap)
(setq nap (buffer-substring-no-properties
(+ pos beg) (+ pos beg end)))
(delete-region (+ pos beg) (+ pos beg end))
@@ -19364,7 +19364,7 @@ assumed to be significant there."
(defun org-fill-line-break-nobreak-p ()
"Non-nil when a new line at point would create an Org line break."
(save-excursion
- (skip-chars-backward "[ \t]")
+ (skip-chars-backward " \t")
(skip-chars-backward "\\\\")
(looking-at "\\\\\\\\\\($\\|[^\\]\\)")))