summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2018-10-18 18:09:41 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2018-10-18 18:15:30 +0200
commit9e05a6ac8ad54268159374486aa75d87c033ef75 (patch)
tree37aefead3624f3d61f5748d86ae4333db817a759
parent102ab1a245bc00e321c3ce893d525684d5c52daa (diff)
downloadorg-mode-9e05a6ac8ad54268159374486aa75d87c033ef75.tar.gz
org-pcomplete: Small reorganization
-rw-r--r--lisp/org-pcomplete.el26
1 files changed, 17 insertions, 9 deletions
diff --git a/lisp/org-pcomplete.el b/lisp/org-pcomplete.el
index 1ef78ed..d245f69 100644
--- a/lisp/org-pcomplete.el
+++ b/lisp/org-pcomplete.el
@@ -68,7 +68,8 @@
(defvar org-todo-keywords-1)
(defvar org-todo-line-regexp)
-;;;; Customization variables
+
+;;; Internal Functions
(defun org-thing-at-point ()
"Examine the thing at point and let the caller know what it is.
@@ -138,6 +139,16 @@ The return value is a string naming the thing at point."
(cons "drawer" nil)))))))
(t nil))))
+(defun org-pcomplete-case-double (list)
+ "Return list with both upcase and downcase version of all strings in LIST."
+ (let (e res)
+ (while (setq e (pop list))
+ (setq res (cons (downcase e) (cons (upcase e) res))))
+ (nreverse res)))
+
+
+;;; Completion API
+
(defun org-command-at-point ()
"Return the qualified name of the Org completion entity at point.
When completing for #+STARTUP, for example, this function returns
@@ -176,6 +187,9 @@ When completing for #+STARTUP, for example, this function returns
(car (org-thing-at-point)))
pcomplete-default-completion-function))))
+
+;;; Completion functions
+
(defun pcomplete/org-mode/file-option ()
"Complete against all valid file options."
(require 'org-element)
@@ -416,14 +430,8 @@ switches."
":tcolumns" ":level" ":compact" ":timestamp"
":formula" ":formatter" ":wstart" ":mstart"))))
-(defun org-pcomplete-case-double (list)
- "Return list with both upcase and downcase version of all strings in LIST."
- (let (e res)
- (while (setq e (pop list))
- (setq res (cons (downcase e) (cons (upcase e) res))))
- (nreverse res)))
-
-;;;; Finish up
+
+;;; Finish up
(provide 'org-pcomplete)