Skip to content

Commit

Permalink
WIP: Fix more warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
gmlarumbe committed Aug 21, 2023
1 parent a52da15 commit a193d03
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions verilog-ext-capf.el
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ If optional arg TAG is nil, get completions for symbol at point."
(verilog-ext-capf-get-entry-items (verilog-ext-capf-get-table-entry table tag)))

(defun verilog-ext-capf--dot-completion-bounds ()
"Return bounds of dot completion, if possible, for `completion-at-point'.
"Return bounds of dot completion for `completion-at-point'.
Return value is a cons with (start . end) bounds."
(let (start end)
Expand All @@ -227,7 +227,7 @@ Return value is a cons with (start . end) bounds."
(cons start end))))

(defun verilog-ext-capf--scope-completion-bounds ()
"Return bounds of scope completion, if possible, for `completion-at-point'.
"Return bounds of scope completion for `completion-at-point'.
Return value is a cons with (start . end) bounds."
(let (start end)
Expand All @@ -245,7 +245,7 @@ Return value is a cons with (start . end) bounds."
(cons start end))))

(defun verilog-ext-capf--system-tf-bounds ()
"Return bounds of system tasks and functions, if possible, for `completion-at-point'.
"Return bounds of system tasks and functions for `completion-at-point'.
Return value is a cons with (start . end) bounds."
(let (start end)
Expand Down Expand Up @@ -331,14 +331,15 @@ the workspace."
(;; Compiler directives
(setq bounds (verilog-ext-capf--directives-bounds))
(setq completions verilog-ext-capf-directives))
(t ; Fallback, all project completions
(t ; Fallback, all project completions and lang keywords
(setq bounds (bounds-of-thing-at-point 'symbol))
(dolist (table `(,defs-table ,inst-table ,refs-table))
(when table
(maphash (lambda (key value)
(maphash (lambda (key _value)
(push key completions))
table)))
(delete-dups completions)))
(delete-dups completions)
(setq completions `(,@completions ,@verilog-keywords))))
;; Return value for `completion-at-point'
(setq start (car bounds))
(setq end (cdr bounds))
Expand Down

0 comments on commit a193d03

Please sign in to comment.