diff options
| author | Stefan Monnier | 2019-11-18 17:47:06 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2019-11-18 17:47:06 -0500 |
| commit | 5bc97ebceb54e0eb2804bef4c1bc32a40d8a2371 (patch) | |
| tree | 7b3588869142b6fbce480786604cd7954dbc1753 | |
| parent | da00577793f9eff3a4cf11638053f6d3fa07728b (diff) | |
| download | emacs-5bc97ebceb54e0eb2804bef4c1bc32a40d8a2371.tar.gz emacs-5bc97ebceb54e0eb2804bef4c1bc32a40d8a2371.zip | |
* lisp/org/org.el (org-mode): Add pcomplete-completions-at-point to capf.
This lets the normal `completion-at-point` and `complete-symbol`
use `pcomplete` for completion.
(org-mode-map): Leave M-TAB bound to the global default since
`pcomplete` is now obsolete.
| -rw-r--r-- | lisp/org/org.el | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/org/org.el b/lisp/org/org.el index aa7e319bda7..73848a46342 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el | |||
| @@ -5541,11 +5541,13 @@ The following commands are available: | |||
| 5541 | (lambda (&rest _) (org-show-context 'isearch))) | 5541 | (lambda (&rest _) (org-show-context 'isearch))) |
| 5542 | 5542 | ||
| 5543 | ;; Setup the pcomplete hooks | 5543 | ;; Setup the pcomplete hooks |
| 5544 | (setq-local pcomplete-command-completion-function 'org-pcomplete-initial) | 5544 | (setq-local pcomplete-command-completion-function #'org-pcomplete-initial) |
| 5545 | (setq-local pcomplete-command-name-function 'org-command-at-point) | 5545 | (setq-local pcomplete-command-name-function #'org-command-at-point) |
| 5546 | (setq-local pcomplete-default-completion-function 'ignore) | 5546 | (setq-local pcomplete-default-completion-function #'ignore) |
| 5547 | (setq-local pcomplete-parse-arguments-function 'org-parse-arguments) | 5547 | (setq-local pcomplete-parse-arguments-function #'org-parse-arguments) |
| 5548 | (setq-local pcomplete-termination-string "") | 5548 | (setq-local pcomplete-termination-string "") |
| 5549 | (add-hook 'completion-at-point-functions | ||
| 5550 | #'pcomplete-completions-at-point nil t) | ||
| 5549 | (setq-local buffer-face-mode-face 'org-default) | 5551 | (setq-local buffer-face-mode-face 'org-default) |
| 5550 | 5552 | ||
| 5551 | ;; If empty file that did not turn on Org mode automatically, make | 5553 | ;; If empty file that did not turn on Org mode automatically, make |
| @@ -19501,7 +19503,7 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names." | |||
| 19501 | (org-defkey org-mode-map "\C-i" 'org-cycle) | 19503 | (org-defkey org-mode-map "\C-i" 'org-cycle) |
| 19502 | (org-defkey org-mode-map [(tab)] 'org-cycle) | 19504 | (org-defkey org-mode-map [(tab)] 'org-cycle) |
| 19503 | (org-defkey org-mode-map [(control tab)] 'org-force-cycle-archived) | 19505 | (org-defkey org-mode-map [(control tab)] 'org-force-cycle-archived) |
| 19504 | (org-defkey org-mode-map "\M-\t" #'pcomplete) | 19506 | (org-defkey org-mode-map "\M-\t" nil) ;; Override text-mode binding |
| 19505 | 19507 | ||
| 19506 | ;; The following line is necessary under Suse GNU/Linux | 19508 | ;; The following line is necessary under Suse GNU/Linux |
| 19507 | (org-defkey org-mode-map [S-iso-lefttab] 'org-shifttab) | 19509 | (org-defkey org-mode-map [S-iso-lefttab] 'org-shifttab) |
| @@ -19567,7 +19569,7 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names." | |||
| 19567 | (org-defkey org-mode-map [?\C-c (right)] 'org-shiftright) | 19569 | (org-defkey org-mode-map [?\C-c (right)] 'org-shiftright) |
| 19568 | (org-defkey org-mode-map [?\C-c ?\C-x (right)] 'org-shiftcontrolright) | 19570 | (org-defkey org-mode-map [?\C-c ?\C-x (right)] 'org-shiftcontrolright) |
| 19569 | (org-defkey org-mode-map [?\C-c ?\C-x (left)] 'org-shiftcontrolleft) | 19571 | (org-defkey org-mode-map [?\C-c ?\C-x (left)] 'org-shiftcontrolleft) |
| 19570 | (org-defkey org-mode-map [?\e (tab)] #'pcomplete) | 19572 | (org-defkey org-mode-map [?\e (tab)] nil) ;; Override text-mode binding |
| 19571 | (org-defkey org-mode-map [?\e (shift return)] 'org-insert-todo-heading) | 19573 | (org-defkey org-mode-map [?\e (shift return)] 'org-insert-todo-heading) |
| 19572 | (org-defkey org-mode-map [?\e (shift left)] 'org-shiftmetaleft) | 19574 | (org-defkey org-mode-map [?\e (shift left)] 'org-shiftmetaleft) |
| 19573 | (org-defkey org-mode-map [?\e (shift right)] 'org-shiftmetaright) | 19575 | (org-defkey org-mode-map [?\e (shift right)] 'org-shiftmetaright) |