I want to write a shorthand for a shorthanded autoloaded function in a package, like so:
;;; super-duper-long-package-name.el --- Provide a cool command -*- lexical-binding: t -*- ;; Version: 0.1.0 ;;; Code: (require 'someone-elses-super-duper-long-package-name) ;;;###autoload (defun sdlpn-cool-command () "Display a cool message." (interactive) (message (someone-elses-super-duper-long-package-name-cool-command))) (provide 'super-duper-long-package-name) ;; Local Variables: ;; read-symbol-shorthands: (("sdlpn-" . "super-duper-long-package-name-") ;; ("sesdlpn-" . "someone-elses-super-duper-long-package-name-")) ;; End: ;;; super-duper-long-package-name.el ends here But when the package is installed, and I try running the command, there are two problems:
The command is still named
sdlpn-cool-command.When I run the command using
M-x sdlpn-cool-command RET, Emacs complains in a message:execute-extended-command: Autoloading file /home/super-duper-long-user-name/.emacs.d/elpa/super-duper-long-package-name-0.1.0/super-duper-long-package-name.elc failed to define function sdlpn-cool-command
How do you solve it?