* sgnus and buttonizing headers (patch to make X-Url: work)
@ 1995-11-08 4:39 Steven L. Baur
0 siblings, 0 replies; only message in thread
From: Steven L. Baur @ 1995-11-08 4:39 UTC (permalink / 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1995-11-08 4:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-11-08 4:39 sgnus and buttonizing headers (patch to make X-Url: work) Steven L. Baur
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).