[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tempel e7ddce97d9: Hide tempel commands in Emacs 28
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tempel e7ddce97d9: Hide tempel commands in Emacs 28 |
Date: |
Thu, 13 Jan 2022 11:58:01 -0500 (EST) |
branch: externals/tempel
commit e7ddce97d92df5830fea556513bb450dbfeaed11
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Hide tempel commands in Emacs 28
---
tempel.el | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tempel.el b/tempel.el
index b692922497..b652e4ae61 100644
--- a/tempel.el
+++ b/tempel.el
@@ -634,5 +634,16 @@ If called interactively, select a template with
`completing-read'."
(unless (or noninteractive (eq (aref (buffer-name) 0) ?\s))
(tempel-abbrev-mode 1)))
+;; Emacs 28: Do not show Tempel commands in M-X
+(dolist (sym (list #'tempel-next-field #'tempel-previous-field
+ #'tempel-field-beginning #'tempel-field-end
+ #'tempel-template-beginning #'tempel-template-end
+ #'tempel-kill-field #'tempel-done #'tempel-abort))
+ (put sym 'completion-predicate #'tempel--command-p))
+
+(defun tempel--command-p (_sym buffer)
+ "Return non-nil if Tempel is active in BUFFER."
+ (buffer-local-value 'tempel--active buffer))
+
(provide 'tempel)
;;; tempel.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/tempel e7ddce97d9: Hide tempel commands in Emacs 28,
ELPA Syncer <=