ejmr / bbcode-mode Goto Github PK
View Code? Open in Web Editor NEWAn Emacs major mode for writing BBCode
License: GNU General Public License v3.0
An Emacs major mode for writing BBCode
License: GNU General Public License v3.0
Using GNU Emacs 24.2.93.1 (latest pretest from http://emacsformacosx.com) keybindings to insert tags fail with void-function
error.
However, invoking the corresponding function manually with M-x
still works.
STR:
C-x C-f test.bbcode
C-c C-t b
Symbol's function definition is void: bbcode/insert-tag-b
appear in the minibuffer.However, M-x bbcode/insert-tag-b
inserts [b][/b]
tag as expected.
Hi,
another older bbcode-mode already exists. This could cause conflicts. Here it is:
It would be nice to be able to customize prefix keys in case users would rather use something besides C-c C-l
as the prefix for all list related tags, for example.
First off, thans for making this mode.
Maybe I'm missing something, but [lsit]foo[/list] works, but usually my lists loook like
[list]
[*] foo
[*] bar
[/list]
Which is not revognized.
If no mark is present then any tag insert command, e.g. C-c C-t b
, will fail and Emacs will complain about there being no mark. It seems like this only started when I upgrade to Emacs 24.2.91.1. It happens with all versions of BBCode Mode.
Currently bbcode-mode
only colors matching pairs of opening/closing tags. It doesn't color orphaned opening or closing tags at all (i.e. an opening tag without a matching closing tag or vice versa). This can be quite confusing to newcomers since the behavior is different from popular Emacs modes like xml-mode
, html-mode
and web-mode
, all of which color orphaned tags as well as properly paired ones. (xml-mode
goes a step further and colors orphaned closing tags in red to highlight that there's a syntax error, but that's tricky to do.)
As a related issue, bbcode-mode
tries to implement tag pair matching using a regexp. This does not work properly with nested tags - in particular, nested [quote]
s are problematic. It's very difficult if not impossible to properly parse nested structures using regexps.
In light of these points, I'd like to propose that the font-lock patterns should simply match individual opening/closing tags and not worry about pairing them up. This would make bbcode-mode
s font-lock behavior consistent with existing popular markup modes and would make the font-lock patterns much simpler to implement as well. What do you think?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.