11
3
I edit a lot of MoinMoinWiki pages in my emacs and love the flyspell-mode
.
Preformatted stuff in {{{...}}}
(in multiple lines) as well as "backtick text backtick" usually contains snippets of programming code which make no sense to spellcheck.
Can I configure ispell
/flyspell
not to include the programming code?
Example:
Bla bla lorem ipsum die Standardcontainer wie `vector` eine
''Methode'' haben, die ein einzelnes Argument nimmt, also
`vector<T>::swap(vector<T)>&)`. Bla bla und diese `swap`-Methoden sind
von dieser Sorte. Warum das so ist, sehen wir gleich. Bla bla
was '''kanonisch''' ist bla bla Template-Funktion<<tlitref(stdswap)>>
{{{#!highlight c++ title="Man könnte 'std::swap@LT@@GT@' spezialisieren"
namespace std {
template<> // wir können durchaus im namespace std spezialisieren
void swap<Thing>(Thing&, Thing&) {
// ...hier swappen...
}
}
}}}
Nun, das würde sicherlich in diesem Fall helfen, doch es bleibt ein
größeres Problem: Eine teilweise Spezialisierung lorem ipsum bla bla
perfect! My mode-line said
(Fundamental Fly)
. Hooking it toflyspell-mode
did not work, butfundamental-mode
instead oftext-mode
seems fine. – towi – 2011-10-20T08:02:54.960Hmm... how to I handle both: the
^{{{
...^}}}
regex and the Backtick-word-Backtick one? – towi – 2011-10-20T08:06:37.870I added support for the backtick-text-backtick. It assumes that such statements only appear on a single line—it counts whether there is an even or odd number of backticks on the line before it. – Ivan Andrus – 2011-10-23T20:11:10.747