emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [emacs-wiki-discuss] XEmacs and character classes


From: Vadim Nasardinov
Subject: Re: [emacs-wiki-discuss] XEmacs and character classes
Date: Tue, 21 Dec 2004 15:40:31 -0500
User-agent: KMail/1.5.4

On Sunday 19 December 2004 16:39, Michael Olson wrote:
> Much to my dismay, I realized today that XEmacs does not seem to support
> character classes in regexps, such as [:space:].

Speaking of [:space:], I found a cosmetic issue with the
emacs-wiki-insert-anchor function.  To be more precise, this problem
probably shows up only in my particular version of Emacs.  For me,
"M-x version" returns

  "GNU Emacs 21.3.1 (i386-redhat-linux-gnu, X toolkit, Xaw3d scroll bars)
   of 2003-10-27 on daffy.perf.redhat.com"

Anyhow, the problem is this.  Suppose I create a wiki page like this:

  |<contents>
  |
  |* cat
  |
  |* dog
  |
  |* spaceship

(sans the leading pipe symbols which I use for quoting).

The published page contains the following markup:

  |<h2>ca<a id="sec1"></a>t</h2>
  |
  |<h2><a id="sec2"></a>dog</h2>
  |
  |<h2>spaces<a id="sec3"></a>hip</h2>


Note that the <a></a> tag splits some of the headers in half.

This occurs because emacs-wiki-insert-anchor is defined like so:

  |(defun emacs-wiki-insert-anchor (anchor)
  |  "Insert an anchor, either around the word at point, or within a tag."
  |  (skip-chars-forward "[:space:]")

Since my Emacs doesn't seem to understand the character class
[:space:], it interprets the above regexp as [space:].  This results
in skip-chars-forward skipping over the characters "s", "p", "a", "c",
"e", and ":".





reply via email to

[Prev in Thread] Current Thread [Next in Thread]