diff options
| author | Richard M. Stallman | 2001-11-21 11:12:45 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2001-11-21 11:12:45 +0000 |
| commit | b1e851bb95a5fc976fe90d86368bf83a482593c7 (patch) | |
| tree | 03320dc92ee2816dbae74fd418920167c6320cc2 | |
| parent | a7dba40b015c90c12715c42ae9fea58d1ca0d085 (diff) | |
| download | emacs-b1e851bb95a5fc976fe90d86368bf83a482593c7.tar.gz emacs-b1e851bb95a5fc976fe90d86368bf83a482593c7.zip | |
(sh-mode-syntax-table): Function restored.
Variable set up for use by function sh-mode-syntax-table.
(sh-set-shell): Set the syntax table.
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/progmodes/sh-script.el | 46 |
2 files changed, 38 insertions, 17 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 655e2d4713d..f01dcc9b7eb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,14 @@ | |||
| 1 | 2001-11-21 Richard M. Stallman <rms@gnu.org> | 1 | 2001-11-21 Richard M. Stallman <rms@gnu.org> |
| 2 | 2 | ||
| 3 | * progmodes/sh-script.el (sh-mode): Don't use define-derived-mode. | ||
| 4 | (sh-mode-syntax-table): Function restored. | ||
| 5 | Variable set up for use by function sh-mode-syntax-table. | ||
| 6 | (sh-set-shell): Set the syntax table. | ||
| 7 | |||
| 8 | * play/gomoku.el (gomoku-mode): Don't use define-derived-mode. | ||
| 9 | |||
| 10 | * progmodes/perl-mode.el (perl-mode): Don't use define-derived-mode. | ||
| 11 | |||
| 3 | * international/encoded-kb.el: Don't alter minor-map-alist. | 12 | * international/encoded-kb.el: Don't alter minor-map-alist. |
| 4 | 13 | ||
| 5 | 2001-11-20 Kai Grossjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> | 14 | 2001-11-20 Kai Grossjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> |
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.") | |||
| 392 | 392 | ||
| 393 | 393 | ||
| 394 | 394 | ||
| 395 | (easy-mmode-defsyntax sh-mode-syntax-table | 395 | (defvar sh-mode-syntax-table |
| 396 | '((?\# . "<") | 396 | '((sh eval sh-mode-syntax-table () |
| 397 | (?\^l . ">#") | 397 | ?\# "<" |
| 398 | (?\n . ">#") | 398 | ?\^l ">#" |
| 399 | (?\" . "\"\"") | 399 | ?\n ">#" |
| 400 | (?\' . "\"'") | 400 | ?\" "\"\"" |
| 401 | (?\` . "\"`") | 401 | ?\' "\"'" |
| 402 | (?! . "_") | 402 | ?\` "\"`" |
| 403 | (?% . "_") | 403 | ?! "_" |
| 404 | (?: . "_") | 404 | ?% "_" |
| 405 | (?. . "_") | 405 | ?: "_" |
| 406 | (?^ . "_") | 406 | ?. "_" |
| 407 | (?~ . "_") | 407 | ?^ "_" |
| 408 | (?< . ".") | 408 | ?~ "_" |
| 409 | (?> . ".")) | 409 | ?< "." |
| 410 | "Syntax-table used in Shell-Script mode.") | 410 | ?> ".") |
| 411 | 411 | (csh eval identity sh) | |
| 412 | (rc eval identity sh)) | ||
| 413 | |||
| 414 | "Syntax-table used in Shell-Script mode. See `sh-feature'.") | ||
| 412 | 415 | ||
| 413 | (defvar sh-mode-map | 416 | (defvar sh-mode-map |
| 414 | (let ((map (make-sparse-keymap)) | 417 | (let ((map (make-sparse-keymap)) |
| @@ -1463,6 +1466,8 @@ Calls the value of `sh-set-shell-hook' if set." | |||
| 1463 | sh-shell-variables-initialized nil | 1466 | sh-shell-variables-initialized nil |
| 1464 | imenu-generic-expression (sh-feature sh-imenu-generic-expression) | 1467 | imenu-generic-expression (sh-feature sh-imenu-generic-expression) |
| 1465 | imenu-case-fold-search nil) | 1468 | imenu-case-fold-search nil) |
| 1469 | (set-syntax-table (or (sh-feature sh-mode-syntax-table) | ||
| 1470 | (standard-syntax-table))) | ||
| 1466 | (dolist (var (sh-feature sh-variables)) | 1471 | (dolist (var (sh-feature sh-variables)) |
| 1467 | (sh-remember-variable var)) | 1472 | (sh-remember-variable var)) |
| 1468 | (make-local-variable 'indent-line-function) | 1473 | (make-local-variable 'indent-line-function) |
| @@ -1577,6 +1582,13 @@ in ALIST." | |||
| 1577 | ;; (symbol-value sh-shell))) | 1582 | ;; (symbol-value sh-shell))) |
| 1578 | 1583 | ||
| 1579 | 1584 | ||
| 1585 | (defun sh-mode-syntax-table (table &rest list) | ||
| 1586 | "Copy TABLE and set syntax for successive CHARs according to strings S." | ||
| 1587 | (setq table (copy-syntax-table table)) | ||
| 1588 | (while list | ||
| 1589 | (modify-syntax-entry (pop list) (pop list) table)) | ||
| 1590 | table) | ||
| 1591 | |||
| 1580 | (defun sh-append (ancestor &rest list) | 1592 | (defun sh-append (ancestor &rest list) |
| 1581 | "Return list composed of first argument (a list) physically appended to rest." | 1593 | "Return list composed of first argument (a list) physically appended to rest." |
| 1582 | (nconc list ancestor)) | 1594 | (nconc list ancestor)) |