# HG changeset patch # User Richard M. Stallman # Date 902714576 0 # Node ID c3bbca1b6f3a7f0b1b433aefc6681af037509b25 # Parent 043c6a4da2df81857725e5581b5680d3e8cd7abc (describe-function-1): Handle macros properly. Handle multiple levels of aliases. diff -r 043c6a4da2df -r c3bbca1b6f3a lisp/help.el --- a/lisp/help.el Mon Aug 10 01:44:59 1998 +0000 +++ b/lisp/help.el Mon Aug 10 02:02:56 1998 +0000 @@ -585,6 +585,8 @@ ((byte-code-function-p def) (concat beg "compiled Lisp function")) ((symbolp def) + (while (symbolp (symbol-function def)) + (setq def (symbol-function def))) (format "alias for `%s'" def)) ((eq (car-safe def) 'lambda) (concat beg "Lisp function")) @@ -625,14 +627,16 @@ (if need-close (princ ")")) (princ ".") (terpri) - (let* ((inner-function (if (and (listp def) 'macro) - (cdr def) - def)) - (arglist (cond ((byte-code-function-p inner-function) - (car (append inner-function nil))) - ((eq (car-safe inner-function) 'lambda) - (nth 1 inner-function)) - (t t)))) + ;; Handle symbols aliased to other symbols. + (setq def (indirect-function def)) + ;; If definition is a macro, find the function inside it. + (if (eq (car-safe def) 'macro) + (setq def (cdr def))) + (let ((arglist (cond ((byte-code-function-p def) + (car (append def nil))) + ((eq (car-safe def) 'lambda) + (nth 1 def)) + (t t)))) (if (listp arglist) (progn (princ (cons function