@@ -267,14 +267,21 @@ The editor need to send a completion request.")
267267; ; (@* "Util" )
268268; ;
269269
270+ (defmacro lsp-ltex--mute-apply (&rest body )
271+ " Execute BODY without message."
272+ (declare (indent 0 ) (debug t ))
273+ `(let (message-log-max )
274+ (with-temp-message (or (current-message ) nil )
275+ (let ((inhibit-message t )) ,@body ))))
276+
270277(defun lsp-ltex--s-replace (old new s )
271278 " Replace OLD with NEW in S."
272279 (replace-regexp-in-string (regexp-quote old) new s t t ))
273280
274281(defun lsp-ltex--execute (cmd &rest args )
275282 " Return non-nil if CMD executed succesfully with ARGS."
276283 (save-window-excursion
277- (let ((inhibit-message t ) ( message-log-max nil ))
284+ (lsp-ltex--mute-apply
278285 (= 0 (shell-command (concat cmd " "
279286 (mapconcat #'shell-quote-argument
280287 (cl-remove-if #'null args)
@@ -291,15 +298,15 @@ Return the written file name, or nil if SYM is not bound."
291298 (lsp-message " [INFO] Saving `%s' to file \" %s\" " (symbol-name sym) out-file)
292299 (with-temp-buffer
293300 (prin1 (eval sym) (current-buffer ))
294- (write-file out-file))
301+ (lsp-ltex--mute-apply ( write-file out-file) ))
295302 out-file)))
296303
297304(defun lsp-ltex--deserialize-symbol (sym dir &optional mutate )
298305 " Deserialize SYM from DIR, if MUTATE is non-nil, assign the object to SYM.
299306Return the deserialized object, or nil if the SYM.el file dont exist."
300307 (let ((in-file (expand-file-name
301308 (lsp-ltex--s-replace " lsp-ltex--" " "
302- (symbol-name sym))
309+ (symbol-name sym))
303310 dir))
304311 res)
305312 (when (file-exists-p in-file)
@@ -382,7 +389,7 @@ This is use to active language server and check if language server's existence."
382389 'ltex-ls
383390 '(:system " ltex-ls" )
384391 `(:download :url , lsp-ltex--server-download-url
385- :store-path ,(lsp-ltex--downloaded-extension-path))))
392+ :store-path ,(lsp-ltex--downloaded-extension-path))))
386393
387394(defcustom lsp-ltex-version (or (lsp-ltex--current-version)
388395 (lsp-ltex--latest-version)
0 commit comments