Hi all:
As slime-close-parens-at-point is now deprecated I am in search for a direct replacement. I had that function bound to ")" so the exact number of right parentheses got inserted at point.
In the source it is suggested to replace the binding with 'slime- close-all-parens-in-sexp but that does not do the same ...
Any hint really appreciated .... (I am only a user of Slime of course).
Thanks!!!
Frank
Frank Goenninger frgo@mac.com writes:
As slime-close-parens-at-point is now deprecated I am in search for a direct replacement. I had that function bound to ")" so the exact number of right parentheses got inserted at point.
Removing it was a mistake by me. (Sorry!) Some older REPL changes rendered it malfunctioning on the REPL, and I mistakenly thought `slime-close-all-parens-in-sexp' would do exactly the same, so I threw it out.
I haven't had time to look at this issue again, so I haven't resurrected it so far.
The function is still in the source base, just commented out. You can simply put the source into your .emacs for now.
-T.
Hi Tobias
thanks for coming back quickly. I tried to resurrect it by un- commenting it - no luck:
"Wrong type argument: number-or-marker-p, nil"
As the definition is
(defun slime-close-parens-at-point () "Close parenthesis at point to complete the top-level-form. Simply inserts ')' characters at point until `beginning-of-defun' and `end-of-defun' execute without errors, or `slime-close-parens-limit' is exceeded." (interactive) (loop for i from 1 to slime-close-parens-limit until (save-excursion (slime-beginning-of-defun) (ignore-errors (slime-end-of-defun) t)) do (insert ")")))
I guess (wild guessing here, really) it's slime-close-parens-limit that is not set... or?
Thanks again for helping me out... Or are there other alternatives using paredit.el and/or slime functionality?
Cheers Frank
Am 27.08.2007 um 21:25 schrieb Tobias C. Rittweiler:
Frank Goenninger frgo@mac.com writes:
As slime-close-parens-at-point is now deprecated I am in search for a direct replacement. I had that function bound to ")" so the exact number of right parentheses got inserted at point.
Removing it was a mistake by me. (Sorry!) Some older REPL changes rendered it malfunctioning on the REPL, and I mistakenly thought `slime-close-all-parens-in-sexp' would do exactly the same, so I threw it out.
I haven't had time to look at this issue again, so I haven't resurrected it so far.
The function is still in the source base, just commented out. You can simply put the source into your .emacs for now.
-T.
slime-devel site list slime-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/slime-devel
Frank Goenninger frgo@mac.com writes:
(defun slime-close-parens-at-point () "...." (interactive) (loop for i from 1 to slime-close-parens-limit until (save-excursion (slime-beginning-of-defun) (ignore-errors (slime-end-of-defun) t)) do (insert ")")))
I guess (wild guessing here, really) it's slime-close-parens-limit that is not set... or?
No, the variable is still there, but NIL by default (with the meaning that no limit should be assumed.) You just have to replace that reference above with (or slime-close-parens-limit 16).
-T.
Am 27.08.2007 um 22:10 schrieb Tobias C. Rittweiler:
Frank Goenninger frgo@mac.com writes:
(defun slime-close-parens-at-point () "...." (interactive) (loop for i from 1 to slime-close-parens-limit until (save-excursion (slime-beginning-of-defun) (ignore-errors (slime-end-of-defun) t)) do (insert ")")))
I guess (wild guessing here, really) it's slime-close-parens-limit that is not set... or?
No, the variable is still there, but NIL by default (with the meaning that no limit should be assumed.) You just have to replace that reference above with (or slime-close-parens-limit 16).
-T.
Yep. Works, of course. Thx!
Frank
Hi Frank,
As slime-close-parens-at-point is now deprecated I am in search for a direct replacement. I had that function bound to ")" so the exact number of right parentheses got inserted at point.
I know it won't answer your question, but have you already considered to use paredit[1] ? I installed it a few months ago and I no longer face unbalanced parenthesis problems in any lisp mode.
Xavier