Comments (11)
Same function runtime issue. 'pcase is not defined.
If you rewrite rules in other style it should solve runtime problem:
(defun vki-elixir-smie-rules (kind token)
(case kind
(:elem
(cond
((equal basic) elixir-smie-indent-basic)))
(:after
(cond
((equal token "OP") elixir-smie-indent-basic)
((equal token "->") elixir-smie-indent-basic)))
(:before
(cond
((equal token "OP") elixir-smie-indent-basic)
))
))
For compilation problem I still can't figure whats wrong with coma here: (:list-intro . ,(or
"do"))`
from emacs-elixir.
It appears pcase
was introduced in Emacs 24. The latest official version is 24.3, released in March 2013. I think for now I am going to mark this ticket as closed, and recommend you upgrade to the latest version (if you haven't already, by now).
from emacs-elixir.
So the only robust 'solution' to this is to upgrade to Emacs24? I have other plug-ins that don't play nicely with that version, so presumably I either choose elixir-mode or these other plug-ins?
from emacs-elixir.
Yes, unfortunately.
Alternatively you could contribute a patch that adds support for emacs 23
from emacs-elixir.
Here's the source for pcase
, which as far as I can tell is the source of the issue. If you wanted, we can talk about a patch that includes this... or perhaps another approach to write smie-rules
functions that is compatible with Emacs 23. (Assuming that's the only issue.)
from emacs-elixir.
In theory, could this pcase macro just be bundled and required as appropriate, i.e. even adding it separately in your loadpath?
Also, is there a surefire fix for the ". in wrong context" error? Could it be consolidated somehow?
Is this a potential summary of where something has to be done to remedy the error on load?
gonz@rooftrellen ~/.e/emacs-elixir> grep -Pn "`\(.*? \." *.el
elixir-smie.el:80: (pushnew `(,',regex-name . ,(upcase (symbol-name ',name))) elixir-syntax class-names))))
elixir-smie.el:297: (`(:after . "STRING")
elixir-smie.el:301: (`(:elem . basic)
elixir-smie.el:305: (`(:after . "OP")
elixir-smie.el:308: (`(:before . "def") elixir-smie-indent-basic)
elixir-smie.el:313: (`(:after . "->")
elixir-smie.el:318: (`(,_ . ,(or `"COMMA")) (smie-rule-separator kind))
elixir-smie.el:319: (`(:after . "=") elixir-smie-indent-basic)
elixir-smie.el:320: (`(:after . "end") 0)
elixir-smie.el:321: (`(:after . ,(or `"do"))
elixir-smie.el:323: (`(:list-intro . ,(or `"do" `";")) t)))
I am not well versed enough in elisp, elixir or this emacs-plugin to know what to do with this.
from emacs-elixir.
This syntax is called a cons cell:
(x . y)
I am operating under the assumption that the . in wrong context
error is an error that cascades down from pcase
not existing, or an earlier version of it that had different syntax, or something.
from emacs-elixir.
I am aware of what a cons cell is, but clearly these are not working just like regular cons cells in the context of the errors.
from emacs-elixir.
I'm not sure. I'll try to look into this this weekend on emacs 23
from emacs-elixir.
Actually, if you're interested in running this to ground I'll re-open the ticket. Unfortunately I don't have the bandwidth to add support for another emacs version, not to say it's not objectively worthwhile.
from emacs-elixir.
I wouldn't advise that. I'm sure the time and effort is better spent elsewhere.
from emacs-elixir.
Related Issues (20)
- Need auto sort aliases HOT 1
- Require as function name should not appear as blue HOT 4
- Remove Python/Ruby dependencies HOT 5
- Better CI pipeline / project tools HOT 12
- ExUnit functions highlighting issues. HOT 3
- Opening largish files is crazy slow due to SMIE HOT 6
- Discussion: Driving this project forward? HOT 21
- incorrect indentation if do is on its own line HOT 3
- Font lock issue with a more complex module var
- Support for `defn`? HOT 3
- Support markdown highlighting HOT 3
- Wrong indentation of case do clause with pipeline
- Highlight mix.lock file
- elixir-format.el show error when upgrade on `list-packages` HOT 3
- Indentation with a guard on a new line HOT 2
- Syntax highlighting for function calls
- package-install elixir-mode fails on pkg-info HOT 6
- tree-sitter support HOT 8
- -emacs-elixir-format.ex files left behind when using format hook HOT 2
- add ~H to recognized sigils HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emacs-elixir.