1 |
;;; help-fns.el --- Complex help functions |
;;; help-fns.el --- Complex help functions |
2 |
|
|
3 |
;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001 |
;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001, 2002 |
4 |
;; Free Software Foundation, Inc. |
;; Free Software Foundation, Inc. |
5 |
|
|
6 |
;; Maintainer: FSF |
;; Maintainer: FSF |
165 |
file-name string |
file-name string |
166 |
(beg (if (commandp def) "an interactive " "a "))) |
(beg (if (commandp def) "an interactive " "a "))) |
167 |
(setq string |
(setq string |
168 |
(cond ((or (stringp def) |
(cond ((or (stringp def) (vectorp def)) |
|
(vectorp def)) |
|
169 |
"a keyboard macro") |
"a keyboard macro") |
170 |
((subrp def) |
((subrp def) |
171 |
(if (eq 'unevalled (cdr (subr-arity def))) |
(if (eq 'unevalled (cdr (subr-arity def))) |
181 |
(concat beg "Lisp function")) |
(concat beg "Lisp function")) |
182 |
((eq (car-safe def) 'macro) |
((eq (car-safe def) 'macro) |
183 |
"a Lisp macro") |
"a Lisp macro") |
184 |
|
((eq (car-safe def) 'closure) |
185 |
|
(concat beg "Lisp closure")) |
186 |
((eq (car-safe def) 'autoload) |
((eq (car-safe def) 'autoload) |
187 |
(setq file-name (nth 1 def)) |
(setq file-name (nth 1 def)) |
188 |
(format "%s autoloaded %s" |
(format "%s autoloaded %s" |
258 |
;; If definition is a macro, find the function inside it. |
;; If definition is a macro, find the function inside it. |
259 |
(if (eq (car-safe def) 'macro) |
(if (eq (car-safe def) 'macro) |
260 |
(setq def (cdr def))) |
(setq def (cdr def))) |
261 |
|
;; and do the same for interpreted closures |
262 |
|
(if (eq (car-safe def) 'closure) |
263 |
|
(setq def (cddr def))) |
264 |
(let ((arglist (cond ((byte-code-function-p def) |
(let ((arglist (cond ((byte-code-function-p def) |
265 |
(car (append def nil))) |
(car (append def nil))) |
266 |
((eq (car-safe def) 'lambda) |
((eq (car-safe def) 'lambda) |