Eliminate compiler warnings.

This commit is contained in:
Vincent Zhang 2019-05-23 16:47:30 +08:00
parent b2b7e60798
commit c5226e4aae
2 changed files with 28 additions and 26 deletions

View file

@ -497,7 +497,7 @@ If the actual char height is larger, it respects the actual char height.")
'mode-line 'mode-line
'mode-line-inactive))) 'mode-line-inactive)))
(defsubst doom-modeline--char-height () (defsubst doom-modeline--font-height ()
"Calculate the actual char height of the mode-line." "Calculate the actual char height of the mode-line."
(ceiling (* 1.68 (frame-char-height)))) (ceiling (* 1.68 (frame-char-height))))

View file

@ -148,9 +148,9 @@
(declare-function jsonrpc-last-error 'jsonrpc) (declare-function jsonrpc-last-error 'jsonrpc)
(declare-function lsp--workspace-print 'lsp-mode) (declare-function lsp--workspace-print 'lsp-mode)
(declare-function lsp-describe-session 'lsp-mode) (declare-function lsp-describe-session 'lsp-mode)
(declare-function lsp-restart-workspace 'lsp-mode)
(declare-function lsp-shutdown-workspace 'lsp-mode)
(declare-function lsp-workspace-folders-open 'lsp-mode) (declare-function lsp-workspace-folders-open 'lsp-mode)
(declare-function lsp-workspace-restart 'lsp-mode)
(declare-function lsp-workspace-shutdown 'lsp-mode)
(declare-function lsp-workspaces 'lsp-mode) (declare-function lsp-workspaces 'lsp-mode)
(declare-function magit-toplevel 'magit-git) (declare-function magit-toplevel 'magit-git)
(declare-function mc/num-cursors 'multiple-cursors-core) (declare-function mc/num-cursors 'multiple-cursors-core)
@ -1624,7 +1624,8 @@ mouse-3: Describe current input method")
(face (if workspaces 'success 'warning)) (face (if workspaces 'success 'warning))
(icon (doom-modeline-lsp-icon "LSP" face))) (icon (doom-modeline-lsp-icon "LSP" face)))
(propertize icon (propertize icon
'help-echo (if workspaces 'help-echo
(if workspaces
(concat "LSP Connected " (concat "LSP Connected "
(string-join (--map (format "[%s]\n" (lsp--workspace-print it)) (string-join (--map (format "[%s]\n" (lsp--workspace-print it))
workspaces)) workspaces))
@ -1635,7 +1636,8 @@ mouse-3: Reconnect to server")
"LSP Disconnected "LSP Disconnected
mouse-1: Reload to start server") mouse-1: Reload to start server")
'mouse-face '(:box 0) 'mouse-face '(:box 0)
'local-map (let ((map (make-sparse-keymap))) 'local-map
(let ((map (make-sparse-keymap)))
(if workspaces (if workspaces
(progn (progn
(define-key map [mode-line C-mouse-1] (define-key map [mode-line C-mouse-1]
@ -1643,9 +1645,9 @@ mouse-1: Reload to start server")
(define-key map [mode-line mouse-1] (define-key map [mode-line mouse-1]
#'lsp-describe-session) #'lsp-describe-session)
(define-key map [mode-line mouse-2] (define-key map [mode-line mouse-2]
#'lsp-shutdown-workspace) #'lsp-workspace-shutdown)
(define-key map [mode-line mouse-3] (define-key map [mode-line mouse-3]
#'lsp-restart-workspace)) #'lsp-workspace-restart))
(progn (progn
(define-key map [mode-line mouse-1] (define-key map [mode-line mouse-1]
(lambda () (lambda ()