[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/progmodes/f90.el
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/progmodes/f90.el |
Date: |
Mon, 27 May 2002 17:07:49 -0400 |
Index: emacs/lisp/progmodes/f90.el
diff -c emacs/lisp/progmodes/f90.el:1.55 emacs/lisp/progmodes/f90.el:1.56
*** emacs/lisp/progmodes/f90.el:1.55 Fri May 24 18:00:21 2002
--- emacs/lisp/progmodes/f90.el Sun May 26 15:54:22 2002
***************
*** 433,440 ****
(define-key map "\r" 'newline)
(define-key map "\C-c\r" 'f90-break-line)
;;; (define-key map [M-return] 'f90-break-line)
! (define-key map "\C-c\C-a" 'f90-previous-block-start)
! (define-key map "\C-c\C-e" 'f90-next-block-end)
(define-key map "\C-c\C-d" 'f90-join-lines)
(define-key map "\C-c\C-f" 'f90-fill-region)
(define-key map "\C-c\C-p" 'f90-previous-statement)
--- 433,440 ----
(define-key map "\r" 'newline)
(define-key map "\C-c\r" 'f90-break-line)
;;; (define-key map [M-return] 'f90-break-line)
! (define-key map "\C-c\C-a" 'f90-previous-block)
! (define-key map "\C-c\C-e" 'f90-next-block)
(define-key map "\C-c\C-d" 'f90-join-lines)
(define-key map "\C-c\C-f" 'f90-fill-region)
(define-key map "\C-c\C-p" 'f90-previous-statement)
***************
*** 1189,1203 ****
not-last-statement))
(defun f90-beginning-of-subprogram ()
! "Move point to the beginning of subprogram.
Return (TYPE NAME), or nil if not found."
(interactive)
(let ((count 1) (case-fold-search t) matching-beg)
(beginning-of-line)
! (skip-chars-forward " \t0-9")
! (if (setq matching-beg (f90-looking-at-program-block-start))
! (setq count (1- count)))
! (while (and (not (zerop count))
(re-search-backward f90-program-block-re nil 'move))
(beginning-of-line)
(skip-chars-forward " \t0-9")
--- 1189,1200 ----
not-last-statement))
(defun f90-beginning-of-subprogram ()
! "Move point to the beginning of the current subprogram.
Return (TYPE NAME), or nil if not found."
(interactive)
(let ((count 1) (case-fold-search t) matching-beg)
(beginning-of-line)
! (while (and (> count 0)
(re-search-backward f90-program-block-re nil 'move))
(beginning-of-line)
(skip-chars-forward " \t0-9")
***************
*** 1212,1227 ****
nil)))
(defun f90-end-of-subprogram ()
! "Move point to the end of subprogram.
Return (TYPE NAME), or nil if not found."
(interactive)
(let ((count 1) (case-fold-search t) matching-end)
- (beginning-of-line)
- (skip-chars-forward " \t0-9")
- (if (setq matching-end (f90-looking-at-program-block-end))
- (setq count (1- count)))
(end-of-line)
! (while (and (not (zerop count))
(re-search-forward f90-program-block-re nil 'move))
(beginning-of-line)
(skip-chars-forward " \t0-9")
--- 1209,1220 ----
nil)))
(defun f90-end-of-subprogram ()
! "Move point to the end of the current subprogram.
Return (TYPE NAME), or nil if not found."
(interactive)
(let ((count 1) (case-fold-search t) matching-end)
(end-of-line)
! (while (and (> count 0)
(re-search-forward f90-program-block-re nil 'move))
(beginning-of-line)
(skip-chars-forward " \t0-9")
***************
*** 1285,1291 ****
(error "End label `%s' does not match start label `%s'"
end-label start-label)))))
(end-of-line))
! (if (> count 0) (error "Unterminated block"))
;; Check outermost block.
(if (interactive-p)
(save-excursion
--- 1278,1284 ----
(error "End label `%s' does not match start label `%s'"
end-label start-label)))))
(end-of-line))
! (if (> count 0) (error "Missing block end"))
;; Check outermost block.
(if (interactive-p)
(save-excursion
***************
*** 1340,1378 ****
start-label end-label))))))
(if (> count 0) (error "Missing block start"))))
! (defun f90-next-block-end (&optional num)
! "Move point forward to the next block end.
! With optional argument NUM, go forward that many block ends.
! If NUM is negative, go backward to the start of a block."
(interactive "p")
! (if (and num (< num 0)) (f90-previous-block-start (- num)))
! (let ((count (or num 1))
! (end-re (concat "end[ \t]*" f90-blocks-re)))
! (while (and (> count 0) (re-search-forward end-re nil 'move))
(beginning-of-line)
(skip-chars-forward " \t0-9")
! (or (f90-in-string) (f90-in-comment)
! (setq count (1- count)))
! (end-of-line))))
!
! (defun f90-previous-block-start (&optional num)
! "Move point backward to the previous block start.
! With optional argument NUM, go backward that many block starts.
! If NUM is negative, go forward to the end of a block."
(interactive "p")
! (if (and num (< num 0)) (f90-next-block-end (- num)))
! (let ((count (or num 1)))
! (while (and (> count 0) (re-search-backward f90-blocks-re nil 'move))
! (beginning-of-line)
! (skip-chars-forward " \t0-9")
! (or (f90-in-string) (f90-in-comment)
! (and (or (f90-looking-at-do)
! (f90-looking-at-select-case)
! (f90-looking-at-type-like)
! (f90-looking-at-program-block-start)
! (f90-looking-at-if-then)
! (f90-looking-at-where-or-forall))
! (setq count (1- count)))))))
(defvar f90-mark-subprogram-overlay nil
--- 1333,1372 ----
start-label end-label))))))
(if (> count 0) (error "Missing block start"))))
! (defun f90-next-block (&optional num)
! "Move point forward to the next end or start of a code block.
! With optional argument NUM, go forward that many blocks.
! If NUM is negative, go backwards.
! A block is a subroutine, if-endif, etc."
(interactive "p")
! (let ((case-fold-search t)
! (count (if num (abs num) 1)))
! (while (and (> count 0)
! (if (> num 0) (re-search-forward f90-blocks-re nil 'move)
! (re-search-backward f90-blocks-re nil 'move)))
(beginning-of-line)
(skip-chars-forward " \t0-9")
! (cond ((or (f90-in-string) (f90-in-comment)))
! ((or
! (looking-at "end[ \t]*")
! (f90-looking-at-do)
! (f90-looking-at-select-case)
! (f90-looking-at-type-like)
! (f90-looking-at-program-block-start)
! (f90-looking-at-if-then)
! (f90-looking-at-where-or-forall))
! (setq count (1- count))))
! (if (> num 0) (end-of-line)
! (beginning-of-line)))))
!
!
! (defun f90-previous-block (&optional num)
! "Move point backward to the previous end or start of a code block.
! With optional argument NUM, go backward that many blocks.
! If NUM is negative, go forwards.
! A block is a subroutine, if-endif, etc."
(interactive "p")
! (f90-next-block (- (or num 1))))
(defvar f90-mark-subprogram-overlay nil
- [Emacs-diffs] Changes to emacs/lisp/progmodes/f90.el, (continued)
- [Emacs-diffs] Changes to emacs/lisp/progmodes/f90.el, Glenn Morris, 2002/05/18
- [Emacs-diffs] Changes to emacs/lisp/progmodes/f90.el, Glenn Morris, 2002/05/18
- [Emacs-diffs] Changes to emacs/lisp/progmodes/f90.el, Glenn Morris, 2002/05/18
- [Emacs-diffs] Changes to emacs/lisp/progmodes/f90.el, Glenn Morris, 2002/05/19
- [Emacs-diffs] Changes to emacs/lisp/progmodes/f90.el, Glenn Morris, 2002/05/19
- [Emacs-diffs] Changes to emacs/lisp/progmodes/f90.el, Glenn Morris, 2002/05/19
- [Emacs-diffs] Changes to emacs/lisp/progmodes/f90.el, Glenn Morris, 2002/05/19
- [Emacs-diffs] Changes to emacs/lisp/progmodes/f90.el, Glenn Morris, 2002/05/20
- [Emacs-diffs] Changes to emacs/lisp/progmodes/f90.el, Glenn Morris, 2002/05/24
- [Emacs-diffs] Changes to emacs/lisp/progmodes/f90.el, Glenn Morris, 2002/05/26
- [Emacs-diffs] Changes to emacs/lisp/progmodes/f90.el,
Glenn Morris <=