From: Richard M. Stallman Date: Wed, 21 Nov 2001 11:12:45 +0000 (+0000) Subject: (sh-mode-syntax-table): Function restored. X-Git-Tag: ttn-vms-21-2-B4~18311 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b1e851bb95a5fc976fe90d86368bf83a482593c7;p=emacs.git (sh-mode-syntax-table): Function restored. Variable set up for use by function sh-mode-syntax-table. (sh-set-shell): Set the syntax table. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 655e2d4713d..f01dcc9b7eb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,14 @@ 2001-11-21 Richard M. Stallman + * progmodes/sh-script.el (sh-mode): Don't use define-derived-mode. + (sh-mode-syntax-table): Function restored. + Variable set up for use by function sh-mode-syntax-table. + (sh-set-shell): Set the syntax table. + + * play/gomoku.el (gomoku-mode): Don't use define-derived-mode. + + * progmodes/perl-mode.el (perl-mode): Don't use define-derived-mode. + * international/encoded-kb.el: Don't alter minor-map-alist. 2001-11-20 Kai Grossjohann diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 6d4ece0807b..4c9cfb9e284 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -392,23 +392,26 @@ the car and cdr are the same symbol.") -(easy-mmode-defsyntax sh-mode-syntax-table - '((?\# . "<") - (?\^l . ">#") - (?\n . ">#") - (?\" . "\"\"") - (?\' . "\"'") - (?\` . "\"`") - (?! . "_") - (?% . "_") - (?: . "_") - (?. . "_") - (?^ . "_") - (?~ . "_") - (?< . ".") - (?> . ".")) - "Syntax-table used in Shell-Script mode.") - +(defvar sh-mode-syntax-table + '((sh eval sh-mode-syntax-table () + ?\# "<" + ?\^l ">#" + ?\n ">#" + ?\" "\"\"" + ?\' "\"'" + ?\` "\"`" + ?! "_" + ?% "_" + ?: "_" + ?. "_" + ?^ "_" + ?~ "_" + ?< "." + ?> ".") + (csh eval identity sh) + (rc eval identity sh)) + + "Syntax-table used in Shell-Script mode. See `sh-feature'.") (defvar sh-mode-map (let ((map (make-sparse-keymap)) @@ -1463,6 +1466,8 @@ Calls the value of `sh-set-shell-hook' if set." sh-shell-variables-initialized nil imenu-generic-expression (sh-feature sh-imenu-generic-expression) imenu-case-fold-search nil) + (set-syntax-table (or (sh-feature sh-mode-syntax-table) + (standard-syntax-table))) (dolist (var (sh-feature sh-variables)) (sh-remember-variable var)) (make-local-variable 'indent-line-function) @@ -1577,6 +1582,13 @@ in ALIST." ;; (symbol-value sh-shell))) +(defun sh-mode-syntax-table (table &rest list) + "Copy TABLE and set syntax for successive CHARs according to strings S." + (setq table (copy-syntax-table table)) + (while list + (modify-syntax-entry (pop list) (pop list) table)) + table) + (defun sh-append (ancestor &rest list) "Return list composed of first argument (a list) physically appended to rest." (nconc list ancestor))