comparison lisp/hyperbole/hact.el @ 171:929b76928fce r20-3b12

Import from CVS: tag r20-3b12
author cvs
date Mon, 13 Aug 2007 09:47:52 +0200
parents 376386a54a3c
children
comparison
equal deleted inserted replaced
170:98a42ee61975 171:929b76928fce
53 ((and (listp function) 53 ((and (listp function)
54 (eq (car function) 'autoload)) 54 (eq (car function) 'autoload))
55 (error "(action:commandp): Autoload not supported: %s" function)) 55 (error "(action:commandp): Autoload not supported: %s" function))
56 (t function)))) 56 (t function))))
57 (if (hypb:v19-byte-code-p action) 57 (if (hypb:v19-byte-code-p action)
58 (if (commandp action) 58 (cond ((fboundp 'compiled-function-interactive)
59 (list 'interactive (aref action 5))) 59 (compiled-function-interactive action))
60 ((commandp action)
61 (list 'interactive (aref action 5))))
60 (commandp action)))) 62 (commandp action))))
61 63
62 (defun action:create (param-list body) 64 (defun action:create (param-list body)
63 "Create an action defined by PARAM-LIST and BODY, a list of Lisp forms." 65 "Create an action defined by PARAM-LIST and BODY, a list of Lisp forms."
64 (if (symbolp body) 66 (if (symbolp body)
78 ((listp action) 80 ((listp action)
79 (if (eq (car action) 'autoload) 81 (if (eq (car action) 'autoload)
80 (error "(action:params): Autoload not supported: %s" action) 82 (error "(action:params): Autoload not supported: %s" action)
81 (car (cdr action)))) 83 (car (cdr action))))
82 ((hypb:v19-byte-code-p action) 84 ((hypb:v19-byte-code-p action)
83 ;; Turn into a list for extraction 85 (if (fboundp 'compiled-function-arglist)
84 (car (cdr (cons nil (append action nil))))))) 86 (compiled-function-arglist action)
87 ;; Turn into a list for extraction
88 (car (cdr (cons nil (append action nil))))))))
85 89
86 (defun action:param-list (action) 90 (defun action:param-list (action)
87 "Returns list of actual ACTION parameters (removes '&' special forms)." 91 "Returns list of actual ACTION parameters (removes '&' special forms)."
88 (delq nil (mapcar 92 (delq nil (mapcar
89 (function 93 (function