~ubuntu-branches/ubuntu/trusty/slime/trusty-proposed

« back to all changes in this revision

Viewing changes to contrib/slime-indentation-fu.el

  • Committer: Bazaar Package Importer
  • Author(s): Peter Van Eynde, Torsten Landschoff, Peter Van Eynde
  • Date: 2009-06-17 22:38:38 UTC
  • mfrom: (1.5.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090617223838-d46ego7v4diibsj5
Tags: 1:20090616-1
[ Torsten Landschoff ]
* slime.el: Populate slime-lisp-implementations from known common
  lisp implementations on PATH (closes: #491602).

[ Peter Van Eynde ]
* New upstream. Removed xref.lisp (Closes: #527524) 
* fixed building instructions
* New upstream version. 
  Code rewrite that (Closes: #410856)
  Also fixes the swank-in-swank problem (Closes: #457648)
* Removed xref.lisp again and added a test in the makefile for it
  (Closes: #517205)
* Fixed typo in swank-loader.lisp that creates spurious warnings.
  (Closes: #477265)
* add a conflict for emacs21. xemacs. Limiting compatiblity to
  emacs22 will already be a challenge.
  (Closes: #517839, #478355)
* Move to debhelper v7 
* updated standard version without any real changes 
* use dh_prep instead of dh_clean -k
* fix debhelper dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    (let* ((local-arglist (slime-enclosing-macro-arglist form-operator))
45
45
           (indent-spec   (if local-arglist
46
46
                              (slime-indentation-spec local-arglist)
47
 
                              (get (intern-soft form-operator) 'slime-indent))))
 
47
                              (get (intern-soft form-operator)
 
48
                                   'slime-global-indent))))
48
49
      ;; If no &BODY appeared in the arglist, indent like a casual
49
50
      ;; function invocation.
50
51
      (unless indent-spec
53
54
       indent-spec path containing-form-start sexp-column normal-indent))))
54
55
 
55
56
(defun slime-update-local-indentation (ops arg-indices points)
56
 
  (loop for name in (car (slime-find-bound-macros ops arg-indices points)) do 
57
 
        (put (intern name) 'slime-local-indent t) ; unused at the moment, for debugging.
58
 
        (put (intern name) 'common-lisp-indent-function 'slime-indent-fu)))
 
57
  (loop for name in (car (slime-find-bound-macros ops arg-indices points)) do
 
58
        (let ((s (intern name)))
 
59
          ;; N.B. cases to take into considerations: local macro is
 
60
          ;; named like an already existing global macro; such a
 
61
          ;; global macro is redefined with a different lambda-list;
 
62
          ;; initially there's no global macro, but it's added later.
 
63
          ;;
 
64
          (put s 'slime-local-indent t)          ; unused at the moment, for debugging.
 
65
          (unless (eq (get s 'common-lisp-indent-function) 'slime-indent-fu) 
 
66
            (put s 'slime-global-indent (get s 'common-lisp-indent-function)))
 
67
          (put s 'common-lisp-indent-function 'slime-indent-fu)
 
68
          (put s 'slime-indent 'slime-indent-fu) ; for redefinition to be taken up
 
69
          )))
59
70
 
60
71
(defun slime-indentation-fu-init ()
61
72
  (add-hook 'slime-autodoc-hook 'slime-update-local-indentation))