emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/helm ce00578ea1 4/4: Use the undocumented feature of inter


From: ELPA Syncer
Subject: [nongnu] elpa/helm ce00578ea1 4/4: Use the undocumented feature of intern-soft to get the symbol at point
Date: Sun, 6 Nov 2022 15:58:47 -0500 (EST)

branch: elpa/helm
commit ce00578ea1aa11692c1e05d1f5005dbdc856db87
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]