Skip to content

Commit

Permalink
fix: Compile warnings (#768)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Mar 28, 2024
1 parent 4e379b4 commit 207f93c
Show file tree
Hide file tree
Showing 5 changed files with 220 additions and 218 deletions.
6 changes: 3 additions & 3 deletions Eask
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

(depends-on "emacs" "27.1")
(depends-on "dash")
(depends-on "flycheck")
(depends-on "lsp-mode")
(depends-on "markdown-mode")
(depends-on "rustic")

(development
(depends-on "ert-runner"))
(depends-on "ert-runner")
(depends-on "rustic")
(depends-on "flycheck"))

(setq network-security-level 'low) ; see https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-932956432
70 changes: 35 additions & 35 deletions lsp-ui-doc.el
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ This affects the position of the documentation when

(defcustom lsp-ui-doc-alignment 'frame
"How to align the doc.
This only takes effect when `lsp-ui-doc-position' is 'top or 'bottom."
This only takes effect when `lsp-ui-doc-position' is `top or `bottom."
:type '(choice (const :tag "Frame" frame)
(const :tag "Window" window))
:group 'lsp-ui-doc)
Expand Down Expand Up @@ -182,31 +182,31 @@ Only the `background' is used in this face."
:group 'lsp-ui-doc)

(defvar lsp-ui-doc-frame-parameters
'((left . -1)
(no-focus-on-map . t)
(min-width . 0)
(width . 0)
(min-height . 0)
(height . 0)
(internal-border-width . 1)
(vertical-scroll-bars . nil)
(horizontal-scroll-bars . nil)
(right-fringe . 0)
(menu-bar-lines . 0)
(tool-bar-lines . 0)
(tab-bar-lines . 0)
'((left . -1)
(no-focus-on-map . t)
(min-width . 0)
(width . 0)
(min-height . 0)
(height . 0)
(internal-border-width . 1)
(vertical-scroll-bars . nil)
(horizontal-scroll-bars . nil)
(right-fringe . 0)
(menu-bar-lines . 0)
(tool-bar-lines . 0)
(tab-bar-lines . 0)
(tab-bar-lines-keep-state . 0)
(line-spacing . 0)
(unsplittable . t)
(undecorated . t)
(top . -1)
(visibility . nil)
(mouse-wheel-frame . nil)
(no-other-frame . t)
(line-spacing . 0)
(unsplittable . t)
(undecorated . t)
(top . -1)
(visibility . nil)
(mouse-wheel-frame . nil)
(no-other-frame . t)
(inhibit-double-buffering . t)
(drag-internal-border . t)
(no-special-glyphs . t)
(desktop-dont-save . t))
(drag-internal-border . t)
(no-special-glyphs . t)
(desktop-dont-save . t))
"Frame parameters used to create the frame.")

(defvar lsp-ui-doc-render-function nil
Expand Down Expand Up @@ -248,7 +248,8 @@ Because some variables are buffer local.")
"Non-nil when the current document should ask to hide after next command.")


(defconst lsp-ui-doc--buffer-prefix " *lsp-ui-doc-")
(defconst lsp-ui-doc--buffer-prefix " *lsp-ui-doc-"
"LSP UI doc prefix.")

(defmacro lsp-ui-doc--with-buffer (&rest body)
"Execute BODY in the lsp-ui-doc buffer."
Expand All @@ -260,7 +261,6 @@ Because some variables are buffer local.")
(setq lsp-ui-doc--parent-vars parent-vars)
(prog1 (let ((buffer-read-only nil)
(inhibit-modification-hooks t)
(inhibit-point-motion-hooks t)
(inhibit-redisplay t))
,@body)
(setq buffer-read-only t)
Expand Down Expand Up @@ -904,15 +904,15 @@ HEIGHT is the documentation number of lines."
(run-hook-with-args 'lsp-ui-doc-frame-hook frame window)
(when lsp-ui-doc-use-webkit
(define-key (current-global-map) [xwidget-event]
(lambda ()
(interactive)
(let ((xwidget-event-type (nth 1 last-input-event)))
;; (when (eq xwidget-event-type 'load-changed)
;; (lsp-ui-doc--move-frame (lsp-ui-doc--get-frame)))
(when (eq xwidget-event-type 'javascript-callback)
(let ((proc (nth 3 last-input-event))
(arg (nth 4 last-input-event)))
(funcall proc arg))))))
(lambda ()
(interactive)
(let ((xwidget-event-type (nth 1 last-input-event)))
;; (when (eq xwidget-event-type 'load-changed)
;; (lsp-ui-doc--move-frame (lsp-ui-doc--get-frame)))
(when (eq xwidget-event-type 'javascript-callback)
(let ((proc (nth 3 last-input-event))
(arg (nth 4 last-input-event)))
(funcall proc arg))))))
(lsp-ui-doc--webkit-run-xwidget))
frame))

Expand Down
Loading

0 comments on commit 207f93c

Please sign in to comment.