branch: elpa/slime commit 91b67bf433bb1e12805d68eee8d5fb58e1d1d969 Author: Stas Boukarev <stass...@gmail.com> Commit: Stas Boukarev <stass...@gmail.com>
Add sb-impl:+internal-features+ to *features* for #+ highlighting. --- swank.lisp | 9 +++++---- swank/backend.lisp | 4 ++++ swank/sbcl.lisp | 3 +++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/swank.lisp b/swank.lisp index 6893c42f05..a03baa1809 100644 --- a/swank.lisp +++ b/swank.lisp @@ -1427,7 +1427,7 @@ FEATURES: a list of keywords PACKAGE: a list (&key NAME PROMPT) VERSION: the protocol version" (let ((c *emacs-connection*)) - (setq *slime-features* *features*) + (setq *slime-features* (augment-features)) `(:pid ,(getpid) :style ,(connection.communication-style c) :encoding (:coding-systems ,(loop for cs in '("utf-8-unix" "iso-latin-1-unix") @@ -3600,9 +3600,10 @@ The server port is written to PORT-FILE-NAME." (defun sync-features-to-emacs () "Update Emacs if any relevant Lisp state has changed." ;; FIXME: *slime-features* should be connection-local - (unless (eq *slime-features* *features*) - (setq *slime-features* *features*) - (send-to-emacs (list :new-features (features-for-emacs))))) + (let ((features (augment-features))) + (unless (equal *slime-features* features) + (setq *slime-features* features) + (send-to-emacs (list :new-features (features-for-emacs)))))) (defun features-for-emacs () "Return `*slime-features*' in a format suitable to send it to Emacs." diff --git a/swank/backend.lisp b/swank/backend.lisp index a3f7e9f997..1ba3ade60b 100644 --- a/swank/backend.lisp +++ b/swank/backend.lisp @@ -1589,3 +1589,7 @@ Implementations intercept calls to SPEC and call, in this order: nil) (prop-value t) (t nil))))) + +(definterface augment-features () + "*features* or something else " + *features*) diff --git a/swank/sbcl.lisp b/swank/sbcl.lisp index eadf646028..1cefb0188c 100644 --- a/swank/sbcl.lisp +++ b/swank/sbcl.lisp @@ -2099,3 +2099,6 @@ stack." (defmethod sexp-ref ((s sb-impl::comma) i) (sexp-ref (sb-impl::comma-expr s) i))) + +(defimplementation augment-features () + (append *features* #+sb-devel sb-impl:+internal-features+))