[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 5c2425b 06/66: Work around python-shell-completion-at-poin
From: |
Dmitry Gutov |
Subject: |
[elpa] master 5c2425b 06/66: Work around python-shell-completion-at-point's behavior |
Date: |
Mon, 5 Nov 2018 18:19:12 -0500 (EST) |
branch: master
commit 5c2425b9863810a395efcbc25abaa5348a7bfe23
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Work around python-shell-completion-at-point's behavior
Closes #549
---
company.el | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/company.el b/company.el
index a694a65..bded061 100644
--- a/company.el
+++ b/company.el
@@ -1361,10 +1361,18 @@ Keywords and function definition names are ignored."
noccurs)))
(defun company--occurrence-predicate ()
+ (defvar comint-last-prompt)
(let ((beg (match-beginning 0))
- (end (match-end 0)))
+ (end (match-end 0))
+ (comint-last-prompt comint-last-prompt))
(save-excursion
(goto-char end)
+ ;; Workaround for python-shell-completion-at-point's behavior:
+ ;; https://github.com/company-mode/company-mode/issues/759
+ ;; https://github.com/company-mode/company-mode/issues/549
+ (when (derived-mode-p 'inferior-python-mode)
+ (let ((lbp (line-beginning-position)))
+ (setq comint-last-prompt (cons lbp lbp))))
(and (not (memq (get-text-property (1- (point)) 'face)
'(font-lock-function-name-face
font-lock-keyword-face)))
- [elpa] master 4a4152b 02/66: Add a FIXME, (continued)
- [elpa] master 4a4152b 02/66: Add a FIXME, Dmitry Gutov, 2018/11/05
- [elpa] master e72dfad 03/66: copyright-update, Dmitry Gutov, 2018/11/05
- [elpa] master 2a21bfd 01/66: Extract company--capf-post-completion, for easier debugging, Dmitry Gutov, 2018/11/05
- [elpa] master 0dc6945 08/66: Fix the build, Dmitry Gutov, 2018/11/05
- [elpa] master fc81e99 04/66: Deprecate company-css, Dmitry Gutov, 2018/11/05
- [elpa] master 1646a10 16/66: Always get candidates with prefix string in `company-diag`., Dmitry Gutov, 2018/11/05
- [elpa] master 07c56b1 12/66: Add NEWS entry, Dmitry Gutov, 2018/11/05
- [elpa] master 0afe18d 09/66: Allow CMake completion in strings when inside ${...}, Dmitry Gutov, 2018/11/05
- [elpa] master 67650de 17/66: Merge pull request #769 from tigersoldier/master, Dmitry Gutov, 2018/11/05
- [elpa] master 23e6c82 07/66: Add NEWS entry, Dmitry Gutov, 2018/11/05
- [elpa] master 5c2425b 06/66: Work around python-shell-completion-at-point's behavior,
Dmitry Gutov <=
- [elpa] master a64d52c 05/66: Deprecate company-nxml too, Dmitry Gutov, 2018/11/05
- [elpa] master 5698be9 10/66: Simplify company-cmake-prefix-dollar-brace-p, Dmitry Gutov, 2018/11/05
- [elpa] master 5118b59 14/66: company-tng: Supress post-completion (#731), Dmitry Gutov, 2018/11/05
- [elpa] master a78f7d8 15/66: Merge pull request #764 from nikital/tng-supress-post-completion, Dmitry Gutov, 2018/11/05
- [elpa] master 5a856d7 13/66: backend: Remove pre-completion command, Dmitry Gutov, 2018/11/05
- [elpa] master 5b11709 31/66: Emacs 24 doesn't have working elisp capf, so don't test it, Dmitry Gutov, 2018/11/05
- [elpa] master b0940fb 29/66: Close #798: look for :company-match function in the capf's metadata, Dmitry Gutov, 2018/11/05
- [elpa] master f404a12 30/66: Add some tests for the previous commits, Dmitry Gutov, 2018/11/05
- [elpa] master 0325a40 11/66: Remove an unnecessary test, Dmitry Gutov, 2018/11/05
- [elpa] master ed1085f 19/66: Merge pull request #771 from Wilfred/interactive-example, Dmitry Gutov, 2018/11/05