branch: elpa/helm commit ce00578ea1aa11692c1e05d1f5005dbdc856db87 Author: Thierry Volpiatto <thie...@posteo.net> Commit: Thierry Volpiatto <thie...@posteo.net>
Use the undocumented feature of intern-soft to get the symbol at point What is undocumented is that intern-soft returns the real symbol name when this symbol is a shorthand symbol. --- helm-elisp.el | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/helm-elisp.el b/helm-elisp.el index 82bb723c48..de269a6fe0 100644 --- a/helm-elisp.el +++ b/helm-elisp.el @@ -798,15 +798,7 @@ is only used to test DEFAULT." (defun helm-apropos-get-default () (with-syntax-table emacs-lisp-mode-syntax-table - (let* ((rss (buffer-local-value 'read-symbol-shorthands (current-buffer))) - (sym (thing-at-point 'symbol)) - (prefix (when (and sym rss) - (cl-loop for (k . _v) in rss - when (string-match (concat "\\`" k) sym) - return k)))) - (if prefix - (replace-regexp-in-string prefix (cdr (assoc prefix rss)) sym) - sym)))) + (symbol-name (intern-soft (thing-at-point 'symbol))))) ;;;###autoload (defun helm-apropos (default)