]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/elisp-mode.el
Use eldoc-documentation-functions
[gnu-emacs] / lisp / progmodes / elisp-mode.el
index 2ad22ddd0ffc2632a45262d869e53afec187e5a1..5f9bdaccd0f98e544538e798b1ecf249e152b6d4 100644 (file)
@@ -235,8 +235,8 @@ Blank lines separate paragraphs.  Semicolons start comments.
               (append '((?\` . ?\') (?‘ . ?’)) electric-pair-text-pairs))
   (setq-local electric-quote-string t)
   (setq imenu-case-fold-search nil)
-  (add-function :before-until (local 'eldoc-documentation-function)
-                #'elisp-eldoc-documentation-function)
+  (add-hook 'eldoc-documentation-functions
+            #'elisp-eldoc-documentation-function nil t)
   (add-hook 'xref-backend-functions #'elisp--xref-backend nil t)
   (setq-local project-vc-external-roots-function #'elisp-load-path-roots)
   (add-hook 'completion-at-point-functions
@@ -1566,7 +1566,8 @@ In the absence of INDEX, just call `eldoc-docstring-format-sym-doc'."
 ARGLIST is either a string, or a list of strings or symbols."
   (let ((str (cond ((stringp arglist) arglist)
                    ((not (listp arglist)) nil)
-                   (t (help--make-usage-docstring 'toto arglist)))))
+                   (t (substitute-command-keys
+                       (help--make-usage-docstring 'toto arglist))))))
     (if (and str (string-match "\\`([^ )]+ ?" str))
         (replace-match "(" t t str)
       str)))