Closed macovsky closed 4 months ago
To keep bindings you are used to you might use this configuration:
(define-key telega-chat-mode-map (kbd "S-<return>") #'telega-chatbuf-input-send)
(define-key telega-chat-mode-map (kbd "<return>") #'newline)
in your telega-load-hook
As to PR, it looks good! However, I think it is better to introduce predicate as possible value for the telega-chat-send-message-on-ret
and remove cludge if-at-the-end-or-C-u
configuration option. Predicate will cover any usecases
To keep bindings you are used to you might use this configuration:
(define-key telega-chat-mode-map (kbd "S-<return>") #'telega-chatbuf-input-send) (define-key telega-chat-mode-map (kbd "<return>") #'newline)
in your
telega-load-hook
that's awesome, thank you!
As to PR, it looks good! However, I think it is better to introduce predicate as possible value for the
telega-chat-send-message-on-ret
and remove cludgeif-at-the-end-or-C-u
configuration option. Predicate will cover any usecases
can you have a look? I'm not good at elisp so I might have done it badly
Code needs a little cleanup, to avoid multiple if
and code duplication. if-C-u
is also should be covered by predicate setting instead, we should keep only always
, if-at-the-end
and predicate as value. If you don't mind I'll add this functionality myself?
Code needs a little cleanup, to avoid multiple
if
and code duplication.if-C-u
is also should be covered by predicate setting instead, we should keep onlyalways
,if-at-the-end
and predicate as value. If you don't mind I'll add this functionality myself?
makes sense! for sure I don't, it's your project.
Now you can (setq telega-chat-send-message-on-ret (lambda () current-prefix-arg))
to send message only if universal argument is used with RET
.
Now you can
(setq telega-chat-send-message-on-ret (lambda () current-prefix-arg))
to send message only if universal argument is used withRET
.
yay, thanks!
it would be great if you could accept this option.
I'm used to sending messages with
shift-enter
in gui client because I tend to send multi-line text mostly and to keep in mind that enter works on(eobp)
all the time is very tedious.thanks!