[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ement 1bad05695c 4/6: Change: Improve completion by loo
From: |
ELPA Syncer |
Subject: |
[elpa] externals/ement 1bad05695c 4/6: Change: Improve completion by looking for prefixes |
Date: |
Sun, 14 May 2023 00:58:06 -0400 (EDT) |
branch: externals/ement
commit 1bad05695cb7d84a8789d75104f889e1b56dab1a
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Change: Improve completion by looking for prefixes
* ement-room.el (ement-room--complete-members-at-point):
(ement-room--complete-rooms-at-point): Look for "@", "!", or "#"
prefix.
---
ement-room.el | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/ement-room.el b/ement-room.el
index 0ce2923c21..5dbbbcd099 100644
--- a/ement-room.el
+++ b/ement-room.el
@@ -4272,8 +4272,8 @@ Web-compatible HTML output, using HTML like:
Uses members in the current buffer's room. For use in
`completion-at-point-functions'."
(let ((beg (save-excursion
- (re-search-backward (rx (or bol bos blank)))
- (1+ (point))))
+ (when (re-search-backward (rx (or bol bos blank) "@") nil t)
+ (point))))
(end (point))
(collection-fn (completion-table-dynamic
;; The manual seems to show the FUN ignoring any
@@ -4281,14 +4281,15 @@ Uses members in the current buffer's room. For use in
;; seems to say that it should use the argument.
(lambda (_ignore)
(ement-room--member-names-and-ids)))))
- (list beg end collection-fn :exclusive 'no)))
+ (when beg
+ (list beg end collection-fn :exclusive 'no))))
(defun ement-room--complete-rooms-at-point ()
"Complete room aliases and IDs at point.
For use in `completion-at-point-functions'."
(let ((beg (save-excursion
- (re-search-backward (rx (or bol bos blank)))
- (1+ (point))))
+ (when (re-search-backward (rx (or bol bos blank) (or "!" "#"))
nil t)
+ (point))))
(end (point))
(collection-fn (completion-table-dynamic
;; The manual seems to show the FUN ignoring any
@@ -4296,7 +4297,8 @@ For use in `completion-at-point-functions'."
;; seems to say that it should use the argument.
(lambda (_ignore)
(ement-room--room-aliases-and-ids)))))
- (list beg end collection-fn :exclusive 'no)))
+ (when beg
+ (list beg end collection-fn :exclusive 'no))))
;; TODO: Use `cl-pushnew' in these two functions instead of `delete-dups'.
- [elpa] externals/ement updated (5be1e07002 -> 726d17b082), ELPA Syncer, 2023/05/14
- [elpa] externals/ement 4d46aa0659 3/6: Change: (ement-room--member-names-and-ids) Use timeline not EWOC, ELPA Syncer, 2023/05/14
- [elpa] externals/ement cb95f5e0e8 5/6: Fix: (ement-room-init-compose-buffer) Enable member/room completion, ELPA Syncer, 2023/05/14
- [elpa] externals/ement 726d17b082 6/6: Docs: Explain mentions and completion, ELPA Syncer, 2023/05/14
- [elpa] externals/ement 6bd1091757 1/6: Fix: (-defevent "m.room.avatar") Warn for unreadable images, ELPA Syncer, 2023/05/14
- [elpa] externals/ement c0b922bcc5 2/6: Fix: (ement-room-list) When no rooms are joined, ELPA Syncer, 2023/05/14
- [elpa] externals/ement 1bad05695c 4/6: Change: Improve completion by looking for prefixes,
ELPA Syncer <=