[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/cape c629043156 145/146: cape-abbrev: Take all abbrev t
From: |
ELPA Syncer |
Subject: |
[elpa] externals/cape c629043156 145/146: cape-abbrev: Take all abbrev tables into account (Fix #19) |
Date: |
Sun, 9 Jan 2022 20:57:50 -0500 (EST) |
branch: externals/cape
commit c6290431566e5e6f30518fc925183907820a1edf
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
cape-abbrev: Take all abbrev tables into account (Fix #19)
Thanks, @tpeacock19!
---
cape.el | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/cape.el b/cape.el
index 63fa9898ec..68426ac5e7 100644
--- a/cape.el
+++ b/cape.el
@@ -681,18 +681,27 @@ is nil the function acts like a capf." method method)
;;;;; cape-abbrev
+(defun cape--abbrev-tables ()
+ "Return list of all active abbrev tables, including parents."
+ ;; Emacs 28: See abbrev--suggest-get-active-tables-including-parents.
+ (let ((tables (abbrev--active-tables)))
+ (append tables (cl-loop for table in tables
+ append (abbrev-table-get table :parents)))))
+
(defun cape--abbrev-list ()
"Abbreviation list."
- (delete "" (nconc (all-completions "" global-abbrev-table)
- (all-completions "" local-abbrev-table))))
+ (delete "" (cl-loop for table in (cape--abbrev-tables)
+ nconc (all-completions "" table))))
(defun cape--abbrev-annotation (abbrev)
"Annotate ABBREV with expansion."
(concat " "
(truncate-string-to-width
- (symbol-value
- (or (abbrev--symbol abbrev local-abbrev-table)
- (abbrev--symbol abbrev global-abbrev-table)))
+ (format
+ "%s"
+ (symbol-value
+ (cl-loop for table in (cape--abbrev-tables)
+ thereis (abbrev--symbol abbrev table))))
30 0 nil t)))
(defun cape--abbrev-exit (_str status)
- [elpa] externals/cape 89aaca7789 128/146: Protect cape--char-translation from macro expansion, (continued)
- [elpa] externals/cape 89aaca7789 128/146: Protect cape--char-translation from macro expansion, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 399fdad016 122/146: cape-tex/sgml: Add docsig, improve parsing of describe-input-method, ELPA Syncer, 2022/01/09
- [elpa] externals/cape c2db8ce4d9 127/146: Expand docstrings, ELPA Syncer, 2022/01/09
- [elpa] externals/cape ab91f727fb 126/146: cape-tex/sgml: Filter candidates during compilation, ELPA Syncer, 2022/01/09
- [elpa] externals/cape bb1921b624 130/146: Add cape-repair-misbehaving-capf, ELPA Syncer, 2022/01/09
- [elpa] externals/cape c442f055dd 132/146: Blurb, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 3495692f4c 133/146: Expand README, ELPA Syncer, 2022/01/09
- [elpa] externals/cape ba24e62961 139/146: README: Expand cape-super-capf documentation, ELPA Syncer, 2022/01/09
- [elpa] externals/cape bcf2fe1bdc 141/146: Version 0.4, ELPA Syncer, 2022/01/09
- [elpa] externals/cape 9defa71303 142/146: cape-dabbrev: Add cape-dabbrev-forbid-space, ELPA Syncer, 2022/01/09
- [elpa] externals/cape c629043156 145/146: cape-abbrev: Take all abbrev tables into account (Fix #19),
ELPA Syncer <=