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

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

[elpa] externals/eldoc-eval e0e6ea1af0 17/28: Remove warnings from byte


From: Stefan Monnier
Subject: [elpa] externals/eldoc-eval e0e6ea1af0 17/28: Remove warnings from byte compilation
Date: Thu, 6 Jan 2022 08:34:56 -0500 (EST)

branch: externals/eldoc-eval
commit e0e6ea1af0d1737f6adca448bcda76c146685b64
Author: Mix Yasuno <yasuno@mix-net.co.jp>
Commit: Mix Yasuno <yasuno@mix-net.co.jp>

    Remove warnings from byte compilation
---
 eldoc-eval.el | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/eldoc-eval.el b/eldoc-eval.el
index af3bb68f66..48ebc41e13 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -51,11 +51,12 @@
 
 ;;; Code:
 (require 'eldoc)
-(when (require 'elisp-mode nil t) ; emacs-25
-  (defalias 'eldoc-current-symbol 'elisp--current-symbol)
-  (defalias 'eldoc-fnsym-in-current-sexp 'elisp--fnsym-in-current-sexp)
-  (defalias 'eldoc-get-fnsym-args-string 'elisp-get-fnsym-args-string)
-  (defalias 'eldoc-get-var-docstring 'elisp-get-var-docstring))
+(eval-and-compile
+  (when (require 'elisp-mode nil t)      ; emacs-25
+    (defalias 'eldoc-current-symbol 'elisp--current-symbol)
+    (defalias 'eldoc-fnsym-in-current-sexp 'elisp--fnsym-in-current-sexp)
+    (defalias 'eldoc-get-fnsym-args-string 'elisp-get-fnsym-args-string)
+    (defalias 'eldoc-get-var-docstring 'elisp-get-var-docstring)))
 
 ;;; Minibuffer support.
 ;;  Enable displaying eldoc info in something else
@@ -177,13 +178,6 @@ See `with-eldoc-in-minibuffer'."
             (sit-for eldoc-show-in-mode-line-delay))))
     (force-mode-line-update)))
 
-(defun eldoc-mode-line-toggle-rolling ()
-  (interactive)
-  (if (and eldoc-in-minibuffer-mode
-           (minibuffer-window-active-p (selected-window)))
-      (setq eldoc-mode-line-rolling-flag (not eldoc-mode-line-rolling-flag))
-      (error "No active minibuffer found")))
-
 (defvar eldoc-in-minibuffer-mode-map
   (let ((map (make-sparse-keymap)))
     (define-key map [remap eval-expression] 'eldoc-eval-expression)
@@ -213,6 +207,13 @@ See `with-eldoc-in-minibuffer'."
                   'eldoc-post-insert-mode))
       (define-key minibuffer-local-map (kbd "C-@") 'set-mark-command)))
 
+(defun eldoc-mode-line-toggle-rolling ()
+  (interactive)
+  (if (and eldoc-in-minibuffer-mode
+           (minibuffer-window-active-p (selected-window)))
+      (setq eldoc-mode-line-rolling-flag (not eldoc-mode-line-rolling-flag))
+      (error "No active minibuffer found")))
+
 (defun eldoc-run-in-minibuffer ()
   (let ((buf (window-buffer (active-minibuffer-window))))
     ;; If this minibuffer have been started with



reply via email to

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