alphapapa / alphapapa/ement.el

Using TAB for completion in the minibuffer and compose buffer

Đang mở
#222 5 bình luận 0 reaction 1 người được giao Được @alphapapa nhận Xem trên GitHub
enhancement help wanted priority:C
Ngôn ngữ chính
Emacs Lisp
Star
604
Fork
54
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

This seems to work, but binding some of these variables may not actually be necessary:
```diff
diff --git a/ement-room.el b/ement-room.el
index 0bd1b95..fd74e96 100644
--- a/ement-room.el
+++ b/ement-room.el
@@ -182,6 +182,7 @@ (defvar ement-room-minibuffer-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map minibuffer-local-map)
(define-key map (kbd "C-c '") #'ement-room-compose-from-minibuffer)
+ (define-key map (kbd "TAB") #'complete-symbol)
map)
"Keymap used in `ement-room-read-string'.")

@@ -2145,7 +2146,9 @@ (defun ement-room-read-string (prompt &optional initial-input history default-va
(setq-local completion-at-point-functions
'(ement-room--complete-members-at-point ement-room--complete-rooms-at-point))
(visual-line-mode 1)
- (run-hooks 'ement-room-read-string-setup-hook))
+ (run-hooks 'ement-room-read-string-setup-hook)
+ (setq-local tab-always-indent 'complete
+ tab-first-completion t))
(read-from-minibuffer prompt initial-input ement-room-minibuffer-map
nil history default-value inherit-input-method))))

@@ -3903,12 +3906,15 @@ (defun ement-room-init-compose-buffer (room session)
(setf ement-room-compose-buffer t)
(setq-local completion-at-point-functions
(append '(ement-room--complete-members-at-point ement-room--complete-rooms-at-point)
- completion-at-point-functions))
+ completion-at-point-functions)
+ tab-always-indent 'complete
+ tab-first-completion t)
;; FIXME: Compose with local map?
(use-local-map (if (current-local-map)
(copy-keymap (current-local-map))
(make-sparse-keymap)))
(local-set-key [remap save-buffer] #'ement-room-compose-send)
+ (keymap-set (current-local-map) "TAB" #'indent-for-tab-command)
(setq header-line-format (substitute-command-keys
(format " Press \\[save-buffer] to send message to room (%s)"
(ement-room-display-name room)))))
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.