;;; -*-Scheme-*-
;;;
-;;; $Id: c-mode.scm,v 1.58 2000/02/29 03:59:38 cph Exp $
+;;; $Id: c-mode.scm,v 1.59 2000/03/02 05:31:58 cph Exp $
;;;
;;; Copyright (c) 1986, 1989-2000 Massachusetts Institute of Technology
;;;
(lambda (buffer)
(local-set-variable! syntax-table c-syntax-table buffer)
(local-set-variable! syntax-ignore-comments-backwards #t buffer)
- (let ((paragraph-start
- (string-append "^$\\|" (ref-variable page-delimiter buffer))))
- (local-set-variable! paragraph-start paragraph-start buffer)
- (local-set-variable! paragraph-separate paragraph-start buffer))
+ (standard-alternate-paragraph-style! buffer)
(local-set-variable! paragraph-ignore-fill-prefix #t buffer)
(local-set-variable! indent-line-procedure (ref-command c-indent-command)
buffer)
;;; -*-Scheme-*-
;;;
-;;; $Id: midas.scm,v 1.20 2000/02/29 02:47:44 cph Exp $
+;;; $Id: midas.scm,v 1.21 2000/03/02 05:31:48 cph Exp $
;;;
;;; Copyright (c) 1986, 1989-2000 Massachusetts Institute of Technology
;;;
;;;; Midas Mode
(declare (usual-integrations))
-\f
+
(define-command midas-mode
"Enter Midas mode."
()
(local-set-variable! comment-indent-hook midas-comment-indentation buffer)
(local-set-variable! comment-start ";" buffer)
(local-set-variable! comment-end "" buffer)
- (let ((paragraph-start "^$"))
- (local-set-variable! paragraph-start paragraph-start buffer)
- (local-set-variable! paragraph-separate paragraph-start buffer))
+ (standard-alternate-paragraph-style! buffer)
(local-set-variable! indent-line-procedure (ref-command insert-tab) buffer)
(local-set-variable! local-abbrev-table
(ref-variable midas-mode-abbrev-table buffer)
;;; -*-Scheme-*-
;;;
-;;; $Id: pasmod.scm,v 1.49 2000/02/29 02:47:51 cph Exp $
+;;; $Id: pasmod.scm,v 1.50 2000/03/02 05:31:51 cph Exp $
;;;
;;; Copyright (c) 1986, 1989-2000 Massachusetts Institute of Technology
;;;
(local-set-variable! comment-indent-hook pascal-comment-indentation buffer)
(local-set-variable! comment-start "(* " buffer)
(local-set-variable! comment-end " *)" buffer)
- (let ((paragraph-start "^$"))
- (local-set-variable! paragraph-start paragraph-start buffer)
- (local-set-variable! paragraph-separate paragraph-start buffer))
+ (standard-alternate-paragraph-style! buffer)
(local-set-variable! local-abbrev-table
(ref-variable pascal-mode-abbrev-table buffer)
buffer)
;;; -*-Scheme-*-
;;;
-;;; $Id: schmod.scm,v 1.46 2000/02/29 03:59:20 cph Exp $
+;;; $Id: schmod.scm,v 1.47 2000/03/02 05:31:55 cph Exp $
;;;
;;; Copyright (c) 1986, 1989-2000 Massachusetts Institute of Technology
;;;
(local-set-variable! comment-indent-hook lisp-comment-indentation buffer)
(local-set-variable! comment-start ";" buffer)
(local-set-variable! comment-end "" buffer)
- (let ((separate
- (string-append "^$\\|" (ref-variable page-delimiter buffer))))
- (local-set-variable! paragraph-start separate buffer)
- (local-set-variable! paragraph-separate separate buffer))
+ (standard-alternate-paragraph-style! buffer)
(local-set-variable! paragraph-ignore-fill-prefix #t buffer)
(local-set-variable! indent-line-procedure
(ref-command lisp-indent-line)
;;; -*-Scheme-*-
;;;
-;;; $Id: texcom.scm,v 1.44 2000/02/29 03:59:11 cph Exp $
+;;; $Id: texcom.scm,v 1.45 2000/03/02 05:31:10 cph Exp $
;;;
;;; Copyright (c) 1986, 1989-2000 Massachusetts Institute of Technology
;;;
"Major mode for editing english text."
(lambda (buffer)
(local-set-variable! syntax-table text-mode:syntax-table buffer)
+ (standard-alternate-paragraph-style! buffer)
(local-set-variable! local-abbrev-table
(ref-variable text-mode-abbrev-table buffer)
buffer)
;;; -*-Scheme-*-
;;;
-;;; $Id: tparse.scm,v 1.71 1999/01/02 06:11:34 cph Exp $
+;;; $Id: tparse.scm,v 1.72 2000/03/02 05:32:01 cph Exp $
;;;
-;;; Copyright (c) 1986, 1989-1999 Massachusetts Institute of Technology
+;;; Copyright (c) 1986, 1989-2000 Massachusetts Institute of Technology
;;;
;;; This program is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU General Public License as
(define-variable paragraph-ignore-fill-prefix
"True means the paragraph commands are not affected by fill-prefix.
This is desirable in modes where blank lines are the paragraph delimiters."
- false
+ #f
boolean?)
(define-integrable (mark/paragraph-start mark)
(define (mark/paragraph-fill-prefix mark)
(if (mark-local-ref mark (ref-variable-object paragraph-ignore-fill-prefix))
- false
+ #f
(mark-local-ref mark (ref-variable-object fill-prefix))))
+
+(define (standard-alternate-paragraph-style! buffer)
+ (let ((regexp
+ (string-append "^[ \t]*$\\|" (ref-variable page-delimiter buffer))))
+ (local-set-variable! paragraph-start regexp buffer)
+ (local-set-variable! paragraph-separate regexp buffer)))
\f
(define (forward-one-paragraph mark #!optional limit fill-prefix)
(let ((limit
(let ((separator?
(if fill-prefix
(lambda (ls)
- (let ((fp (match-forward fill-prefix ls end false)))
+ (let ((fp (match-forward fill-prefix ls end #f)))
(if fp
- (re-match-forward "[ \t]*$" fp end false)
- true)))
+ (re-match-forward "[ \t]*$" fp end #f)
+ #t)))
(lambda (ls)
- (re-match-forward para-separate ls end false)))))
+ (re-match-forward para-separate ls end #f)))))
(letrec
((skip-separators
(lambda (ls)
- (cond ((mark= ls limit) false)
+ (cond ((mark= ls limit) #f)
((separator? ls) (skip-separators (next-ls ls)))
(else (skip-body ls)))))
(skip-body
(lambda (ls)
(let ((le (line-end ls 0)))
(if (and (mark< le limit)
- (re-search-forward para-start le limit
- false))
+ (re-search-forward para-start le limit #f))
(re-match-start 0)
limit))))))
(if (separator? (line-start mark 0))
(let ((separator?
(if fill-prefix
(lambda (ls)
- (let ((fp (match-forward fill-prefix ls end false)))
+ (let ((fp (match-forward fill-prefix ls end #f)))
(if fp
- (re-match-forward "[ \t]*$" fp end false)
- true)))
+ (re-match-forward "[ \t]*$" fp end #f)
+ #t)))
(lambda (ls)
- (re-match-forward para-separate ls end false)))))
+ (re-match-forward para-separate ls end #f)))))
(letrec ((skip-separators
(lambda (ls)
(and (mark< limit ls)
(re-search-backward para-start
(line-end ls 0)
limit
- false)))
+ #f)))
(cond ((not ps)
limit)
((separator? ps)
(let ((separator?
(if fill-prefix
(lambda (ls)
- (let ((fp (match-forward fill-prefix ls end false)))
+ (let ((fp (match-forward fill-prefix ls end #f)))
(if fp
- (re-match-forward "[ \t]*$" fp end false)
- true)))
+ (re-match-forward "[ \t]*$" fp end #f)
+ #t)))
(lambda (ls)
- (re-match-forward para-separate ls end false)))))
+ (re-match-forward para-separate ls end #f)))))
(letrec ((skip-separators
(lambda (ls)
(cond ((not (separator? ls)) (skip-body ls))
(re-search-backward para-start
(line-end ls 0)
start
- false)))
+ #f)))
(cond ((not ps) start)
((separator? ps) (line-start ps 1))
(else ps)))))))
(let ((separator?
(if fill-prefix
(lambda (ls)
- (let ((fp (match-forward fill-prefix ls end false)))
+ (let ((fp (match-forward fill-prefix ls end #f)))
(if fp
- (re-match-forward "[ \t]*$" fp end false)
- true)))
+ (re-match-forward "[ \t]*$" fp end #f)
+ #t)))
(lambda (ls)
- (re-match-forward para-separate ls end false)))))
+ (re-match-forward para-separate ls end #f)))))
(letrec
((skip-separators
(lambda (ls)
- (cond ((mark= ls end)
- false)
- ((separator? ls)
- (skip-separators (next-ls ls)))
- (else
- (skip-body ls)))))
+ (cond ((mark= ls end) #f)
+ ((separator? ls) (skip-separators (next-ls ls)))
+ (else (skip-body ls)))))
(skip-body
(if fill-prefix
(lambda (ls)
(finish
(let ((le (line-end ls 0)))
(if (and (mark< le end)
- (re-search-forward para-start le end
- false))
+ (re-search-forward para-start le end #f))
(re-match-start 0)
end))))))
(finish
mark
(or para-end (group-end mark)))))
(if mark
- (skip-chars-backward " \t\n" mark (re-match-start 0) false)
+ (skip-chars-backward " \t\n" mark (re-match-start 0) #f)
para-end))))
(define (backward-one-sentence mark)
;;; -*-Scheme-*-
;;;
-;;; $Id: verilog.scm,v 1.7 2000/02/29 02:47:56 cph Exp $
+;;; $Id: verilog.scm,v 1.8 2000/03/02 05:31:39 cph Exp $
;;;
;;; Copyright (c) 1996-2000 Massachusetts Institute of Technology
;;;
buffer)
(local-set-variable! comment-start "// " buffer)
(local-set-variable! comment-end "" buffer)
- (let ((paragraph-start
- (string-append "^$\\|" (ref-variable page-delimiter buffer))))
- (local-set-variable! paragraph-start paragraph-start buffer)
- (local-set-variable! paragraph-separate paragraph-start buffer))
+ (standard-alternate-paragraph-style! buffer)
(local-set-variable! indent-line-procedure
(ref-command keyparser-indent-line)
buffer)
;;; -*-Scheme-*-
;;;
-;;; $Id: vhdl.scm,v 1.7 2000/02/29 02:47:01 cph Exp $
+;;; $Id: vhdl.scm,v 1.8 2000/03/02 05:31:35 cph Exp $
;;;
;;; Copyright (c) 1997-2000 Massachusetts Institute of Technology
;;;
(local-set-variable! comment-indent-hook vhdl-comment-indentation buffer)
(local-set-variable! comment-start "-- " buffer)
(local-set-variable! comment-end "" buffer)
- (let ((paragraph-start
- (string-append "^$\\|" (ref-variable page-delimiter buffer))))
- (local-set-variable! paragraph-start paragraph-start buffer)
- (local-set-variable! paragraph-separate paragraph-start buffer))
+ (standard-alternate-paragraph-style! buffer)
(local-set-variable! indent-line-procedure
(ref-command keyparser-indent-line)
buffer)