diff --git a/gdscript-docs.el b/gdscript-docs.el index 4cf2f31..6da415f 100644 --- a/gdscript-docs.el +++ b/gdscript-docs.el @@ -44,7 +44,7 @@ (defun gdscript-docs-browse-api (&optional force-online) "Open the main page of Godot API. Use the universal prefix (C-u) to force browsing the online API." (interactive) - (if (and (or gdscript-docs-force-online-lookup current-prefix-arg force-online) (not (string= gdscript-docs-local-path ""))) + (if (and (or gdscript-docs-force-online-lookup current-prefix-arg force-online) (string= gdscript-docs-local-path "")) (gdscript-docs-open "https://docs.godotengine.org/en/stable/classes/index.html?#godot-api") (let ((file (concat (file-name-as-directory gdscript-docs-local-path) "classes/index.html"))) (if (file-exists-p file) @@ -63,12 +63,12 @@ If a page is already open, switch to its buffer. Use local docs if gdscripts-doc (lambda (current-buffer) (with-current-buffer current-buffer (when (derived-mode-p 'eww-mode) - (string-suffix-p symbol(string-remove-suffix ".html" (plist-get eww-data :url)) t) - ))) (buffer-list))))) + (string-suffix-p symbol (string-remove-suffix ".html" (plist-get eww-data :url)) t)))) + (buffer-list))))) (if buffer (pop-to-buffer-same-window buffer) (if (string= "" symbol) (message "No symbol at point or open API reference buffers.") - (if (and (not gdscript-docs-force-online-lookup)(not (or current-prefix-arg force-online)) (not (string= gdscript-docs-local-path ""))) + (if (and (not gdscript-docs-force-online-lookup) (not (or current-prefix-arg force-online)) (not (string= gdscript-docs-local-path ""))) (let ((file (concat (file-name-as-directory gdscript-docs-local-path) (file-name-as-directory "classes") "class_" symbol ".html"))) (if (file-exists-p file) (gdscript-docs-open file)