aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorDave Love2001-01-11 19:13:43 +0000
committerDave Love2001-01-11 19:13:43 +0000
commit562e00daecc360ed0440260cbd5643bb17f3d409 (patch)
treed88aeb352e6a4a0582417b1444ab4269e03b7b35 /lisp/progmodes
parent117be359bf4253cccaf522846ccc2192537bdc10 (diff)
downloademacs-562e00daecc360ed0440260cbd5643bb17f3d409.tar.gz
emacs-562e00daecc360ed0440260cbd5643bb17f3d409.zip
(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.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/fortran.el100
1 files changed, 49 insertions, 51 deletions
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index b5b2caa2cff..a845358a6a2 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -421,53 +421,52 @@ These get fixed-format comments fontified.")
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
@@ -1789,15 +1788,14 @@ Intended as the value of `fill-paragraph-function'."
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).
1794Also delete trailing whitespace after stripping such text. Supplying 1793Also delete trailing whitespace after stripping such text. Supplying
1795prefix arg DO-SPACE prevent stripping the whitespace." 1794prefix 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