diff options
| author | Lars Ingebrigtsen | 2021-04-12 11:45:33 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-04-12 11:45:33 +0200 |
| commit | 72db25ef54f3d8e3b9827eeaa6df2eab2711cdff (patch) | |
| tree | 479d3506dbf24b91d71acbaa82ba519a17009aa4 | |
| parent | f2ab4cec7a762e8fe641cde00e6b299a92301cac (diff) | |
| download | emacs-72db25ef54f3d8e3b9827eeaa6df2eab2711cdff.tar.gz emacs-72db25ef54f3d8e3b9827eeaa6df2eab2711cdff.zip | |
Adjust verilog-mode to changes in the completion framework
* lisp/progmodes/verilog-mode.el (verilog-func-completion): Don't
bug out on `C-M-i' (which expects no point movement) (bug#47652).
(verilog-declaration-end): There may be no semicolons; don't bug out.
| -rw-r--r-- | lisp/progmodes/verilog-mode.el | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index a7f72950b10..5f8f723f80e 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el | |||
| @@ -3607,7 +3607,7 @@ inserted using a single call to `verilog-insert'." | |||
| 3607 | ;; More searching | 3607 | ;; More searching |
| 3608 | 3608 | ||
| 3609 | (defun verilog-declaration-end () | 3609 | (defun verilog-declaration-end () |
| 3610 | (search-forward ";")) | 3610 | (search-forward ";" nil t)) |
| 3611 | 3611 | ||
| 3612 | (defun verilog-single-declaration-end (limit) | 3612 | (defun verilog-single-declaration-end (limit) |
| 3613 | "Returns pos where current (single) declaration statement ends. | 3613 | "Returns pos where current (single) declaration statement ends. |
| @@ -7555,25 +7555,25 @@ will be completed at runtime and should not be added to this list.") | |||
| 7555 | TYPE is `module', `tf' for task or function, or t if unknown." | 7555 | TYPE is `module', `tf' for task or function, or t if unknown." |
| 7556 | (if (string= verilog-str "") | 7556 | (if (string= verilog-str "") |
| 7557 | (setq verilog-str "[a-zA-Z_]")) | 7557 | (setq verilog-str "[a-zA-Z_]")) |
| 7558 | (let ((verilog-str (concat (cond | 7558 | (let ((verilog-str |
| 7559 | ((eq type 'module) "\\<\\(module\\|connectmodule\\)\\s +") | 7559 | (concat (cond |
| 7560 | ((eq type 'tf) "\\<\\(task\\|function\\)\\s +") | 7560 | ((eq type 'module) "\\<\\(module\\|connectmodule\\)\\s +") |
| 7561 | (t "\\<\\(task\\|function\\|module\\|connectmodule\\)\\s +")) | 7561 | ((eq type 'tf) "\\<\\(task\\|function\\)\\s +") |
| 7562 | "\\<\\(" verilog-str "[a-zA-Z0-9_.]*\\)\\>")) | 7562 | (t "\\<\\(task\\|function\\|module\\|connectmodule\\)\\s +")) |
| 7563 | "\\<\\(" verilog-str "[a-zA-Z0-9_.]*\\)\\>")) | ||
| 7563 | match) | 7564 | match) |
| 7564 | 7565 | ||
| 7565 | (if (not (looking-at verilog-defun-re)) | 7566 | (save-excursion |
| 7566 | (verilog-re-search-backward verilog-defun-re nil t)) | 7567 | (if (not (looking-at verilog-defun-re)) |
| 7567 | (forward-char 1) | 7568 | (verilog-re-search-backward verilog-defun-re nil t)) |
| 7569 | (forward-char 1) | ||
| 7568 | 7570 | ||
| 7569 | ;; Search through all reachable functions | 7571 | ;; Search through all reachable functions |
| 7570 | (goto-char (point-min)) | 7572 | (goto-char (point-min)) |
| 7571 | (while (verilog-re-search-forward verilog-str (point-max) t) | 7573 | (while (verilog-re-search-forward verilog-str (point-max) t) |
| 7572 | (progn (setq match (buffer-substring (match-beginning 2) | 7574 | (setq match (buffer-substring (match-beginning 2) |
| 7573 | (match-end 2))) | 7575 | (match-end 2))) |
| 7574 | (setq verilog-all (cons match verilog-all)))) | 7576 | (setq verilog-all (cons match verilog-all)))))) |
| 7575 | (if (match-beginning 0) | ||
| 7576 | (goto-char (match-beginning 0))))) | ||
| 7577 | 7577 | ||
| 7578 | (defun verilog-get-completion-decl (end) | 7578 | (defun verilog-get-completion-decl (end) |
| 7579 | "Macro for searching through current declaration (var, type or const) | 7579 | "Macro for searching through current declaration (var, type or const) |