From: yamaoka Date: Sun, 2 Feb 2003 05:03:04 +0000 (+0000) Subject: Synch to Oort Gnus. X-Git-Tag: t-gnus-6_15_16-00-quimby~16 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d1d8788fd071e60bbc844bd34c2a9d7f216826b5;p=elisp%2Fgnus.git- Synch to Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 03bafff..854ccd8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -5,6 +5,14 @@ 2003-02-02 Jesper Harder + * gnus-art.el (gnus-button-handle-describe-key): Implement it. + (gnus-button-alist): Fix regexp for describe-key. + (gnus-button-handle-describe-function) + (gnus-button-handle-describe-variable) + (gnus-button-handle-apropos, gnus-button-handle-apropos-command) + (gnus-button-handle-apropos-variable) + (gnus-button-handle-apropos-documentation): Docstring fix. + * gnus-util.el (gnus-kill-buffer): Use get-buffer. 2003-02-01 Lars Magne Ingebrigtsen diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 00e47d3..4570864 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -5972,40 +5972,43 @@ respectivly." (defvar gnus-button-handle-describe-prefix "^\\(C-h\\|?\\)") (defun gnus-button-handle-describe-function (url) - "Call describe-function when pushing the corresponding 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 corresponding URL button." + "Call `describe-variable' when pushing the corresponding URL button." (describe-variable (intern (gnus-replace-in-string url gnus-button-handle-describe-prefix "")))) -;; 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 corresponding URL button." - (error "not implemented")) + "Call `describe-key' when pushing the corresponding URL button." + (let* ((key-string + (gnus-replace-in-string url gnus-button-handle-describe-prefix "")) + (keys (ignore-errors (eval `(kbd ,key-string))))) + (if keys + (describe-key keys) + (gnus-message 3 "Invalid key sequence in button: %s" key-string)))) (defun gnus-button-handle-apropos (url) - "Call apropos when pushing the corresponding URL button." + "Call `apropos' when pushing the corresponding 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 corresponding URL button." + "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." + "Call `apropos' when pushing the corresponding URL button." (funcall (if (fboundp 'apropos-variable) 'apropos-variable 'apropos) (gnus-replace-in-string url gnus-button-handle-describe-prefix ""))) (defun gnus-button-handle-apropos-documentation (url) - "Call apropos when pushing the corresponding URL button." + "Call `apropos' when pushing the corresponding URL button." (funcall (if (fboundp 'apropos-documentation) 'apropos-documentation 'apropos) (gnus-replace-in-string url gnus-button-handle-describe-prefix ""))) @@ -6097,9 +6100,10 @@ positives are possible." 0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-function 2) ("\\b\\(C-h\\|?\\)[ \t\n]+v[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET" 0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-variable 2) - ("\\b\\(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) + ("`\\(\\b\\(C-h\\|?\\)[ \t\n]+k[ \t\n]+\\([^']+\\)\\)'" 1 + ;; Unlike the other regexps we really have to require quoting + ;; here to determine where it ends. + (>= gnus-button-emacs-level 1) gnus-button-handle-describe-key 3) ;; This is how URLs _should_ be embedded in text... ("]*\\)>" 1 t gnus-button-embedded-url 1) ;; Raw URLs.