6120 |
(vhdl-keep-region-active) |
(vhdl-keep-region-active) |
6121 |
foundp)) |
foundp)) |
6122 |
|
|
6123 |
(defun vhdl-beginning-of-statement (&optional count lim) |
(defun vhdl-beginning-of-statement (&optional count lim interactive) |
6124 |
"Go to the beginning of the innermost VHDL statement. |
"Go to the beginning of the innermost VHDL statement. |
6125 |
With prefix arg, go back N - 1 statements. If already at the |
With prefix arg, go back N - 1 statements. If already at the |
6126 |
beginning of a statement then go to the beginning of the preceding |
beginning of a statement then go to the beginning of the preceding |
6127 |
one. If within a string or comment, or next to a comment (only |
one. If within a string or comment, or next to a comment (only |
6128 |
whitespace between), move by sentences instead of statements. |
whitespace between), move by sentences instead of statements. |
6129 |
|
|
6130 |
When called from a program, this function takes 2 optional args: the |
When called from a program, this function takes 3 optional args: the |
6131 |
prefix arg, and a buffer position limit which is the farthest back to |
prefix arg, and a buffer position limit which is the farthest back to |
6132 |
search." |
search, and something whose meaning I don't understand." |
6133 |
(interactive "p") |
(interactive "p\np") |
6134 |
(let ((count (or count 1)) |
(let ((count (or count 1)) |
6135 |
(case-fold-search t) |
(case-fold-search t) |
6136 |
(lim (or lim (point-min))) |
(lim (or lim (point-min))) |
6139 |
(save-excursion |
(save-excursion |
6140 |
(goto-char lim) |
(goto-char lim) |
6141 |
(setq state (parse-partial-sexp (point) here nil nil))) |
(setq state (parse-partial-sexp (point) here nil nil))) |
6142 |
(if (and (interactive-p) |
(if (and interactive |
6143 |
(or (nth 3 state) |
(or (nth 3 state) |
6144 |
(nth 4 state) |
(nth 4 state) |
6145 |
(looking-at (concat "[ \t]*" comment-start-skip)))) |
(looking-at (concat "[ \t]*" comment-start-skip)))) |
7531 |
|
|
7532 |
(defun vhdl-fill-region (beg end &optional arg) |
(defun vhdl-fill-region (beg end &optional arg) |
7533 |
"Fill lines for a region of code." |
"Fill lines for a region of code." |
7534 |
(interactive "r") |
(interactive "r\np") |
7535 |
(save-excursion |
(save-excursion |
7536 |
(goto-char beg) |
(goto-char beg) |
7537 |
(let ((margin (if (interactive-p) (current-indentation) (current-column)))) |
(let ((margin (if interactive (current-indentation) (current-column)))) |
7538 |
(goto-char end) |
(goto-char end) |
7539 |
(setq end (point-marker)) |
(setq end (point-marker)) |
7540 |
;; remove inline comments, newlines and whitespace |
;; remove inline comments, newlines and whitespace |