Fix read-extended-command-predicate
This commit is contained in:
parent
b54abacff3
commit
e9e4e89930
@ -287,19 +287,6 @@ passed to it."
|
|||||||
"C-c M-p C-w" #'org-mu4e-render-preview
|
"C-c M-p C-w" #'org-mu4e-render-preview
|
||||||
"C-c C-;" #'mu4e-compose-context-switch)
|
"C-c C-;" #'mu4e-compose-context-switch)
|
||||||
|
|
||||||
(defun org-mu4e--compose-mode-command-predicate (symbol buffer)
|
|
||||||
"`org-mu4e-compose-mode' local value for command completion predicate.
|
|
||||||
This will defer to the user's global value for the same, except that it allows
|
|
||||||
for commands who are designed for `message-mode' and `mu4e-mode' as well.
|
|
||||||
SYMBOL is the command to check. BUFFER is the buffer in which checking
|
|
||||||
happens. BUFFER is ignored."
|
|
||||||
(let ((real-fun (default-value 'read-extended-command-predicate))
|
|
||||||
(modes (command-modes symbol)))
|
|
||||||
(or (not real-fun)
|
|
||||||
(member 'message-mode modes)
|
|
||||||
(member 'mu4e-compose-mode modes)
|
|
||||||
(funcall real-fun symbol buffer))))
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(define-derived-mode org-mu4e-compose-mode org-mode "mu4e:org-compose"
|
(define-derived-mode org-mu4e-compose-mode org-mode "mu4e:org-compose"
|
||||||
"Major mode for editing mu4e messages with `org-mode' syntax.
|
"Major mode for editing mu4e messages with `org-mode' syntax.
|
||||||
@ -327,10 +314,7 @@ This is derived from `org-mode', but it also essentially runs
|
|||||||
;; Add `message-mode' keyword and quote highlighting on top of the org syntax
|
;; Add `message-mode' keyword and quote highlighting on top of the org syntax
|
||||||
;; highlighting
|
;; highlighting
|
||||||
(font-lock-add-keywords nil message-font-lock-keywords)
|
(font-lock-add-keywords nil message-font-lock-keywords)
|
||||||
(setq-local org-mu4e--override-org-mode-check t
|
(setq-local org-mu4e--override-org-mode-check t)
|
||||||
;; This does not work, but I am leaving it here to figure out later
|
|
||||||
read-extended-command-predicate
|
|
||||||
'org-mu4e--compose-mode-command-predicate)
|
|
||||||
(add-to-list (make-local-variable 'org-ctrl-c-ctrl-c-final-hook)
|
(add-to-list (make-local-variable 'org-ctrl-c-ctrl-c-final-hook)
|
||||||
'org-mu4e-send-and-exit)
|
'org-mu4e-send-and-exit)
|
||||||
(add-to-list (make-local-variable 'mode-line-misc-info)
|
(add-to-list (make-local-variable 'mode-line-misc-info)
|
||||||
|
3
init.el
3
init.el
@ -687,7 +687,8 @@ visual states."
|
|||||||
(advice-add #'completing-read-multiple :filter-args #'my/crm-indicator)
|
(advice-add #'completing-read-multiple :filter-args #'my/crm-indicator)
|
||||||
(setq vertico-cycle t
|
(setq vertico-cycle t
|
||||||
enable-recursive-minibuffers t
|
enable-recursive-minibuffers t
|
||||||
read-extended-command-predicate #'command-completion-default-include-p
|
;; read-extended-command-predicate #'command-completion-default-include-p
|
||||||
|
read-extended-command-predicate nil
|
||||||
minibuffer-prompt-properties '(read-only t ;; noindent 3
|
minibuffer-prompt-properties '(read-only t ;; noindent 3
|
||||||
cursor-intangible t
|
cursor-intangible t
|
||||||
face minibuffer-prompt))
|
face minibuffer-prompt))
|
||||||
|
Loading…
Reference in New Issue
Block a user