From 5f80b93f0456a94efc9cf027b5f920cb63e13f38 Mon Sep 17 00:00:00 2001 From: Simon McFarlane Date: Thu, 8 Apr 2021 20:57:53 -0700 Subject: [PATCH] verilog-mode: add save-excursion to fix completion-at-word mangling cursor --- lisp/progmodes/verilog-mode.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index a7f72950b1..bc4f101c0a 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -7630,27 +7630,27 @@ nil otherwise." (let ((state (car (verilog-calculate-indent)))) (cond ((eq state 'defun) (save-excursion (verilog-var-completion)) - (verilog-func-completion 'module) + (save-excursion (verilog-func-completion 'module)) (verilog-keyword-completion verilog-defun-keywords)) ((eq state 'behavioral) (save-excursion (verilog-var-completion)) - (verilog-func-completion 'module) + (save-excursion (verilog-func-completion 'module)) (verilog-keyword-completion verilog-defun-keywords)) ((eq state 'block) (save-excursion (verilog-var-completion)) - (verilog-func-completion 'tf) + (save-excursion (verilog-func-completion 'tf)) (verilog-keyword-completion verilog-block-keywords)) ((eq state 'case) (save-excursion (verilog-var-completion)) - (verilog-func-completion 'tf) + (save-excursion (verilog-func-completion 'tf)) (verilog-keyword-completion verilog-case-keywords)) ((eq state 'tf) (save-excursion (verilog-var-completion)) - (verilog-func-completion 'tf) + (save-excursion (verilog-func-completion 'tf)) (verilog-keyword-completion verilog-tf-keywords)) ((eq state 'cpp) @@ -7662,7 +7662,7 @@ nil otherwise." (t;--Anywhere else (save-excursion (verilog-var-completion)) - (verilog-func-completion 'both) + (save-excursion (verilog-func-completion 'both)) (verilog-keyword-completion verilog-separator-keywords)))) ;; Now we have built a list of all matches. Give response to caller -- 2.31.1