[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu 68d799a 2/6: Revert "Add corfu-completion-styles"
From: |
Protesilaos Stavrou |
Subject: |
[elpa] externals/corfu 68d799a 2/6: Revert "Add corfu-completion-styles" |
Date: |
Sat, 17 Apr 2021 18:26:55 -0400 (EDT) |
branch: externals/corfu
commit 68d799a724c98de481f692b2fd36277ace378790
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Revert "Add corfu-completion-styles"
This reverts commit 6e9b8ef9b96037b5ee1ff583eafdde4cd78842fe.
Revert this for since it needs more thought (See #5).
---
corfu.el | 24 ++++++++----------------
1 file changed, 8 insertions(+), 16 deletions(-)
diff --git a/corfu.el b/corfu.el
index 3532cc3..a873816 100644
--- a/corfu.el
+++ b/corfu.el
@@ -55,11 +55,6 @@
"Enable cycling for `corfu-next' and `corfu-previous'."
:type 'boolean)
-;; XXX Maybe there should be a `completion-in-region-styles' variable in Emacs
-(defcustom corfu-completion-styles nil
- "Completion styles to use for completion in region, defaults to
`completion-styles'."
- :type '(choice (const nil) (repeat symbol)))
-
(defgroup corfu-faces nil
"Faces used by Corfu."
:group 'corfu
@@ -275,8 +270,7 @@ If `line-spacing/=nil' or in text-mode, the background
color is used instead.")
(lambda (pattern cands)
(setq hl (lambda (x) (orderless-highlight-matches pattern x)))
cands)))
- (let ((completion-styles (or corfu-completion-styles completion-styles)))
- (cons (apply #'completion-all-completions args) hl))))
+ (cons (apply #'completion-all-completions args) hl)))
(defun corfu--sort-predicate (x y)
"Sorting predicate which compares X and Y."
@@ -477,11 +471,11 @@ If `line-spacing/=nil' or in text-mode, the background
color is used instead.")
(other other-window-scroll-buffer)
(restore (make-symbol "corfu--restore")))
(fset restore (lambda ()
- (when (eq this-command #'corfu-abort)
- (setq this-command #'ignore))
- (remove-hook 'pre-command-hook restore)
- (setq other-window-scroll-buffer other)
- (set-window-configuration config)))
+ (when (eq this-command #'corfu-abort)
+ (setq this-command #'ignore))
+ (remove-hook 'pre-command-hook restore)
+ (setq other-window-scroll-buffer other)
+ (set-window-configuration config)))
(run-at-time 0 nil (lambda () (add-hook 'pre-command-hook restore)))))
;; Company support, taken from `company.el', see `company-show-doc-buffer'.
@@ -528,8 +522,7 @@ If `line-spacing/=nil' or in text-mode, the background
color is used instead.")
(pt (max 0 (- (point) beg)))
(str (buffer-substring-no-properties beg end))
(metadata (completion-metadata (substring str 0 pt) table
pred)))
- (pcase (let ((completion-styles (or corfu-completion-styles
completion-styles)))
- (completion-try-completion str table pred pt metadata))
+ (pcase (completion-try-completion str table pred pt metadata)
((and `(,newstr . ,newpt) (guard (not (equal str newstr))))
(completion--replace beg end newstr)
(goto-char (+ beg newpt)))))))
@@ -571,8 +564,7 @@ If `line-spacing/=nil' or in text-mode, the background
color is used instead.")
(defun corfu--completion-in-region (&rest args)
"Corfu completion in region function passing ARGS to
`completion--in-region'."
- (let ((completion-styles (or corfu-completion-styles completion-styles))
- (completion-show-inline-help)
+ (let ((completion-show-inline-help)
(completion-auto-help))
(apply #'completion--in-region args)))
- [elpa] externals/corfu updated (4c2c997 -> 5214170), Protesilaos Stavrou, 2021/04/17
- [elpa] externals/corfu e226da3 1/6: Oops, use `:global nil` instead of `:local t`, Protesilaos Stavrou, 2021/04/17
- [elpa] externals/corfu 68d799a 2/6: Revert "Add corfu-completion-styles",
Protesilaos Stavrou <=
- [elpa] externals/corfu 6c361fd 3/6: README: Update caveats section, Protesilaos Stavrou, 2021/04/17
- [elpa] externals/corfu 4c2d5de 4/6: Update readme, Protesilaos Stavrou, 2021/04/17
- [elpa] externals/corfu 59263bf 5/6: Hide scrollbar if there are fewer than corfu-count candidates, Protesilaos Stavrou, 2021/04/17
- [elpa] externals/corfu 5214170 6/6: Add base string when previewing the current candidate, Protesilaos Stavrou, 2021/04/17