From 42e2578cc0f9884cc047768a767bdbab1873cb69 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 29 Feb 2000 02:41:44 +0000 Subject: [PATCH] Add mode-specific abbrev tables and \\{} doc strings to many major modes. --- v7/src/edwin/c-mode.scm | 16 +++++++++-- v7/src/edwin/htmlmode.scm | 16 +++++++++-- v7/src/edwin/javamode.scm | 30 ++++++++++++++++---- v7/src/edwin/midas.scm | 55 +++++++++++++++++------------------ v7/src/edwin/pasmod.scm | 60 +++++++++++++++++++-------------------- v7/src/edwin/schmod.scm | 16 +++++++++-- v7/src/edwin/sendmail.scm | 51 ++++++++++++++++----------------- v7/src/edwin/shell.scm | 16 ++++++++--- v7/src/edwin/texcom.scm | 13 +++++++-- v7/src/edwin/tximod.scm | 20 +++++++++++-- v7/src/edwin/verilog.scm | 20 +++++++++++-- v7/src/edwin/vhdl.scm | 20 +++++++++++-- 12 files changed, 218 insertions(+), 115 deletions(-) diff --git a/v7/src/edwin/c-mode.scm b/v7/src/edwin/c-mode.scm index 2a7dd4cd5..30fdcf68b 100644 --- a/v7/src/edwin/c-mode.scm +++ b/v7/src/edwin/c-mode.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: c-mode.scm,v 1.56 1999/10/07 15:13:09 cph Exp $ +;;; $Id: c-mode.scm,v 1.57 2000/02/29 02:41:14 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 @@ -62,7 +62,9 @@ Settings for K&R and BSD indentation styles are c-continued-statement-offset 5 8 c-brace-offset -5 -8 c-argdecl-indent 0 8 - c-label-offset -5 -8" + c-label-offset -5 -8 + +\\{c}" (lambda (buffer) (local-set-variable! syntax-table c-syntax-table buffer) (local-set-variable! syntax-ignore-comments-backwards #t buffer) @@ -79,6 +81,9 @@ Settings for K&R and BSD indentation styles are (local-set-variable! comment-column 32 buffer) (local-set-variable! comment-locator-hook c-comment-locate buffer) (local-set-variable! comment-indent-hook c-comment-indent buffer) + (local-set-variable! local-abbrev-table + (ref-variable c-mode-abbrev-table buffer) + buffer) (event-distributor/invoke! (ref-variable c-mode-hook buffer) buffer))) (define-command c-mode @@ -86,6 +91,11 @@ Settings for K&R and BSD indentation styles are () (lambda () (set-current-major-mode! (ref-mode-object c)))) +(define-variable C-mode-abbrev-table + "Mode-specific abbrev table for C code." + (make-abbrev-table) + abbrev-table?) + (define-variable c-mode-hook "An event distributor that is invoked when entering C mode." (make-event-distributor)) diff --git a/v7/src/edwin/htmlmode.scm b/v7/src/edwin/htmlmode.scm index c679adc14..c37b2952a 100644 --- a/v7/src/edwin/htmlmode.scm +++ b/v7/src/edwin/htmlmode.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: htmlmode.scm,v 1.1 1999/10/07 17:00:07 cph Exp $ +;;; $Id: htmlmode.scm,v 1.2 2000/02/29 02:41:11 cph Exp $ ;;; -;;; Copyright (c) 1999 Massachusetts Institute of Technology +;;; Copyright (c) 1999-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 @@ -23,7 +23,9 @@ (declare (usual-integrations)) (define-major-mode html text "HTML" - "Major mode for editing HTML." + "Major mode for editing HTML. + +\\{html}" (lambda (buffer) (local-set-variable! syntax-table html-syntax-table buffer) (local-set-variable! indent-line-procedure @@ -40,6 +42,9 @@ sentence-end "[.?!][]\"')}]*\\(<[^>]*>\\)*\\($\\| $\\|\t\\| \\)[ \t\n]*" buffer) + (local-set-variable! local-abbrev-table + (ref-variable html-mode-abbrev-table buffer) + buffer) (event-distributor/invoke! (ref-variable html-mode-hook buffer) buffer))) (define html-paragraph-separator @@ -50,6 +55,11 @@ () (lambda () (set-current-major-mode! (ref-mode-object html)))) +(define-variable html-mode-abbrev-table + "Mode-specific abbrev table for HTML." + (make-abbrev-table) + abbrev-table?) + (define-variable html-mode-hook "An event distributor that is invoked when entering HTML mode." (make-event-distributor)) diff --git a/v7/src/edwin/javamode.scm b/v7/src/edwin/javamode.scm index aa5469822..88d3f9411 100644 --- a/v7/src/edwin/javamode.scm +++ b/v7/src/edwin/javamode.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: javamode.scm,v 1.8 1999/10/09 03:52:46 cph Exp $ +;;; $Id: javamode.scm,v 1.9 2000/02/29 02:41:07 cph Exp $ ;;; -;;; Copyright (c) 1998-1999 Massachusetts Institute of Technology +;;; Copyright (c) 1998-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 @@ -35,7 +35,9 @@ "Major mode for editing Java code. This is just like C mode, except that (1) comments begin with // and end at the end of line, and - (2) c-continued-brace-offset defaults to -2 instead of 0." + (2) c-continued-brace-offset defaults to -2 instead of 0. + +\\{java}" (lambda (buffer) (local-set-variable! syntax-table java-syntax-table buffer) (local-set-variable! syntax-ignore-comments-backwards #f buffer) @@ -44,6 +46,9 @@ This is just like C mode, except that (local-set-variable! comment-start "// " buffer) (local-set-variable! comment-end "" buffer) (local-set-variable! c-continued-brace-offset -2 buffer) + (local-set-variable! local-abbrev-table + (ref-variable java-mode-abbrev-table buffer) + buffer) (event-distributor/invoke! (ref-variable java-mode-hook buffer) buffer))) (define-command java-mode @@ -51,6 +56,11 @@ This is just like C mode, except that () (lambda () (set-current-major-mode! (ref-mode-object java)))) +(define-variable java-mode-abbrev-table + "Mode-specific abbrev table for Java code." + (make-abbrev-table) + abbrev-table?) + (define-variable java-mode-hook "An event distributor that is invoked when entering Java mode." (make-event-distributor)) @@ -81,12 +91,14 @@ This is just like C mode, except that column (max (+ (mark-column (horizontal-space-start mark)) 1) column)))) - + (define-major-mode php c "PHP" "Major mode for editing PHP code. This is just like C mode, except that (1) comments begin with // and end at the end of line, and - (2) $ is a symbol constituent rather than a word constituent." + (2) $ is a symbol constituent rather than a word constituent. + +\\{php}" (lambda (buffer) (local-set-variable! syntax-table php-syntax-table buffer) (local-set-variable! syntax-ignore-comments-backwards #f buffer) @@ -94,6 +106,9 @@ This is just like C mode, except that (local-set-variable! comment-indent-hook java-comment-indentation buffer) (local-set-variable! comment-start "// " buffer) (local-set-variable! comment-end "" buffer) + (local-set-variable! local-abbrev-table + (ref-variable php-mode-abbrev-table buffer) + buffer) (event-distributor/invoke! (ref-variable php-mode-hook buffer) buffer))) (define-command PHP-mode @@ -101,6 +116,11 @@ This is just like C mode, except that () (lambda () (set-current-major-mode! (ref-mode-object php)))) +(define-variable php-mode-abbrev-table + "Mode-specific abbrev table for PHP code." + (make-abbrev-table) + abbrev-table?) + (define-variable php-mode-hook "An event distributor that is invoked when entering PHP mode." (make-event-distributor)) diff --git a/v7/src/edwin/midas.scm b/v7/src/edwin/midas.scm index 749fb4b6f..f6aad7741 100644 --- a/v7/src/edwin/midas.scm +++ b/v7/src/edwin/midas.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: midas.scm,v 1.18 1999/01/02 06:11:34 cph Exp $ +;;; $Id: midas.scm,v 1.19 2000/02/29 02:41:18 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 @@ -25,38 +25,35 @@ (define-command midas-mode "Enter Midas mode." () - (lambda () - (set-current-major-mode! (ref-mode-object midas)))) + (lambda () (set-current-major-mode! (ref-mode-object midas)))) (define-major-mode midas fundamental "Midas" "Major mode for editing assembly code." (lambda (buffer) - (define-variable-local-value! buffer (ref-variable-object syntax-table) - midas-mode:syntax-table) - (define-variable-local-value! buffer (ref-variable-object comment-column) - 40) - (define-variable-local-value! buffer - (ref-variable-object comment-locator-hook) - lisp-comment-locate) - (define-variable-local-value! buffer - (ref-variable-object comment-indent-hook) - midas-comment-indentation) - (define-variable-local-value! buffer (ref-variable-object comment-start) - ";") - (define-variable-local-value! buffer (ref-variable-object comment-end) - "") + (local-set-variable! syntax-table midas-mode:syntax-table buffer) + (local-set-variable! comment-column 40 buffer) + (local-set-variable! comment-locator-hook lisp-comment-locate buffer) + (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 "^$")) - (define-variable-local-value! buffer - (ref-variable-object paragraph-start) - paragraph-start) - (define-variable-local-value! buffer - (ref-variable-object paragraph-separate) - paragraph-start)) - (define-variable-local-value! buffer - (ref-variable-object indent-line-procedure) - (ref-command insert-tab)) + (local-set-variable! paragraph-start paragraph-start buffer) + (local-set-variable! paragraph-separate paragraph-start 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) + buffer) (event-distributor/invoke! (ref-variable midas-mode-hook buffer) buffer))) +(define-variable midas-mode-abbrev-table + "Mode-specific abbrev table for assembly code." + (make-abbrev-table) + abbrev-table?) + +(define-variable midas-mode-hook + "An event distributor that is invoked when entering Midas mode." + (make-event-distributor)) + (define midas-mode:syntax-table (make-syntax-table)) (modify-syntax-entry! midas-mode:syntax-table #\; "< ") (modify-syntax-entry! midas-mode:syntax-table #\newline "> ") @@ -69,5 +66,5 @@ (define (midas-comment-indentation mark) (if (match-forward ";;;" mark) 0 - (max (1+ (mark-column (horizontal-space-start mark))) - (ref-variable comment-column)))) \ No newline at end of file + (max (+ (mark-column (horizontal-space-start mark)) 1) + (ref-variable comment-column mark)))) \ No newline at end of file diff --git a/v7/src/edwin/pasmod.scm b/v7/src/edwin/pasmod.scm index c1fae0d37..7d5091f63 100644 --- a/v7/src/edwin/pasmod.scm +++ b/v7/src/edwin/pasmod.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: pasmod.scm,v 1.47 1999/01/02 06:11:34 cph Exp $ +;;; $Id: pasmod.scm,v 1.48 2000/02/29 02:41:21 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 @@ -29,37 +29,37 @@ (set-current-major-mode! (ref-mode-object pascal)))) (define-major-mode pascal fundamental "Pascal" - "Major mode specialized for editing Pascal code." + "Major mode specialized for editing Pascal code. + +\\{pascal}" (lambda (buffer) - (define-variable-local-value! buffer (ref-variable-object syntax-table) - pascal-mode:syntax-table) - (define-variable-local-value! buffer - (ref-variable-object syntax-ignore-comments-backwards) - true) - (define-variable-local-value! buffer - (ref-variable-object indent-line-procedure) - (ref-command pascal-indent-line)) - (define-variable-local-value! buffer (ref-variable-object comment-column) - 32) - (define-variable-local-value! buffer - (ref-variable-object comment-locator-hook) - pascal-comment-locate) - (define-variable-local-value! buffer - (ref-variable-object comment-indent-hook) - pascal-comment-indentation) - (define-variable-local-value! buffer (ref-variable-object comment-start) - "(* ") - (define-variable-local-value! buffer (ref-variable-object comment-end) - " *)") + (local-set-variable! syntax-table pascal-mode:syntax-table buffer) + (local-set-variable! syntax-ignore-comments-backwards #t buffer) + (local-set-variable! indent-line-procedure + (ref-command pascal-indent-line) + buffer) + (local-set-variable! comment-column 32 buffer) + (local-set-variable! comment-locator-hook pascal-comment-locate buffer) + (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 "^$")) - (define-variable-local-value! buffer - (ref-variable-object paragraph-start) - paragraph-start) - (define-variable-local-value! buffer - (ref-variable-object paragraph-separate) - paragraph-start)) + (local-set-variable! paragraph-start paragraph-start buffer) + (local-set-variable! paragraph-separate paragraph-start buffer)) + (local-set-variable! local-abbrev-table + (ref-variable pascal-mode-abbrev-table buffer) + buffer) (event-distributor/invoke! (ref-variable pascal-mode-hook buffer) buffer))) +(define-variable pascal-mode-abbrev-table + "Mode-specific abbrev table for Pascal code." + (make-abbrev-table) + abbrev-table?) + +(define-variable pascal-mode-hook + "An event distributor that is invoked when entering Pascal mode." + (make-event-distributor)) + (define pascal-mode:syntax-table (make-syntax-table)) (modify-syntax-entry! pascal-mode:syntax-table #\( "()1 ") (modify-syntax-entry! pascal-mode:syntax-table #\) ")( 4") @@ -139,7 +139,7 @@ With an argument, shifts left that many times." (line-start start 1))))))) (define (find-statement-start mark) (let ((start (find-previous-non-blank-line mark))) - (cond ((not start) false) + (cond ((not start) #f) ((mark< start def-start) def-start) (else (let ((container diff --git a/v7/src/edwin/schmod.scm b/v7/src/edwin/schmod.scm index cdb3ac56e..a7eec822c 100644 --- a/v7/src/edwin/schmod.scm +++ b/v7/src/edwin/schmod.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: schmod.scm,v 1.44 1999/01/02 06:11:34 cph Exp $ +;;; $Id: schmod.scm,v 1.45 2000/02/29 02:41:02 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 @@ -40,7 +40,9 @@ The following commands evaluate Scheme expressions: \\[eval-last-sexp] evaluates the expression preceding point. \\[eval-defun] evaluates the current definition. \\[eval-current-buffer] evaluates the buffer. -\\[eval-region] evaluates the current region." +\\[eval-region] evaluates the current region. + +\\{scheme}" (lambda (buffer) (local-set-variable! syntax-table scheme-mode:syntax-table buffer) (local-set-variable! syntax-ignore-comments-backwards #f buffer) @@ -63,8 +65,16 @@ The following commands evaluate Scheme expressions: (local-set-variable! mode-line-process '(RUN-LIGHT (": " RUN-LIGHT) "") buffer) + (local-set-variable! local-abbrev-table + (ref-variable scheme-mode-abbrev-table buffer) + buffer) (event-distributor/invoke! (ref-variable scheme-mode-hook buffer) buffer))) +(define-variable scheme-mode-abbrev-table + "Mode-specific abbrev table for Scheme code." + (make-abbrev-table) + abbrev-table?) + (define-variable scheme-mode-hook "An event distributor that is invoked when entering Scheme mode." (make-event-distributor)) diff --git a/v7/src/edwin/sendmail.scm b/v7/src/edwin/sendmail.scm index b6554d950..b1086795d 100644 --- a/v7/src/edwin/sendmail.scm +++ b/v7/src/edwin/sendmail.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: sendmail.scm,v 1.44 1999/02/01 03:46:56 cph Exp $ +;;; $Id: sendmail.scm,v 1.45 2000/02/29 02:41:44 cph Exp $ ;;; -;;; Copyright (c) 1991-1999 Massachusetts Institute of Technology +;;; Copyright (c) 1991-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 @@ -64,7 +64,7 @@ If set to the null string, no Organization: field is generated." (define-variable mail-default-reply-to "Address to insert as default Reply-to field of outgoing messages." - false + #f (lambda (object) (or (not object) (string? object) @@ -75,12 +75,12 @@ If set to the null string, no Organization: field is generated." "True means insert BCC to self in messages to be sent. This is done when the message is initialized, so you can remove or alter the BCC field to override the default." - false + #f boolean?) (define-variable mail-archive-file-name - "Name of file to write all outgoing messages in, or false for none." - false + "Name of file to write all outgoing messages in, or #f for none." + #f string-or-false?) (define-variable mail-relay-host @@ -123,8 +123,8 @@ Otherwise, only one valid recipient is required." (define-variable mail-interactive "True means when sending a message wait for and display errors. -False means let mailer mail back a message to report errors." - false +#F means let mailer mail back a message to report errors." + #f boolean?) (define-variable mail-header-separator @@ -135,7 +135,7 @@ False means let mailer mail back a message to report errors." (define-variable mail-header-function "A function of one argument, POINT (the current point), which inserts additional header lines into a mail message. The function is called -after all other headers are inserted. If this variable is false, it +after all other headers are inserted. If this variable is #f, it is ignored." #f (lambda (object) @@ -159,7 +159,7 @@ The headers are delimited by a string found in mail-header-separator." (define-variable mail-reply-buffer "" - false + #f (lambda (object) (or (false? object) (buffer? object)))) (variable-permanent-local! (ref-variable-object mail-reply-buffer)) @@ -254,7 +254,7 @@ is inserted." (lambda (start end) (fill-region-as-paragraph start end "\t" (ref-variable fill-column buffer) - false)))) + #f)))) (let ((start (mark-right-inserting-copy point))) (for-each (lambda (header) (let ((key (car header)) @@ -381,15 +381,14 @@ The mail buffer is passed as an argument; it is not necessarily selected." (define-major-mode mail text "Mail" "Major mode for editing mail to be sent. -Separate names of recipients (in To: and CC: fields) with commas. Like Text Mode but with these additional commands: -C-c C-s mail-send (send the message) C-c C-c mail-send-and-exit -C-c C-f move to a header field (and create it if there isn't): - C-c C-f C-t move to To: C-c C-f C-s move to Subj: - C-c C-f C-b move to BCC: C-c C-f C-c move to CC: -C-c C-w mail-signature (insert ~/.signature at end). -C-c C-y mail-yank-original (insert current message, in Rmail). -C-c C-q mail-fill-yanked-message (fill what was yanked)." +\\[mail-send] mail-send (send the message) \\[mail-send-and-exit] mail-send-and-exit +Here are commands that move to a header field (and create it if there isn't): + \\[mail-to] move to To: \\[mail-subject] move to Subject: + \\[mail-cc] move to CC: \\[mail-bcc] move to BCC: +\\[mail-signature] mail-signature (insert ~/.signature file). +\\[mail-yank-original] mail-yank-original (insert current message, in Rmail). +\\[mail-fill-yanked-message] mail-fill-yanked-message (fill what was yanked)." (lambda (buffer) (define-variable-local-value! buffer (ref-variable-object paragraph-start) (string-append "^" @@ -566,7 +565,7 @@ and don't delete any header fields." (let ((start (mark-left-inserting-copy start)) (end (mark-left-inserting-copy - (if (re-search-forward "\n\n" start end false) + (if (re-search-forward "\n\n" start end #f) (mark1+ (re-match-start 0)) end))) (mail-yank-ignored-headers (ref-variable mail-yank-ignored-headers))) @@ -574,11 +573,11 @@ and don't delete any header fields." (lambda () (do () ((not - (re-search-forward mail-yank-ignored-headers start end true))) + (re-search-forward mail-yank-ignored-headers start end #t))) (move-mark-to! start (re-match-start 0)) (delete-string start - (if (re-search-forward "^[^ \t]" (line-end start 0) end false) + (if (re-search-forward "^[^ \t]" (line-end start 0) end #f) (re-match-start 0) end))))) (mark-temporary! start) @@ -595,7 +594,7 @@ Numeric argument means justify as well." (buffer-end buffer) (ref-variable fill-column) justify? - true)))) + #t)))) (define-command mail-send-and-exit "Send message like mail-send, then, if no errors, exit from mail buffer. @@ -613,7 +612,7 @@ Prefix arg means don't delete this window." (define-command mail-send "Send the message in the current buffer. -If mail-interactive is non-false, wait for success indication +If mail-interactive is true, wait for success indication or error messages, and inform user. Otherwise any failure is reported in a message back to the user from the mailer." @@ -734,7 +733,7 @@ the user from the mailer." ;; that "^[>]+From " be quoted in the same transparent way.) (let ((m (mark-right-inserting-copy (mark+ start 2)))) (do () - ((not (re-search-forward "^From " m end false))) + ((not (re-search-forward "^From " m end #f))) (move-mark-to! m (re-match-end 0)) (insert-string ">" (re-match-start 0))) (mark-temporary! m)) @@ -752,7 +751,7 @@ the user from the mailer." (define (digest-fcc-headers start header-end) (let ((m (mark-right-inserting-copy start))) (let loop ((pathnames '())) - (if (re-search-forward "^FCC:[ \t]*\\([^ \t\n]+\\)" m header-end true) + (if (re-search-forward "^FCC:[ \t]*\\([^ \t\n]+\\)" m header-end #t) (let ((filename (extract-string (re-match-start 1) (re-match-end 1)))) (move-mark-to! m (line-start (re-match-start 0) 0)) diff --git a/v7/src/edwin/shell.scm b/v7/src/edwin/shell.scm index 33b75742d..5dd375d94 100644 --- a/v7/src/edwin/shell.scm +++ b/v7/src/edwin/shell.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: shell.scm,v 1.22 2000/02/24 01:23:42 cph Exp $ +$Id: shell.scm,v 1.23 2000/02/29 02:41:36 cph Exp $ Copyright (c) 1991-2000 Massachusetts Institute of Technology @@ -67,8 +67,16 @@ to match their respective commands." (local-set-variable! comint-input-sentinel shell-directory-tracker buffer) (local-set-variable! shell-dirstack '() buffer) (local-set-variable! shell-dirtrack? #t buffer) + (local-set-variable! local-abbrev-table + (ref-variable shell-mode-abbrev-table buffer) + buffer) (event-distributor/invoke! (ref-variable shell-mode-hook buffer) buffer))) +(define-variable shell-mode-abbrev-table + "Mode-specific abbrev table for Shell mode." + (make-abbrev-table) + abbrev-table?) + (define-variable shell-mode-hook "An event distributor that is invoked when entering Shell mode." (make-event-distributor)) @@ -135,7 +143,7 @@ Otherwise, one argument `-i' is passed to the shell." "List of directories saved by pushd in this buffer's shell." '()) -(define-variable shell-dirtrack? "" false) +(define-variable shell-dirtrack? "" #f) (define (shell-directory-tracker string) (if (ref-variable shell-dirtrack?) @@ -259,8 +267,8 @@ Otherwise, one argument `-i' is passed to the shell." shell-dirtrack? (let ((argument (command-argument-value argument))) (cond ((not argument) (not (ref-variable shell-dirtrack?))) - ((positive? argument) true) - ((negative? argument) false) + ((positive? argument) #t) + ((negative? argument) #f) (else (ref-variable shell-dirtrack?))))) (message "Directory tracking " (if (ref-variable shell-dirtrack?) "on" "off") diff --git a/v7/src/edwin/texcom.scm b/v7/src/edwin/texcom.scm index ffcd65114..5f1acec52 100644 --- a/v7/src/edwin/texcom.scm +++ b/v7/src/edwin/texcom.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: texcom.scm,v 1.41 2000/02/25 19:02:42 cph Exp $ +;;; $Id: texcom.scm,v 1.42 2000/02/29 02:41:23 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-2000 Massachusetts Institute of Technology ;;; @@ -25,8 +25,10 @@ (define-major-mode text fundamental "Text" "Major mode for editing english text." (lambda (buffer) - (define-variable-local-value! buffer (ref-variable-object syntax-table) - text-mode:syntax-table) + (local-set-variable! syntax-table text-mode:syntax-table buffer) + (local-set-variable! local-abbrev-table + (ref-variable text-mode-abbrev-table buffer) + buffer) (event-distributor/invoke! (ref-variable text-mode-hook buffer) buffer))) (define-key 'text #\m-s 'center-line) @@ -40,6 +42,11 @@ (modify-syntax-entry! text-mode:syntax-table #\} "){ ") (modify-syntax-entry! text-mode:syntax-table #\' "w ") +(define-variable scheme-mode-abbrev-table + "Mode-specific abbrev table for Text mode." + (make-abbrev-table) + abbrev-table?) + (define-variable text-mode-hook "An event distributor that is invoked when entering Text mode." (make-event-distributor)) diff --git a/v7/src/edwin/tximod.scm b/v7/src/edwin/tximod.scm index a163fa7d6..b206a9220 100644 --- a/v7/src/edwin/tximod.scm +++ b/v7/src/edwin/tximod.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: tximod.scm,v 1.21 1999/01/02 06:11:34 cph Exp $ +;;; $Id: tximod.scm,v 1.22 2000/02/29 02:41:26 cph Exp $ ;;; -;;; Copyright (c) 1987-1999 Massachusetts Institute of Technology +;;; Copyright (c) 1987-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 @@ -41,7 +41,9 @@ set up so expression commands skip Texinfo bracket groups. In addition, Texinfo mode provides commands that insert various frequently used @-sign commands into the buffer. You can use these -commands to save keystrokes." +commands to save keystrokes. + +\\{texinfo}" (lambda (buffer) (local-set-variable! syntax-table texinfo-mode:syntax-table buffer) (local-set-variable! fill-column 72 buffer) @@ -60,9 +62,21 @@ commands to save keystrokes." (ref-variable paragraph-separate buffer)) buffer) + (local-set-variable! local-abbrev-table + (ref-variable texinfo-mode-abbrev-table buffer) + buffer) (event-distributor/invoke! (ref-variable texinfo-mode-hook buffer) buffer))) +(define-variable texinfo-mode-abbrev-table + "Mode-specific abbrev table for Texinfo." + (make-abbrev-table) + abbrev-table?) + +(define-variable texinfo-mode-hook + "An event distributor that is invoked when entering Texinfo mode." + (make-event-distributor)) + (define texinfo-mode:syntax-table (make-syntax-table)) (modify-syntax-entry! texinfo-mode:syntax-table #\" " ") (modify-syntax-entry! texinfo-mode:syntax-table #\\ " ") diff --git a/v7/src/edwin/verilog.scm b/v7/src/edwin/verilog.scm index 0f31f8992..d2f963bca 100644 --- a/v7/src/edwin/verilog.scm +++ b/v7/src/edwin/verilog.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: verilog.scm,v 1.5 1999/01/02 06:11:34 cph Exp $ +;;; $Id: verilog.scm,v 1.6 2000/02/29 02:41:29 cph Exp $ ;;; -;;; Copyright (c) 1996-1999 Massachusetts Institute of Technology +;;; Copyright (c) 1996-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 @@ -28,7 +28,9 @@ (lambda () (set-current-major-mode! (ref-mode-object verilog)))) (define-major-mode verilog fundamental "Verilog" - "Major mode specialized for editing Verilog code." + "Major mode specialized for editing Verilog code. + +\\{verilog}" (lambda (buffer) (local-set-variable! syntax-table verilog-mode:syntax-table buffer) (local-set-variable! syntax-ignore-comments-backwards #f buffer) @@ -49,9 +51,21 @@ (local-set-variable! require-final-newline #t buffer) (local-set-variable! keyparser-description verilog-description buffer) (local-set-variable! keyword-table verilog-keyword-table buffer) + (local-set-variable! local-abbrev-table + (ref-variable verilog-mode-abbrev-table buffer) + buffer) (event-distributor/invoke! (ref-variable verilog-mode-hook buffer) buffer))) +(define-variable verilog-mode-abbrev-table + "Mode-specific abbrev table for Verilog code." + (make-abbrev-table) + abbrev-table?) + +(define-variable verilog-mode-hook + "An event distributor that is invoked when entering Verilog mode." + (make-event-distributor)) + (define verilog-mode:syntax-table (let ((syntax-table (make-syntax-table))) (for-each (lambda (char) (modify-syntax-entry! syntax-table char ".")) diff --git a/v7/src/edwin/vhdl.scm b/v7/src/edwin/vhdl.scm index f543c0355..4948e690e 100644 --- a/v7/src/edwin/vhdl.scm +++ b/v7/src/edwin/vhdl.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: vhdl.scm,v 1.5 1999/01/02 06:11:34 cph Exp $ +;;; $Id: vhdl.scm,v 1.6 2000/02/29 02:41:32 cph Exp $ ;;; -;;; Copyright (c) 1997, 1999 Massachusetts Institute of Technology +;;; Copyright (c) 1997-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 @@ -28,7 +28,9 @@ (lambda () (set-current-major-mode! (ref-mode-object vhdl)))) (define-major-mode vhdl fundamental "VHDL" - "Major mode specialized for editing VHDL code." + "Major mode specialized for editing VHDL code. + +\\{vhdl}" (lambda (buffer) (local-set-variable! syntax-table vhdl-mode:syntax-table buffer) (local-set-variable! syntax-ignore-comments-backwards #f buffer) @@ -48,9 +50,21 @@ (local-set-variable! require-final-newline #t buffer) (local-set-variable! keyparser-description vhdl-description buffer) (local-set-variable! keyword-table vhdl-keyword-table buffer) + (local-set-variable! local-abbrev-table + (ref-variable vhdl-mode-abbrev-table buffer) + buffer) (event-distributor/invoke! (ref-variable vhdl-mode-hook buffer) buffer))) +(define-variable vhdl-mode-abbrev-table + "Mode-specific abbrev table for VHDL code." + (make-abbrev-table) + abbrev-table?) + +(define-variable vhdl-mode-hook + "An event distributor that is invoked when entering VHDL mode." + (make-event-distributor)) + (define vhdl-mode:syntax-table (let ((syntax-table (make-syntax-table))) (for-each (lambda (char) (modify-syntax-entry! syntax-table char "_")) -- 2.25.1