Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. (defun preserved-symbol-p (sym)
  2. (and (slime-eval `(cl:let ((sym (cl:find-symbol
  3. (cl:format nil "~A" (cl:read-from-string ',sym))
  4. :cl)))
  5. (cl:and sym
  6. (cl:eq sym
  7. (cl:find-symbol
  8. (cl:format nil "~A" (cl:read-from-string ',sym))
  9. (cl:read-from-string ,(slime-current-package))))))
  10. (slime-current-package))
  11. t))
  12.  
  13.  
  14. (defun slime-upcase-preserved-symbol ()
  15. (interactive)
  16. (and (preserved-symbol-p
  17. (substring-no-properties (thing-at-point 'symbol)))
  18. (save-excursion
  19. (let ((beg (point)))
  20. (backward-sexp 1)
  21. (upcase-region beg (point))))))
  22.  
  23.  
  24. (defun slime-upcase-preserved-symbol/slime-autodoc-space (&rest args)
  25. (slime-upcase-preserved-symbol))
  26.  
  27.  
  28. (advice-add 'slime-autodoc-space :before #'slime-upcase-preserved-symbol/slime-autodoc-space)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement