[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: |
Sun, 19 May 2002 19:18:17 -0400 |
Index: emacs/lisp/progmodes/f90.el
diff -c emacs/lisp/progmodes/f90.el:1.51 emacs/lisp/progmodes/f90.el:1.52
*** emacs/lisp/progmodes/f90.el:1.51 Sun May 19 18:25:25 2002
--- emacs/lisp/progmodes/f90.el Sun May 19 19:18:16 2002
***************
*** 377,383 ****
'("\\<\\(case\\)[ \t]*\\(default\\|(\\)" . 1)
'("\\<\\(do\\|go *to\\)\\>[ \t]*\\([0-9]+\\)"
(1 font-lock-keyword-face) (2 font-lock-constant-face))
! ;; line numbers (lines whose first character after number is letter)
'("^[ \t]*\\([0-9]+\\)[ \t]*[a-z]+" (1 font-lock-constant-face t))))
"Highlights declarations, do-loops and other constructs.")
--- 377,383 ----
'("\\<\\(case\\)[ \t]*\\(default\\|(\\)" . 1)
'("\\<\\(do\\|go *to\\)\\>[ \t]*\\([0-9]+\\)"
(1 font-lock-keyword-face) (2 font-lock-constant-face))
! ;; Line numbers (lines whose first character after number is letter).
'("^[ \t]*\\([0-9]+\\)[ \t]*[a-z]+" (1 font-lock-constant-face t))))
"Highlights declarations, do-loops and other constructs.")
***************
*** 918,961 ****
(defsubst f90-equal-symbols (a b)
"Compare strings A and B neglecting case and allowing for nil value."
! (let ((a-local (if a (downcase a) nil))
! (b-local (if b (downcase b) nil)))
! (equal a-local b-local)))
;; XEmacs 19.11 & 19.12 return a single char when matching an empty regexp.
;; The next 2 functions are therefore longer than necessary.
(defsubst f90-looking-at-do ()
"Return (\"do\" NAME) if a do statement starts after point.
NAME is nil if the statement has no label."
! (if (looking-at "\\(\\(\\sw+\\)[ \t]*\:\\)?[ \t]*\\(do\\)\\>")
! (let (label
! (struct (match-string 3)))
! (if (looking-at "\\(\\sw+\\)[ \t]*\:")
! (setq label (match-string 1)))
! (list struct label))))
(defsubst f90-looking-at-select-case ()
"Return (\"select\" NAME) if a select-case statement starts after point.
NAME is nil if the statement has no label."
! (if (looking-at "\\(\\(\\sw+\\)[ \t]*\:\\)?[ \t]*\
\\(select\\)[ \t]*case[ \t]*(")
! (let (label
! (struct (match-string 3)))
! (if (looking-at "\\(\\sw+\\)[ \t]*\:")
! (setq label (match-string 1)))
! (list struct label))))
(defsubst f90-looking-at-if-then ()
"Return (\"if\" NAME) if an if () then statement starts after point.
NAME is nil if the statement has no label."
(save-excursion
! (when (looking-at "\\(\\(\\sw+\\)[ \t]*\:\\)?[ \t]*\\(if\\)\\>")
! (let (label
! (struct (match-string 3)))
! (if (looking-at "\\(\\sw+\\)[ \t]*\:")
! (setq label (match-string 1)))
! (let ((pos (scan-lists (point) 1 0)))
! (and pos (goto-char pos)))
(skip-chars-forward " \t")
(if (or (looking-at "then\\>")
(when (f90-line-continued)
--- 918,952 ----
(defsubst f90-equal-symbols (a b)
"Compare strings A and B neglecting case and allowing for nil value."
! (equal (if a (downcase a) nil)
! (if b (downcase b) nil)))
;; XEmacs 19.11 & 19.12 return a single char when matching an empty regexp.
;; The next 2 functions are therefore longer than necessary.
(defsubst f90-looking-at-do ()
"Return (\"do\" NAME) if a do statement starts after point.
NAME is nil if the statement has no label."
! (if (looking-at "\\(\\(\\sw+\\)[ \t]*:\\)?[ \t]*\\(do\\)\\>")
! (list (match-string 3)
! (if (looking-at "\\(\\sw+\\)[ \t]*:") (match-string 1)))))
(defsubst f90-looking-at-select-case ()
"Return (\"select\" NAME) if a select-case statement starts after point.
NAME is nil if the statement has no label."
! (if (looking-at "\\(\\(\\sw+\\)[ \t]*:\\)?[ \t]*\
\\(select\\)[ \t]*case[ \t]*(")
! (list (match-string 3)
! (if (looking-at "\\(\\sw+\\)[ \t]*:") (match-string 1)))))
(defsubst f90-looking-at-if-then ()
"Return (\"if\" NAME) if an if () then statement starts after point.
NAME is nil if the statement has no label."
(save-excursion
! (when (looking-at "\\(\\(\\sw+\\)[ \t]*:\\)?[ \t]*\\(if\\)\\>")
! (let ((struct (match-string 3))
! (label (if (looking-at "\\(\\sw+\\)[ \t]*:") (match-string 1)))
! (pos (scan-lists (point) 1 0)))
! (and pos (goto-char pos))
(skip-chars-forward " \t")
(if (or (looking-at "then\\>")
(when (f90-line-continued)
***************
*** 964,979 ****
(looking-at "then\\>")))
(list struct label))))))
! (defsubst f90-looking-at-where-or-forall ()
"Return (KIND NAME) if a where or forall block starts after point.
NAME is nil if the statement has no label."
! (if (looking-at "\\(\\(\\sw+\\)[ \t]*\:\\)?[ \t]*\
! \\(where\\|forall\\)[ \t]*(.*)[ \t]*\\(!\\|$\\)")
! (let (label
! (struct (match-string 3)))
! (if (looking-at "\\(\\sw+\\)[ \t]*\:")
! (setq label (match-string 1)))
! (list struct label))))
(defsubst f90-looking-at-type-like ()
"Return (KIND NAME) if a type/interface/block-data block starts after point.
--- 955,972 ----
(looking-at "then\\>")))
(list struct label))))))
! (defun f90-looking-at-where-or-forall ()
"Return (KIND NAME) if a where or forall block starts after point.
NAME is nil if the statement has no label."
! (save-excursion
! (when (looking-at "\\(\\(\\sw+\\)[ \t]*:\\)?[ \t]*\
! \\(where\\|forall\\)\\>")
! (let ((struct (match-string 3))
! (label (if (looking-at "\\(\\sw+\\)[ \t]*:") (match-string 1)))
! (pos (scan-lists (point) 1 0)))
! (and pos (goto-char pos))
! (skip-chars-forward " \t")
! (if (looking-at "\\(!\\|$\\)") (list struct label))))))
(defsubst f90-looking-at-type-like ()
"Return (KIND NAME) if a type/interface/block-data block starts after point.
- [Emacs-diffs] Changes to emacs/lisp/progmodes/f90.el, Glenn Morris, 2002/05/01
- [Emacs-diffs] Changes to emacs/lisp/progmodes/f90.el, Glenn Morris, 2002/05/01
- [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 <=
- [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, 2002/05/27