1215 |
(message "No end found.") |
(message "No end found.") |
1216 |
nil))) |
nil))) |
1217 |
|
|
1218 |
|
(defvar f90-mark-subprogram-overlay nil |
1219 |
|
"Used internally by `f90-mark-subprogram' to highlight the subprogram.") |
1220 |
|
(make-variable-buffer-local 'f90-mark-subprogram-overlay) |
1221 |
|
|
1222 |
(defun f90-mark-subprogram () |
(defun f90-mark-subprogram () |
1223 |
"Put mark at end of F90 subprogram, point at beginning. |
"Put mark at end of F90 subprogram, point at beginning, push marks. |
1224 |
Marks are pushed and highlight (grey shadow) is turned on." |
If called interactively, highlight the subprogram with the face `highlight'. |
1225 |
|
Call again to remove the highlighting." |
1226 |
(interactive) |
(interactive) |
1227 |
(let ((pos (point)) program) |
(let ((pos (point)) program) |
1228 |
(f90-end-of-subprogram) |
(f90-end-of-subprogram) |
1233 |
(if f90-xemacs-flag |
(if f90-xemacs-flag |
1234 |
(zmacs-activate-region) |
(zmacs-activate-region) |
1235 |
(setq mark-active t |
(setq mark-active t |
1236 |
deactivate-mark nil)) |
deactivate-mark nil) |
1237 |
|
(if (interactive-p) |
1238 |
|
(if (overlayp f90-mark-subprogram-overlay) |
1239 |
|
(if (overlay-buffer f90-mark-subprogram-overlay) |
1240 |
|
(delete-overlay f90-mark-subprogram-overlay) |
1241 |
|
(move-overlay f90-mark-subprogram-overlay (point) (mark))) |
1242 |
|
(setq f90-mark-subprogram-overlay (make-overlay (point) (mark))) |
1243 |
|
(overlay-put f90-mark-subprogram-overlay 'face 'highlight)))) |
1244 |
program)) |
program)) |
1245 |
|
|
1246 |
(defun f90-comment-region (beg-region end-region) |
(defun f90-comment-region (beg-region end-region) |