summaryrefslogtreecommitdiff
path: root/lisp/progmodes/vhdl-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/vhdl-mode.el')
-rw-r--r--lisp/progmodes/vhdl-mode.el61
1 files changed, 33 insertions, 28 deletions
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index b176e64652e..5c78aaa1daa 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -6577,7 +6577,7 @@ returned point is at the first character of the \"libunit\" keyword."
;; keyword, allow for the keyword and an extra character,
;; as this will be used when looking forward for the
;; "begin" keyword.
- (save-excursion (forward-word 1) (1+ (point))))
+ (save-excursion (forward-word-strictly 1) (1+ (point))))
foundp literal placeholder)
;; Find the "libunit" keyword.
(while (and (not foundp)
@@ -6628,7 +6628,7 @@ stops due to beginning or end of buffer."
;; keyword, allow for the keyword and an extra character,
;; as this will be used when looking forward for the
;; "begin" keyword.
- (save-excursion (forward-word 1) (1+ (point))))
+ (save-excursion (forward-word-strictly 1) (1+ (point))))
begin-string literal)
(while (and (not foundp)
(re-search-backward vhdl-defun-re nil 'move))
@@ -6774,7 +6774,7 @@ statement if already at the beginning of one."
;; start point was not inside leader area
;; set stop point at word after leader
(setq pos (point))))
- (forward-word 1)
+ (forward-word-strictly 1)
(vhdl-forward-syntactic-ws here)
(setq pos (point)))
(goto-char pos)
@@ -8452,7 +8452,7 @@ buffer."
(setq end (vhdl-re-search-forward "\\<then\\>" proc-end t))
(when (vhdl-re-search-backward "\\('event\\|\\<\\(falling\\|rising\\)_edge\\)\\>" beg t)
(goto-char end)
- (backward-word 1)
+ (backward-word-strictly 1)
(vhdl-forward-sexp)
(push (cons end (point)) seq-region-list)
(beginning-of-line)))
@@ -8924,7 +8924,7 @@ is omitted or nil."
(vhdl-insert-keyword ": BLOCK ")
(goto-char start)
(when (setq label (vhdl-template-field "label" nil t start (+ (point) 8)))
- (forward-word 1)
+ (forward-word-strictly 1)
(forward-char 1)
(insert "(")
(if (vhdl-template-field "[guard expression]" nil t)
@@ -8960,7 +8960,7 @@ is omitted or nil."
(if (vhdl-template-field "[quantity name]" " USE " t)
(progn (vhdl-template-field "quantity name" " => ") t)
(delete-region (point)
- (progn (forward-word -1) (point)))
+ (progn (forward-word-strictly -1) (point)))
nil))
(vhdl-template-field "[quantity name]" " => " t))
(vhdl-template-field "expression")
@@ -8993,7 +8993,7 @@ is omitted or nil."
(goto-char start)
(setq label (vhdl-template-field "[label]" nil t))
(unless label (delete-char 2))
- (forward-word 1)
+ (forward-word-strictly 1)
(forward-char 1))
(when (vhdl-template-field "expression" nil t start (point))
(vhdl-insert-keyword (concat " " (if (eq kind 'is) "IS" "USE") "\n\n"))
@@ -9275,7 +9275,7 @@ a configuration declaration if not within a design unit."
(interactive)
(insert " ")
(unexpand-abbrev)
- (backward-word 1)
+ (backward-word-strictly 1)
(vhdl-case-word 1)
(forward-char 1))
@@ -9284,7 +9284,7 @@ a configuration declaration if not within a design unit."
(interactive)
(insert " ")
(unexpand-abbrev)
- (backward-word 1)
+ (backward-word-strictly 1)
(vhdl-case-word 1)
(forward-char 1)
(indent-according-to-mode))
@@ -9445,7 +9445,7 @@ otherwise."
(goto-char start)
(setq label (vhdl-template-field "[label]" nil t))
(unless label (delete-char 2))
- (forward-word 1)
+ (forward-word-strictly 1)
(forward-char 1))
(when (setq index (vhdl-template-field "loop variable"
nil t start (point)))
@@ -9586,7 +9586,7 @@ otherwise."
(goto-char start)
(setq label (vhdl-template-field "[label]" nil t))
(unless label (delete-char 2))
- (forward-word 1)
+ (forward-word-strictly 1)
(forward-char 1))
(when vhdl-conditions-in-parenthesis (insert "("))
(when (vhdl-template-field "condition" nil t start (point))
@@ -9669,7 +9669,7 @@ otherwise."
(goto-char start)
(setq label (vhdl-template-field "[label]" nil t))
(unless label (delete-char 2))
- (forward-word 1)
+ (forward-word-strictly 1)
(delete-char 1))
(insert "\n\n")
(indent-to margin)
@@ -9753,11 +9753,13 @@ otherwise."
(cond ((equal definition "")
(insert ";"))
((equal definition "ARRAY")
- (delete-region (point) (progn (forward-word -1) (point)))
+ (delete-region (point) (progn (forward-word-strictly -1)
+ (point)))
(vhdl-template-array 'nature t))
((equal definition "RECORD")
(setq mid-pos (point-marker))
- (delete-region (point) (progn (forward-word -1) (point)))
+ (delete-region (point) (progn (forward-word-strictly -1)
+ (point)))
(vhdl-template-record 'nature name t))
(t
(vhdl-insert-keyword " ACROSS ")
@@ -9870,7 +9872,7 @@ otherwise."
(goto-char start)
(setq label (vhdl-template-field "[label]" nil t))
(unless label (delete-char 2))
- (forward-word 1)
+ (forward-word-strictly 1)
(forward-char 1))
(unless (vhdl-standard-p '87) (vhdl-insert-keyword "IS"))
(insert "\n")
@@ -9927,7 +9929,7 @@ otherwise."
(goto-char start)
(setq label (vhdl-template-field "[label]" nil t))
(unless label (delete-char 2))
- (forward-word 1)
+ (forward-word-strictly 1)
(forward-char 1))
(insert "(")
(if (not seq)
@@ -10123,7 +10125,7 @@ otherwise."
(vhdl-insert-keyword "WITH ")
(when (vhdl-template-field "selector expression"
nil t start (+ (point) 7))
- (forward-word 1)
+ (forward-word-strictly 1)
(delete-char 1)
(insert "\n")
(indent-to (+ margin vhdl-basic-offset))
@@ -10245,11 +10247,13 @@ otherwise."
(delete-char -4)
(insert ";"))
((equal definition "ARRAY")
- (delete-region (point) (progn (forward-word -1) (point)))
+ (delete-region (point) (progn (forward-word-strictly -1)
+ (point)))
(vhdl-template-array 'type t))
((equal definition "RECORD")
(setq mid-pos (point-marker))
- (delete-region (point) (progn (forward-word -1) (point)))
+ (delete-region (point) (progn (forward-word-strictly -1)
+ (point)))
(vhdl-template-record 'type name t))
((equal definition "ACCESS")
(insert " ")
@@ -10293,7 +10297,8 @@ otherwise."
(if (or (save-excursion
(progn (vhdl-beginning-of-block)
(looking-at "\\s-*\\(\\w+\\s-*:\\s-*\\)?\\<\\(\\<function\\|procedure\\|process\\|procedural\\)\\>")))
- (save-excursion (backward-word 1) (looking-at "\\<shared\\>")))
+ (save-excursion (backward-word-strictly 1)
+ (looking-at "\\<shared\\>")))
(vhdl-insert-keyword "VARIABLE ")
(if (vhdl-standard-p '87)
(error "ERROR: Not within sequential block")
@@ -10351,7 +10356,7 @@ otherwise."
(goto-char start)
(setq label (vhdl-template-field "[label]" nil t))
(unless label (delete-char 2))
- (forward-word 1)
+ (forward-word-strictly 1)
(forward-char 1))
(when vhdl-conditions-in-parenthesis (insert "("))
(when (vhdl-template-field "condition" nil t start (point))
@@ -11213,7 +11218,7 @@ else insert tab (used for word completion in VHDL minibuffer)."
(save-match-data
(save-excursion
(goto-char (match-end 5))
- (forward-word 1)
+ (forward-word-strictly 1)
(vhdl-forward-syntactic-ws)
(when (looking-at "(")
(forward-sexp))
@@ -11287,19 +11292,19 @@ else insert tab (used for word completion in VHDL minibuffer)."
but not if inside a comment or quote."
(if (or (vhdl-in-literal)
(save-excursion
- (forward-word -1)
+ (forward-word-strictly -1)
(and (looking-at "\\<end\\>") (not (looking-at "\\<end;")))))
(progn
(insert " ")
(unexpand-abbrev)
- (backward-word 1)
+ (backward-word-strictly 1)
(vhdl-case-word 1)
(delete-char 1))
(if (not vhdl-electric-mode)
(progn
(insert " ")
(unexpand-abbrev)
- (backward-word 1)
+ (backward-word-strictly 1)
(vhdl-case-word 1)
(delete-char 1))
(let ((invoke-char vhdl-last-input-event)
@@ -11702,7 +11707,7 @@ reflected in a subsequent paste operation."
(equal "END" (upcase (match-string 1))))
(throw 'parse "ERROR: Not within an entity or component declaration"))
(setq decl-type (downcase (match-string-no-properties 1)))
- (forward-word 1)
+ (forward-word-strictly 1)
(vhdl-parse-string "\\s-+\\(\\w+\\)\\(\\s-+is\\>\\)?")
(setq name (match-string-no-properties 1))
(message "Reading port of %s \"%s\"..." decl-type name)
@@ -13206,7 +13211,7 @@ File statistics: \"%s\"\n\
;; subprogram body
(when (match-string 2)
(re-search-forward "^\\s-*\\<begin\\>" nil t)
- (backward-word 1)
+ (backward-word-strictly 1)
(vhdl-forward-sexp)))
;; block (recursive)
((looking-at "^\\s-*\\w+\\s-*:\\s-*block\\>")
@@ -13219,7 +13224,7 @@ File statistics: \"%s\"\n\
(re-search-forward "^\\s-*end\\s-+process\\>" nil t))
;; configuration declaration
((looking-at "^\\s-*configuration\\>")
- (forward-word 4)
+ (forward-word-strictly 4)
(vhdl-forward-sexp))
(t (goto-char pos))))))