Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workaround for hy-1.0a3 #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions hy-jedhy.el
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"Text identifying successful startup of jedhy.")

(defconst hy-jedhy--reset-namespace-code
"(setv --JEDHY (jedhy.api.API :locals- (locals) :globals- (globals) :macros- --macros--))"
"(setv --JEDHY (jedhy.api.API :locals- (locals) :globals- (globals) :macros- __macros__))"
"Text to send to make Jedhy's namespace current.")

;;; Startup
Expand Down Expand Up @@ -149,13 +149,13 @@ Not bound atm as this is temporary, run via M-x or bind yourself."

(defun hy-jedhy--format-output-tuple (output)
"Format OUTPUT given as a tuple."
(unless (s-equals? "()" output)
(unless (s-equals? "(,)" output)
(->> output
(s-replace-all '(("'" . "")
(",)" . "") ; one element list case
("(" . "")
(")" . "")))
(s-split ", ")))) ; comma is a valid token so can't replace it
("(, \"" . "") ; one element list case
("\")" . "")))
(s-split "\" \"")
))) ; comma is a valid token so can't replace it

(defun hy-jedhy--format-describe-output (output)
"Converts escaped newlines to true newlines."
Expand Down