X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fhelp.el;h=901724b456e5d79723e04111755648a1e3eccc0d;hb=4e344277e13cd8813592afc6b0bfb89474f0cbb0;hp=8651aab249eb29156e6766a0ef4f7986054e852f;hpb=376658ea71d16dced8acff36c3e385ac3738d868;p=chise%2Fxemacs-chise.git- diff --git a/lisp/help.el b/lisp/help.el index 8651aab..901724b 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -730,7 +730,10 @@ of the key sequence that ran this command." (stringp Installation-string)) (with-displaying-help-buffer (lambda () - (princ Installation-string)) + (princ + (if (fboundp 'decode-coding-string) + (decode-coding-string Installation-string 'automatic-conversion) + Installation-string))) "Installation") (error "No Installation information available."))) @@ -1018,24 +1021,27 @@ For example: This function is used by `describe-function-1' to list function arguments in the standard Lisp style." - (let* ((fndef (indirect-function function)) + (let* ((fnc (indirect-function function)) + (fndef (if (eq (car-safe fnc) 'macro) + (cdr fnc) + fnc)) (arglist - (cond ((compiled-function-p fndef) - (compiled-function-arglist fndef)) - ((eq (car-safe fndef) 'lambda) - (nth 1 fndef)) - ((subrp fndef) - (let* ((doc (documentation function)) - (args (and (string-match - "[\n\t ]*\narguments: ?(\\(.*\\))\n?\\'" - doc) - (match-string 1 doc)))) - ;; If there are no arguments documented for the - ;; subr, rather don't print anything. - (cond ((null args) t) - ((equal args "") nil) - (args)))) - (t t)))) + (cond ((compiled-function-p fndef) + (compiled-function-arglist fndef)) + ((eq (car-safe fndef) 'lambda) + (nth 1 fndef)) + ((subrp fndef) + (let* ((doc (documentation function)) + (args (and (string-match + "[\n\t ]*\narguments: ?(\\(.*\\))\n?\\'" + doc) + (match-string 1 doc)))) + ;; If there are no arguments documented for the + ;; subr, rather don't print anything. + (cond ((null args) t) + ((equal args "") nil) + (args)))) + (t t)))) (cond ((listp arglist) (prin1-to-string (cons function (mapcar (lambda (arg) @@ -1423,7 +1429,7 @@ after the listing is made.)" (if cmd (princ " "))))) (terpri)))))) -;; Stop gap for 21.0 untill we do help-char etc properly. +;; Stop gap for 21.0 until we do help-char etc properly. (defun help-keymap-with-help-key (keymap form) "Return a copy of KEYMAP with an help-key binding according to help-char invoking FORM like help-form. An existing binding is not overridden.