GithubHelp home page GithubHelp logo

clojure-emacs / clojure-mode Goto Github PK

View Code? Open in Web Editor NEW
900.0 900.0 248.0 24.08 MB

Emacs support for the Clojure(Script) programming language

Makefile 0.10% Emacs Lisp 97.61% Clojure 2.29%
clojure clojure-mode emacs emacs-lisp emacs-package major-mode

clojure-mode's People

Contributors

amalloy avatar anthonygalea avatar bbatsov avatar benedekfazekas avatar bonega avatar bonifaido avatar bost avatar cichli avatar drone29a avatar hugoduncan avatar jeffvalk avatar jochu avatar juergenhoetzel avatar kototama avatar magnars avatar malabarba avatar oknolombarda avatar p4v4n avatar pjstadig avatar rlbdv avatar samaaron avatar scottjad avatar syohex avatar tavisrudd avatar technomancy avatar ucieee avatar vemv avatar vspinu avatar xiongtx avatar yuhan0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clojure-mode's Issues

What is the appropriate way to use SLIME via an old clojure-mode version?

I get that nREPL is the future, but I use SLIME's inspector on a daily basis and can't make the switch quite yet.
It looks like two weeks ago a new version of clojure-mode was released with the SLIME support cut, which I only discovered when putting my emacs config onto a clean machine.

I used to have all my emacs bits checked into git, but I switched to emacs-starter-kit 2.0 which recommends using the emacs24 package manager over direct checkins or submodules.
So how can I get an older version of clojure-mode so I can keep working?

According to this Emacs documentation, I should hold clojure-mode back.
Marmalade's clojure-mode page doesn't list any other available versions besides 2.0.0, so I tried digging through the commits and found "1.11.5".
Adding this to my init.el:

