[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/cape f270456b5d 041/146: Improve cape-dabbrev-capf
From: |
ELPA Syncer |
Subject: |
[elpa] externals/cape f270456b5d 041/146: Improve cape-dabbrev-capf |
Date: |
Sun, 9 Jan 2022 20:57:41 -0500 (EST) |
branch: externals/cape
commit f270456b5d5ace09c17f6267028bc411d3f20220
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Improve cape-dabbrev-capf
---
cape.el | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/cape.el b/cape.el
index 97b869e36c..d3a678ae3a 100644
--- a/cape.el
+++ b/cape.el
@@ -373,15 +373,19 @@ METADATA is optional completion metadata."
(declare-function dabbrev--ignore-case-p "dabbrev")
(declare-function dabbrev--find-all-expansions "dabbrev")
(declare-function dabbrev--reset-global-variables "dabbrev")
+(declare-function dabbrev--abbrev-at-point "dabbrev")
;;;###autoload
(defun cape-dabbrev-capf ()
"Ispell completion-at-point-function."
- (when-let (bounds (bounds-of-thing-at-point 'word))
- `(,(car bounds) ,(cdr bounds)
- ,(cape--cached-table (car bounds) (cdr bounds) 'prefix
#'cape--dabbrev-expansions)
- :exclusive no
- ,@cape--dabbrev-properties)))
+ (let ((abbrev (ignore-errors (dabbrev--abbrev-at-point))))
+ (when (and abbrev (not (string-match-p "\\s-" abbrev)))
+ (let ((beg (progn (search-backward abbrev) (point)))
+ (end (progn (search-forward abbrev) (point))))
+ `(,beg ,end
+ ,(cape--cached-table beg end 'prefix #'cape--dabbrev-expansions)
+ :exclusive no
+ ,@cape--dabbrev-properties)))))
(defun cape--dabbrev-expansions (word)
"Find all dabbrev expansions for WORD."
- [elpa] externals/cape 139ffe8720 002/146: Add license, (continued)
- [elpa] externals/cape 139ffe8720 002/146: Add license, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 8ed1e4e9cd 005/146: Remove parens from annotations, ELPA Syncer, 2022/01/09
- [elpa] externals/cape a8d00aa3ef 006/146: Add defcustoms, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 97eacd933d 016/146: README: Update example, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 9833045077 017/146: Add completion categories, ELPA Syncer, 2022/01/09
- [elpa] externals/cape b3c5e4ec69 018/146: cape-merge-capfs: Fix sorting, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 26b822db0a 011/146: Add MELPA badges, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 84c128ae9b 013/146: Add cape-merge-capfs (Fix #2), ELPA Syncer, 2022/01/09
- [elpa] externals/cape 6c124b6cfd 015/146: README: Add some justification for the name :), ELPA Syncer, 2022/01/09
- [elpa] externals/cape 63ded5fde4 028/146: Improve cape-company-to-capf, ELPA Syncer, 2022/01/09
- [elpa] externals/cape f270456b5d 041/146: Improve cape-dabbrev-capf,
ELPA Syncer <=
- [elpa] externals/cape a8e10cf7ae 014/146: Update README, ELPA Syncer, 2022/01/09
- [elpa] externals/cape d6b13d3055 027/146: Fix no-cache call, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 0e60999893 032/146: cape-ispell: Fix caching, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 7325c5002f 035/146: Update README, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 0a374042c9 003/146: README: Update configuration, ELPA Syncer, 2022/01/09
- [elpa] externals/cape d7c765d057 004/146: Add cape-keyword and cape-keyword-capf (Fix #3), ELPA Syncer, 2022/01/09
- [elpa] externals/cape 1aaca0fd74 008/146: Expand comment, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 38802ada22 007/146: Add kinds, ELPA Syncer, 2022/01/09
- [elpa] externals/cape b1f57d79ba 009/146: Improve ispell, ELPA Syncer, 2022/01/09
- [elpa] externals/cape ae136b6ba4 010/146: Improve dabbrev lazy loading, ELPA Syncer, 2022/01/09