home *** CD-ROM | disk | FTP | other *** search
/ Mega CD-ROM 1 / megacd_rom_1.zip / megacd_rom_1 / FREEMACS / FORTEX.ZIP / FORTRAN.MIN < prev    next >
INI File  |  1990-03-27  |  21KB  |  819 lines

  1. [*]#(F:save-all-libs)[*]
  2. -------------------------------------------------------------------------------
  3. Press C-c C-c (= M:done-editing) to install,
  4. then answer 'y' to write the changes to disk.
  5. -------------------------------------------------------------------------------
  6.  
  7. Name:Nfilename
  8. [*]fortran[*]
  9.  
  10. Name:N-Fortran-mode-description
  11. fortran.min - major mode for editing Fortran with Freemacs.
  12. Copyright (C) 1989, 1990 by Thorsten Ohl, td12@ddagsi3.bitnet
  13.  
  14.     Fortran mode is free software; you can redistribute it and/or modify
  15.     it under the terms of the GNU General Public License as published by
  16.     the Free Software Foundation; either version 1, or (at your option)
  17.     any later version.
  18.  
  19.     Fortran mode is distributed in the hope that it will be useful,
  20.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  21.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  22.     GNU General Public License for more details.
  23.  
  24.     You should have received a copy of the GNU General Public License
  25.     along with Fortran mode; if not, write to the Free Software
  26.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  27.  
  28. -------------------------------------------------------------------------------
  29.  
  30. This should really become a TeXinfo file, but nobody has volunteered
  31. to code TeXinfo-format-buffer in MINT yet. (Someday the Free Software
  32. Foundation might release the 'makeinfo' program.)
  33.  
  34. -------------------------------------------------------------------------------
  35.  
  36. Major mode for editing Fortran code with Freemacs:
  37. ==================================================
  38.  
  39.  
  40. Here we should write down some more documentation ....
  41.  
  42.  
  43. -------------------------------------------------------------------------------
  44.  
  45. Possible improvements: (PROBABLY in the next release, no promises)
  46.  
  47.   * make indentation faster.
  48.  
  49.   * implement indent-region.
  50.  
  51. -------------------------------------------------------------------------------
  52.  
  53. Credits:
  54.  
  55.    much inspiration came from the GNU Emacs Fortran mode.
  56.  
  57. -------------------------------------------------------------------------------
  58.  
  59. Functions: (invoked by M-x fun-name)
  60. ------------------------------------
  61.  
  62.   * Fortran-mode, for-mode
  63.     Switch to Fortran-mode
  64.  
  65.   * split-space
  66.     Supports fortran continuation and comment lines.
  67.  
  68.   * fortran-indent-line
  69.     Indent properly for fortran.
  70.  
  71.   * fortran-new-line
  72.     Newline and indent properly for fortran.
  73.  
  74.   * fortran-split-line
  75.     Force splitting of current line at point, taking care of continuation.
  76.  
  77.   * fortran-close-block
  78.     If there is an DO (resp. IF) on the current line,
  79.     insert the corresponding template.
  80.  
  81.   * fortran-column-ruler
  82.     Display a column ruler above current line.
  83.  
  84.   * newline
  85.     Insert a newline.
  86.  
  87.   * fortran-help
  88.     Give some help.
  89.  
  90.   * beginning-of-fortran-subprogram
  91.     Moves point to the beginning of the current fortran subprogram.
  92.  
  93.   * end-of-fortran-subprogram
  94.     Moves point to the end of the current fortran subprogram.
  95.  
  96.   * mark-fortran-subprogram
  97.     Put mark at end of fortran subprogram, point at beginning.
  98.  
  99.   * fortran-electric-line-number
  100.     Place line numbers in the right column.
  101.  
  102.   * question-mark
  103.     Insert a question mark or give help about abbrevs.
  104.  
  105.   * list-fortran-abbrevs
  106.     Display the list of currently defined abbrevs.
  107.  
  108.   * fortran-version
  109.     Echo the current RCS Header of the mint file.
  110.  
  111.  
  112. Locally redefined keys:
  113. -----------------------
  114.  
  115.   *          (split-space)
  116.   * 0,..,9    (fortran-electric-line-number)
  117.   * ?        (question-mark)
  118.   * Tab        (fortran-indent-line)
  119.   * Return    (newline)
  120.   * C-Return    (fortran-new-line)
  121.   * M-Return    (fortran-split-line)
  122.   * C-c a    (list-fortran-abbrevs)
  123.   * C-c C-h    (fortran-help)
  124.   * M-C-a    (beginning-of-fortran-subprogram)
  125.   * M-C-e    (end-of-fortran-subprogram)
  126.   * M-C-h    (mark-fortran-subprogram)
  127.   * C-c C-r    (fortran-column-ruler)
  128.   * C-c C-f    (fortran-close-block)
  129.   * C-c v    (fortran-version)
  130.  
  131.  
  132. Configuration variables:
  133. ------------------------
  134.  
  135.   * N-fortran-do-indent
  136.     Amount on indentation of 'do' loops
  137.     Default: 3
  138.  
  139.   * N-fortran-if-indent
  140.     Amount on indentation of 'if' blocks.
  141.     Default: 3
  142.  
  143.   * N-fortran-continuation-indent
  144.     Extra indentation of continuation lines.
  145.     Default: 5
  146.  
  147.   * N-fortran-continuation-char
  148.     Character which is inserted to begin a continuation line.
  149.     Default: $
  150.  
  151.   * N-fortran-abbrev-char
  152.     Character to introduce static abbreviations.
  153.     Default: ;
  154.  
  155.   * N-fortran-electric-line-number
  156.     Electric line numbers are active if this variable is non-nil.
  157.     Default: Y
  158.  
  159.   * N-fortran-startup-message
  160.     Set to nil to inhibit message first time Fortran-mode is used.
  161.  
  162.  
  163. -------------------------------------------------------------------------------
  164.  
  165. If you find bugs or miss a feature, please feel free to contact the
  166. author: Thorsten Ohl, td12@ddagsi3.bitnet.  (If you're not on the net:
  167. Jahnstrasse 80, 6100 Darmstadt, F.R.G.)
  168.  
  169. I can make no promises, but if you notify me of a bug, chances are much
  170. better that it will be fixed in a future release. Please quote always the
  171. version of Fortran mode you're working with. (Use C-c v if you're in
  172. Fortran mode or see below.)
  173.  
  174. -------------------------------------------------------------------------------
  175.  
  176. Revision information:
  177.  
  178.     $Source: c:/emacs/RCS/fortran.m'v $
  179.     $Revision: 1.4 $
  180.     $Date: 90/03/27 19:21:20 $
  181.     $Author: tho $
  182.  
  183. [*]dummy[*]
  184.  
  185.  
  186. -------------------------------------------------------------------------------
  187. 'style' parameters:
  188. -------------------------------------------------------------------------------
  189.  
  190. Name:N-fortran-do-indent
  191. Amount on indentation of 'do' loops
  192. [*]3[*]
  193.  
  194. Name:N-fortran-if-indent
  195. Amount on indentation of 'if' blocks.
  196. [*]3[*]
  197.  
  198. Name:N-fortran-continuation-char
  199. Character which is inserted to begin a continuation line.
  200. [*]$[*]
  201.  
  202. Name:N-fortran-continuation-indent
  203. Extra indentation of continuation lines.
  204. [*]5[*]
  205.  
  206. Name:N-fortran-abbrev-char
  207. Character to introduce static abbreviations.
  208. [*];[*]
  209.  
  210. Name:N-fortran-electric-line-number
  211. Electric line numbers are active if this variable is non-nil.
  212. [*]Y[*]
  213.  
  214. Name:N-fortran-startup-message
  215. Set to nil to inhibit message first time Fortran-mode is used.
  216. [*](major mode for editing Fortran with Freemacs.
  217. Copyright (C) 1989, 1990 by Thorsten Ohl, td12@ddagsi3.bitnet
  218.  
  219. use `C-c C-h' for quick help and `F1 m' for detailed information.
  220.  
  221. )[*]
  222.  
  223. Name:N-RCS-Id
  224. [*]$Header: c:/emacs/RCS/fortran.m'v 1.4 90/03/27 19:21:20 tho Rel $[*]
  225.  
  226. -------------------------------------------------------------------------------
  227. abbrevs:
  228. -------------------------------------------------------------------------------
  229.  
  230. Name:N$b
  231. [*]byte[*]
  232.  
  233. Name:N$ch
  234. [*]character[*]
  235.  
  236. Name:N$cl
  237. [*]close[*]
  238.  
  239. Name:N$c
  240. [*]continue[*]
  241.  
  242. Name:N$cm
  243. [*]common[*]
  244.  
  245. Name:N$cx
  246. [*]complex[*]
  247.  
  248. Name:N$di
  249. [*]dimension[*]
  250.  
  251. Name:N$do
  252. [*]double[*]
  253.  
  254. Name:N$dc
  255. [*]double complex[*]
  256.  
  257. Name:N$dp
  258. [*]double precision[*]
  259.  
  260. Name:N$dw
  261. [*]do while[*]
  262.  
  263. Name:N$e
  264. [*]else[*]
  265.  
  266. Name:N$ed
  267. [*]enddo[*]
  268.  
  269. Name:N$el
  270. [*]elseif[*]
  271.  
  272. Name:N$en
  273. [*]endif[*]
  274.  
  275. Name:N$eq
  276. [*]equivalence[*]
  277.  
  278. Name:N$ex
  279. [*]external[*]
  280.  
  281. Name:N$ey
  282. [*]entry[*]
  283.  
  284. Name:N$f
  285. [*]format[*]
  286.  
  287. Name:N$fu
  288. [*]function[*]
  289.  
  290. Name:N$g
  291. [*]goto[*]
  292.  
  293. Name:N$im
  294. [*]implicit[*]
  295.  
  296. Name:N$ib
  297. [*]implicit byte[*]
  298.  
  299. Name:N$ic
  300. [*]implicit complex[*]
  301.  
  302. Name:N$ich
  303. [*]implicit character[*]
  304.  
  305. Name:N$ii
  306. [*]implicit integer[*]
  307.  
  308. Name:N$il
  309. [*]implicit logical[*]
  310.  
  311. Name:N$ir
  312. [*]implicit real[*]
  313.  
  314. Name:N$inc
  315. [*]include[*]
  316.  
  317. Name:N$in
  318. [*]integer[*]
  319.  
  320. Name:N$intr
  321. [*]intrinsic[*]
  322.  
  323. Name:N$l
  324. [*]logical[*]
  325.  
  326. Name:N$op
  327. [*]open[*]
  328.  
  329. Name:N$pa
  330. [*]parameter[*]
  331.  
  332. Name:N$pr
  333. [*]program[*]
  334.  
  335. Name:N$p
  336. [*]print[*]
  337.  
  338. Name:N$re
  339. [*]real[*]
  340.  
  341. Name:N$r
  342. [*]read[*]
  343.  
  344. Name:N$rt
  345. [*]return[*]
  346.  
  347. Name:N$rw
  348. [*]rewind[*]
  349.  
  350. Name:N$s
  351. [*]stop[*]
  352.  
  353. Name:N$su
  354. [*]subroutine[*]
  355.  
  356. Name:N$ty
  357. [*]type[*]
  358.  
  359. Name:N$w
  360. [*]write[*]
  361.  
  362. -------------------------------------------------------------------------------
  363. initialization:
  364. -------------------------------------------------------------------------------
  365.  
  366. Name:F:Fortran-mode
  367. Switch to Fortran-mode, i.e. enable Fortran-specific extensions.
  368. [*]#(Fexit-mode)
  369. #(n?,Nfilename,,(
  370.         #(Fload-lib,fortran)
  371. ))#(N!Fortran-mode)
  372. [*]
  373.  
  374. Name:F:for-mode
  375. Synonym for Fortran-mode
  376. [*]#(F:Fortran-mode)[*]
  377.  
  378. Name:N!Fortran-mode
  379. Meaty part of F:Fortran-mode.
  380. [*]#(Flocal-bind-key,K.M-C-a,N:beginning-of-fortran-subprogram)
  381. #(Flocal-bind-key,K.M-C-e,N:end-of-fortran-subprogram)
  382. #(Flocal-bind-key,K.M-C-h,N:mark-fortran-subprogram)
  383. #(Flocal-bind-key,K.C-c C-r,N:fortran-column-ruler)
  384. #(Flocal-bind-key,K.C-c C-f,N:fortran-close-block)
  385. #(Flocal-bind-key,K.C-c C-h,N:fortran-help)
  386. #(Flocal-bind-key,K.C-c a,N:list-fortran-abbrevs)
  387. #(Flocal-bind-key,K.C-c v,N:fortran-version)
  388. #(Flocal-bind-key,K.Tab,N:fortran-indent-line)
  389. #(Flocal-bind-key,K.C-Return,N:fortran-new-line)
  390. #(Flocal-bind-key,K.M-Return,N:fortran-split-line)
  391. #(Flocal-bind-key,K.Return,N:newline)
  392. #(Flocal-bind-key,K. ,N:split-space)
  393. #(Flocal-bind-key,K.?,N:question-mark)
  394. #(Flocal-bind-key,F-left-comment,c )
  395. #(Flocal-bind-key,F-prefix-comment,c )
  396. #(Flocal-bind-key,F-right-comment,)
  397. #(Flocal-bind-key,F-fill-column,72)
  398. #(Flocal-bind-key,K.0,N:fortran-electric-line-number(,)0)
  399. #(Flocal-bind-key,K.1,N:fortran-electric-line-number(,)1)
  400. #(Flocal-bind-key,K.2,N:fortran-electric-line-number(,)2)
  401. #(Flocal-bind-key,K.3,N:fortran-electric-line-number(,)3)
  402. #(Flocal-bind-key,K.4,N:fortran-electric-line-number(,)4)
  403. #(Flocal-bind-key,K.5,N:fortran-electric-line-number(,)5)
  404. #(Flocal-bind-key,K.6,N:fortran-electric-line-number(,)6)
  405. #(Flocal-bind-key,K.7,N:fortran-electric-line-number(,)7)
  406. #(Flocal-bind-key,K.8,N:fortran-electric-line-number(,)8)
  407. #(Flocal-bind-key,K.9,N:fortran-electric-line-number(,)9)
  408. #(Fset-modename,Fortran)
  409. #(Fenter-minor-mode,Fill)
  410. #(Fenter-minor-mode,Abbrev)
  411. [*]
  412.  
  413. Name:N&setup
  414. [*]#(==,##(N-fortran-startup-message),,,(
  415.     #(xy,0,0)
  416.     #(ow,#(N-fortran-startup-message))
  417.     #(Fmode-line)
  418.     #(Fhit-any-key)
  419. ))[*]
  420.  
  421. -------------------------------------------------------------------------------
  422. give help:
  423. -------------------------------------------------------------------------------
  424.  
  425. Name:N-fortran-help-screen
  426. [*](Special keys in the Fortran mode:
  427. ------------------------------------------------
  428.  
  429. indent properly:            Tab
  430. goto beginning of fortran subprogram:    M-C-a
  431. goto end of fortran subprogram:        M-C-e
  432. mark fortran subprogram:        M-C-h
  433. new line (with indentation):        C-Return
  434. split line (with continuation):        M-Return
  435. close Fortran block (IF & DO)        C-c C-f
  436. introduce abbreviation:            ;
  437.  
  438. help (this screen):            C-c C-h
  439. column ruler:                C-c C-r
  440. describe Fortran mode:            F1 m
  441. display abbrevs:            C-c a
  442. show revision of fortran mode:        C-c v
  443.  
  444. )
  445. [*]
  446.  
  447. Name:N:fortran-help
  448. Give some help.
  449. [*]#(ow,#(N-fortran-help-screen))
  450. #(Fmore)
  451. [*]
  452.  
  453. Name:N:fortran-version
  454. Echo the current RCS Header of the mint file.
  455. [*]#(an,#(N-RCS-Id))[*]
  456.  
  457. -------------------------------------------------------------------------------
  458. tabbing etc.:
  459. -------------------------------------------------------------------------------
  460.  
  461. Name:N:fortran-indent-line
  462. Indent properly for fortran.
  463. [*]#(F:kill-spaces)
  464. #(sp,^)
  465. #(Uforward-skip,Uwhitep)
  466. #(Uforward-skip,Udigitp)
  467. #(Nwrite-label,#(rm,{)#(dm,^))
  468. #(F:kill-spaces)
  469. #(Fpad-to-column,#(Nindentation))
  470. [*]
  471.  
  472. Name:N:fortran-new-line
  473. Newline and indent properly for fortran.
  474. [*]#(Fin-minor-mode,Abbrev,(#(Nexpand-fortran-abbrev)))
  475. #(sp,$)#(Fcrlf)
  476. #(Fpad-to-column,#(Nindentation))
  477. [*]
  478.  
  479. Name:Fforward-skip-nonwhite
  480. Skip non whitespace to the right of point.
  481. (missing from the distribution).
  482. [*]#(==,##(rc,]),0,,(
  483.     #(Fwhitespace,,(
  484.         #(sp,>)
  485.         #(SELF)
  486.     ))
  487. ))[*]
  488.  
  489. Name:Nline-head
  490. Returns the beginning of the current line.
  491. [*]#(pm,2)#(sm,0)
  492. #(sp,^)
  493. #(Fforward-skip-nonwhite)#(Fforward-skip-white)
  494. #(rm,^)
  495. #(sp,0)#(pm)
  496. [*]
  497.  
  498. Name:N:fortran-split-line
  499. Force splitting of current line at point, taking care of continuation.
  500. [*]
  501. #(Fin-minor-mode,Abbrev,(#(Nexpand-fortran-abbrev)))
  502. #(lp,^[Cc\*],,R)
  503. #(l?,.,^,,,(#(is,#(Nline-head)#(Fcrlf))),
  504.        (#(Fcrlf)#(is,     ##(N-fortran-continuation-char))
  505.         #(Fpad-to-column,#(++,
  506.             #(Nindentation),
  507.             #(N-fortran-continuation-indent)))
  508.        )
  509. )
  510. [*]
  511.  
  512. Name:N:split-space
  513. Supports fortran continuation and comment lines (and only those)
  514. [*]#(Fspell-word)
  515. #(Fin-minor-mode,Abbrev,(#(Nexpand-fortran-abbrev)))
  516. #(Fself-insert, )
  517. #(Fin-minor-mode,Fill,(
  518.     #(g?,##(lv,cs),##(gs,F-fill-column),(
  519.         #(pm,1)
  520.         #(sm,0,<)
  521.         #(sv,cs,##(gs,F-fill-column))
  522.         #(Fbackward-skip-nonwhite)
  523.         #(Fbackward-delete-whitespace)
  524.         #(N:fortran-split-line)
  525.         #(sp,0>)
  526.         #(pm)
  527.     ))
  528. ))[*]
  529.  
  530. Name:N:newline
  531. Insert a newline.
  532. [*]#(Fspell-word)
  533. #(Fin-minor-mode,Abbrev,(#(Nexpand-fortran-abbrev)))
  534. #(Fcrlf)[*]
  535.  
  536. -------------------------------------------------------------------------------
  537. dynamical abbreviation:
  538. -------------------------------------------------------------------------------
  539.  
  540. Name:N:fortran-close-block
  541. If there is an DO (resp. IF) on the current line, place the corresponding
  542. CONTINUE (resp. ELSE ENDIF) with the right indentation two lines below.
  543. Write label (resp. THEN). Cases are folded automatically.
  544. [*]#(pm,3)
  545. #(lp,^[ (    )]*DO[(    ) ]*,,R,F)
  546. #(l?,$,^,1,2,(
  547.         #(sp,2)
  548.             #(ds,N-label,#(rm,}))
  549.         #(sp,1+)
  550.             #(Nset-indent)
  551.         #(sp,$)
  552.             #(Fcrlf)#(Fcrlf)
  553.             #(Nwrite-label,#(N-label))
  554.                       #(Nalign,continue,#(N-fortran-do-indent))
  555.     ),(
  556.         #(lp,^[ (    )]*IF[ ##(bc,40,d,a)],,R,F)
  557.         #(l?,$,^,1,,(
  558.                 #(sp,1+)
  559.                     #(Nset-indent)
  560.                 #(sp,$)
  561.                     #(is, #(Nfold,then))
  562.                     #(Fcrlf)#(Fcrlf)
  563.                               #(Nalign,endif,#(N-fortran-if-indent))
  564.                     #(Fcrlf)
  565.                               #(Nalign,else,#(N-fortran-if-indent))
  566.             ),(
  567.                 #(an,No block starts on this line!)
  568.             ))
  569.     ))
  570. #(pm)
  571. [*]
  572.  
  573. -------------------------------------------------------------------------------
  574. 'subroutines':
  575. -------------------------------------------------------------------------------
  576.  
  577. Name:Npull-mark-regex
  578. #(Npull-mark-regex,RE,S,E,Y,N)
  579. Search for regular expression RE (case insensitive) between
  580. S and E. If successful, set E to the beginning of the
  581. matching string, and return Y; else return N.
  582. [*]#(lp,arg1,,R,F)#(l?,arg2,arg3,arg3,,(arg4),(arg5))[*]
  583. [*]
  584.  
  585. Name:Nindentation
  586. Returns the current indentation, according to nested DO-loops or
  587. IF-blocks. Works only if each DO-loop is ended by a CONTINUE
  588. (which is anyway good fortran style). Knows about the 7th column.
  589. -----------------------------------------------------------------
  590. Although this routine is faster than my first trials, it is
  591. still to slow for non-16-Mhz PCs. Somebody could find a
  592. way without regular expressions ...
  593. [*]#(pm,2)#(sm,0)#(sm,1,[)
  594. #(Npull-mark-regex,(^[(    ) 0-9]*continue$),0,1,
  595.         (#(sp,1+}+)))
  596. #(Npull-mark-regex,(^[(    ) ]*endif$),0,1,
  597.         (#(sp,1+)))
  598. #(Npull-mark-regex,(^[(    ) ]*do[ (    )]),0,1,
  599.         (#(sp,1+#(Floop,>,#(N-fortran-do-indent)))))
  600. #(Npull-mark-regex,(^[(    ) ]*if[ (    )##(bc,40,d,a)].*then),0,1,
  601.         (#(sp,1+#(Floop,>,#(N-fortran-if-indent)))))
  602. #(g?,7,#(lv,cs),7,(#(lv,cs)))
  603. #(sp,0)#(pm)
  604. [*]
  605.  
  606. Name:Nset-indent
  607. Determines the case of the character under the point,
  608. writes the current indentation to #(N-white), and aligns
  609. the opening line of the structure.
  610. Assumes to sit on the first letter of the DO of IF.
  611. [*]
  612. #(ds,N-case,#(rm,>))
  613. #(ds,N-white,#(Nindentation))
  614. #(dm,^)
  615. #(Fpad-to-column,#(N-white))
  616. [*]
  617.  
  618. Name:Nfold
  619. Return arg1 (folded according to #(N-case)).
  620. [*]#(a?,#(N-case),[,(#(si,Fxlat-upper,arg1)),(#(si,Fxlat-lower,arg1)))[*]
  621.  
  622. Name:Nalign
  623. Insert arg1 (folded according to #(N-case)), indented by #(N-white), then
  624. move up one line and indent by #(N-white) + arg2.
  625. [*]#(Fpad-to-column,#(N-white))
  626. #(is,#(Nfold,arg1))
  627. #(sp,^<)
  628. #(Fpad-to-column,#(++,#(N-white),arg2))
  629. [*]
  630.  
  631. Name:Nwrite-label
  632. Inserts arg1 like labels in Fortran should look.
  633. (assumes .=^).
  634. [*]#(Fpad-to-column,#(--,6,#(nc,arg1)))
  635. #(is,arg1)
  636. [*]
  637.  
  638. -------------------------------------------------------------------------------
  639. Digitally remastered GNU emacs:
  640. -------------------------------------------------------------------------------
  641.  
  642. Name:N:beginning-of-fortran-subprogram
  643. Moves point to the beginning of the current fortran subprogram.
  644. [*]#(pm,2)#(sm,0)#(sm,1,[)
  645. #(Npull-mark-regex,^[ (    )a-z]*function ,0,1,(#(sp,1+)))
  646. #(Npull-mark-regex,^[ (    )]*subroutine ,0,1,(#(sp,1+)))
  647. #(Npull-mark-regex,^[ (    )]*program ,0,1,(#(sp,1+)))
  648. #(==,#(rc,0),0,(#(an,First subprogram!)))
  649. #(pm)
  650. [*]
  651.  
  652. Name:N:end-of-fortran-subprogram
  653. Moves point to the end of the current fortran subprogram.
  654. [*]#(pm,2)#(sm,0)#(sm,1,])
  655. #(Npull-mark-regex,^[ (    )]*end$,0,1,(#(sp,1+)))
  656. #(==,#(rc,0),0,(#(an,Last subprogram!)))
  657. #(pm)
  658. [*]
  659.  
  660. Name:N:mark-fortran-subprogram
  661. Put mark at end of fortran subprogram, point at beginning.
  662. The marks are pushed.
  663. [*]#(N:end-of-fortran-subprogram)#(sp,$>)
  664. #(F:set-mark-command)
  665. #(N:beginning-of-fortran-subprogram)#(sp,^)
  666. [*]
  667.  
  668. Name:N-fortran-column-ruler
  669. Used by fortran-column-ruler.
  670. [*](0---4-6--10----*---20----*---30----*---40----*---50----*---60----*---70
  671. [---]|{---|----|----|----|----|----|----|----|----|----|----|----|----|})
  672. [*]
  673.  
  674. Name:N:fortran-column-ruler
  675. Inserts a column ruler momentarily above current line, till next keystroke.
  676. The ruler is defined by the value of N-fortran-column-ruler.
  677. The key typed is executed unless it is SPC.
  678. [*]
  679. #(xy,0,#(--,#(lv,rs),3))
  680. #(ow,#(N-fortran-column-ruler))
  681. #(ds,temp,#(g))
  682. #(==,##(temp), ,,(
  683.     #(Fkbd-in,##(temp))
  684. ))
  685. [*]
  686.  
  687.  
  688. Name:Nexpand-fortran-abbrev
  689. Expand the non-white characters to the left of point, if they begin with
  690. #(N-fortran-abbrev-char), which is usually `;', from GNU Emacs.
  691. Insert the result.
  692. [*]#(pm,1)
  693. #(sm)#(sp,{)
  694. #(==,##(N-fortran-abbrev-char),##(rm,<),
  695.     (#(dm,<)#(is,#(Nexpand-fortran-abbrev-do,#(rm,})))#(dm,})),
  696.     (#(sp,0)))
  697. #(pm)
  698. [*]
  699.  
  700. Name:Nexpand-fortran-abbrev-do
  701. Expand arg1 properly case folded as fortran abbrev
  702. [*]#(a?,arg1,a,
  703.     (#(si,Fxlatupper,#(N$#(si,Fxlat-lower,arg1)))),
  704.     (#(N$arg1)))
  705. [*]
  706.  
  707. Name:N:question-mark
  708. Insert a question mark or give help about abbrevs.
  709. [*]#(Fin-minor-mode,Abbrev,
  710.     (#(==,##(N-fortran-abbrev-char),##(rm,<),
  711.         (#(N:list-fortran-abbrevs)),
  712.         (#(Fself-insert,?)))),
  713.     (#(Fself-insert,?)))
  714. [*]
  715.  
  716. Name:N:list-fortran-abbrevs
  717. Display the list of currently defined abbrevs.
  718. [*]#(ds,@N$,##(sa,#(ls,(,),N$)))
  719. #(fm,@N$,(,)N$)
  720. #(ds,temp,
  721. The following abbrevs are available in Fortran-mode:(,)
  722. ----------------------------------------------------(,)
  723. #(Nscan-fortran-abbrevs))
  724. #(Fmore)
  725. #(es,@N$)
  726. [*]
  727.  
  728. Name:Nscan-fortran-abbrevs
  729. Recursively scan the list of abbrevs and format them for #(Fmore).
  730. [*]#(ds,-temp,##(fm,@N$,(,)N$))
  731. #(==,##(-temp),,,(##(Nshow-abbrev-expansion,##(-temp))(,)#(SELF)))
  732. [*]
  733.  
  734. Name:Nshow-abbrev-expansion
  735. [*]((    )arg1(    )#(N$arg1))[*]
  736.  
  737. -------------------------------------------------------------------------------
  738. electric line numbers.
  739. -------------------------------------------------------------------------------
  740.  
  741. Name:N:fortran-electric-line-number
  742. Inspired by GNU Emacs.
  743. [*]#(Fself-insert,(arg1))
  744. #(==,#(N-fortran-electric-line-number),,,(
  745.     #(==,#(Nfortran-line-numberp,Y),,,(
  746.         #(sp,^+})
  747.         #(g?,6,#(rc,{),(
  748.                 #(Nwrite-label,#(rm,{)#(dm,^))
  749.                 #(N:fortran-indent-line)
  750.                 #(sp,-)
  751.             ),(
  752.                 #(dm,<)
  753.                 #(F:ring-the-bell)
  754.                 #(an,Line number to long!)
  755.             ))
  756.     ))
  757. ))
  758. [*]
  759.  
  760. Name:Nfortran-line-numberp
  761. #(Nfortran-line-numberp,Y,N) returns `Y' if point is on (or just behind) a
  762. Fortran line number, else `N' is returned.
  763. [*]#(pm,2)#(sm,0)#(lp,^[ (    )]*[0-9]*,,R)
  764. #(l?,^,$,,1,(
  765.         #(sp,})
  766.         #(==,#(rc,1),0,(arg1),(arg2))
  767.         #(sp,0)
  768.     ),(
  769.         (arg2)
  770.     ))
  771. #(pm)
  772. [*]
  773.  
  774. ----------------------------------------------------------------------
  775. point moving functions for the common user library:
  776. ----------------------------------------------------------------------
  777.  
  778. Name:Uforward-skip
  779. Skip all characters C to the right of point, for which #((arg1),C,Y,N)
  780. returns Y.
  781. [*]#(==,##(rc,]),0,,(
  782.     #((arg1),##(rm,>),(
  783.         #(sp,>)
  784.         #(SELF,(arg1))
  785.     ))
  786. ))[*]
  787.  
  788. Name:Ubackward-skip
  789. Skip all characters C to the left of point, for which #((arg1),C,Y,N)
  790. returns Y.
  791. [*]#(==,##(rc,[),0,,(
  792.     #(sp,<)
  793.     #((arg1),##(rm,>),(
  794.             #(SELF,(arg1))
  795.         ),(
  796.             #(sp,>)
  797.         ))
  798. ))[*]
  799.  
  800. Name:Udigitp
  801. #(Udigitp,C,Y,N) returns Y if C is a digit, N else.
  802. [*]#(a?,(arg1),9,(
  803.         #(a?,0,(arg1),(arg2),(arg3))
  804.     ),(
  805.         arg3
  806. ))[*]
  807.  
  808. Name:Uwhitep
  809. #(Uwhitep,C,Y,N) returns Y if C is a blank or tab, N else.
  810. [*]#(==,(arg1), ,(
  811.         arg2
  812.     ),(
  813.         #(==,(arg1),(    ),(arg2),(arg3))
  814. ))[*]
  815.  
  816. -------------------------------------------------------------------------------
  817. that's it.
  818. -------------------------------------------------------------------------------
  819.