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

Can't patch functions with literal cons cells in their definitions #13

Closed
caadar opened this issue Aug 12, 2017 · 6 comments
Closed

Can't patch functions with literal cons cells in their definitions #13

caadar opened this issue Aug 12, 2017 · 6 comments
Labels

Comments

@caadar
Copy link
Contributor

caadar commented Aug 12, 2017

I can't patch org-auto-repeat-maybe from org.el.

Just change `defun' to `el-patch-defun' end evaluate the form.
Messages says: cl-mapcar: Wrong type argument: listp, hour

@raxod502
Copy link
Member

Fun fun fun. I can reproduce it. Let me see what's the matter.

@raxod502 raxod502 added the bug label Aug 12, 2017
@raxod502
Copy link
Member

Oh, it's because el-patch--resolve only recurses correctly into list forms, and not other things like cons cells. That should be fairly straightforward to fix.

@raxod502
Copy link
Member

This turns out to be more difficult fun than expected. Because fully handling improper lists requires making

(a b (el-patch-add c . d))

resolve to

(a b c . d)

which is nontrivial (and not even necessarily something that makes sense).

@raxod502 raxod502 changed the title Fail to patch org-auto-repeat-maybe function (org.el) Can't patch functions with literal cons cells in their definitions Oct 15, 2017
@caadar
Copy link
Contributor Author

caadar commented Oct 17, 2017

The same with (el-patch-defvar xml-entity-alist ...).

@raxod502
Copy link
Member

raxod502 commented May 3, 2018

The same with (el-patch-defvar counsel-mode-map ...), unfortunately.

@raxod502
Copy link
Member

raxod502 commented May 3, 2018

Hey, it's fixed (finally)! Give it a try :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants