emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/fortran.el


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/fortran.el
Date: Tue, 20 Aug 2002 16:37:08 -0400

Index: emacs/lisp/progmodes/fortran.el
diff -c emacs/lisp/progmodes/fortran.el:1.96 
emacs/lisp/progmodes/fortran.el:1.97
*** emacs/lisp/progmodes/fortran.el:1.96        Sat May 18 15:05:34 2002
--- emacs/lisp/progmodes/fortran.el     Tue Aug 20 16:31:26 2002
***************
*** 1820,1847 ****
  ;; for it.
  (defun fortran-current-defun ()
    "Function to use for `add-log-current-defun-function' in Fortran mode."
!   ;; We must be inside function body for this to work.
!   (fortran-beginning-of-subprogram)
!   (let ((case-fold-search t))         ; case-insensitive
!     ;; search for fortran subprogram start
!     (if (re-search-forward
!        (concat "^[ \t]*\\(program\\|subroutine\\|function"
!                "\\|[ \ta-z0-9*()]*[ \t]+function\\|"
!                "\\(block[ \t]*data\\)\\)")
!        (save-excursion (fortran-end-of-subprogram)
!                        (point))
!        t)
!       (or (match-string-no-properties 2)
!           (progn
!             ;; move to EOL or before first left paren
!             (if (re-search-forward "[(\n]" nil t)
!                 (progn (backward-char)
!                        (skip-chars-backward " \t"))
!               (end-of-line))
!             ;; Use the name preceding that.
!             (buffer-substring-no-properties (point) (progn (backward-sexp)
!                                                            (point)))))
!       "main")))
  
  (provide 'fortran)
  
--- 1820,1848 ----
  ;; for it.
  (defun fortran-current-defun ()
    "Function to use for `add-log-current-defun-function' in Fortran mode."
!   (save-excursion
!     ;; We must be inside function body for this to work.
!     (fortran-beginning-of-subprogram)
!     (let ((case-fold-search t))               ; case-insensitive
!       ;; search for fortran subprogram start
!       (if (re-search-forward
!            (concat "^[ \t]*\\(program\\|subroutine\\|function"
!                    "\\|[ \ta-z0-9*()]*[ \t]+function\\|"
!                    "\\(block[ \t]*data\\)\\)")
!            (save-excursion (fortran-end-of-subprogram)
!                            (point))
!            t)
!           (or (match-string-no-properties 2)
!               (progn
!                 ;; move to EOL or before first left paren
!                 (if (re-search-forward "[(\n]" nil t)
!                     (progn (backward-char)
!                            (skip-chars-backward " \t"))
!                   (end-of-line))
!                 ;; Use the name preceding that.
!                 (buffer-substring-no-properties (point) (progn (backward-sexp)
!                                                                (point)))))
!         "main"))))
  
  (provide 'fortran)
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]