From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/46707 Path: main.gmane.org!not-for-mail From: Reiner Steib <4uce.02.r.steib@gmx.net> Newsgroups: gmane.emacs.gnus.general Subject: Re: [patch] More buttons for emacs stuff, MIDs, mail addresses Date: Tue, 24 Sep 2002 22:29:18 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: <3D6FED17.6040201@yahoo.com.cn> Reply-To: reiner.steib@gmx.de NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1032899429 19431 127.0.0.1 (24 Sep 2002 20:30:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 24 Sep 2002 20:30:29 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17twK8-000539-00 for ; Tue, 24 Sep 2002 22:30:24 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17twJT-0008C1-00; Tue, 24 Sep 2002 15:29:43 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 24 Sep 2002 15:30:23 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id PAA11586 for ; Tue, 24 Sep 2002 15:30:07 -0500 (CDT) Original-Received: (qmail 9682 invoked by alias); 24 Sep 2002 20:29:21 -0000 Original-Received: (qmail 9677 invoked from network); 24 Sep 2002 20:29:20 -0000 Original-Received: from theotp5.physik.uni-ulm.de (134.60.10.145) by gnus.org with SMTP; 24 Sep 2002 20:29:20 -0000 Original-Received: (from ste@localhost) by theotp5.physik.uni-ulm.de (8.11.2/8.11.2) id g8OKTI622225; Tue, 24 Sep 2002 22:29:18 +0200 X-Authentication-Warning: theotp5.physik.uni-ulm.de: ste set sender to 4uce.02.r.steib@gmx.net using -f Original-To: ding@gnus.org X-Face: P05mdcZT&lL[-s2=mw~RsllZ0zZAb?vdE}.s (Katsumi Yamaoka's message of "Tue, 24 Sep 2002 09:32:47 +0900") Original-Lines: 26 User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:46707 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:46707 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Sep 24 2002, Katsumi Yamaoka wrote: >>>>>> In >>>>>> grossjoh@lothlorien.cs.uni-dortmund.de (Kai Gro=DFjohann) wrote: > >> Committed. Please test. > > Unfortunately, XEmacs doesn't have the command apropos-variable. The attached patch uses `apropos' for XEmacs and ... * gnus-art.el (gnus-button-guessed-mid-regexp): Improved regexp. (gnus-button-handle-describe-{function,variable,key}, gnus-button-handle-apropos{,-command}): Fixed typos in doc-strings. (gnus-button-handle-apropos-variable): Use `apropos' in XEmacs. (gnus-button-alist): Fixed missing "RET" and allow more whitespace in "M-x apropos" regexps. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=gnus-art.buttons.03.patch Content-Description: buttons.03.patch Index: gnus-art.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus-art.el,v retrieving revision 6.241 diff -u -w -r6.241 gnus-art.el --- gnus-art.el 2002/09/24 17:16:49 6.241 +++ gnus-art.el 2002/09/24 20:20:57 @@ -5295,7 +5295,8 @@ (defcustom gnus-button-guessed-mid-regexp (concat "^?\\)") +(defvar gnus-button-handle-describe-prefix "^\\(C-h\\|?\\)") (defun gnus-button-handle-describe-function (url) - "Call describe-function when pushing the corresponing URL button." + "Call describe-function when pushing the corresponding URL button." (describe-function (intern (gnus-replace-in-string url gnus-button-handle-describe-prefix "")))) (defun gnus-button-handle-describe-variable (url) - "Call describe-variable when pushing the corresponing URL button." + "Call describe-variable when pushing the corresponding URL button." (describe-variable (intern (gnus-replace-in-string url gnus-button-handle-describe-prefix "")))) @@ -5348,21 +5349,21 @@ ;; FIXME: Is is possible to implement this? Else it should be removed here ;; and in `gnus-button-alist'. (defun gnus-button-handle-describe-key (url) - "Call describe-key when pushing the corresponing URL button." + "Call describe-key when pushing the corresponding URL button." (error "not implemented")) -(defun gnus-button-handle-apropos (url) - "Call apropos when pushing the corresponing URL button." - (apropos (gnus-replace-in-string url gnus-button-handle-describe-prefix ""))) - (defun gnus-button-handle-apropos-command (url) - "Call apropos when pushing the corresponing URL button." - (apropos-command (gnus-replace-in-string url - gnus-button-handle-describe-prefix ""))) + "Call apropos when pushing the corresponding URL button." + (apropos-command + (gnus-replace-in-string url gnus-button-handle-describe-prefix ""))) (defun gnus-button-handle-apropos-variable (url) "Call apropos when pushing the corresponding URL button." - (apropos-variable (gnus-replace-in-string url gnus-button-handle-describe-prefix ""))) + (if (fboundp 'apropos-variable) + (apropos + (gnus-replace-in-string url gnus-button-handle-describe-prefix "")) + (apropos-variable + (gnus-replace-in-string url gnus-button-handle-describe-prefix "")))) (defcustom gnus-button-man-level 5 "*Integer that says how many man-related buttons Gnus will show. @@ -5414,18 +5415,18 @@ ("M-x[ \t\n]customize-[^ ]+[ \t\n]RET[ \t\n]\\([^ ]+\\)[ \t\n]RET" 0 (>= gnus-button-emacs-level 1) gnus-button-handle-custom 1) ;; Emacs help commands - ("M-x[ \t\n]apropos[ \t\n]\\([^ ]+\\)[ \t\n]RET" + ("M-x[ \t\n]+apropos[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" ;; regexp doesn't match arguments containing ` '. 0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos 1) - ("M-x[ \t\n]apropos-command[ \t\n]\\([^ ]+\\)[ \t\n]RET" 0 - (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-command 1) - ("M-x[ \t\n]apropos-variable[ \t\n]\\([^ ]+\\)[ \t\n]RET" 0 - (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-variable 1) - ("\\W\\(C-h\\|?\\)[ \t\n]f[ \t\n]\\([^ ]+\\)[ \t\n]RET" 0 - (>= gnus-button-emacs-level 1) gnus-button-handle-describe-function 2) - ("\\W\\(C-h\\|?\\)[ \t\n]v[ \t\n]\\([^ ]+\\)[ \t\n]RET" 0 - (>= gnus-button-emacs-level 1) gnus-button-handle-describe-variable 2) - ("\\W\\(C-h\\|?\\)[ \t\n]k[ \t\n]\\([^ ]+\\)[ \t\n]" 0 + ("M-x[ \t\n]+apropos-command[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" + 0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-command 1) + ("M-x[ \t\n]+apropos-variable[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" + 0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-variable 1) + ("\\W\\(C-h\\|?\\)[ \t\n]+f[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" + 0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-function 2) + ("\\W\\(C-h\\|?\\)[ \t\n]+v[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" + 0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-variable 2) + ("\\W\\(C-h\\|?\\)[ \t\n]+k[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+" 0 ;; this regexp needs to be fixed! (>= gnus-button-emacs-level 9) gnus-button-handle-describe-key 2) ;; This is how URLs _should_ be embedded in text... --=-=-= Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/ --=-=-=--