The Lambda Lab
/
projects
/
lurk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6d15ff3
)
Commands are removed from prompt after sending.
author
Tim Vaughan
<plugd@thelambdalab.xyz>
Wed, 16 Jun 2021 08:47:32 +0000
(10:47 +0200)
committer
Tim Vaughan
<plugd@thelambdalab.xyz>
Wed, 16 Jun 2021 08:47:32 +0000
(10:47 +0200)
lirc.el
patch
|
blob
|
history
diff --git
a/lirc.el
b/lirc.el
index
cd746b5
..
f8c23b2
100644
(file)
--- a/
lirc.el
+++ b/
lirc.el
@@
-1,4
+1,4
@@
-;;; lirc.el --- L
ambdalabs
irc client -*- lexical-binding:t -*-
+;;; lirc.el --- L
ightweight
irc client -*- lexical-binding:t -*-
;; Copyright (C) 2021 Tim Vaughan
;; Copyright (C) 2021 Tim Vaughan
@@
-43,21
+43,25
@@
"Default full name.")
(defcustom lirc-user-name "plugd"
"Default user name.")
"Default full name.")
(defcustom lirc-user-name "plugd"
"Default user name.")
-(defcustom lirc-host "
localhos
t"
+(defcustom lirc-host "
irc.libera.cha
t"
"Default server.")
(defcustom lirc-port 6667
"Default port.")
"Default server.")
(defcustom lirc-port 6667
"Default port.")
-(defcustom lirc-prompt-string "
prompt
> "
+(defcustom lirc-prompt-string "> "
"Prompt.")
;;; Faces
;;
(defface lirc-prompt
"Prompt.")
;;; Faces
;;
(defface lirc-prompt
- '((t :inherit
font-lock-string-face
))
+ '((t :inherit
org-level-2
))
"Face used for the prompt.")
"Face used for the prompt.")
+(defface lirc-channel
+ '((t :inherit org-list-dt))
+ "Face used for the channel name in the prompt.")
+
;;; Global variables
;;
;;; Global variables
;;
@@
-186,10
+190,16
@@
(save-excursion
(goto-char lirc-prompt-marker)
(let ((inhibit-read-only t))
(save-excursion
(goto-char lirc-prompt-marker)
(let ((inhibit-read-only t))
- (insert (propertize lirc-prompt-string
- 'face 'lirc-prompt
- 'read-only t
- 'rear-nonsticky t))))
+ (insert
+ (propertize (if lirc-current-channel
+ lirc-current-channel
+ "[no channel]")
+ 'face 'lirc-channel
+ 'read-only t)
+ (propertize lirc-prompt-string
+ 'face 'lirc-prompt
+ 'read-only t
+ 'rear-nonsticky t))))
(set-marker-insertion-type lirc-input-marker nil)))
(defvar lirc-prompt-marker nil
(set-marker-insertion-type lirc-input-marker nil)))
(defvar lirc-prompt-marker nil
@@
-240,7
+250,10
@@
(interactive)
(with-current-buffer "*lirc*"
(lirc-enter-string
(interactive)
(with-current-buffer "*lirc*"
(lirc-enter-string
- (buffer-substring lirc-input-marker (point-max)))))
+ (buffer-substring lirc-input-marker (point-max)))
+ (let ((inhibit-read-only t))
+ (delete-region lirc-input-marker (point-max)))))
+
;;; Mode
;;; Mode