diff --git a/enode-lisp/enode.el b/enode-lisp/enode.el index 0fe06f4..c2f4c6b 100755 --- a/enode-lisp/enode.el +++ b/enode-lisp/enode.el @@ -583,12 +583,12 @@ INTERACTIVE" (active-buffer (current-buffer)) ) ;; The user to connect as - (setq conn-user (car conn-details)) + (setq conn-user (plist-get conn-details :conn-user)) ;; The database to connect to - (setq conn-connection (caddr conn-details)) + (setq conn-connection (plist-get conn-details :conn-connection)) ;; The password to use: if it's not in the saved connection ;; details... - (setq conn-pass (if (not (cadr conn-details)) + (setq conn-pass (if (not (plist-get conn-details :conn-pass)) ;; ... if it's one of the locally saved ;; passwords... (if (assoc connection-description @@ -610,12 +610,18 @@ INTERACTIVE" enode-passwords-in-use)) my-conn-pass)))) ;; The SQL prompt for the SQL engine - (setq conn-prompt (cadddr conn-details)) + (setq conn-prompt (plist-get conn-details :conn-prompt)) + (setq conn-hostname (plist-get conn-details :conn-hostname)) + (setq conn-port (plist-get conn-details :conn-port)) (cond ((eq 'oracle enode-current-connection-type) ;; Connect. (enode-oracle-connect conn-user conn-pass conn-connection conn-prompt) ) + ((eq 'mysql enode-current-connection-type) + (enode-mysql-connect conn-user conn-pass conn-connection + conn-hostname conn-prompt conn-port) + ) ) ;; Say who we're now connected to. (setq enode-current-connection connection-description)