diff options
Diffstat (limited to 'lisp/progmodes/verilog-mode.el')
| -rw-r--r-- | lisp/progmodes/verilog-mode.el | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index 557d587e6f3..27f7580f523 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -7137,7 +7137,10 @@ IGNORE-NEXT is true to ignore next token, fake from inside case statement." uses-delayed) ;; Found signal/rvalue; push if not function (search-forward ")") (verilog-read-always-signals-recurse nil nil nil) - ;;(if dbg (save-excursion (set-buffer (get-buffer-create "*vl-dbg*")) (delete-region (point-min) (point-max)) (insert dbg) (setq dbg ""))) + ;;(if dbg (with-current-buffer (get-buffer-create "*vl-dbg*") + ;; (delete-region (point-min) (point-max)) + ;; (insert dbg) + ;; (setq dbg ""))) ;; Return what was found (list sigs-out nil sigs-in uses-delayed)))) @@ -7249,8 +7252,7 @@ list of ( (signal_name connection_name)... )." (defun verilog-set-define (defname defvalue &optional buffer enumname) "Set the definition DEFNAME to the DEFVALUE in the given BUFFER. Optionally associate it with the specified enumeration ENUMNAME." - (save-excursion - (set-buffer (or buffer (current-buffer))) + (with-current-buffer (or buffer (current-buffer)) (let ((mac (intern (concat "vh-" defname)))) ;;(message "Define %s=%s" defname defvalue) (sleep-for 1) ;; Need to define to a constant if no value given @@ -7497,8 +7499,8 @@ Some macros and such are also found and included. For dinotrace.el." (forward-line 1) (when (string-match "//" line) (setq line (substring line 0 (match-beginning 0)))) - (save-excursion - (set-buffer orig-buffer) ; Variables are buffer-local, so need right context. + ;; Variables are buffer-local, so need right context. + (with-current-buffer orig-buffer (verilog-getopt line)))))) (defun verilog-getopt-flags () @@ -7599,11 +7601,11 @@ Allows version control to check out the file if need be." (and (fboundp 'vc-backend) (vc-backend filename))) (let (pt) - (save-excursion - (set-buffer (find-file-noselect filename)) + (with-current-buffer (find-file-noselect filename) (goto-char (point-min)) (while (and - ;; It may be tempting to look for verilog-defun-re, don't, it slows things down a lot! + ;; It may be tempting to look for verilog-defun-re, + ;; don't, it slows things down a lot! (verilog-re-search-forward-quick "\\<module\\>" nil t) (verilog-re-search-forward-quick "[(;]" nil t)) (if (equal module (verilog-read-module-name)) |
