apportioning of permanent buffer-locals and as such Slime could be making better use of permanent-locals as well :)
You could also give slime-echo-arglist-function a buffer local value, right?
Currently there is this:
slime-space `-> slime-echo-arglist `--> slime-echo-arglist-function `---> slime-show-arglist
The proposed solution short circuits the nesting and `slime-echo-arglist' is never seen which (I hope) may help avoid slime-autodoc/eldoc loading/unloading/enabling/disabling issues...
My thinking was that making `slime-echo-arglist-function' the buffer-local permanent-local was too coarse but maybe there is other stuff happening swank side that i am missing?
But yeah, AFAICT making `slime-echo-arglist-function' buffer-local would accomplish the same thing as long as it was _also_ permanent-local, e.g.:
(defvar slime-echo-arglist-function 'slime-show-arglist "Symbol naming a function. Used by `slime-echo-arglist' and `slime-space'.")
(make-variable-buffer-local 'slime-echo-arglist-function) (put 'slime-echo-arglist-function 'permanent-local t) (set-default 'slime-echo-arglist-function 'slime-show-arglist)
Assuming the corresponding getter/setter exist:
(defcustom *slime-echo-arglist-ignore-function* 'ignore "Symbol naming a function to use when `slime-echo-arglist' shouldn't. The function will become the default buffer-local-value when `slime-echo-arglist-toggle' is invoked to override default-value of `slime-echo-arglist-function'. The default value is `ignore', which effectively prevents `slime-space' from verbosely echoing arglists to minibuffer." :type 'function :group 'slime-ui)
(defun slime-echo-arglist-toggle () (interactive) (with-current-buffer (current-buffer) (apply slime-message-function (concat ;; :NOTE byte-compiler will optimize away this concat. "Toggled buffer-local-value `slime-echo-arglist-function'" "in buffer: %s, new value is `%S'") (list (buffer-name) (if (eq (buffer-local-value 'slime-echo-arglist-function (current-buffer)) (default-value 'slime-echo-arglist-function)) (set (make-local-variable 'slime-echo-arglist-function) *slime-echo-arglist-ignore-function*) (set (make-local-variable 'slime-echo-arglist-function) (default-value 'slime-echo-arglist-function)))))))
Helmut
-- /s_P\