From 2438bf6cadf3df5a0b3d2e127929804f97ad8e9d Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sat, 21 Sep 2024 07:50:25 +0200 Subject: emacs: Add support for a full-calc popup --- .config/emacs/init.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to '.config/emacs/init.el') diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 1b4f7df..d5e4bd3 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -719,6 +719,19 @@ a semicolon following a return statement." (with-eval-after-load 'tempel (push (cons tempel-path #'lisp-data-mode) auto-mode-alist)) + ;;; Popup Windows +(require 'popup) +(popup-define full-calc) +(use-package calc + :ensure nil + :config + (defun x-calc-quit () + (interactive) + (if (popupp) + (delete-frame) + (calc-quit :non-fatal))) + (evil-define-key 'normal 'calc-mode-map "q" #'x-calc-quit)) + ;;; Keybindings (defmacro x-define-bindings (&rest body) (declare (indent 0)) -- cgit v1.2.3