Emacs WML-mode
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
-
- Posts: 161
- Joined: September 6th, 2005, 10:41 pm
- Location: Australia
Re: Emacs WML-mode
The behaviour is intentional for consistency with the wmlindent tool, although I also find this style of indentation unusual. I'll look into changing this behaviour when wesnoth-indent-preprocessor-bol is nil.Anonymissimus wrote:#ifdef etc is indented like a tag but doesn't cause indentation itsselfCode: Select all
[event] #ifdef HARD name=turn 2 #else name=turn 3 #endif [/event]
Update: This has been added in 1.3.4a.
Re: Emacs WML-mode
commited
-
- Posts: 161
- Joined: September 6th, 2005, 10:41 pm
- Location: Australia
Re: Emacs WML-mode
Wesnoth Mode 1.3.5 is now available.
As usual, several bugs have been fixed and some new features added.
New to this release is the ability to navigate via WML structure. C-M-n and C-M-p will move forward and back (respectively) one block at the current depth. C-M-d move one level deeper, whereas C-M-u will move up one level. Prefix arguments can be added to any of these to repeat the command 'n' times.
It's now also possible to kill a block using C-M-k, and mark can be placed at the end of the current block using C-M-SPC.
As usual, several bugs have been fixed and some new features added.
New to this release is the ability to navigate via WML structure. C-M-n and C-M-p will move forward and back (respectively) one block at the current depth. C-M-d move one level deeper, whereas C-M-u will move up one level. Prefix arguments can be added to any of these to repeat the command 'n' times.
It's now also possible to kill a block using C-M-k, and mark can be placed at the end of the current block using C-M-SPC.
Re: Emacs WML-mode
Commited 1.3.5 to trunk.
Re: Emacs WML-mode
I found a copy of Emacs WML-mode in wesnoth/data/tools/emacs_mode, and started using it with Emacs 23.4. I have a problem when indenting IF_VAR calls.
Emacs indents like this:
But wmlindent does indent, and I want to indent, like this:
Does anyone know how to configure Emacs WML-mode to indent IF_VAR as wmlindent does?
Emacs indents like this:
Code: Select all
{IF_VAR a equals $b (
[then]
{ERROR "yes"}
[/then]
[else]
{ERROR "no"}
[/else]
)}
Code: Select all
{IF_VAR a equals $b (
[then]
{ERROR "yes"}
[/then]
[else]
{ERROR "no"}
[/else]
)}
--Kernigh http://www.wesnoth.org/wiki/User:Kernigh
-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: Emacs WML-mode
It does that with all similar macro constructs. Most likely it's not possible; and this mode in unmaintained since WildPenguin's disappearance.
He last logged in 03 Dec 2011, 08:06 though, so perhaps he can be motivated to continue his work.
He last logged in 03 Dec 2011, 08:06 though, so perhaps he can be motivated to continue his work.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign