Function: fortran-match-and-skip-declaration

fortran-match-and-skip-declaration is a byte-compiled function defined in fortran.el.gz.

Signature

(fortran-match-and-skip-declaration LIMIT)

Documentation

Like font-lock-match-c-style-declaration-item-and-skip-to-next.

The only difference is, it returns t in a case when the default returns nil.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/fortran.el.gz
;; See bug#1385. Never really looked into _why_ this matters...
(defun fortran-match-and-skip-declaration (limit)
  "Like `font-lock-match-c-style-declaration-item-and-skip-to-next'.
The only difference is, it returns t in a case when the default returns nil."
  (when (looking-at "[ \n\t*]*\\(\\sw+\\)[ \t\n]*\\(((?\\)?")
    (when (and (match-end 2) (> (- (match-end 2) (match-beginning 2)) 1))
      (let ((pos (point)))
	(skip-chars-backward " \t\n")
	(skip-syntax-backward "w")
	(unless (looking-at "\\(\\sw+\\)[ \t\n]*\\sw+[ \t\n]*\\(((?\\)?")
	  (goto-char pos)
	  (looking-at "[ \n\t*]*\\(\\sw+\\)[ \t\n]*\\(((?\\)?"))))
    (save-match-data
      (condition-case nil
	  (save-restriction
	    (narrow-to-region (point-min) limit)
	    (goto-char (match-end 1))
	    (while (not (looking-at "[ \t\n]*\\(\\(,\\)\\|;\\|\\'\\)"))
	      (goto-char (or (scan-sexps (point) 1) (point-max))))
            (goto-char (match-end 2)))
	(error t)))))