aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2026-04-01 12:37:55 -0700
committerGravatar Tom Willemse2026-04-01 12:49:54 -0700
commitfa0cf1fa075764a07d2952083fa174f663553183 (patch)
treef04e16dc9782691abfeb0daa94e790f82fda0220
parent0e8038216d43d979c31a440bace1402819173207 (diff)
downloademacs-config-fa0cf1fa075764a07d2952083fa174f663553183.tar.gz
emacs-config-fa0cf1fa075764a07d2952083fa174f663553183.zip
oni-sql: Enable ‘outline-minor-mode’ in ‘sql-interactive-mode’
-rw-r--r--oni-sql.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/oni-sql.el b/oni-sql.el
index e9f1665..4746025 100644
--- a/oni-sql.el
+++ b/oni-sql.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2026.0401.112757
+;; Version: 2026.0401.124124
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -29,5 +29,15 @@
(define-key sql-mode-map (kbd "C-c C-b") 'sql-set-sqli-buffer)
+(defun oni-sql-send-input ()
+ (interactive nil sql-interactive-mode)
+ (outline-hide-body)
+ (comint-send-input))
+
+(add-hook 'sql-mode-hook 'outline-minor-mode)
+(add-hook 'sql-interactive-mode-hook 'outline-minor-mode)
+
+(define-key sql-interactive-mode-map (kbd "RET") 'oni-sqli-send-input)
+
(provide 'oni-sql)
;;; oni-sql.el ends here