392 |
|
|
393 |
|
|
394 |
|
|
395 |
(easy-mmode-defsyntax sh-mode-syntax-table |
(defvar sh-mode-syntax-table |
396 |
'((?\# . "<") |
'((sh eval sh-mode-syntax-table () |
397 |
(?\^l . ">#") |
?\# "<" |
398 |
(?\n . ">#") |
?\^l ">#" |
399 |
(?\" . "\"\"") |
?\n ">#" |
400 |
(?\' . "\"'") |
?\" "\"\"" |
401 |
(?\` . "\"`") |
?\' "\"'" |
402 |
(?! . "_") |
?\` "\"`" |
403 |
(?% . "_") |
?! "_" |
404 |
(?: . "_") |
?% "_" |
405 |
(?. . "_") |
?: "_" |
406 |
(?^ . "_") |
?. "_" |
407 |
(?~ . "_") |
?^ "_" |
408 |
(?< . ".") |
?~ "_" |
409 |
(?> . ".")) |
?< "." |
410 |
"Syntax-table used in Shell-Script mode.") |
?> ".") |
411 |
|
(csh eval identity sh) |
412 |
|
(rc eval identity sh)) |
413 |
|
|
414 |
|
"Syntax-table used in Shell-Script mode. See `sh-feature'.") |
415 |
|
|
416 |
(defvar sh-mode-map |
(defvar sh-mode-map |
417 |
(let ((map (make-sparse-keymap)) |
(let ((map (make-sparse-keymap)) |
1466 |
sh-shell-variables-initialized nil |
sh-shell-variables-initialized nil |
1467 |
imenu-generic-expression (sh-feature sh-imenu-generic-expression) |
imenu-generic-expression (sh-feature sh-imenu-generic-expression) |
1468 |
imenu-case-fold-search nil) |
imenu-case-fold-search nil) |
1469 |
|
(set-syntax-table (or (sh-feature sh-mode-syntax-table) |
1470 |
|
(standard-syntax-table))) |
1471 |
(dolist (var (sh-feature sh-variables)) |
(dolist (var (sh-feature sh-variables)) |
1472 |
(sh-remember-variable var)) |
(sh-remember-variable var)) |
1473 |
(make-local-variable 'indent-line-function) |
(make-local-variable 'indent-line-function) |
1582 |
;; (symbol-value sh-shell))) |
;; (symbol-value sh-shell))) |
1583 |
|
|
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 |
|
|
1592 |
(defun sh-append (ancestor &rest list) |
(defun sh-append (ancestor &rest list) |
1593 |
"Return list composed of first argument (a list) physically appended to rest." |
"Return list composed of first argument (a list) physically appended to rest." |
1594 |
(nconc list ancestor)) |
(nconc list ancestor)) |