Hi, I'm setting up emacs/slime for the first time and I'm having some difficulties getting automatic bracket matching to work. I watched Marco Baringer's lisp video and I've got most of the useful features working like tab auto-completion and hyperspec lookup for example, but brackets don't seem to matched automatically like they were in Marco's video. For example whenever an opening bracket was typed a closing bracket would be inserted after the cursor, but this doesn't happen in my emacs/slime configuration.
My versions are the following: emacs-22.3-r1 slime-2.0_p20080731
Here is my emacs config for slime/lisp
(add-to-list 'load-path "/usr/share/emacs/site-lisp/slime") (require 'slime)
(slime-setup)
(setq inferior-lisp-program "/usr/bin/sbcl" slime-complete-symbol-function 'slime-fuzzy-complete-symbol common-lisp-hyperspec-root "file:///usr/share/doc/hyperspec-7.0/HyperSpec/" slime-enable-evaluate-in-emacs t slime-log-events t slime-outline-mode-in-events-buffer nil slime-repl-return-behaviour :send-only-if-after-complete slime-autodoc-use-multiline-p t slime-highlight-compiler-notes t browse-url-browser-function 'w3m)
(define-key global-map (kbd "<f12>") 'slime-selector) (define-key slime-mode-map (kbd "TAB") 'slime-indent-and-complete-symbol) (define-key slime-mode-map (kbd "C-c TAB") 'slime-complete-form)
Thanks in advance,
Adam
Adam, I suspect that Marco had ParEdit mode enabled in his Emacs, which did that bracket-magic. Look at http://www.emacswiki.org/cgi-bin/wiki/ParEdit
2009/2/5 Adam adam@fastmail.com.au:
Hi, I'm setting up emacs/slime for the first time and I'm having some difficulties getting automatic bracket matching to work. I watched Marco Baringer's lisp video and I've got most of the useful features working like tab auto-completion and hyperspec lookup for example, but brackets don't seem to matched automatically like they were in Marco's video. For example whenever an opening bracket was typed a closing bracket would be inserted after the cursor, but this doesn't happen in my emacs/slime configuration.
My versions are the following: emacs-22.3-r1 slime-2.0_p20080731
Here is my emacs config for slime/lisp
(add-to-list 'load-path "/usr/share/emacs/site-lisp/slime") (require 'slime)
(slime-setup)
(setq inferior-lisp-program "/usr/bin/sbcl" slime-complete-symbol-function 'slime-fuzzy-complete-symbol common-lisp-hyperspec-root "file:///usr/share/doc/hyperspec-7.0/HyperSpec/" slime-enable-evaluate-in-emacs t slime-log-events t slime-outline-mode-in-events-buffer nil slime-repl-return-behaviour :send-only-if-after-complete slime-autodoc-use-multiline-p t slime-highlight-compiler-notes t browse-url-browser-function 'w3m)
(define-key global-map (kbd "<f12>") 'slime-selector) (define-key slime-mode-map (kbd "TAB") 'slime-indent-and-complete-symbol) (define-key slime-mode-map (kbd "C-c TAB") 'slime-complete-form)
Thanks in advance,
Adam
slime-devel site list slime-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/slime-devel
* Adam [2009-02-05 11:47+0100] writes:
Hi, I'm setting up emacs/slime for the first time and I'm having some difficulties getting automatic bracket matching to work. I watched Marco Baringer's lisp video and I've got most of the useful features working like tab auto-completion and hyperspec lookup for example, but brackets don't seem to matched automatically like they were in Marco's video. For example whenever an opening bracket was typed a closing bracket would be inserted after the cursor, but this doesn't happen in my emacs/slime configuration.
Paren matching is a standard Emacs feature not something specific to Slime. You can enable it with something like (show-paren-mode t) in your .emacs. Depending on the Emacs version, there is also an item the "Options" menu. `M-x customize-option show-paren-mode' will also work. In Emcas 23 it's enable by default.
There is also a slightly different feature called "paren blinking" which moves the cursor temporarily back to the opening paren when the closing ) is inserted. That's useful if you work on a black&white terminal.
Helmut.