/[slime]/slime/swank.lisp
ViewVC logotype

Diff of /slime/swank.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.747 by nsiivola, Tue Jun 14 15:34:18 2011 UTC revision 1.748 by nsiivola, Thu Jun 16 08:29:17 2011 UTC
# Line 3948  in Emacs." Line 3948  in Emacs."
3948        nil))        nil))
3949    
3950  (defun macro-indentation (arglist)  (defun macro-indentation (arglist)
3951    (labels ((walk (list &optional base)    (if (well-formed-list-p arglist)
3952               (when (consp list)        (position '&body (remove '&optional (clean-arglist arglist)))
3953                 (let ((head (car list))        nil))
                      (n (if base 4 1)))  
                  (cond ((consp head)  
                         (let ((indent (walk head)))  
                           (cons (list* "&whole" n indent) (walk (cdr list) base))))  
                        ((eq '&body head)  
                         '("&body"))  
                        ((member head lambda-list-keywords)  
                         (if (member head '(&rest &key))  
                             (list "&rest" n)  
                             (walk (cdr list) base)))  
                        (t  
                         (cons n (walk (cdr list) base))))))))  
     (walk arglist t)))  
3954    
3955  (defun clean-arglist (arglist)  (defun clean-arglist (arglist)
3956    "Remove &whole, &enviroment, and &aux elements from ARGLIST."    "Remove &whole, &enviroment, and &aux elements from ARGLIST."

Legend:
Removed from v.1.747  
changed lines
  Added in v.1.748

  ViewVC Help
Powered by ViewVC 1.1.5