diff options
| author | Richard M. Stallman | 1998-10-14 19:55:35 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-10-14 19:55:35 +0000 |
| commit | 1c20c5890a48ac6016cb3a31a95d6fa1ec7ca016 (patch) | |
| tree | b71f1dd14478b6f094fae8f9876b4502cfbb7bc6 | |
| parent | 7218b1d448e442e26031f4fe890b980c52bb9ca0 (diff) | |
| download | emacs-1c20c5890a48ac6016cb3a31a95d6fa1ec7ca016.tar.gz emacs-1c20c5890a48ac6016cb3a31a95d6fa1ec7ca016.zip | |
(vhdl-add-index-menu): reverse order in imenu-generic-expression.
(vhdl-template-assert, vhdl-block, vhdl-configuration-spec)
(vhdl-elsif, vhdl-generate, vhdl-if, vhdl-map)
(vhdl-selected-signal-assignment, vhdl-use, vhdl-while-loop)
(vhdl-get-port, vhdl-get-generic): Replace (undo 0) by (undo).
(vhdl-when): Fix indentation problem.
(vhdl-outer-space): Add "_" to syntax table for expand-abbrev.
(vhdl-get-port, vhdl-get-generic): Bug fix in template.
(vhdl-hooked-abbrev): Bug fix in hooked abbrev.
| -rw-r--r-- | lisp/progmodes/vhdl-mode.el | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 337694e52b2..274c5e70df0 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el | |||
| @@ -1219,7 +1219,7 @@ The format is suitable for use with `easy-menu-define'." | |||
| 1219 | 1219 | ||
| 1220 | (defun vhdl-add-index-menu () | 1220 | (defun vhdl-add-index-menu () |
| 1221 | (make-local-variable 'imenu-generic-expression) | 1221 | (make-local-variable 'imenu-generic-expression) |
| 1222 | (setq imenu-generic-expression vhdl-imenu-generic-expression) | 1222 | (setq imenu-generic-expression (nreverse vhdl-imenu-generic-expression)) |
| 1223 | (imenu-add-to-menubar "Index")) | 1223 | (imenu-add-to-menubar "Index")) |
| 1224 | 1224 | ||
| 1225 | ;; ############################################################################ | 1225 | ;; ############################################################################ |
| @@ -3955,7 +3955,7 @@ the token in MATCH." | |||
| 3955 | (vhdl-insert-keyword "ASSERT ") | 3955 | (vhdl-insert-keyword "ASSERT ") |
| 3956 | (if vhdl-conditions-in-parenthesis (insert "(")) | 3956 | (if vhdl-conditions-in-parenthesis (insert "(")) |
| 3957 | (if (equal (vhdl-field "condition (negated)") "") | 3957 | (if (equal (vhdl-field "condition (negated)") "") |
| 3958 | (progn (undo 0) (insert " ")) | 3958 | (progn (undo) (insert " ")) |
| 3959 | (if vhdl-conditions-in-parenthesis (insert ")")) | 3959 | (if vhdl-conditions-in-parenthesis (insert ")")) |
| 3960 | (vhdl-insert-keyword " REPORT \"") | 3960 | (vhdl-insert-keyword " REPORT \"") |
| 3961 | (vhdl-field "string-expression" "\" ") | 3961 | (vhdl-field "string-expression" "\" ") |
| @@ -3991,7 +3991,7 @@ the token in MATCH." | |||
| 3991 | (let* ((margin (current-column)) | 3991 | (let* ((margin (current-column)) |
| 3992 | (name (vhdl-field "label"))) | 3992 | (name (vhdl-field "label"))) |
| 3993 | (if (equal name "") | 3993 | (if (equal name "") |
| 3994 | (progn (undo 0) (insert " ")) | 3994 | (progn (undo) (insert " ")) |
| 3995 | (end-of-line) | 3995 | (end-of-line) |
| 3996 | (insert "(") | 3996 | (insert "(") |
| 3997 | (if (equal (vhdl-field "[guard expression]") "") | 3997 | (if (equal (vhdl-field "[guard expression]") "") |
| @@ -4132,7 +4132,7 @@ a configuration declaration if not within a design unit." | |||
| 4132 | (let ((margin (current-column))) | 4132 | (let ((margin (current-column))) |
| 4133 | (vhdl-insert-keyword "FOR ") | 4133 | (vhdl-insert-keyword "FOR ") |
| 4134 | (if (equal (vhdl-field "(component names | ALL)" " : ") "") | 4134 | (if (equal (vhdl-field "(component names | ALL)" " : ") "") |
| 4135 | (progn (undo 0) (insert " ")) | 4135 | (progn (undo) (insert " ")) |
| 4136 | (vhdl-field "component type" "\n") | 4136 | (vhdl-field "component type" "\n") |
| 4137 | (indent-to (+ margin vhdl-basic-offset)) | 4137 | (indent-to (+ margin vhdl-basic-offset)) |
| 4138 | (vhdl-insert-keyword "USE ENTITY ") | 4138 | (vhdl-insert-keyword "USE ENTITY ") |
| @@ -4261,7 +4261,7 @@ a configuration declaration if not within a design unit." | |||
| 4261 | (vhdl-insert-keyword "ELSIF ") | 4261 | (vhdl-insert-keyword "ELSIF ") |
| 4262 | (if vhdl-conditions-in-parenthesis (insert "(")) | 4262 | (if vhdl-conditions-in-parenthesis (insert "(")) |
| 4263 | (if (equal (vhdl-field "condition") "") | 4263 | (if (equal (vhdl-field "condition") "") |
| 4264 | (progn (undo 0) (insert " ")) | 4264 | (progn (undo) (insert " ")) |
| 4265 | (if vhdl-conditions-in-parenthesis (insert ")")) | 4265 | (if vhdl-conditions-in-parenthesis (insert ")")) |
| 4266 | (vhdl-indent-line) | 4266 | (vhdl-indent-line) |
| 4267 | (setq margin (current-indentation)) | 4267 | (setq margin (current-indentation)) |
| @@ -4385,7 +4385,7 @@ declaration, a for loop otherwise." | |||
| 4385 | (label (vhdl-field "label")) | 4385 | (label (vhdl-field "label")) |
| 4386 | (string)) | 4386 | (string)) |
| 4387 | (if (equal label "") | 4387 | (if (equal label "") |
| 4388 | (progn (undo 0) (insert " ")) | 4388 | (progn (undo) (insert " ")) |
| 4389 | (insert " : ") | 4389 | (insert " : ") |
| 4390 | (setq string (vhdl-field "(FOR | IF)")) | 4390 | (setq string (vhdl-field "(FOR | IF)")) |
| 4391 | (insert " ") | 4391 | (insert " ") |
| @@ -4482,7 +4482,7 @@ declaration, a for loop otherwise." | |||
| 4482 | (vhdl-insert-keyword "IF ") | 4482 | (vhdl-insert-keyword "IF ") |
| 4483 | (if vhdl-conditions-in-parenthesis (insert "(")) | 4483 | (if vhdl-conditions-in-parenthesis (insert "(")) |
| 4484 | (if (equal (vhdl-field "condition") "") | 4484 | (if (equal (vhdl-field "condition") "") |
| 4485 | (progn (undo 0) (insert " ")) | 4485 | (progn (undo) (insert " ")) |
| 4486 | (if vhdl-conditions-in-parenthesis (insert ")")) | 4486 | (if vhdl-conditions-in-parenthesis (insert ")")) |
| 4487 | (vhdl-insert-keyword " THEN\n\n") | 4487 | (vhdl-insert-keyword " THEN\n\n") |
| 4488 | (indent-to margin) | 4488 | (indent-to margin) |
| @@ -4535,7 +4535,7 @@ declaration, a for loop otherwise." | |||
| 4535 | (interactive) | 4535 | (interactive) |
| 4536 | (vhdl-insert-keyword "MAP (") | 4536 | (vhdl-insert-keyword "MAP (") |
| 4537 | (if (equal (vhdl-field "[association list]") "") | 4537 | (if (equal (vhdl-field "[association list]") "") |
| 4538 | (progn (undo 0) (insert " ")) | 4538 | (progn (undo) (insert " ")) |
| 4539 | (insert ")") | 4539 | (insert ")") |
| 4540 | )) | 4540 | )) |
| 4541 | 4541 | ||
| @@ -4718,7 +4718,7 @@ declaration, a for loop otherwise." | |||
| 4718 | (goto-char position)) | 4718 | (goto-char position)) |
| 4719 | (vhdl-insert-keyword "WITH ") | 4719 | (vhdl-insert-keyword "WITH ") |
| 4720 | (if (equal (vhdl-field "selector expression") "") | 4720 | (if (equal (vhdl-field "selector expression") "") |
| 4721 | (progn (undo 0) (insert " ")) | 4721 | (progn (undo) (insert " ")) |
| 4722 | (end-of-line) | 4722 | (end-of-line) |
| 4723 | (insert "\n") | 4723 | (insert "\n") |
| 4724 | (indent-to (+ margin vhdl-basic-offset)) | 4724 | (indent-to (+ margin vhdl-basic-offset)) |
| @@ -4806,7 +4806,7 @@ declaration, a for loop otherwise." | |||
| 4806 | (vhdl-insert-keyword "USE ..ALL;") | 4806 | (vhdl-insert-keyword "USE ..ALL;") |
| 4807 | (backward-char 6) | 4807 | (backward-char 6) |
| 4808 | (if (equal (vhdl-field "library name") "") | 4808 | (if (equal (vhdl-field "library name") "") |
| 4809 | (progn (undo 0) (insert " ")) | 4809 | (progn (undo) (insert " ")) |
| 4810 | (forward-char 1) | 4810 | (forward-char 1) |
| 4811 | (vhdl-field "package name") | 4811 | (vhdl-field "package name") |
| 4812 | (end-of-line) | 4812 | (end-of-line) |
| @@ -4855,7 +4855,8 @@ declaration, a for loop otherwise." | |||
| 4855 | (interactive) | 4855 | (interactive) |
| 4856 | (let ((position (point)) | 4856 | (let ((position (point)) |
| 4857 | (margin)) | 4857 | (margin)) |
| 4858 | (if (and (re-search-forward "\\<end\\>" nil t) | 4858 | (if (and (= (current-column) (current-indentation)) |
| 4859 | (re-search-forward "\\<end\\>" nil t) | ||
| 4859 | (looking-at "\\s-*\\<case\\>")) | 4860 | (looking-at "\\s-*\\<case\\>")) |
| 4860 | (progn | 4861 | (progn |
| 4861 | (setq margin (current-indentation)) | 4862 | (setq margin (current-indentation)) |
| @@ -4880,7 +4881,7 @@ declaration, a for loop otherwise." | |||
| 4880 | (end-of-line) | 4881 | (end-of-line) |
| 4881 | (if vhdl-conditions-in-parenthesis (insert "(")) | 4882 | (if vhdl-conditions-in-parenthesis (insert "(")) |
| 4882 | (if (equal (vhdl-field "condition") "") | 4883 | (if (equal (vhdl-field "condition") "") |
| 4883 | (progn (undo 0) (insert " ")) | 4884 | (progn (undo 2)) |
| 4884 | (if vhdl-conditions-in-parenthesis (insert ")")) | 4885 | (if vhdl-conditions-in-parenthesis (insert ")")) |
| 4885 | (vhdl-insert-keyword " LOOP\n\n") | 4886 | (vhdl-insert-keyword " LOOP\n\n") |
| 4886 | (indent-to margin) | 4887 | (indent-to margin) |
| @@ -5106,7 +5107,12 @@ if in comment and past end-comment-column." | |||
| 5106 | (interactive "p") | 5107 | (interactive "p") |
| 5107 | (if (or (and (>= (preceding-char) ?a) (<= (preceding-char) ?z)) | 5108 | (if (or (and (>= (preceding-char) ?a) (<= (preceding-char) ?z)) |
| 5108 | (and (>= (preceding-char) ?A) (<= (preceding-char) ?Z))) | 5109 | (and (>= (preceding-char) ?A) (<= (preceding-char) ?Z))) |
| 5109 | (expand-abbrev)) | 5110 | (progn |
| 5111 | (modify-syntax-entry ?_ "w" vhdl-mode-syntax-table) | ||
| 5112 | (expand-abbrev) | ||
| 5113 | (if (not vhdl-underscore-is-part-of-word) | ||
| 5114 | (modify-syntax-entry ?_ "_" vhdl-mode-syntax-table)) | ||
| 5115 | )) | ||
| 5110 | (if (not (vhdl-in-comment-p)) | 5116 | (if (not (vhdl-in-comment-p)) |
| 5111 | (self-insert-command count) | 5117 | (self-insert-command count) |
| 5112 | (if (< (current-column) end-comment-column) | 5118 | (if (< (current-column) end-comment-column) |
| @@ -5236,7 +5242,7 @@ Point is left between them." | |||
| 5236 | (progn (vhdl-kill-entire-line) (forward-line -1) | 5242 | (progn (vhdl-kill-entire-line) (forward-line -1) |
| 5237 | (if (not vhdl-argument-list-indent) | 5243 | (if (not vhdl-argument-list-indent) |
| 5238 | (progn (vhdl-kill-entire-line) (forward-line -1)))) | 5244 | (progn (vhdl-kill-entire-line) (forward-line -1)))) |
| 5239 | (progn (undo 0) (insert " ")) | 5245 | (progn (undo) (insert " ")) |
| 5240 | nil ) | 5246 | nil ) |
| 5241 | (insert " : ") | 5247 | (insert " : ") |
| 5242 | (progn | 5248 | (progn |
| @@ -5254,7 +5260,8 @@ Point is left between them." | |||
| 5254 | (setq vhdl-ports (vhdl-field "[names]" " : "))) | 5260 | (setq vhdl-ports (vhdl-field "[names]" " : "))) |
| 5255 | (goto-char semicolon-pos) | 5261 | (goto-char semicolon-pos) |
| 5256 | (if (not vhdl-argument-list-indent) | 5262 | (if (not vhdl-argument-list-indent) |
| 5257 | (progn (insert "\n") (indent-to margin))) | 5263 | (progn (delete-char 1) (end-of-line) (insert "\n") |
| 5264 | (indent-to margin) (insert ";") (backward-char 1))) | ||
| 5258 | (insert ")") | 5265 | (insert ")") |
| 5259 | (forward-char 1) | 5266 | (forward-char 1) |
| 5260 | (if (= (following-char) ? ) | 5267 | (if (= (following-char) ? ) |
| @@ -5285,7 +5292,7 @@ Point is left between them." | |||
| 5285 | (progn (vhdl-kill-entire-line) (end-of-line -0) | 5292 | (progn (vhdl-kill-entire-line) (end-of-line -0) |
| 5286 | (if (not vhdl-argument-list-indent) | 5293 | (if (not vhdl-argument-list-indent) |
| 5287 | (progn (vhdl-kill-entire-line) (end-of-line -0)))) | 5294 | (progn (vhdl-kill-entire-line) (end-of-line -0)))) |
| 5288 | (progn (undo 0) (insert " ")) | 5295 | (progn (undo) (insert " ")) |
| 5289 | nil ) | 5296 | nil ) |
| 5290 | (insert " : ") | 5297 | (insert " : ") |
| 5291 | (progn | 5298 | (progn |
| @@ -5308,7 +5315,8 @@ Point is left between them." | |||
| 5308 | (setq vhdl-generic (vhdl-field "[name]" " : ")))) | 5315 | (setq vhdl-generic (vhdl-field "[name]" " : ")))) |
| 5309 | (goto-char semicolon-pos) | 5316 | (goto-char semicolon-pos) |
| 5310 | (if (not vhdl-argument-list-indent) | 5317 | (if (not vhdl-argument-list-indent) |
| 5311 | (progn (insert "\n") (indent-to margin))) | 5318 | (progn (delete-char 1) (end-of-line) (insert "\n") |
| 5319 | (indent-to margin) (insert ";") (backward-char 1))) | ||
| 5312 | (insert ")") | 5320 | (insert ")") |
| 5313 | (forward-char 1) | 5321 | (forward-char 1) |
| 5314 | (if (= (following-char) ? ) | 5322 | (if (= (following-char) ? ) |
| @@ -5473,7 +5481,9 @@ else indent line in proper way for current major mode | |||
| 5473 | but not if inside a comment or quote)" | 5481 | but not if inside a comment or quote)" |
| 5474 | (if (or (vhdl-in-comment-p) | 5482 | (if (or (vhdl-in-comment-p) |
| 5475 | (vhdl-in-string-p) | 5483 | (vhdl-in-string-p) |
| 5476 | (save-excursion (forward-word -1) (looking-at "end"))) | 5484 | (save-excursion (forward-word -1) |
| 5485 | (and (looking-at "\\<end\\>") | ||
| 5486 | (not (looking-at "\\<end;"))))) | ||
| 5477 | (progn | 5487 | (progn |
| 5478 | (insert " ") | 5488 | (insert " ") |
| 5479 | (unexpand-abbrev) | 5489 | (unexpand-abbrev) |