(setq package-load-list '((clojure-mode "1.11.5") all))

and running

(package-install 'clojure-mode)

returns a package not found error.

What's the proper way to use an older version of clojure-mode?
Or should I give up on package.el and just check in the version manually into my emacs config repo?

Keywords ending in # aren't correctly highlighted

I've tried to hack a solution but I appear to be lost in a sea of unfamiliar regex syntax.

It appears that line 520 is close to the issue:

  ;; Constant values (keywords), including as metadata e.g. ^:static
  ("\\<^?:\\(\\sw\\|#\\)+\\>" 0 font-lock-builtin-face)

somehow the end of word matcher \\> inhibits # from being the end of a keyword.

Loading the slime payload upsets clojure-mode's formatting

When given a form like

(deftest ^{:regression true} test-blah
  ...)

clojure-mode will format it by indenting the "..." two spaces from the margin. After M-x clojure-jack-in, clojure-mode will indent the "..." underneath the metadata map.

Repro steps using swank-clojure 1.3.4 and clojure-mode c858a:

  1. Format the test source file with clojure-mode, and notice that "..." is indented two spaces.
  2. M-x clojure-jack-in
  3. C-c C-k to compile the test namespace.
  4. Format the source file with clojure-mode and notice that the "..." is indented to line up with the metadata map.
  5. Open clojure-mode.el and C-c v.
  6. Go back to the test source file, format with clojure-mode, and notice that the "..." is indented two spaces.

After performing a bisect it appears this problem was introduced in cdfc45.

Certain comments break check-parens (and hence paredit)

With Emacs HEAD and the latest clojure-mode from git, check-parens breaks when the following comment is in a file, claiming that there are unmatched parens.

; e.g. Foo StartTime="2008-09-28T14:38:53Z

I presume that the syntax table is slightly confused, and the unmatched quote therefore gets treated as a broken sexp; the same comment passes check-parens when dropped into an elisp file.

When check-parens fails, paredit can't be enabled. (gasp!)

I don't know if it's related, but I also noticed that emacs' notion of sexps varies between emacs-lisp and clojure source; in the former, any number of consecutive comments are treated as a single sexp for the purpose of 'forward-sexp etc., even when separated by blank lines. In clojure-mode, forward-sexp at the beginning of this line:

;; Parse dates/times in common string formats

moves point to just before "Parse". This seems like an error to me.

-Steve

Better integration with swank-cdt

(As discussed between myself and technomancy here: http://clojure-log.n01se.net/#12:21)

We should make it possible to invoke a clojure instance prepped for CDT without the user having to modify the project file. This could happen with a prefix argument to clojure-jack-in or maybe a related start function such as clojure-jack-in-debug.

There are three potential parts to this:

  1. Add "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n" to the Java options.
  2. Add tools.jar and sa-jdi.jar from $(JAVA_HOME)/../lib to the classpath of the invoked JVM. (CDT tries to add these to the classpath with add-classpath, but doesn't always seem to succeed.)
  3. Add a dependency to clojure-source.

Of these three, #1 is clearly required, #2 would make the whole structure more reliable, and I don't even know how we'd make #3 happen in the current structure (esp., since clojure-source doesn't seem to be pushed reliably).

We may want to do the underlying implementation a part of a new option to lein jack-in (e.g., "lein jack-in debug") so that it can be used by tools other than emacs, but that's obviously a matter for your judgment.

clojure-slime-config doesn't add swank-clojure.jar onto the classpath

I've been getting errors when running M-x slime, saying that swank-clojure isn't on the classpath...

Altering the setq for swank-clojure-classpath inside the clojure-slime-config function seems to fix this... e.g.

From this:

(setq swank-clojure-classpath
      (list
       (concat clojure-src-root "/clojure/clojure.jar")
       (concat clojure-src-root "/clojure-contrib/clojure-contrib.jar")))

To this:

(setq swank-clojure-classpath
      (list
       (concat clojure-src-root "/clojure/clojure.jar")
       (concat clojure-src-root "/swank-clojure/swank-clojure.jar")
       (concat clojure-src-root "/clojure-contrib/clojure-contrib.jar")))

bug - clojure-match-next-def d/n work correctly, (potential fix attached)

Hi, I'm your neightbor over at https://github.com/mgrisius/clj-mode. Steve Purcell (https://github.com/purcell) suggested that I share a potential fix.

I noticed that clojure-match-next-def d/n work correctly. Using `clojure-1.4.0/src/clj/clojure/core.clj' as a test use case over 20 of 571 defs or ~4% were missing from index, plus erroneous entries were added too!

Here is my approach that might help the community at large:

(defun clj-mode-next-def ()
"Scans the buffer backwards for the next top-level definition."
(when (re-search-backward "^(def\sw*" nil t)
(save-excursion
(let ((def-name nil)
(start (point)))
(down-list)
(forward-sexp)
(while (not def-name)
(forward-sexp)
(or (if (char-equal ?[ (char-after (point)))
(backward-sexp))
(if (char-equal ?) (char-after (point)))
(backward-sexp)))
(destructuring-bind (def-beg . def-end) (bounds-of-thing-at-point 'sexp)
(if (not (char-equal ?^ (char-after def-beg)))
(progn (setq def-name t) (set-match-data (list def-beg def-end)))
(progn (forward-sexp) (backward-sexp)))))
(goto-char start)))))

Hope that helps, thanks!

Install question for emacs first-timer

I just installed emacs24 and I'm trying to get to the point where I can run clojurescriptone's repl from emacs so I'm guessing that I'll need this for emacs so that the repl will run when I put it into inferior-lisp mode as I saw in clojurescript one's video.

I'm very new at emacs, knowing a smidgen of the basics from the tutorial, so I've never installed a new mode.

I'm working on a Windows7 machine, if that means anything.

My first question (aside from the request for any corrections if you sense my trajectory is erroneous in terms of the goals I've stated in the above preface) is--

Since I know that package.el comes with emacs24 I tried the "M-x package-install clojure-mode" command and get a notice saying it doesn't exist. So I need to download it, I assume, but I've never done anything like this so I need to know how I do it. Specifically, of the files in the table above the read me section how do I go about downloading those, I mean do I place them in a text file, where relative to the emacs path do I place them and do I need to use any program to do it or do I just copy and paste into a text file?

A million thanks to anyone that can either point me to the answer or can step me through this. If I knew where to look for this answer I promise I wouldn't go through this and waste anyone's time but I'm at a loss and am finding that I move a lot faster and learn a lot faster and have an overall better experience when I'm more willing to ask what seem to have the potential to be dumb questions.

getRoot causes throw when working with Clojure 1.3.0-beta1

Applies to

Steps to Reproduce

  • Create a new lein project that has clojure 1.3.0-beta1 as a dependency and swank-clojure 1.4.0-snapshot as a dev dependency.
  • Connect via SLIME/emacs to the new project
  • Write a trivial test
  • Run test via C-c ,
  • Observe the following exception:
No matching field found: getRoot for class clojure.lang.Var
  [Thrown class java.lang.IllegalArgumentException]

Restarts:
 0: [QUIT] Quit to the SLIME top level

Backtrace:
  0: clojure.lang.Reflector.getInstanceField(Reflector.java:289)
  1: clojure.lang.Reflector.invokeNoArgInstanceMember(Reflector.java:318)
  2: clojure.test.mode$report.invoke(NO_SOURCE_FILE:1)
  3: clojure.test$do_report.invoke(test.clj:349)
  4: clojure.test$test_ns.invoke(test.clj:723)
  5: clojure.core$map$fn__3839.invoke(core.clj:2433)
  6: clojure.lang.LazySeq.sval(LazySeq.java:42)
  7: clojure.lang.LazySeq.seq(LazySeq.java:60)
  8: clojure.lang.Cons.next(Cons.java:39)
  9: clojure.lang.RT.boundedLength(RT.java:1607)
...

clojure-test-mode mode specification errors

I try to use clojure-test-mode and face with few problems.

First I try open test file with disconnected nREPL and without slime installation in my system.

I've got "File mode specification error: (void-function slime-connected-p)"

I think it wood be better to use something like "(when (fboundp 'slime-connected-p)
(slime-connected-p))" in the minor mode definition.

After it happens I try to open emacs without open any files, start nREPL with `nrepl-jack-in' command and open my test file. I've got something like this:

File mode specification error: (wrong-type-argument stringp (lambda (&rest --cl-rest--) (apply (quote #[(G97112 G97113 G97114 G97115 G97116 response) "\306\307�"A\306\310�"A\306\311�"A\306\312�"A\306\313�"A\306\314�"A\306\315�"A\306\316�"A���������\211��\203Y

When I try `clojure-test-run-tests' I've got message below

nrepl-netstring: Wrong type argument: stringp, (lambda (&rest --cl-rest--) (apply (quote #[(G97112 G97113 G97114 G97115 G97116 response) "ÆÇ�"AÆÈ�"AÆÉ�"AÆÊ�"AÆË�"AÆÌ�"AÆÍ�"AÆÎ�"A�������������Y

What is this at all?!

If I use "(run-tests)" command directly in repl buffer it will process perfectly.

P.S. This is part of my .emacs file for clojure support:

(require 'clojure-mode)
(require 'clojure-test-mode)
(require 'nrepl)
(add-hook 'clojure-mode-hook 'nrepl-interaction-mode)

clojure-jack-in uses incorrect path on windows

Hello,

clojure-jack-in creates the shell-command
cd ~/clojure/scripts/myproject/ && lein jack-in 46284
which won't work under windows.

I changed
(format clojure-swank-command clojure-root clojure-swank-port) to
(format clojure-swank-command (expand-file-name clojure-root) clojure-swank-port)
which worked for me...

Thanks!

Binding for "C-c t" violates Emacs key binding conventions

clojure-mode currently binds C-c t to clojure-jump-to-test. This violates Emacs's key binding conventions:

Don't define C-c letter as a key in Lisp programs. Sequences consisting of C-c and a letter (either upper or lower case) are reserved for users; they are the only sequences reserved for users, so do not block them.

Changing all the Emacs major modes to respect this convention was a lot of work; abandoning this convention would make that work go to waste, and inconvenience users. Please comply with it.

Key Binding Conventions, Emacs Lisp Manual

Docstring with map breaks font locking

This function breaks font locking in my Emacs 23.3.1. I raised a separate issue with nrepl.el for the evaluation issue.

(defn xxx 
  "This docstring breaks font lock and eval.
{:key [values] :anotherkey [more values]}"
  [] (str "this breaks font lock "
          "and C-M-x in nrepl"))

To all those following both projects: Please excuse the duplicate noise. To me it feels like to separate issues. Hope this is correct.

Regards,
Stefan

best workflow with testing

Hello,

I'm currently trying to create some serious project with clojure using aquaemacs, leiningen, nrepl and clojure-mode. I faced quite a problem for me: how can I test my code in REPL? I want to have 2 files, first one with code, the second with tests. What's the best approach of doing it in "one-click" manner with autoreloading, switching buffers, don't asking for save etc. Just ONE step. I don't want to use lein test, it takes too long.
Any suggestion is worthy for me :)

thanks,
Bartek

clojure-test-maybe-enable issue

Hi! Is it my impression, or the current definition of the clojure-test-maybe-enable has two setbacks?

  • First, it doesn't do anything related to the directory the file is in, unlike the docstring statement.
  • Second, the check it does will search for "clojure.test" on the file - isn't that somehow limitative (despite the fact that it won't be a good detection method, if the file contains that string in a comment somewhere else besides the namespace, e.g. ...)

I propose the following change, as it works for - what i believe to be - the right way to specify tests:

(defun clojure-test-maybe-enable ()
  "Enable clojure-test-mode if the current buffer contains a namespace 
   with a \"test.\" bit on it."
  (let ((ns (clojure-find-package))) ; defined in clojure-mode.el
    (when (search "test." ns)
  (clojure-test-mode t))))

What do you think?

RET behavior is non-standard

By default, RET calls reindent-then-newline-and-indent. This breaks tradition with most programming modes for Emacs, which instead call newline.

This is really a personal preference thing. The default behavior should be like all the other programming modes for Emacs, and if the user doesn't like this (as many folks don't) it can of course be customized.

Syntax highlighting on Java with numbers

Hi, importing the following class

(:import (ncsa.hdf.hdf5lib HDF5Constants))

The syntax highlighter skips HDF5 and highlights only Constants, this seems
to be the case anytime a number is next to a capital at the start of a variable/class.

Not properly indenting "let" binding sequences

"let" binding blocks containing complex bindings are not indented properly.

(let [[x
       y] (range 2)

       [a b] (["foo" "bar"])]
  (print x y a b))

Notice that the line that starts with [a ...] is lined up under the y in the line above. It should line up under the [x .... It appears to be a problem with having 2 s-expressions on the lines starting [x ...

Changes to clojure-swank-command breaks use under Windows

Since clojure-swank-command now tries to pipe to sh, clojure-jack-in doesn't work on Windows. This is what I get in swank when I try clojure-jack-in:

Process swank exited abnormally with code 255
'sh' is not recognized as an internal or external command,
operable program or batch file.

all-caps words get parsed as Java interop forms

All-caps words such as GET or POST get treated as Java interop forms. This is the culprit regex:

("\\<[A-Z][a-zA-Z0-9_]*[a-zA-Z0-9/$_]+\\>" 0 font-lock-preprocessor-face) ;; Foo Bar$Baz

Not sure if this is a bug or a feature - it is not too rare to find Clojurians typing their constants in caps... it's probably as likely as finding an all-uppercase Java class.

Replacing it for these

  ("\\<[A-Z_][a-z_/0-9]*\\>" 0 font-lock-preprocessor-face)
  ("\\<[A-Z].*\\>" 0 font-lock-preprocessor-face)

seems to works in that it covers all the test suite attached. Not sure if my solution is the best or generates false positives, though.

(comment
 _Bar .foo .barBaz .qux01 .-flibble .-flibbleWobble
 barFoo Foo Bar$Baz Qux_
 World_OpenUDP
 Foo/Bar
 Foo/
 AhenAenenAEnenAEnenAenenen
 Astr$Sstrst
 foo.bar.Baz foo.Bar/baz
 Foo. BarBaz. Qux$Quux. Corge9.
 Bar
 Bar_
 HTTP GET POST) ; these should be the only not rendered with font-lock-preprocessor-face

Enabling slime-mode for clojure-mode interferes with nrepl-mode

clojure-mode enables slime-mode for all Clojure buffers if slime is activated. Unfortunately, this interferes with nrepl-mode and you get "Not Connected" errors when trying to load file etc. The workaround is to disable slime-mode in a Clojure buffer which restores nrepl's correct functioning.

Locally I've edited my copy of clojure-mode to comment out the add-hook that enables slime-mode on Clojure buffers (the slime-connected-hook).

Now that swank-clojure is deprecated and everyone is being (strongly!) encouraged to switch to nrepl instead, it seems that clojure-mode should play nicer with nrepl?

(require 'swank-clojure-autoload) after swank-clojure-jar-path has been set

In clojure-slime-config
(require 'swank-clojure-autoload)
is called before swank-clojure-jar-path is set. This results in the error
"You must specifiy either a swank-clojure-binary or a swank-clojure-jar-path"
if all the used specified was clojure-src-root. Changing the order of (require...) and (setq...) in the definition of clojure-slime-config solves this issue.

clojure-jack-in on Windows, error in process filter: Non-hex digit used for Unicode escape

Emacs version 23.3.1

When I try to use clojure-jack-in I get the error above. I turned on debugging and get the message below.

Debugger entered--Lisp error: (error "Non-hex digit used for Unicode escape")
eval-region(43 746) ; Reading at buffer position 143
clojure-eval-bootstrap-region(#)
#[(G84100 G84101 process output) "r\305�!q\210 c\210)\306\307 "\205.

Running `clojure-test-run-tests` when using `nrepl.el` doesn't seem to work.

I'm only using emacs (and clojure) for a couple of months so I may be doing something wrong :(

Today I tried to use the nrepl.el plugin. When trying to run tests (e.g. the lein2 default generated test) it returns nil and it doesn't seem to run. Trying to compile/load the file again doesn't help.

The clojure-test-run-tests function causes another strange behavior:

  • I load the test file to nrepl.
  • I switch to the namespace of the test file
  • I run the tests with (run-tests)
  • It shows one test failed (as it should).
  • I switch to the test file and execute clojure-test-run-tests
  • Switching back to nrepl and running (run-tests) shows that 0 tests were running.
  • I have to load the test file again (e.g. with C-c, C-l) to make it run the tests again.

I'm using latest versions of everything (via melpa) and emacs 24.1.

Thanks

Test file location should mirror leiningen's project structure

Currently clojure-mode looks for src/my/project/frob.clj tests in test/my/project/test/frob.clj. Leiningen structures its projects to use test/my/project/frob_test.clj. Can clojure-mode use leiningen's project structure when looking for tests (or at least have the option)?

Add a 'setup' option (vs install)

Would be nice to have an M-x clojure-setup option, in addition to the M-x clojure-install, for people who already have Clojure repositories set up.

Another use case would be if for some reason the Git clone fails (e.g. on a crappy Comcast cable connection!). Having just spent several attempts (and bandwith) only to watch the clones of either -contrib or slime getting aborted, I ended up editing the clojure-mode.el file and commenting-out the checkout parts.

So if clojure-install clones the repositories and then hands off to clojure-setup, the latter can be called by people who have set up the repositories already (but might not want to set up Emacs by themselves).

Thanks for the good work -- I just persuaded a colleague to try Clojure, and clojure-mode (+ ELPA) definitely makes the task easier.

Integrate with Aquamacs (feature request)

This is a feature request, rather than a bugreport, since I know you don't claim support for Aquamacs.

Clojure-mode doesn't work with Aquamacs 2.4 (current). When I install clojure-mode 1.11.5 via marmalade, I get a problem

Compiling file /Users/norman/Library/Application Support/Aquamacs Emacs/elpa/clojure-mode-1.11.5/clojure-mode.el at Thu Jan 19 18:39:10 2012
clojure-mode.el:70:1:Warning: cl package required at runtime

In clojure-mode:
clojure-mode.el:194:34:Warning: reference to free variable `paredit-mode'
clojure-mode.el:194:51:Warning: reference to free variable `paredit-version'
....

I think that clojure-mode 1.10 has worked with this version.

Points:

  • Aquamacs is becoming the 'default' emacs on OS X. It's not literally the default, but it's becoming the standard answer to the question "I want to use emacs on OS X...", and when I see folk running emacs on OS X, it's usually Aquamacs. Google suggests there's quite a few people having this clojure-mode/Aquamacs problem.
  • I don't keep track of the lineages of emacs, so I don't know if this is a big ask.
  • The aquamacs developer -- see http://aquamacs.org/ -- is pretty responsive, and if there's something obvious missing from that version, it might be easy to get it included or adjusted as appropriate. If it'd be useful, I could make a feature request there matching this one.

Var metadata breaks the imenu index

For example, imenu index for core.clj (from clojure-1.2.1.jar) contains a lot of junk from the annotations:

unquote)
unquote-splicing)
'([&
'([x
true
'([coll])
'([coll
"Same
'([coll])
'([^Class

clojure-test-mode output is hard to read

Could you use flymakes faces if those are installed instead of defining your own? More people are likely to have flymake faces customized so that they are readable.

Also you can use an underline in red/yellow for your error faces, so text is easier to read. This is likely more compatible with most color-schemes as well.

Bug with nrepl-hide-special-buffers (??? and add-hook 'nrepl-mode-hook)

Hi everybody,

I am having problems with clojure-mode,
if I set
(setq nrepl-hide-special-buffers t)
it doesn't work and I still see the nrepl-connection and nrepl-server buffer when I switch buffers using C-x LEFT/RIGHT or when I use the switch-to-buffer command (either via C-x b and by the bar)

Then the nrepl doesn't work (it does not show the namespace> and when I press RET (enter) it reply "wrong type of argument: integer-or.marker-p, nil" ) if I either:
(add-hook 'nrepl-mode-hook 'paredit-mode)
or
(add-hook 'nrepl-mode-hook 'rainbow-delimiters-mode)

(I think, but I may be wrong that the problem is the add-hook)

My .emacs is here:
https://gist.github.com/siscia/5093718

Debugger entered--Lisp error: (wrong-number-of-arguments #[(sym indent)

Hi technomancy:
there is a debugger lisp error when I use emacs24.0.94 in win7 with "clisp", "sbcl" and "ccl" .
when I run M-x: slime, It gives the error:
------------detail info----------------

Debugger entered--Lisp error: (wrong-number-of-arguments #[(sym indent) "\302�\303 #\207" [sym indent put clojure-indent-function] 4] 3)
put-clojure-indent(with-stack-short-floats 1 ("X8632"))
run-hook-with-args(put-clojure-indent with-stack-short-floats 1 ("X8632"))
(let ((symbol (intern (car info))) (indent (slime-intern-indentation-spec (second info))) (packages (third info))) (if (boundp (quote common-lisp-system-indentation)) (slime-update-system-indentation symbol indent packages) (when (equal (get symbol (quote common-lisp-indent-function)) (get symbol (quote slime-indent))) (put symbol (quote common-lisp-indent-function) indent) (put symbol (quote slime-indent) indent))) (run-hook-with-args (quote slime-indentation-update-hooks) symbol indent packages))
(while --cl-dolist-temp-- (setq info (car --cl-dolist-temp--)) (let ((symbol (intern (car info))) (indent (slime-intern-indentation-spec (second info))) (packages (third info))) (if (boundp (quote common-lisp-system-indentation)) (slime-update-system-indentation symbol indent packages) (when (equal (get symbol (quote common-lisp-indent-function)) (get symbol (quote slime-indent))) (put symbol (quote common-lisp-indent-function) indent) (put symbol (quote slime-indent) indent))) (run-hook-with-args (quote slime-indentation-update-hooks) symbol indent packages)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))
(let ((--cl-dolist-temp-- alist) info) (while --cl-dolist-temp-- (setq info (car --cl-dolist-temp--)) (let ((symbol (intern (car info))) (indent (slime-intern-indentation-spec (second info))) (packages (third info))) (if (boundp (quote common-lisp-system-indentation)) (slime-update-system-indentation symbol indent packages) (when (equal (get symbol (quote common-lisp-indent-function)) (get symbol (quote slime-indent))) (put symbol (quote common-lisp-indent-function) indent) (put symbol (quote slime-indent) indent))) (run-hook-with-args (quote slime-indentation-update-hooks) symbol indent packages)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--))))
(catch (quote --cl-block-nil--) (let ((--cl-dolist-temp-- alist) info) (while --cl-dolist-temp-- (setq info (car --cl-dolist-temp--)) (let ((symbol (intern (car info))) (indent (slime-intern-indentation-spec (second info))) (packages (third info))) (if (boundp (quote common-lisp-system-indentation)) (slime-update-system-indentation symbol indent packages) (when (equal (get symbol ...) (get symbol ...)) (put symbol (quote common-lisp-indent-function) indent) (put symbol (quote slime-indent) indent))) (run-hook-with-args (quote slime-indentation-update-hooks) symbol indent packages)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))))
(cl-block-wrapper (catch (quote --cl-block-nil--) (let ((--cl-dolist-temp-- alist) info) (while --cl-dolist-temp-- (setq info (car --cl-dolist-temp--)) (let ((symbol (intern ...)) (indent (slime-intern-indentation-spec ...)) (packages (third info))) (if (boundp (quote common-lisp-system-indentation)) (slime-update-system-indentation symbol indent packages) (when (equal ... ...) (put symbol ... indent) (put symbol ... indent))) (run-hook-with-args (quote slime-indentation-update-hooks) symbol indent packages)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--))))))
(block nil (let ((--cl-dolist-temp-- alist) info) (while --cl-dolist-temp-- (setq info (car --cl-dolist-temp--)) (let ((symbol (intern (car info))) (indent (slime-intern-indentation-spec (second info))) (packages (third info))) (if (boundp (quote common-lisp-system-indentation)) (slime-update-system-indentation symbol indent packages) (when (equal (get symbol ...) (get symbol ...)) (put symbol (quote common-lisp-indent-function) indent) (put symbol (quote slime-indent) indent))) (run-hook-with-args (quote slime-indentation-update-hooks) symbol indent packages)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))))
(dolist (info alist) (let ((symbol (intern (car info))) (indent (slime-intern-indentation-spec (second info))) (packages (third info))) (if (boundp (quote common-lisp-system-indentation)) (slime-update-system-indentation symbol indent packages) (when (equal (get symbol (quote common-lisp-indent-function)) (get symbol (quote slime-indent))) (put symbol (quote common-lisp-indent-function) indent) (put symbol (quote slime-indent) indent))) (run-hook-with-args (quote slime-indentation-update-hooks) symbol indent packages)))
slime-handle-indentation-update((("with-stack-short-floats" 1 ("X8632")) ("defx8632archmacro" 2 ("X8632")) ("with-format-scan-options" 1 ("CCL")) ("with-lock-grabbed-maybe" 1 ("CCL")) ("defx862" 3 ("CCL")) ("with-ioblock-input-locked" 1 ("CCL")) ("lfunloop" 4 ("CCL")) ("with-package-write-lock" 1 ("CCL")) ("with-program-error-handler" 1 ("CCL")) ("allowing-deferred-gc" 0 ("CCL")) ("with-eagain" 2 ("CCL")) ("with-slot-values" 2 ("CCL")) ("defx86lapfunction" 2 ("CCL")) ("with-ioblock-output-lock-grabbed" 1 ("CCL")) ("with-node-target" 2 ("CCL")) ("%get-signed-natural" 0 ("CCL")) ("%get-natural" 0 ("CCL")) ("without-gcing" 0 ("CCL")) ("with-declarations" 1 ("CCL")) ("with-restart" 1 ("CCL")) ("with-auxiliary-foreign-types" 0 ("CCL")) ("with-deferred-gc" 0 ("CCL")) ("with-package-read-lock" 1 ("CCL")) ("with-preserved-working-directory" 1 ("CCL")) ("while" 1 ("CCL")) ("with-additional-imm-reg" 1 ("CCL")) ("with-call-method-context" 1 ("CCL")) ("ff-call-ignoring-eintr" 0 ("CCL")) ("with-dll-node-freelist" 1 ("CCL")) ("with-open-dir" 1 ("CCL")) ("with-note" 1 ("CCL")) ("ignoring-without-interrupts" 0 ("CCL")) ("with-area-macptr" 1 ("CCL")) ("with-standard-abort-handling" 1 ("CCL")) ("define-x8632-vinsn" 2 ("CCL")) ("once-only" 1 ("CCL")) ("def-kernel-restart" 3 ("CCL")) ("define-toplevel-command" 3 ("CCL")) ("defx86lapmacro" 2 ("CCL")) ("with-native-utf-16-cstrs" 1 ("CCL")) ("with-imm-target" 2 ("CCL")) ("with-cross-compilation-package" 1 ("CCL")) ("def-acode-rewrite" 4 ("CCL")) ("ignoring-eintr" 0 ("CCL")) ("with-x86-p2-declarations" 1 ("CCL")) ("with-package-list-read-lock" 0 ("CCL")) ("with-stream-ioblock-input" 1 ("CCL")) ("with-standard-initial-bindings" 0 ("CCL")) ("def-ccl-pointers" 2 ("CCL")) ("with-native-utf-16-cstr" 1 ("CCL")) ...))
slime-dispatch-event((:indentation-update (("with-stack-short-floats" 1 ("X8632")) ("defx8632archmacro" 2 ("X8632")) ("with-format-scan-options" 1 ("CCL")) ("with-lock-grabbed-maybe" 1 ("CCL")) ("defx862" 3 ("CCL")) ("with-ioblock-input-locked" 1 ("CCL")) ("lfunloop" 4 ("CCL")) ("with-package-write-lock" 1 ("CCL")) ("with-program-error-handler" 1 ("CCL")) ("allowing-deferred-gc" 0 ("CCL")) ("with-eagain" 2 ("CCL")) ("with-slot-values" 2 ("CCL")) ("defx86lapfunction" 2 ("CCL")) ("with-ioblock-output-lock-grabbed" 1 ("CCL")) ("with-node-target" 2 ("CCL")) ("%get-signed-natural" 0 ("CCL")) ("%get-natural" 0 ("CCL")) ("without-gcing" 0 ("CCL")) ("with-declarations" 1 ("CCL")) ("with-restart" 1 ("CCL")) ("with-auxiliary-foreign-types" 0 ("CCL")) ("with-deferred-gc" 0 ("CCL")) ("with-package-read-lock" 1 ("CCL")) ("with-preserved-working-directory" 1 ("CCL")) ("while" 1 ("CCL")) ("with-additional-imm-reg" 1 ("CCL")) ("with-call-method-context" 1 ("CCL")) ("ff-call-ignoring-eintr" 0 ("CCL")) ("with-dll-node-freelist" 1 ("CCL")) ("with-open-dir" 1 ("CCL")) ("with-note" 1 ("CCL")) ("ignoring-without-interrupts" 0 ("CCL")) ("with-area-macptr" 1 ("CCL")) ("with-standard-abort-handling" 1 ("CCL")) ("define-x8632-vinsn" 2 ("CCL")) ("once-only" 1 ("CCL")) ("def-kernel-restart" 3 ("CCL")) ("define-toplevel-command" 3 ("CCL")) ("defx86lapmacro" 2 ("CCL")) ("with-native-utf-16-cstrs" 1 ("CCL")) ("with-imm-target" 2 ("CCL")) ("with-cross-compilation-package" 1 ("CCL")) ("def-acode-rewrite" 4 ("CCL")) ("ignoring-eintr" 0 ("CCL")) ("with-x86-p2-declarations" 1 ("CCL")) ("with-package-list-read-lock" 0 ("CCL")) ("with-stream-ioblock-input" 1 ("CCL")) ("with-standard-initial-bindings" 0 ("CCL")) ("def-ccl-pointers" 2 ("CCL")) ("with-native-utf-16-cstr" 1 ("CCL")) ...)) #)
slime-process-available-input(#)
slime-net-filter(# ""CCL")) ("%stack-block" 1 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("rletz" 1 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("with-input-from-vector" 1 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("with-output-to-vector" 1 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("let-globally" 1 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("define-setf-method" 2 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("with-input-timeout" 1 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("rlet" 1 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("with-interrupts-enabled" 0 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("with-encoded-cstrs" 2 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("with-write-lock" 1 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("with-pointer-to-ivector" 1 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("with-output-timeout" 1 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("dovector" 1 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("without-compiling-code-coverage" 0 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("defcallback" 2 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("without-interrupts" 0 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("def-load-pointers" 2 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("without-duplicate-definition-warnings" 0 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("with-read-lock" 1 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("with-string-vector" 1 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("%vstack-block" 1 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("define-declaration" 2 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("with-cstrs" 1 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("with-terminal-input" 0 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("with-lock-grabbed" 1 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("catch-cancel" 0 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("with-open-socket" 1 ("COMMON-LISP-USER" "SWINK" "INSPECTOR" "OPENMCL-SOCKET" "CCL")) ("defarchmacro" 3 ("ARCH")) ("defx8664archmacro" 2 ("X8664")) ("with-errorfree-printing" 0 ("INSPECTOR")) ("with-swink-stream" 2 ("SWINK")) ("with-swink-lock" 1 ("SWINK")) ("with-return-values" 1 ("SWINK")) ("with-event-handling" 1 ("SWINK")) ("with-connection-lock" 1 ("SWINK")) ("with-loop-list-collection-head" 1 ("ANSI-LOOP")) ("with-minimax-value" 1 ("ANSI-LOOP")) ("with-slime-output-stream" 1 ("SWANK-BACKEND")) ("converting-errors-to-error-location" 0 ("SWANK-BACKEND")) ("with-frame" 2 ("SWANK-BACKEND")) ("defimplementation" 2 ("SWANK-BACKEND")) ("with-compilation-hooks" 1 ("SWANK" "SWANK-BACKEND")) ("with-struct" 2 ("SWANK" "SWANK-BACKEND")) ("when-let" 1 ("SWANK" "SWANK-BACKEND")) ("with-time/cons" 2 ("MONITOR")) ("with-monitoring" 2 ("MONITOR")) ("with-xref" 0 ("CROSS-REFERENCE" "COMMON-LISP-USER" "SWINK" "INSPECTOR" "CCL")) ("match" 1 ("SWANK" "SWANK-MATCH")) ("with-slime-interrupts" 0 ("SWANK")) ("define-channel-method" 2 ("SWANK")) ("without-slime-interrupts" 0 ("SWANK")) ("with-swank-error-handler" 1 ("SWANK")) ("with-buffer-syntax" 1 ("SWANK")) ("with-retry-restart" 1 ("SWANK")) ("without-printing-errors" 1 ("SWANK")) ("with-describe-settings" 1 ("SWANK")) ("with-top-level-restart" 1 ("SWANK")) ("with-io-redirection" 1 ("SWANK")) ("with-bindings" 1 ("SWANK")) ("with-struct*" 1 ("SWANK")) ("with-string-stream" 1 ("SWANK")) ("with-connection" 1 ("SWANK")) ("defslimefun" 2 ("SWANK")) ("with-panic-handler" 1 ("SWANK"))))")

In 8f4f9b2d clojure-jack-in breaks clojure-mode buffers

Hitting enter on any clojure-mode buffer after connecting to SLIME via clojure-jack-in results in

slime-to-lisp-filename: Symbol's function definition is void: slime-tramp-local-filename

To reproduce using latest HEAD of swank, clojure-mode and emacs 22.1.1 (mac-apple-darwin)

emacs -nw -Q
In scratch buffer, evaluate:

(add-to-list 'load-path "/path/to/slime")
(add-to-list 'load-path "/path/to/clojure-mode")

Open a clojure file,
M-x clojure-mode
M-x clojure-jack-in

Now in the clojure file buffer, hit enter or backspace and the error occurs.

clojure-fill-docstring error when fill-paragraph takes only one arg

clojure-fill-docstring throws an error in versions of Emacs in which fill-paragraph only accepts one argument.

My full version: "GNU Emacs 23.3.50.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54) of 2011-08-04 on braeburn.aquamacs.org - Aquamacs Distribution 2.3a"

clojure-test-mode not up-to date on marmalade repo

Running tests with clojure-test-mode on clojure 1.3.0 and 1.4.0-alpha fails by calling "getRoot" which doesn't exist there.
"getRawRoot" fixed the problem, but it isn't mirrored in the marmalade repo.

mismatch in test name convention between clojure-mode and clojure-test-mode.

Commit e753312 changed the convention for naming tests in clojure-mode to "test/foo", but in clojure-test-mode it's still "foo_test" which completely breaks clojure-jump-between-tests-and-code.

I'm not sure which is the right way so I can't submit a pull request (iirc a few months ago there was a change in the opposite direction) 😄 .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.