aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorGlenn Morris2002-04-28 22:15:51 +0000
committerGlenn Morris2002-04-28 22:15:51 +0000
commit82b4fc4ab4cea651f8341db488fffa1bb180ef8a (patch)
treed9b1e31dde7bd29ac399031cb51c1266daaeaef0 /lisp/progmodes
parent1bb3ae5c0b337d3b05eb4cd34bdfddf6267c1001 (diff)
downloademacs-82b4fc4ab4cea651f8341db488fffa1bb180ef8a.tar.gz
emacs-82b4fc4ab4cea651f8341db488fffa1bb180ef8a.zip
(f90-mark-subprogram-overlay): New internal variable.
(f90-mark-subprogram): Use it to highlight the subprogram with an overlay.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/f90.el18
1 files changed, 15 insertions, 3 deletions
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index f88d94cca46..873520c7544 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -1215,9 +1215,14 @@ Return (type name) or nil if not found."
1215 (message "No end found.") 1215 (message "No end found.")
1216 nil))) 1216 nil)))
1217 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
1218(defun f90-mark-subprogram () 1222(defun f90-mark-subprogram ()
1219 "Put mark at end of F90 subprogram, point at beginning. 1223 "Put mark at end of F90 subprogram, point at beginning, push marks.
1220Marks are pushed and highlight (grey shadow) is turned on." 1224If called interactively, highlight the subprogram with the face `highlight'.
1225Call again to remove the highlighting."
1221 (interactive) 1226 (interactive)
1222 (let ((pos (point)) program) 1227 (let ((pos (point)) program)
1223 (f90-end-of-subprogram) 1228 (f90-end-of-subprogram)
@@ -1228,7 +1233,14 @@ Marks are pushed and highlight (grey shadow) is turned on."
1228 (if f90-xemacs-flag 1233 (if f90-xemacs-flag
1229 (zmacs-activate-region) 1234 (zmacs-activate-region)
1230 (setq mark-active t 1235 (setq mark-active t
1231 deactivate-mark nil)) 1236 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))))
1232 program)) 1244 program))
1233 1245
1234(defun f90-comment-region (beg-region end-region) 1246(defun f90-comment-region (beg-region end-region)