Parent Directory | Revision Log
|Links to HEAD:||(view) (annotate)|
* contrib/slime-cl-indent.el (define-common-lisp-style "basic"): Don't set `comment-column' to NIL, it only can accept integers.
slime-indentation: don't indent non-lists as if they were lambda-lists Not even if they appear where a lambda-list is expected. Makes TENTATIVE-DEFUN logic more correct for things like (define-foo name :option1 bar :option2 quux) which previously indented as (define-foo name :option1 bar :option2 quux) .
slime-indentation: correct indentation for &AUX value forms in lambda-lists
slime-indentation: fix long lines
slime-indentation: identify initial-value-forms in lambda-lists ...and indent them as regular code, not as lambda-lists.
slime-indentation: fix indentation of (foo ;; comment\n... (foo ;; Deal with bar (bar) ;; Deal with quux (quux)) instead of (foo ;; Deal with bar (bar) ;; Deal with quux (quux))
slime-indentation: better treatment of feature expressions Particularly interaction with keyword arguments.
slime-indentation: fix local function lambda-list indentation
slime-indentation: wrap initialization into a function
slime-indentation: recognize :foo and #:foo style loop keywords Patch from Didier Verna.
slime-indentation: XEmacs compatibility Patch from Didier Verna.
slime-indentation: still more work on loop indentation (loop repeat 1000 do ;; This is the ;; beginning (foo)) (loop repeat 100 ;; This too ;; is a beginning do (foo))
slime-indentation: better DEFCLASS and DEFINE-CONDITION superclass indentation
slime-indentation: add !def-debug-command to "sbcl" style
slime-indent: DEFMETHOD indentation when the name is a SETF-name and qualifiers are present * slime-cl-indent.el (lisp-beginning-of-defmethod-qualifiers): Renamed from `lisp-beginning-of-defmethod'. Skip the method name as well, since unlike qualifiers it can be list -- eg. (setf foo). (lisp-indent-defmethod): Use the above to get the number of skips right. * slime-cl-indent-test.txt: Tests 64 and 65.
slime-indent: make it possible to run only a specific test Useful for debugging.
slime-indent: improve indentation of comments in LOOPs
slime-indent: add !DEF-TYPE-TRANSLATOR indentation to "sbcl" style
slime-indent: two patches from Tomohiro Matsuyama * slime-cl-indent.el (define-common-lisp-style): Fix handling of :documentation option, which accidentally threw out the docstring. (lisp-indent-lambda-list-keywords-regexp): Handle trailing &allow-other-keys correctly. * slime-cl-indent-test.txt: Tests 50-53.
slime-indentation: tweak COND indentation Indent (cond (symbol (foo) (bar))) not (cond (symbol (foo) (bar))) -- should not change anything unless there is a form on the same line with a test that's a symbol.
slime-indentation: small fixes * Two defcustoms had wrong types. * Make the common-lisp-style-default offer a dropdown menu in the customization group. * "sbcl" style used :as instead of as, and missed defmacro-mundanely and define-source-transform.
slime-indentation: with-compilation-unit indentation Add indentation method for it.
slime-indentation: incomplete destructuring tails Fixes: (let (foo bar quux) ...) to indent as (let (foo bar quux) ...) instead.
slime-indentation: don't consider DEFINER and DEFINITION to be defun-like They're normally not.
slime-indentation: even better defmethod indentation Fix indentation of non-toplevel defmethods, and Handle qualifiers in defgeneric :methods as well.
slime-indentation: more XEmacs compatibility Hopefully this is all...
slime-indentation: XEmacs compatibility Kudos for Raymond Toy for being the intrepid tester.
slime-indentation: refactor named styles Now changes from a redefined style take immediate effect, including inheritance. (Previously you had to redefine the style you wanted to see the changes in as well, and then use common-lisp-set-style to activate it again.) Additionally, calling `common-lisp-set-style' is no longer necessary: just setting the buffer-local variable will cause the style to activate as long as common-lisp-indent-function is being used. (It remains a /good idea/ to call it, though, and that's what we do in the lisp-mode hook.) How this works: * common-lisp-styles now stores the specifications only: inheritance is marked there, but its effects are not precomputed. * common-lisp-active-style holds a cons: (<style> . <methods>) where <style> is the specification for the currently active style, and <method> is a hash-table of indentation method for it -- including inherited methods. * common-lisp-get-indentation calls common-lisp-active-style-methods, which does: (eq (car common-lisp-active-style) (gethash common-lisp-style common-lisp-styles)) If this is true, it just returns the table in the cdr. Otherwise it calls common-lisp-activate-style to compute the methods, which also binds any local variables, runs initialization hooks, etc. * defining or redefining a style copies of style specifications currently in common-lisp-styles, so next time common-lisp-get-style is called, methods are computed anew, etc.
slime-indentation: indent boa-constructor lambda-lists properly
slime-indentation: missing paren
slime-indentation: fix , and ,@ at the start of the indentation Use the first comma as the basis.
swank: better macro-indentation lisp-indent-259 didn't handle complex destructuring right: &whole nested in &whole wasn't working properly. Now it hopefully does. (But the whole indentation spec walking really deserves a rewrite.) Derived indentation: * Walk the entire macro lambda-list instead of just looking for &BODY in the toplevel. * Set the base indentation to 4 in macro-indentation only for the first level of destructuring -- use 1 later. now (defmacro foo (x (&rest args) &body body) ...) gives (foo (bar quux zot) (a b c d) ...) instead of the old (foo (bar quux zot) (a b c d) ...) While this change may turn out to be controversial, I feel that since FOO and (&REST FOO) are semantically equivalent as long as the corresponding argument is not an atom, it seems most natural to treat them as indentation hints instead. Complaints to the usual address...
slime-indentation: hack comment indentation in "basic" style All styles inherit from it, so everyone benefits. Haters gonna hate, but this fixes (foo (;; bar bar)) getting a space inserted between ( and ;.
slime-indentation: another bug in the fallback method Handle (foo ( bar quux zor)) and similar.
slime-indentation: refactor tests Move all test-cases to a new file: slime-cl-indent-test.txt.
slime-indentation: bugfix in fallback method
fix lisp-lambda-list-keyword-parameter-alignement docstring
fix typo in define-common-lisp-style "modern"
slime-indentation: per-package indentation from swank SWANK sends indentation information for macro-lambda lists to the Emacs side. Prior to this, however, this was a lossy N->1 mapping, where different symbols with the same name from multiple packages were conflated. Now an indentation update also includes a list of packages where the symbol in question is accessible. If slime-indentation is not being used, this information is dropped by Emacs. If, however, slime-indentation is used, the package information is stored in common-lisp-system-indentation hash-table, which is used as a fallback when indentation from other sources is not available for the symbol in question. Package used for looking up the indentation spec is either picked up from the package qualifier in the source, or guessed from the buffer.
slime-indentation: named Common Lisp styles I need to edit files with somewhat different Common Lisp indentation style regularly, and I doubt I'm the only one. `define-common-lisp-style' can be used to define new styles. If you define one that you use in an open-source project, please consider submitting it for inclusion. * Styles can inherit from each other. * Styles can specify buffer local variables. * Styles can have custom indentation rules. * Styles activation can evaluate code, so they can turn on minor modes, etc. A style can be specified for a while by doing: ;; -*- common-lisp-style: stylename -*= Some predefined styles: * basic: provides defaults * classic: emulates the 1995 vintage indentation from old slime-indentation * modern: a good pick. Turns on lambda-list smarts, but keeps more conservative loop indentation. * sbcl: SBCL style. Adds indentation for some SBCL bootstrapping constructs, sets indent-tabs-mode to nil, etc.
slime-indentation: indirect indentation specs Previously, if something was aping the indentation of another form, redefinitions weren't being picked up. Now, setting the common-lisp-indent-function property of a symbol -- say bar -- to: (as foo) means to indent (bar ...) forms as if they were (foo ...) forms. If indentation of foo changes, bar will immediately get the new indentation as well.
slime-indentation: fallback method for trailing expressions on prev line Emacs' calculate-lisp-indent doesn't indent (foo (or x y) t z) right, but would align Z with Y. Add a fallback method to deal with that.
slime-indentation: better named-lambda and destructuring-bind indentation Make both apply the newfangled lambda-list indentation mechanism.
slime-indentation: support for turning off lambda-list indentation By request. (setq lisp-lambda-list-indentation nil) and lambda-lists will be more boring than ever before.
slime-indentation: aligning keywords in calls Provides (make-instance 'foo :bar t :quux t :zot t) and (vecto:with-canvas (:height 42 :width 100) (save-png foo)) Controlled via lisp-align-keywords-in-calls.
slime-indention: add support for short form DEFSETF
slime-indentation: fix indentation of function calls inside loop forms ...and add a test-case.
slime-indentation: better multiform loop bodies better When subclause indentation is disabled: (loop repeat n do (foo) finally (fini1) (fini2) (fini3)) fixes the previous commit that didn't get this right if there were more than 2 subforms. Duh.
slime-indentation: one more loop indentation option Catering for: (loop for x in xs do (foo x) finally (bar x) (quux x))
slime-indentation: nicer newline-and-indent interaction with loop indentation (For non-subclause aware loop indentation.)
slime-indentation: better #+foo support (list bar #+foo (foo) #-foo (no-foo)) instead of (list bar #+foo (foo) #-foo (no-foo)) .
Make sure indent-tabs-mode is nil in tests.
Use back-to-indentation instead of reinventing it.
slime-indentation: support for IF* From Gabor Melis' post to slime-devel 2011-01-24.
slime-indentation: fix indentation of sublists in destructuring lambda-lists Simply apply the existing logic even if the path is not empty: (defmacro foo ((&optional o1 o2 &rest rest) &body body) ...) instead of: (defmacro foo ((&optional o1 o2 &rest rest) &body body) ...)
slime-indentation: rudimentary tests Too damn easy to break things otherwise.
slime-indentation: identify &more in lambda-lists
slime-indentation: sexp-based traversal for lambda-list indentation Fixes indentation of destructuring lambda-lists. Not: (defmacro with-foo ((foo &rest args) &body body) ...) but: (defmacro with-foo ((foo &rest args) &body body) ...)
slime-indentation: indent forms following #+foo specially
slime-indentation: whitespace changes Delete trailing whitespace, untabify, and fix part of the indentation.
slime-indentation: subclause aware loop indentation Adapted from cl-indent-patches.el. Setting lisp-loop-indent-subclauses to nil causes old indentation method to be used. Default is t.
slime-indentation: handle both split and unsplit loops A "split" loop is one where the body does not start on the same line as the opening parenthesis: (loop for x in ...) Replace extended-loop-p with common-lisp-loop-type, returning either 'simple, 'extended, or 'extended/split. Adjust indentation in common-lisp-loop-part-indentation based on that. Since previously loop customization variables were mostly for picking either the split or the unsplit style, remove them except for lisp-simple-loop-indentation: old settings for the others would not produce the intended results anymore. Now both (loop for x in list1 for y in ...) and (loop for x in list1 for y in ...) styles work out of the box.
slime-indentation: make indent-sexp work properly for loop indentation Prior to this indent-sexp didn't indent loops properly, but simply aligned all lines of the loop body. common-lisp-loop-part-indentation needs to return a list of (<indent> <loop-start>) to let calculate-lisp-indent know that the following lines might have a different indentation.
slime-indentation: fix indentation inside ,(...) and ,@(...) For some unfathomable reason indetation logic was explicitly turned off for these -- but since these sections are evaluated, they should clearly be indented as code.
slime-indentation: fix handling of (... &rest not-a-cons) indentation specs Previously if the expression following &rest in a cl-indent indentation spec was not a cons, all but the first form of the tail got normal indentation instead of the specified one, causing eg. PROG to be indented wrong. As far as I can tell the first leg of the COND that this patch deletes was never correct.
slime-indentation: don't take `default' for a tentative defun cl-indent.el assumed that anything starting with `def' is a defining form, which is mostly a good assumption, but breaks horribly with `default', which isn't even all that rare. This patch fixes indentation of defclass :default-initargs, among other things.
slime-indentation: better defmethod and lambda-list indentation From Didier Verna's patch sent to GNU Emacs mailing list. * cl-indent.el: Advertise the changes and remove obsolete TODO entries. * cl-indent.el (lisp-lambda-list-keyword-alignment): * cl-indent.el (lisp-lambda-list-keyword-parameter-indentation): * cl-indent.el (lisp-lambda-list-keyword-parameter-alignment): New customizable user options. * cl-indent.el (lisp-indent-defun-method): Improve docstring. * cl-indent.el (extended-loop-p): Fix comment. * cl-indent.el (lisp-indent-lambda-list-keywords-regexp): New variable. * cl-indent.el (lisp-indent-lambda-list): New function. * cl-indent.el (lisp-indent-259): Use it. * cl-indent.el (lisp-indent-defmethod): Support for more than one method qualifier and properly indent methods lambda-lists. * cl-indent.el: Provide a missing common-lisp-indent-function property for defgeneric.
slime-indentation: switch to current GNU Emacs cl-indent.el The old version inlined in slime-indentation.el was from 1995. This should make it easier to merge our changes back into Emacs. To that end, don't inline the file, but keep it as slime-cl-indent.el instead.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.
|Powered by ViewVC 1.1.5|