aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2007-04-21 19:53:39 +0000
committerChong Yidong2007-04-21 19:53:39 +0000
commit453cfeb31b4efbde3d6d8c72461e25b36a5ff0c4 (patch)
tree34dbae20f2dd7c3453952d715bf80ebfc39650a3
parentecff835def4c80240fec05d1304432d63f1c3903 (diff)
downloademacs-453cfeb31b4efbde3d6d8c72461e25b36a5ff0c4.tar.gz
emacs-453cfeb31b4efbde3d6d8c72461e25b36a5ff0c4.zip
(vhdl-template-type)
(vhdl-template-record, vhdl-template-nature) (vhdl-template-configuration-spec, vhdl-template-component-inst) (vhdl-template-break, vhdl-regress-line, vhdl-electric-tab): Use delete-region instead of kill-word and kill-line.
-rw-r--r--lisp/progmodes/vhdl-mode.el22
1 files changed, 12 insertions, 10 deletions
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 2d7bbd79c6b..c549d066b64 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -7028,7 +7028,7 @@ else indent `correctly'."
7028 (indent-to comment-column) 7028 (indent-to comment-column)
7029 (indent-according-to-mode)) 7029 (indent-according-to-mode))
7030 (t ; inline comment indent 7030 (t ; inline comment indent
7031 (kill-line -0)))) 7031 (delete-region (line-beginning-position) (point)))))
7032 ;; dedent 7032 ;; dedent
7033 ((and (>= (current-indentation) vhdl-basic-offset) 7033 ((and (>= (current-indentation) vhdl-basic-offset)
7034 (or (eq last-command 'vhdl-electric-tab) 7034 (or (eq last-command 'vhdl-electric-tab)
@@ -7161,7 +7161,7 @@ ENDPOS is encountered."
7161 (when (not (looking-at "^\\s-*\\(--.*\\)?$")) 7161 (when (not (looking-at "^\\s-*\\(--.*\\)?$"))
7162 (end-of-line) 7162 (end-of-line)
7163 (if (search-backward " -- ((" (vhdl-point 'bol) t) 7163 (if (search-backward " -- ((" (vhdl-point 'bol) t)
7164 (kill-line)) 7164 (delete-region (point) (line-end-position)))
7165 (insert " -- ") 7165 (insert " -- ")
7166 (insert (format "%s" expurgated)))))) 7166 (insert (format "%s" expurgated))))))
7167 (vhdl-keep-region-active)) 7167 (vhdl-keep-region-active))
@@ -8346,7 +8346,9 @@ Turn on if ARG positive, turn off if ARG negative, toggle if ARG zero or nil."
8346 (progn (vhdl-insert-keyword "FOR ") 8346 (progn (vhdl-insert-keyword "FOR ")
8347 (if (vhdl-template-field "[quantity name]" " USE " t) 8347 (if (vhdl-template-field "[quantity name]" " USE " t)
8348 (progn (vhdl-template-field "quantity name" " => ") t) 8348 (progn (vhdl-template-field "quantity name" " => ") t)
8349 (kill-word -1) nil)) 8349 (delete-region (point)
8350 (progn (forward-word -1) (point)))
8351 nil))
8350 (vhdl-template-field "[quantity name]" " => " t)) 8352 (vhdl-template-field "[quantity name]" " => " t))
8351 (vhdl-template-field "expression") 8353 (vhdl-template-field "expression")
8352 (setq position (point)) 8354 (setq position (point))
@@ -8482,7 +8484,7 @@ since these are almost equivalent)."
8482 (setq position (point)) 8484 (setq position (point))
8483 (vhdl-insert-keyword "PORT ") 8485 (vhdl-insert-keyword "PORT ")
8484 (unless (vhdl-template-map position t t) 8486 (unless (vhdl-template-map position t t)
8485 (kill-line -0) 8487 (delete-region (line-beginning-position) (point))
8486 (delete-char -1)) 8488 (delete-char -1))
8487 (insert ";")))) 8489 (insert ";"))))
8488 8490
@@ -8573,7 +8575,7 @@ a configuration declaration if not within a design unit."
8573 (setq position (point)) 8575 (setq position (point))
8574 (vhdl-insert-keyword "PORT ") 8576 (vhdl-insert-keyword "PORT ")
8575 (unless (vhdl-template-map position t t) 8577 (unless (vhdl-template-map position t t)
8576 (kill-line -0) 8578 (delete-region (line-beginning-position) (point))
8577 (delete-char -1)) 8579 (delete-char -1))
8578 (insert ";") 8580 (insert ";")
8579 t) 8581 t)
@@ -9116,11 +9118,11 @@ otherwise."
9116 (cond ((equal definition "") 9118 (cond ((equal definition "")
9117 (insert ";")) 9119 (insert ";"))
9118 ((equal definition "ARRAY") 9120 ((equal definition "ARRAY")
9119 (kill-word -1) 9121 (delete-region (point) (progn (forward-word -1) (point)))
9120 (vhdl-template-array 'nature t)) 9122 (vhdl-template-array 'nature t))
9121 ((equal definition "RECORD") 9123 ((equal definition "RECORD")
9122 (setq mid-pos (point-marker)) 9124 (setq mid-pos (point-marker))
9123 (kill-word -1) 9125 (delete-region (point) (progn (forward-word -1) (point)))
9124 (vhdl-template-record 'nature name t)) 9126 (vhdl-template-record 'nature name t))
9125 (t 9127 (t
9126 (vhdl-insert-keyword " ACROSS ") 9128 (vhdl-insert-keyword " ACROSS ")
@@ -9435,7 +9437,7 @@ otherwise."
9435 (insert "\n") 9437 (insert "\n")
9436 (indent-to (+ margin vhdl-basic-offset)) 9438 (indent-to (+ margin vhdl-basic-offset))
9437 (setq first nil)) 9439 (setq first nil))
9438 (kill-line -0) 9440 (delete-region (line-beginning-position) (point))
9439 (indent-to margin) 9441 (indent-to margin)
9440 (vhdl-insert-keyword "END RECORD") 9442 (vhdl-insert-keyword "END RECORD")
9441 (unless (vhdl-standard-p '87) (and name (insert " " name))) 9443 (unless (vhdl-standard-p '87) (and name (insert " " name)))
@@ -9600,11 +9602,11 @@ otherwise."
9600 (delete-backward-char 4) 9602 (delete-backward-char 4)
9601 (insert ";")) 9603 (insert ";"))
9602 ((equal definition "ARRAY") 9604 ((equal definition "ARRAY")
9603 (kill-word -1) 9605 (delete-region (point) (progn (forward-word -1) (point)))
9604 (vhdl-template-array 'type t)) 9606 (vhdl-template-array 'type t))
9605 ((equal definition "RECORD") 9607 ((equal definition "RECORD")
9606 (setq mid-pos (point-marker)) 9608 (setq mid-pos (point-marker))
9607 (kill-word -1) 9609 (delete-region (point) (progn (forward-word -1) (point)))
9608 (vhdl-template-record 'type name t)) 9610 (vhdl-template-record 'type name t))
9609 ((equal definition "ACCESS") 9611 ((equal definition "ACCESS")
9610 (insert " ") 9612 (insert " ")