From: Reiner Steib <4uce.02.r.steib@gmx.net>
Subject: Re: [Patch] Improvements and additions for gnus-button-alist
Date: Thu, 02 Jan 2003 18:46:11 +0100 [thread overview]
Message-ID: <v9hecrzbq4.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <m3smwfgn39.fsf@quimbies.gnus.org>
[-- Attachment #1: Type: text/plain, Size: 937 bytes --]
On Mon, Dec 30 2002, Lars Magne Ingebrigtsen wrote:
> Reiner Steib <4uce.02.r.steib@gmx.net> writes:
>
>> Some of the regexps use [a-zA-Z]. But gnus-article-add-buttons set
>> case-fold-search to t. Is this indented? (I didn't change this.)
>
> The [A-Z] parts in the regexps should probably be removed.
Done.
lisp/ChangeLog:
--8<---------------cut here---------------start------------->8---
2003-01-02 Reiner Steib <Reiner.Steib@gmx.de>
* gnus-art.el (gnus-button-url-regexp,
(gnus-button-mid-or-mail-regexp, gnus-button-alist,
(gnus-header-button-alist): Regexps are case insensitive here.
--8<---------------cut here---------------end--------------->8---
texi/ChangeLog:
--8<---------------cut here---------------start------------->8---
2003-01-02 Reiner Steib <Reiner.Steib@gmx.de>
* gnus.texi (Article Buttons): Regexps are case insensitive here.
--8<---------------cut here---------------end--------------->8---
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnus-art.buttons-case.patch --]
[-- Type: text/x-patch, Size: 4690 bytes --]
--- lisp/gnus-art.el 2003/01/02 02:34:32 6.260
+++ lisp/gnus-art.el 2003/01/02 17:24:21
@@ -5340,8 +5340,8 @@
(defcustom gnus-button-url-regexp
(if (string-match "[[:digit:]]" "1") ;; support POSIX?
- "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?[-a-zA-Z0-9_=!?#$@~`%&*+|\\/:;.,[:word:]]+[-a-zA-Z0-9_=#$@~`%&*+|\\/[:word:]]\\)"
- "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?\\([-a-zA-Z0-9_=!?#$@~`%&*+|\\/:;.,]\\|\\w\\)+\\([-a-zA-Z0-9_=#$@~`%&*+|\\/]\\|\\w\\)\\)")
+ "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-z0-9_.]+:[0-9]*\\)?[-a-z0-9_=!?#$@~`%&*+|\\/:;.,[:word:]]+[-a-z0-9_=#$@~`%&*+|\\/[:word:]]\\)"
+ "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-z0-9_.]+:[0-9]*\\)?\\([-a-z0-9_=!?#$@~`%&*+|\\/:;.,]\\|\\w\\)+\\([-a-z0-9_=#$@~`%&*+|\\/]\\|\\w\\)\\)")
"Regular expression that matches URLs."
:group 'gnus-article-buttons
:type 'regexp)
@@ -5393,7 +5393,7 @@
(regexp :tag "Other")))
(defcustom gnus-button-mid-or-mail-regexp
- (concat "\\b\\(<?[a-zA-Z0-9][^<>\")!;:,{}\n\t ]*@"
+ (concat "\\b\\(<?[a-z0-9][^<>\")!;:,{}\n\t ]*@"
gnus-button-valid-fqdn-regexp
">?\\)\\b")
"Regular expression that matches a message ID or a mail address."
@@ -5557,7 +5557,7 @@
("\\bin\\( +article\\| +message\\)? +\\(<\\([^\n @<>]+@[^\n @<>]+\\)>\\)" 2
t gnus-button-message-id 3)
("\\(<URL: *\\)mailto: *\\([^> \n\t]+\\)>" 0 t gnus-url-mailto 2)
- ("mailto:\\([-a-zA-Z.@_+0-9%=?]+\\)" 0 t gnus-url-mailto 1)
+ ("mailto:\\([-a-z.@_+0-9%=?]+\\)" 0 t gnus-url-mailto 1)
("\\bmailto:\\([^ \n\t]+\\)" 0 t gnus-url-mailto 1)
;; CTAN
("\\bCTAN:[ \t\n]*\\([^>)!;:,\n\t ]*\\)" 0 (>= gnus-button-tex-level 1)
@@ -5596,12 +5596,12 @@
(and (>= gnus-button-man-level 1) (< gnus-button-man-level 3))
gnus-button-handle-man 1)
;; more man pages: resolv.conf(5), iso_8859-1(7), xterm(1x)
- ("\\b\\([a-zA-Z][-_.a-zA-Z0-9]+\\)([1-9])\\W" 0
+ ("\\b\\([a-z][-_.a-z0-9]+\\)([1-9])\\W" 0
(and (>= gnus-button-man-level 3) (< gnus-button-man-level 5))
gnus-button-handle-man 1)
;; even more: Apache::PerlRun(3pm), PDL::IO::FastRaw(3pm),
;; SoWWWAnchor(3iv), XSelectInput(3X11)
- ("\\b\\([a-zA-Z][-_.:a-zA-Z0-9]+\\)([1-9][X1a-z]*)\\W" 0
+ ("\\b\\([a-z][-_.:a-z0-9]+\\)([1-9][X1a-z]*)\\W" 0
(>= gnus-button-man-level 5) gnus-button-handle-man 1)
;; MID or mail: To avoid too many false positives we don't try to catch
;; all kind of allowed MIDs or mail addresses. Domain part must contain
@@ -5613,8 +5613,8 @@
"*Alist of regexps matching buttons in article bodies.
Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where
-REGEXP: is the string matching text around the button (can also be lisp
-expression evaluating to a string),
+REGEXP: is the string (case insensitive) matching text around the button (can
+also be lisp expression evaluating to a string),
BUTTON: is the number of the regexp grouping actually matching the button,
FORM: is a lisp expression which must eval to true for the button to
be added,
@@ -5641,7 +5641,7 @@
("^X-[Uu][Rr][Ll]:" gnus-button-url-regexp 0 t browse-url 0)
("^Subject:" gnus-button-url-regexp 0 t browse-url 0)
("^[^:]+:" gnus-button-url-regexp 0 t browse-url 0)
- ("^[^:]+:" "\\bmailto:\\([-a-zA-Z.@_+0-9%=?]+\\)" 0 t gnus-url-mailto 1)
+ ("^[^:]+:" "\\bmailto:\\([-a-z.@_+0-9%=?]+\\)" 0 t gnus-url-mailto 1)
("^[^:]+:" "\\(<\\(url: \\)?news:\\([^>\n ]*\\)>\\)" 1 t
gnus-button-message-id 3))
"*Alist of headers and regexps to match buttons in article heads.
--- texi/gnus.texi 2002/12/31 13:04:24 6.356
+++ texi/gnus.texi 2003/01/02 17:24:23
@@ -8528,10 +8528,11 @@
@table @var
@item regexp
-All text that match this regular expression will be considered an
-external reference. Here's a typical regexp that matches embedded URLs:
-@samp{<URL:\\([^\n\r>]*\\)>}. This can also be a variable containing a
-regexp, useful variables to use include @code{gnus-button-url-regexp}.
+All text that match this regular expression (case insensitive) will be
+considered an external reference. Here's a typical regexp that matches
+embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}. This can also be a
+variable containing a regexp, useful variables to use include
+@code{gnus-button-url-regexp}.
@item button-par
Gnus has to know which parts of the matches is to be highlighted. This
[-- Attachment #3: Type: text/plain, Size: 116 bytes --]
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/
next prev parent reply other threads:[~2003-01-02 17:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-30 22:05 Reiner Steib
2002-12-30 22:26 ` Lars Magne Ingebrigtsen
2003-01-02 17:46 ` Reiner Steib [this message]
2003-01-02 18:44 ` Lars Magne Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=v9hecrzbq4.fsf@marauder.physik.uni-ulm.de \
--to=4uce.02.r.steib@gmx.net \
--cc=reiner.steib@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).