Mercurial > emacs
comparison lisp/progmodes/fortran.el @ 35244:682d1ffa0b5e
(fortran-mode-map): Modify Customization
entry for custom-menu-create change.
(fortran-strip-sqeuence-nos): Make arg optional. Fix regexp and
don't cons it in the search loop.
author | Dave Love <fx@gnu.org> |
---|---|
date | Thu, 11 Jan 2001 19:13:25 +0000 |
parents | 7ade0d187b77 |
children | 5d300b531da9 |
comparison
equal
deleted
inserted
replaced
35243:569b2a1b20df | 35244:682d1ffa0b5e |
---|---|
419 (define-key map "7" 'fortran-electric-line-number) | 419 (define-key map "7" 'fortran-electric-line-number) |
420 (define-key map "8" 'fortran-electric-line-number) | 420 (define-key map "8" 'fortran-electric-line-number) |
421 (define-key map "9" 'fortran-electric-line-number) | 421 (define-key map "9" 'fortran-electric-line-number) |
422 | 422 |
423 ;; Menu | 423 ;; Menu |
424 (unless (boundp 'fortran-mode-menu) | 424 (easy-menu-define |
425 (easy-menu-define | 425 fortran-mode-menu map "" |
426 fortran-mode-menu map "" | 426 `("Fortran" |
427 `("Fortran" | 427 ["Manual" (info "(emacs)Fortran")] |
428 ["Manual" (info "(emacs)Fortran")] | 428 ("Customization" |
429 ["Customize" :filter (lambda (&rest junk) | 429 ,(custom-menu-create 'fortran) |
430 (cdr (custom-menu-create 'fortran)))] | 430 ["Set" Custom-set t] |
431 ["Set" Custom-set t] | 431 ["Save" Custom-save t] |
432 ["Save" Custom-save t] | 432 ["Reset to Current" Custom-reset-current t] |
433 ["Reset to Current" Custom-reset-current t] | 433 ["Reset to Saved" Custom-reset-saved t] |
434 ["Reset to Saved" Custom-reset-saved t] | 434 ["Reset to Standard Settings" Custom-reset-standard t]) |
435 ["Reset to Standard Settings" Custom-reset-standard t] | 435 "----" |
436 "----" | 436 ["Toggle Auto-fill" auto-fill-mode :style toggle |
437 ["Toggle Auto-fill" auto-fill-mode :style toggle | 437 :selected auto-fill-function] |
438 :selected auto-fill-function] | 438 ["Toggle abbrev-mode" abbrev-mode :style toggle :selected abbrev-mode] |
439 ["Toggle abbrev-mode" abbrev-mode :style toggle :selected abbrev-mode] | 439 "----" |
440 "----" | 440 ["Comment-out Region" fortran-comment-region mark-active] |
441 ["Comment-out Region" fortran-comment-region mark-active] | 441 ["Uncomment-out region" |
442 ["Uncomment-out region" | 442 (fortran-comment-region (region-beginning) (region-end) 1) |
443 (fortran-comment-region (region-beginning) (region-end) 1) | 443 mark-active] |
444 mark-active] | 444 ["Indent Region" indent-region mark-active] |
445 ["Indent Region" indent-region mark-active] | 445 ["Indent Subprogram" fortran-indent-subprogram t] |
446 ["Indent Subprogram" fortran-indent-subprogram t] | 446 "----" |
447 "----" | 447 ["Beginning of Subprogram" fortran-beginning-of-subprogram t] |
448 ["Beginning of Subprogram" fortran-beginning-of-subprogram t] | 448 ["End of Subprogram" fortran-end-of-subprogram t] |
449 ["End of Subprogram" fortran-end-of-subprogram t] | 449 ("Mark" |
450 ("Mark" | 450 ["Subprogram" mark-defun t] |
451 ["Subprogram" mark-defun t] | 451 ["IF Block" fortran-mark-if t] |
452 ["IF Block" fortran-mark-if t] | 452 ["DO Block" fortran-mark-do t]) |
453 ["DO Block" fortran-mark-do t]) | 453 ["Narrow to Subprogram" narrow-to-defun t] |
454 ["Narrow to Subprogram" narrow-to-defun t] | 454 ["Widen" widen t] |
455 ["Widen" widen t] | 455 "----" |
456 "----" | 456 ["Temporary column ruler" fortran-column-ruler t] |
457 ["Temporary column ruler" fortran-column-ruler t] | 457 ["72-column window" fortran-window-create t] |
458 ["72-column window" fortran-window-create t] | 458 ["Full Width Window" |
459 ["Full Width Window" | 459 (enlarge-window-horizontally (- (frame-width) (window-width))) |
460 (enlarge-window-horizontally (- (frame-width) (window-width))) | 460 (< (window-width) (frame-width))] |
461 (< (window-width) (frame-width))] | 461 ["Momentary 72-column window" fortran-window-create-momentarily t] |
462 ["Momentary 72-column window" fortran-window-create-momentarily t] | 462 "----" |
463 "----" | 463 ["Break Line at Point" fortran-split-line t] |
464 ["Break Line at Point" fortran-split-line t] | 464 ["Join Line" fortran-join-line t] |
465 ["Join Line" fortran-join-line t] | 465 ["Fill Statement/Comment" fill-paragraph t] |
466 ["Fill Statement/Comment" fill-paragraph t] | 466 "----" |
467 "----" | 467 ["Add imenu menu" |
468 ["Add imenu menu" | 468 imenu-add-menubar-index (not (and (boundp 'imenu--index-alist) |
469 imenu-add-menubar-index (not (and (boundp 'imenu--index-alist) | 469 imenu--index-alist))])) |
470 imenu--index-alist))]))) | |
471 map) | 470 map) |
472 "Keymap used in Fortran mode.") | 471 "Keymap used in Fortran mode.") |
473 | 472 |
474 (defvar fortran-mode-abbrev-table | 473 (defvar fortran-mode-abbrev-table |
475 (let ((ac abbrevs-changed)) | 474 (let ((ac abbrevs-changed)) |
1787 (forward-line) | 1786 (forward-line) |
1788 (fortran-remove-continuation))) | 1787 (fortran-remove-continuation))) |
1789 (fortran-previous-statement))) | 1788 (fortran-previous-statement))) |
1790 (fortran-indent-line))) | 1789 (fortran-indent-line))) |
1791 | 1790 |
1792 (defun fortran-strip-sqeuence-nos (do-space) | 1791 (defun fortran-strip-sqeuence-nos (&optional do-space) |
1793 "Delete all text after column 72 (assumed to be sequence numbers). | 1792 "Delete all text after column 72 (assumed to be sequence numbers). |
1794 Also delete trailing whitespace after stripping such text. Supplying | 1793 Also delete trailing whitespace after stripping such text. Supplying |
1795 prefix arg DO-SPACE prevent stripping the whitespace." | 1794 prefix arg DO-SPACE prevents stripping the whitespace." |
1796 (interactive "p") | 1795 (interactive "p") |
1797 (save-excursion | 1796 (save-excursion |
1798 (goto-char (point-min)) | 1797 (goto-char (point-min)) |
1799 (while (re-search-forward (concat "^" (make-string 72 ?.)" \\(.*\\)") | 1798 (while (re-search-forward "^.\\{72\\}\\(.*\\)" nil t) |
1800 nil t) | |
1801 (replace-match "" nil nil nil 1) | 1799 (replace-match "" nil nil nil 1) |
1802 (unless do-space (delete-horizontal-space))))) | 1800 (unless do-space (delete-horizontal-space))))) |
1803 | 1801 |
1804 ;; This code used to live in add-log.el, but this is a better place | 1802 ;; This code used to live in add-log.el, but this is a better place |
1805 ;; for it. | 1803 ;; for it. |