I switched to
 
    (defpackage :my (:use :cl))
    (in-package :my)
    (export '(
      function-a
      function-b
      variable-x
      variable-y))
 
(Example: https://github.com/cl-plus-ssl/cl-plus-ssl/blob/13d824e27cf7f6085086458daea1514b605b3980/src/package.lisp)
 
That way not only slime-edit-definition works,
but also I can use real names of exported symbols,
instead of scarifying readability by uninterned
symbols or keywords, and without polluting the keywords
package or another package like cl-user.
 
An added benefit of using real symbol names is
GitHub code search. In GitHub UI when you click a symbol,
it is selected by whitespace or punctuation boundaries somehow,
and search of that symbol is presented on the right hand side.
That way user can relatively easy find the function definition
(poor man's got-to-definition).
But uninterned symbols are selected fully, with #:
And the search is confused by the leading #:
It fails to find function-a when searching for #:function-a.
Compare the old version of the same package definition:
https://github.com/cl-plus-ssl/cl-plus-ssl/blob/04f82026e2245edc72fd85e08af4dc6b403d1cb5/src/package.lisp
(Login required for GitHub code search to work).
 
Keywords, BTW, are selected without the colon, so GitHub
code search works if exported symbols are represented by
keywords. For example:
https://github.com/edicl/cl-ppcre/blob/93bd7cfbac231cea55e6f9b72c454176fd1c0dbe/packages.lisp
However, that does not work for slime-edit-definition.
 
So, the EXPORT function instead of the :EXPORT clause in DEFPACKAGE
supports exploration of a library API both in Slime and GitHub.