From: steve@miranova.com (Steven L. Baur)
Subject: sgnus and buttonizing headers (patch to make X-Url: work)
Date: 07 Nov 1995 20:39:11 -0800 [thread overview]
Message-ID: <m220rjoh3k.fsf@diana.miranova.com> (raw)
The X-Url: and X-Uri: optional headers are not buttonized.
This patch has the unwanted side affect of not allowing changes to
gnus-button-url to be recognized in the same session, due to when
gnus-button-alist is evaluated.
Here is the patch to gnus-vis.el:
*** gnus-vis.el~ Tue Nov 7 19:12:31 1995
--- gnus-vis.el Tue Nov 7 19:12:01 1995
***************
*** 210,225 ****
;(defvar gnus-signature-face 'italic
; "Face used for signature.")
(defvar gnus-button-alist
! '(("in\\( +article\\)? +\\(<\\([^\n @<>]+@[^\n @<>]+\\)>\\)" 2
! (assq (count-lines (point-min) (match-end 0))
! gnus-cite-attribution-alist)
! gnus-button-message-id 3)
! ;; This is how URLs _should_ be embedded in text...
! ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
! ;; Next regexp stolen from highlight-headers.el.
! ;; Modified by Vladimir Alexiev.
! ("\\b\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\):\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?[-a-zA-Z0-9_=?#$@~`%&*+|\\/.,]*[-a-zA-Z0-9_=#$@~`%&*+|\\/]" 0 t gnus-button-url 0))
"Alist of regexps matching buttons in article bodies.
Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where
--- 210,228 ----
;(defvar gnus-signature-face 'italic
; "Face used for signature.")
+ (defvar gnus-button-url-regexp "\\b\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\):\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?[-a-zA-Z0-9_=?#$@~`%&*+|\\/.,]*[-a-zA-Z0-9_=#$@~`%&*+|\\/]"
+ "*Regular expression matching Urls")
+
(defvar gnus-button-alist
! (list '("in\\( +article\\)? +\\(<\\([^\n @<>]+@[^\n @<>]+\\)>\\)" 2
! (assq (count-lines (point-min) (match-end 0))
! gnus-cite-attribution-alist)
! gnus-button-message-id 3)
! ;; This is how URLs _should_ be embedded in text...
! '("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
! ;; Next regexp stolen from highlight-headers.el.
! ;; Modified by Vladimir Alexiev.
! (list gnus-button-url-regexp 0 t gnus-button-url 0))
"Alist of regexps matching buttons in article bodies.
Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where
***************
*** 234,243 ****
variable it the real callback function.")
(defvar gnus-header-button-alist
! '(("^\\(References\\|Message-ID\\):" "<[^>]+>" 0 t gnus-button-message-id 0)
! ("^\\(From\\|Reply-To\\): " ": *\\(.+\\)$" 1 t gnus-button-reply 0)
! ("^\\(Cc\\|To\\):" "[^ \t\n<>,()\"]+@[^ \t\n<>,()\"]+"
! 0 t gnus-button-mailto 0))
"Alist of headers and regexps to match buttons in article heads.
This alist is very similar to `gnus-button-alist', except that each
--- 237,248 ----
variable it the real callback function.")
(defvar gnus-header-button-alist
! (list
! '("^\\(References\\|Message-ID\\):" "<[^>]+>" 0 t gnus-button-message-id 0)
! '("^\\(From\\|Reply-To\\): " ": *\\(.+\\)$" 1 t gnus-button-reply 0)
! '("^\\(Cc\\|To\\):" "[^ \t\n<>,()\"]+@[^ \t\n<>,()\"]+"
! 0 t gnus-button-mailto 0)
! (list "^X-[Uu][Rr][Ll]:" gnus-button-url-regexp 0 t gnus-button-url 0))
"Alist of headers and regexps to match buttons in article heads.
This alist is very similar to `gnus-button-alist', except that each
--
steve@miranova.com baur
reply other threads:[~1995-11-08 4:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=m220rjoh3k.fsf@diana.miranova.com \
--to=steve@miranova.com \
/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).