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

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

[emacs-wiki-discuss] Minor regexp cleanup and treatment of whitespace in


From: Michael Olson
Subject: [emacs-wiki-discuss] Minor regexp cleanup and treatment of whitespace in links
Date: Sat, 28 Aug 2004 12:38:23 -0500
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux)

Sacha: the resynchronization with Gary's tree looks good.  I'd say
it's ready to be Debian-ised.

I made a few minor changes to `emacs-wiki-url-regexp' in
`emacs-wiki-set-sym-and-url-regexp'.  The tab is now represented as
`\t', and the right bracket `]' is moved to a spot that makes the
regexp more readable, IMHO.

Also, I made a note in the attached ChangeLog that corrects my
previous error in thinking that spaces and tabs *were* allowed.
Currently, they are *not*.

Enclosed are patches against Sacha's patch-67 and Gary's patch-20, as
well as the ChangeLog entry.  This patch will not change any
functionality, just make the source code look nicer.  :^)

--- orig/emacs-wiki.el  2004-08-28 11:03:52.000000000 -0500
+++ mod/emacs-wiki.el   2004-08-28 11:57:14.000000000 -0500
@@ -326,13 +326,13 @@
           (concat "\\<\\("
                   (mapconcat 'car emacs-wiki-url-protocols "\\|")
                   "\\):"
-                  "[^]         \n \"'()<>[^`{}]*[^]    \n \"'()<>[^`{}.,;]+")
+                  "[^][ \t\n\"'()<>^`{}]*[^][ \t\n\"'()<>^`{}.,;]+")
           emacs-wiki-url-server-regexp
           (concat "\\<\\("
                   (mapconcat 'car emacs-wiki-url-protocols "\\|")
                   "\\):"
                   "\\([^:@address@hidden:]+\\)?"
-                  "\\([^]      \n \"'()<>[^`{},;/]+\\)"
+                  "\\([^][ \t\n\"'()<>^`{},;/]+\\)"
                   "\\(/.*\\|$\\)")))
   (setq emacs-wiki-url-or-name-regexp
         (concat "\\("
--- orig/emacs-wiki.el  2004-08-26 17:53:35.000000000 -0500
+++ mod/emacs-wiki.el   2004-08-28 12:21:08.000000000 -0500
@@ -300,13 +300,13 @@
           (concat "\\<\\("
                   (mapconcat 'car emacs-wiki-url-protocols "\\|")
                   "\\):"
-                  "[^]  \n \"'()<>[^`{}]*[^]    \n \"'()<>[^`{}.,;]+")
+                  "[^][ \t\n\"'()<>^`{}]*[^][ \t\n\"'()<>^`{}.,;]+")
           emacs-wiki-url-server-regexp
           (concat "\\<\\("
                   (mapconcat 'car emacs-wiki-url-protocols "\\|")
                  "\\):"
                   "\\([^:@address@hidden:]+\\)?"
-                 "\\([^]       \n \"'()<>[^`{},;/]+\\)"
+                 "\\([^][ \t\n\"'()<>^`{},;/]+\\)"
                  "\\(/.*\\|$\\)")))
   (setq emacs-wiki-url-or-name-regexp
         (concat "\\("
2004-08-28  Michael Olson  <address@hidden>

        * emacs-wiki.el (emacs-wiki-set-sym-and-url-regexp): Represent
        tabs with `\t' and move right bracket closer to the beginning of
        the complement group so that it is more consistent with the other
        regexps.  This was done to `emacs-wiki-url-regexp'.
        (emacs-wiki-extended-link-regexp): No changes made.  To clarify
        from my previous ChangeLog note: tabs and spaces are *not* allowed
        currently in extended links because they should be quoted just
        like other special characters.

reply via email to

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