diff options
| author | Karl Heuer | 1997-11-03 02:50:20 +0000 |
|---|---|---|
| committer | Karl Heuer | 1997-11-03 02:50:20 +0000 |
| commit | 60db35943357fffada30fdf38e864a38bae1076e (patch) | |
| tree | ebd59c74bcb3ad010ba7a2d6cf79bc251de62b9c | |
| parent | 328b4b7052a5d464e52818ff0f1a33b96e5e761c (diff) | |
| download | emacs-60db35943357fffada30fdf38e864a38bae1076e.tar.gz emacs-60db35943357fffada30fdf38e864a38bae1076e.zip | |
(fortran-imenu-generic-expression): Doc fix.
Delete redundant setq.
| -rw-r--r-- | lisp/progmodes/fortran.el | 57 |
1 files changed, 22 insertions, 35 deletions
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index 6d09a86a7ee..fdf5620584a 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | 34 | ||
| 35 | ;; We acknowledge many contributions and valuable suggestions by | 35 | ;; We acknowledge many contributions and valuable suggestions by |
| 36 | ;; Lawrence R. Dodd, Ralf Fassel, Ralph Finch, Stephen Gildea, | 36 | ;; Lawrence R. Dodd, Ralf Fassel, Ralph Finch, Stephen Gildea, |
| 37 | ;; Dr. Anil Gokhale, Ulrich Mueller, Mark Neale, Eric Prestemon, | 37 | ;; Dr. Anil Gokhale, Ulrich Mueller, Mark Neale, Eric Prestemon, |
| 38 | ;; Gary Sabot and Richard Stallman. | 38 | ;; Gary Sabot and Richard Stallman. |
| 39 | 39 | ||
| 40 | ;; This file may be used with GNU Emacs version 18.xx if the following | 40 | ;; This file may be used with GNU Emacs version 18.xx if the following |
| @@ -243,7 +243,7 @@ This variable used in TAB format mode.") | |||
| 243 | ;; standard comment syntax in an Emacs syntax table (we can for VAX-style). | 243 | ;; standard comment syntax in an Emacs syntax table (we can for VAX-style). |
| 244 | ;; Therefore an unmatched quote in a standard comment will throw fontification | 244 | ;; Therefore an unmatched quote in a standard comment will throw fontification |
| 245 | ;; off on the wrong track. So we do syntactic fontification with regexps. | 245 | ;; off on the wrong track. So we do syntactic fontification with regexps. |
| 246 | 246 | ||
| 247 | ;; Regexps done by simon@gnu with help from Ulrik Dickow <dickow@nbi.dk> and | 247 | ;; Regexps done by simon@gnu with help from Ulrik Dickow <dickow@nbi.dk> and |
| 248 | ;; probably others Si's forgotten about (sorry). | 248 | ;; probably others Si's forgotten about (sorry). |
| 249 | 249 | ||
| @@ -368,7 +368,7 @@ This variable used in TAB format mode.") | |||
| 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 | 372 | (defvar fortran-imenu-generic-expression |
| 373 | (list | 373 | (list |
| 374 | (list | 374 | (list |
| @@ -382,22 +382,9 @@ This variable used in TAB format mode.") | |||
| 382 | subroutine\\|entry\\|block\\s-*data\\|program\\)[ \t]+\ | 382 | subroutine\\|entry\\|block\\s-*data\\|program\\)[ \t]+\ |
| 383 | \\(\\sw+\\)" | 383 | \\(\\sw+\\)" |
| 384 | 3)) | 384 | 3)) |
| 385 | "imenu generic expression for `imenu-ci-deafult-create-index-function'.") | 385 | "imenu generic expression for `imenu-ci-default-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))) | ||
| 399 | 386 | ||
| 400 | (defvar fortran-mode-map () | 387 | (defvar fortran-mode-map () |
| 401 | "Keymap used in Fortran mode.") | 388 | "Keymap used in Fortran mode.") |
| 402 | (if fortran-mode-map | 389 | (if fortran-mode-map |
| 403 | () | 390 | () |
| @@ -495,7 +482,7 @@ subroutine\\|entry\\|block\\s-*data\\|program\\)[ \t]+\ | |||
| 495 | ;;;###autoload | 482 | ;;;###autoload |
| 496 | (defun fortran-mode () | 483 | (defun fortran-mode () |
| 497 | "Major mode for editing Fortran code. | 484 | "Major mode for editing Fortran code. |
| 498 | \\[fortran-indent-line] indents the current Fortran line correctly. | 485 | \\[fortran-indent-line] indents the current Fortran line correctly. |
| 499 | DO statements must not share a common CONTINUE. | 486 | DO statements must not share a common CONTINUE. |
| 500 | 487 | ||
| 501 | Type ;? or ;\\[help-command] to display a list of built-in\ | 488 | Type ;? or ;\\[help-command] to display a list of built-in\ |
| @@ -543,7 +530,7 @@ Variables controlling indentation style and extra features: | |||
| 543 | fortran-check-all-num-for-matching-do | 530 | fortran-check-all-num-for-matching-do |
| 544 | Non-nil causes all numbered lines to be treated as possible \"continue\" | 531 | Non-nil causes all numbered lines to be treated as possible \"continue\" |
| 545 | statements. (default nil) | 532 | statements. (default nil) |
| 546 | fortran-blink-matching-if | 533 | fortran-blink-matching-if |
| 547 | Non-nil causes \\[fortran-indent-line] on an ENDIF statement to blink on | 534 | Non-nil causes \\[fortran-indent-line] on an ENDIF statement to blink on |
| 548 | matching IF. Also, from an ENDDO statement, blink on matching DO [WHILE] | 535 | matching IF. Also, from an ENDDO statement, blink on matching DO [WHILE] |
| 549 | statement. (default nil) | 536 | statement. (default nil) |
| @@ -551,10 +538,10 @@ Variables controlling indentation style and extra features: | |||
| 551 | Single-character string to be inserted in column 5 of a continuation | 538 | Single-character string to be inserted in column 5 of a continuation |
| 552 | line. (default \"$\") | 539 | line. (default \"$\") |
| 553 | fortran-comment-region | 540 | fortran-comment-region |
| 554 | String inserted by \\[fortran-comment-region] at start of each line in | 541 | String inserted by \\[fortran-comment-region] at start of each line in |
| 555 | region. (default \"c$$$\") | 542 | region. (default \"c$$$\") |
| 556 | fortran-electric-line-number | 543 | fortran-electric-line-number |
| 557 | Non-nil causes line number digits to be moved to the correct column | 544 | Non-nil causes line number digits to be moved to the correct column |
| 558 | as typed. (default t) | 545 | as typed. (default t) |
| 559 | fortran-break-before-delimiters | 546 | fortran-break-before-delimiters |
| 560 | Non-nil causes `fortran-fill' breaks lines before delimiters. | 547 | Non-nil causes `fortran-fill' breaks lines before delimiters. |
| @@ -667,8 +654,8 @@ or on a new line inserted before this line if this line is not blank." | |||
| 667 | 654 | ||
| 668 | (defun fortran-comment-region (beg-region end-region arg) | 655 | (defun fortran-comment-region (beg-region end-region arg) |
| 669 | "Comments every line in the region. | 656 | "Comments every line in the region. |
| 670 | Puts fortran-comment-region at the beginning of every line in the region. | 657 | Puts fortran-comment-region at the beginning of every line in the region. |
| 671 | BEG-REGION and END-REGION are args which specify the region boundaries. | 658 | BEG-REGION and END-REGION are args which specify the region boundaries. |
| 672 | With non-nil ARG, uncomments the region." | 659 | With non-nil ARG, uncomments the region." |
| 673 | (interactive "*r\nP") | 660 | (interactive "*r\nP") |
| 674 | (let ((end-region-mark (make-marker)) (save-point (point-marker))) | 661 | (let ((end-region-mark (make-marker)) (save-point (point-marker))) |
| @@ -692,7 +679,7 @@ With non-nil ARG, uncomments the region." | |||
| 692 | (set-marker save-point nil))) | 679 | (set-marker save-point nil))) |
| 693 | 680 | ||
| 694 | (defun fortran-abbrev-start () | 681 | (defun fortran-abbrev-start () |
| 695 | "Typing ;\\[help-command] or ;? lists all the Fortran abbrevs. | 682 | "Typing ;\\[help-command] or ;? lists all the Fortran abbrevs. |
| 696 | Any other key combination is executed normally." | 683 | Any other key combination is executed normally." |
| 697 | (interactive) | 684 | (interactive) |
| 698 | (let (c) | 685 | (let (c) |
| @@ -725,12 +712,12 @@ The ruler is defined by the value of `fortran-column-ruler-fixed' when in fixed | |||
| 725 | format mode, and `fortran-column-ruler-tab' when in TAB format mode. | 712 | format mode, and `fortran-column-ruler-tab' when in TAB format mode. |
| 726 | The key typed is executed unless it is SPC." | 713 | The key typed is executed unless it is SPC." |
| 727 | (interactive) | 714 | (interactive) |
| 728 | (momentary-string-display | 715 | (momentary-string-display |
| 729 | (if indent-tabs-mode | 716 | (if indent-tabs-mode |
| 730 | fortran-column-ruler-tab | 717 | fortran-column-ruler-tab |
| 731 | fortran-column-ruler-fixed) | 718 | fortran-column-ruler-fixed) |
| 732 | (save-excursion | 719 | (save-excursion |
| 733 | (beginning-of-line) | 720 | (beginning-of-line) |
| 734 | (if (eq (window-start (selected-window)) | 721 | (if (eq (window-start (selected-window)) |
| 735 | (window-point (selected-window))) | 722 | (window-point (selected-window))) |
| 736 | (progn (forward-line) (point)) | 723 | (progn (forward-line) (point)) |
| @@ -776,7 +763,7 @@ See also `fortran-window-create'." | |||
| 776 | (if (save-excursion (beginning-of-line) (looking-at comment-line-start-skip)) | 763 | (if (save-excursion (beginning-of-line) (looking-at comment-line-start-skip)) |
| 777 | (insert "\n" comment-line-start " ") | 764 | (insert "\n" comment-line-start " ") |
| 778 | (if indent-tabs-mode | 765 | (if indent-tabs-mode |
| 779 | (progn | 766 | (progn |
| 780 | (insert "\n\t") | 767 | (insert "\n\t") |
| 781 | (insert-char (fortran-numerical-continuation-char) 1)) | 768 | (insert-char (fortran-numerical-continuation-char) 1)) |
| 782 | (insert "\n " fortran-continuation-string)));Space after \n important | 769 | (insert "\n " fortran-continuation-string)));Space after \n important |
| @@ -805,7 +792,7 @@ except that ] is never special and \ quotes ^, - or \." | |||
| 805 | Auto-indent does not happen if a numeric arg is used." | 792 | Auto-indent does not happen if a numeric arg is used." |
| 806 | (interactive "P") | 793 | (interactive "P") |
| 807 | (if (or arg (not fortran-electric-line-number)) | 794 | (if (or arg (not fortran-electric-line-number)) |
| 808 | (if arg | 795 | (if arg |
| 809 | (self-insert-command (prefix-numeric-value arg)) | 796 | (self-insert-command (prefix-numeric-value arg)) |
| 810 | (self-insert-command 1)) | 797 | (self-insert-command 1)) |
| 811 | (if (or (and (= 5 (current-column)) | 798 | (if (or (and (= 5 (current-column)) |
| @@ -853,7 +840,7 @@ Auto-indent does not happen if a numeric arg is used." | |||
| 853 | (forward-line 1))) | 840 | (forward-line 1))) |
| 854 | 841 | ||
| 855 | (defun mark-fortran-subprogram () | 842 | (defun mark-fortran-subprogram () |
| 856 | "Put mark at end of Fortran subprogram, point at beginning. | 843 | "Put mark at end of Fortran subprogram, point at beginning. |
| 857 | The marks are pushed." | 844 | The marks are pushed." |
| 858 | (interactive) | 845 | (interactive) |
| 859 | (end-of-fortran-subprogram) | 846 | (end-of-fortran-subprogram) |
| @@ -883,7 +870,7 @@ non-comment Fortran statement in the file, and nil otherwise." | |||
| 883 | (cond ((and continue-test | 870 | (cond ((and continue-test |
| 884 | (not not-first-statement)) | 871 | (not not-first-statement)) |
| 885 | (message "Incomplete continuation statement.")) | 872 | (message "Incomplete continuation statement.")) |
| 886 | (continue-test | 873 | (continue-test |
| 887 | (fortran-previous-statement)) | 874 | (fortran-previous-statement)) |
| 888 | ((not not-first-statement) | 875 | ((not not-first-statement) |
| 889 | 'first-statement)))) | 876 | 'first-statement)))) |
| @@ -956,7 +943,7 @@ non-comment Fortran statement in the file, and nil otherwise." | |||
| 956 | (goto-char enddo-point)))))) | 943 | (goto-char enddo-point)))))) |
| 957 | 944 | ||
| 958 | (defun fortran-mark-do () | 945 | (defun fortran-mark-do () |
| 959 | "Put mark at end of Fortran DO [WHILE]-ENDDO construct, point at beginning. | 946 | "Put mark at end of Fortran DO [WHILE]-ENDDO construct, point at beginning. |
| 960 | The marks are pushed." | 947 | The marks are pushed." |
| 961 | (interactive) | 948 | (interactive) |
| 962 | (let (enddo-point do-point) | 949 | (let (enddo-point do-point) |
| @@ -1351,7 +1338,7 @@ notes: 1) A non-zero/non-blank character in column 5 indicates a continuation | |||
| 1351 | ((looking-at (regexp-quote fortran-continuation-string)) | 1338 | ((looking-at (regexp-quote fortran-continuation-string)) |
| 1352 | (if indent-tabs-mode | 1339 | (if indent-tabs-mode |
| 1353 | (progn | 1340 | (progn |
| 1354 | (indent-to | 1341 | (indent-to |
| 1355 | (if indent-tabs-mode | 1342 | (if indent-tabs-mode |
| 1356 | fortran-minimum-statement-indent-tab | 1343 | fortran-minimum-statement-indent-tab |
| 1357 | fortran-minimum-statement-indent-fixed)) | 1344 | fortran-minimum-statement-indent-fixed)) |
| @@ -1607,7 +1594,7 @@ automatically breaks the line at a previous space." | |||
| 1607 | (fortran-break-line)) | 1594 | (fortran-break-line)) |
| 1608 | (save-excursion | 1595 | (save-excursion |
| 1609 | (if (> (save-excursion | 1596 | (if (> (save-excursion |
| 1610 | (goto-char fill-point) | 1597 | (goto-char fill-point) |
| 1611 | (current-column)) | 1598 | (current-column)) |
| 1612 | (+ (calculate-fortran-indent) fortran-continuation-indent)) | 1599 | (+ (calculate-fortran-indent) fortran-continuation-indent)) |
| 1613 | (progn | 1600 | (progn |
| @@ -1619,7 +1606,7 @@ automatically breaks the line at a previous space." | |||
| 1619 | (bol (save-excursion (beginning-of-line) (point))) | 1606 | (bol (save-excursion (beginning-of-line) (point))) |
| 1620 | (eol (save-excursion (end-of-line) (point))) | 1607 | (eol (save-excursion (end-of-line) (point))) |
| 1621 | (comment-string nil)) | 1608 | (comment-string nil)) |
| 1622 | 1609 | ||
| 1623 | (save-excursion | 1610 | (save-excursion |
| 1624 | (if (and comment-start-skip (fortran-find-comment-start-skip)) | 1611 | (if (and comment-start-skip (fortran-find-comment-start-skip)) |
| 1625 | (progn | 1612 | (progn |