]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
make my-sql-connect optional
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Tue, 13 Sep 2022 07:43:51 +0000 (09:43 +0200)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Tue, 13 Sep 2022 07:43:51 +0000 (09:43 +0200)
Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
bba.org

diff --git a/bba.org b/bba.org
index 51012784416ccb83793fa54d729958867f584d31..3888f43caf20b721ae3d950c92485044283a56a9 100644 (file)
--- a/bba.org
+++ b/bba.org
@@ -3331,6 +3331,7 @@ have a look in [[file:/Applications/Emacs.app/Contents/Resources/lisp/progmodes/
 starting sql-connect.
 
 #+BEGIN_SRC emacs-lisp
+  (if (file-exists-p "~/.emacs_secrets.el.gpg")
   (defun my-sql-connect ()
     (interactive)
     (require 'my-password "~/.emacs_secrets.el.gpg")
@@ -3342,7 +3343,7 @@ starting sql-connect.
       (if current-prefix-arg
           (sql-connect connection connection)
         (sql-connect connection))))
-  (global-set-key (kbd "s-s") 'my-sql-connect)
+  (global-set-key (kbd "s-s") 'my-sql-connect))
 #+END_SRC
 
 your =~/.emacs_secrets.el.gpg= might look like: