Mercurial > emacs
comparison lisp/progmodes/fortran.el @ 20205:cdaddfc03fe8
(fortran-imenu-generic-expression): New variable.
(fortran-mode): Use it.
author | Dave Love <fx@gnu.org> |
---|---|
date | Fri, 31 Oct 1997 23:17:17 +0000 |
parents | 9fa0ed8da0b1 |
children | 38616c4cf58c |
comparison
equal
deleted
inserted
replaced
20204:44f91b648e03 | 20205:cdaddfc03fe8 |
---|---|
367 ) | 367 ) |
368 | 368 |
369 (defvar fortran-font-lock-keywords fortran-font-lock-keywords-1 | 369 (defvar fortran-font-lock-keywords fortran-font-lock-keywords-1 |
370 "Default expressions to highlight in Fortran mode.") | 370 "Default expressions to highlight in Fortran mode.") |
371 | 371 |
372 (defvar fortran-imenu-generic-expression | |
373 (list | |
374 (list | |
375 nil | |
376 ;; Lines are: 1. leading whitespace; 2. function declaration | |
377 ;; with optional type, e.g. `real', `double precision', [which | |
378 ;; will be fooled by `end function' allowed by G77]; 3. untyped | |
379 ;; declarations; 4. the name to index. | |
380 "^\\s-+\\(\ | |
381 \\(\\sw\\|\\s-\\)*\\<function\\|\ | |
382 subroutine\\|entry\\|block\\s-*data\\|program\\)[ \t]+\ | |
383 \\(\\sw+\\)" | |
384 3)) | |
385 "imenu generic expression for `imenu-ci-deafult-create-index-function'.") | |
386 (setq fortran-imenu-generic-expression | |
387 (list | |
388 (list | |
389 nil | |
390 ;; Lines are: 1. leading whitespace; 2. function declaration | |
391 ;; with optional type, e.g. `real', `double precision', [which | |
392 ;; will be fooled by `end function' allowed by G77]; 3. untyped | |
393 ;; declarations; 4. the variable to index. | |
394 "^\\s-+\\(\ | |
395 \\(\\sw\\|\\s-\\)*\\<function\\|\ | |
396 subroutine\\|entry\\|block\\s-*data\\|program\\)[ \t]+\ | |
397 \\(\\sw+\\)" | |
398 3))) | |
372 | 399 |
373 (defvar fortran-mode-map () | 400 (defvar fortran-mode-map () |
374 "Keymap used in Fortran mode.") | 401 "Keymap used in Fortran mode.") |
375 (if fortran-mode-map | 402 (if fortran-mode-map |
376 () | 403 () |
585 (make-local-variable 'fortran-column-ruler-fixed) | 612 (make-local-variable 'fortran-column-ruler-fixed) |
586 (make-local-variable 'fortran-column-ruler-tab) | 613 (make-local-variable 'fortran-column-ruler-tab) |
587 (make-local-variable 'fortran-tab-mode-string) | 614 (make-local-variable 'fortran-tab-mode-string) |
588 (setq fortran-tab-mode-string " TAB-format") | 615 (setq fortran-tab-mode-string " TAB-format") |
589 (setq indent-tabs-mode (fortran-analyze-file-format)) | 616 (setq indent-tabs-mode (fortran-analyze-file-format)) |
617 (make-local-variable 'imenu-generic-expression) | |
618 (setq imenu-generic-expression fortran-imenu-generic-expression) | |
590 (run-hooks 'fortran-mode-hook)) | 619 (run-hooks 'fortran-mode-hook)) |
591 | 620 |
592 (defun fortran-comment-hook () | 621 (defun fortran-comment-hook () |
593 (save-excursion | 622 (save-excursion |
594 (skip-chars-backward " \t") | 623 (skip-chars-backward " \t") |