From 63d8a5f88d5a23cb2df215125e81ac78dd0d7e6a Mon Sep 17 00:00:00 2001 From: Mathieu Marques Date: Fri, 12 Mar 2021 19:43:10 +0100 Subject: [PATCH 1/2] * lisp/emacs-lisp/eldoc.el: Untabify and fix indent levels --- lisp/emacs-lisp/eldoc.el | 58 ++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index a02406a7b7..485ea26379 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -87,7 +87,7 @@ returns another string is acceptable. Note that this variable has no effect, unless `eldoc-documentation-strategy' handles it explicitly." :type '(radio (function-item upcase) - (function-item downcase) + (function-item downcase) function)) (make-obsolete-variable 'eldoc-argument-case nil "25.1") @@ -183,12 +183,12 @@ It should receive the same arguments as `message'.") When `eldoc-print-after-edit' is non-nil, ElDoc messages are only printed after commands contained in this obarray." (let ((cmds (make-vector 31 0)) - (re (regexp-opt '("delete" "insert" "edit" "electric" "newline")))) + (re (regexp-opt '("delete" "insert" "edit" "electric" "newline")))) (mapatoms (lambda (s) - (and (commandp s) - (string-match-p re (symbol-name s)) - (intern (symbol-name s) cmds))) - obarray) + (and (commandp s) + (string-match-p re (symbol-name s)) + (intern (symbol-name s) cmds))) + obarray) cmds)) @@ -269,8 +269,8 @@ reflect the change." (memq eldoc-timer timer-idle-list)) ;FIXME: Why? (setq eldoc-timer (run-with-idle-timer - eldoc-idle-delay nil - (lambda () + eldoc-idle-delay nil + (lambda () (when (or eldoc-mode (and global-eldoc-mode (eldoc--supported-p))) @@ -291,23 +291,23 @@ reflect the change." Otherwise work like `message'." (if (minibufferp) (progn - (add-hook 'minibuffer-exit-hook - (lambda () (setq eldoc-mode-line-string nil - ;; https://debbugs.gnu.org/16920 - eldoc-last-message nil)) - nil t) - (with-current-buffer - (window-buffer - (or (window-in-direction 'above (minibuffer-window)) - (minibuffer-selected-window) - (get-largest-window))) + (add-hook 'minibuffer-exit-hook + (lambda () (setq eldoc-mode-line-string nil + ;; https://debbugs.gnu.org/16920 + eldoc-last-message nil)) + nil t) + (with-current-buffer + (window-buffer + (or (window-in-direction 'above (minibuffer-window)) + (minibuffer-selected-window) + (get-largest-window))) (when (and mode-line-format (not (and (listp mode-line-format) (assq 'eldoc-mode-line-string mode-line-format)))) - (setq mode-line-format - (list "" '(eldoc-mode-line-string - (" " eldoc-mode-line-string " ")) - mode-line-format))) + (setq mode-line-format + (list "" '(eldoc-mode-line-string + (" " eldoc-mode-line-string " ")) + mode-line-format))) (setq eldoc-mode-line-string (when (stringp format-string) (apply #'format-message format-string args))) @@ -327,8 +327,8 @@ Also store it in `eldoc-last-message' and return that value." ;; Emacs way of preventing log messages. (let ((message-log-max nil)) (cond (eldoc-last-message - (funcall eldoc-message-function "%s" eldoc-last-message)) - (omessage (funcall eldoc-message-function nil))))) + (funcall eldoc-message-function "%s" eldoc-last-message)) + (omessage (funcall eldoc-message-function nil))))) eldoc-last-message) (defun eldoc--message-command-p (command) @@ -350,8 +350,8 @@ Also store it in `eldoc-last-message' and return that value." (and eldoc-last-message (not (minibufferp)) ;We don't use the echo area when in minibuffer. (if (and (eldoc-display-message-no-interference-p) - (eldoc--message-command-p this-command)) - (eldoc--message eldoc-last-message) + (eldoc--message-command-p this-command)) + (eldoc--message eldoc-last-message) ;; No need to call eldoc--message since the echo area will be cleared ;; for us, but do note that the last-message will be gone. (setq eldoc-last-message nil)))) @@ -667,9 +667,9 @@ Meant as a value for `eldoc-documentation-strategy'." (progn (defcustom ,secondary ,value ,docstring ,@more) (define-obsolete-variable-alias ',main ',secondary "eldoc-1.1.0")) - (progn - (defcustom ,main ,value ,docstring ,@more) - (defvaralias ',secondary ',main ,docstring)))) + (progn + (defcustom ,main ,value ,docstring ,@more) + (defvaralias ',secondary ',main ,docstring)))) (eldoc--documentation-strategy-defcustom eldoc-documentation-strategy eldoc-documentation-function -- 2.30.1