2001-11-21 Richard M. Stallman <rms@gnu.org>
+ * 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 <Kai.Grossjohann@CS.Uni-Dortmund.DE>
-(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))
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)
;; (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))