[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/cape 3beed4f37c 047/146: Use cape--silent
From: |
ELPA Syncer |
Subject: |
[elpa] externals/cape 3beed4f37c 047/146: Use cape--silent |
Date: |
Sun, 9 Jan 2022 20:57:41 -0500 (EST) |
branch: externals/cape
commit 3beed4f37ca4e50ca97f7f49e2cc5faf35f07a59
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Use cape--silent
x
---
cape.el | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/cape.el b/cape.el
index 8a8298f12e..3b78239faf 100644
--- a/cape.el
+++ b/cape.el
@@ -301,6 +301,13 @@
"Alist of major modes and keywords."
:type 'alist)
+(defmacro cape--silent (&rest body)
+ "Silence BODY."
+ `(cl-letf ((inhibit-message t)
+ (message-log-max nil)
+ ((symbol-function #'minibuffer-message) #'ignore))
+ (ignore-errors ,@body)))
+
(defun cape--complete-in-region (thing table extra)
"Complete THING at point given completion TABLE and EXTRA properties."
(let ((bounds (or (bounds-of-thing-at-point thing) (cons (point) (point))))
@@ -401,11 +408,11 @@ METADATA is optional completion metadata."
(defun cape--dabbrev-expansions (word)
"Find all dabbrev expansions for WORD."
(cape--dabbrev-reset)
- (let* ((inhibit-message t)
- (message-log-max nil)
- (min-len (+ cape-dabbrev-min-length (length word)))
- (words (dabbrev--find-all-expansions word (dabbrev--ignore-case-p
word))))
- (cl-loop for w in words if (>= (length w) min-len) collect w)))
+ (cape--silent
+ (cl-loop
+ with min-len = (+ cape-dabbrev-min-length (length word))
+ for w in (dabbrev--find-all-expansions word (dabbrev--ignore-case-p word))
+ if (>= (length w) min-len) collect w)))
(defvar cape--ispell-properties
(list :annotation-function (lambda (_) " Ispell")
@@ -417,9 +424,7 @@ METADATA is optional completion metadata."
"Return all words from Ispell matching STR."
(with-demoted-errors "Ispell Error: %S"
(require 'ispell)
- (let ((message-log-max nil)
- (inhibit-message t))
- (ispell-lookup-words (format "*%s*" str)))))
+ (cape--silent (ispell-lookup-words (format "*%s*" str)))))
(defun cape--ispell-table (bounds)
"Return completion table for Ispell completion between BOUNDS."
@@ -678,12 +683,6 @@ and the various :company-* extensions."
(`(,beg ,end ,table . ,plist)
`(,beg ,end ,table ,@properties ,@plist)))))
-(defmacro cape--silent (&rest body)
- "Silence BODY."
- `(cl-letf ((inhibit-message t)
- ((symbol-function #'minibuffer-message) #'ignore))
- (ignore-errors ,@body)))
-
(defun cape-silent-capf (capf)
"Return a new CAPF which is silent (no messages, no errors)."
(lambda ()
- [elpa] externals/cape da32e232d6 093/146: cape--company-call: Cheaper timeout checking, throw error, (continued)
- [elpa] externals/cape da32e232d6 093/146: cape--company-call: Cheaper timeout checking, throw error, ELPA Syncer, 2022/01/09
- [elpa] externals/cape c4d821d55b 079/146: Add cape--symbol-annotation, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 2ce63259d7 097/146: Update README - Asynchronous Company backends work as expected, ELPA Syncer, 2022/01/09
- [elpa] externals/cape c1f7fa746b 104/146: Improve synchronization, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 1d69a06890 117/146: cape-tex/cape-sgml: Add autoloads, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 7f11b354df 124/146: cape-company-capf: Remove symbol restriction, ELPA Syncer, 2022/01/09
- [elpa] externals/cape a6db83b1bd 135/146: Improve repair function, ELPA Syncer, 2022/01/09
- [elpa] externals/cape f26e835929 131/146: README: Do not use hashed symbol, ELPA Syncer, 2022/01/09
- [elpa] externals/cape e23226cb1c 022/146: cape-file-capf: Add company-prefix-length=t after slash (Fix #8), ELPA Syncer, 2022/01/09
- [elpa] externals/cape e2fd7c1cc6 038/146: Minor refactoring, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 3beed4f37c 047/146: Use cape--silent,
ELPA Syncer <=
- [elpa] externals/cape 12f5ae008c 051/146: Update README, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 1b4b739639 059/146: Refactoring, ELPA Syncer, 2022/01/09
- [elpa] externals/cape b63deab5af 058/146: cape--cached-table: Add category, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 11bcf51724 064/146: Ensure that cape-line is not sorted, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 33850ae000 068/146: Unify cape-dict and cape-dict-capf, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 241dde47ca 070/146: Unify cape-keyword and cape-keyword-capf, ELPA Syncer, 2022/01/09
- [elpa] externals/cape eaa408779e 072/146: cape-symbol: Implement capf, ELPA Syncer, 2022/01/09
- [elpa] externals/cape eff4f34841 084/146: Add cape-noninterruptible-capf, ELPA Syncer, 2022/01/09
- [elpa] externals/cape fd8828cff3 100/146: Make cape--company-call more robust, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 1d0d3abbd1 102/146: Use namespaced symbol, ELPA Syncer, 2022/01/09