diff options
| author | jao <jao@gnu.org> | 2026-09-06 15:36:38 +0100 |
|---|---|---|
| committer | jao <jao@gnu.org> | 2026-09-06 15:36:38 +0100 |
| commit | 0f8eb65fb807a125dd601cd6b3ee746e6c7b6020 (patch) | |
| tree | 1d394cf0023d0d4e9df41a28c1d4376769c91d77 /lib/net/jao-proton-utils.el | |
| parent | 21c34f24c110e57a6c90126c87fee9cd71e85817 (diff) | |
| download | elibs-0f8eb65fb807a125dd601cd6b3ee746e6c7b6020.tar.gz elibs-0f8eb65fb807a125dd601cd6b3ee746e6c7b6020.tar.bz2 | |
a slew of little fixes courtesy of the byte compiler
Diffstat (limited to 'lib/net/jao-proton-utils.el')
| -rw-r--r-- | lib/net/jao-proton-utils.el | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/net/jao-proton-utils.el b/lib/net/jao-proton-utils.el index 0a08f5d..a8f13eb 100644 --- a/lib/net/jao-proton-utils.el +++ b/lib/net/jao-proton-utils.el @@ -1,4 +1,4 @@ -;; jao-proton-utils.el -- simple interaction with Proton mail and vpn +;; jao-proton-utils.el -- simple interaction with Proton mail and vpn -*- lexical-binding: t; -*- ;; Copyright (c) 2018, 2019, 2020, 2023, 2026 Jose Antonio Ortega Ruiz @@ -54,6 +54,22 @@ (defvar jao-proton-vpn-font-lock-keywords '("\\[.+\\]")) +(defvar proton-vpn-mode-map + (let ((map (make-keymap))) + (suppress-keymap map) + (define-key map [?q] 'bury-buffer) + (define-key map [?n] 'next-line) + (define-key map [?p] 'previous-line) + (define-key map [?g] 'proton-vpn-status) + (define-key map [?r] 'proton-vpn-reconnect) + (define-key map [?d] (lambda () + (interactive) + (when (y-or-n-p "Disconnect?") + (proton-vpn-disconnect)))) + (define-key map [?c] 'proton-vpn-connect) + map)) + + ;;;###autoload (defun proton-vpn-mode () "A very simple mode to show the output of ProtonVPN commands" @@ -121,21 +137,5 @@ (interactive) (jao-proton-vpn--do "d")) -(setq proton-vpn-mode-map - (let ((map (make-keymap))) - (suppress-keymap map) - (define-key map [?q] 'bury-buffer) - (define-key map [?n] 'next-line) - (define-key map [?p] 'previous-line) - (define-key map [?g] 'proton-vpn-status) - (define-key map [?r] 'proton-vpn-reconnect) - (define-key map [?d] (lambda () - (interactive) - (when (y-or-n-p "Disconnect?") - (proton-vpn-disconnect)))) - (define-key map [?c] 'proton-vpn-connect) - map)) - - (provide 'jao-proton-utils) ;;; jao-proton.el ends here |
