diff options
| author | Richard M. Stallman | 1997-04-10 06:38:26 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-04-10 06:38:26 +0000 |
| commit | 2718efdd525898b3026636bd611ea16dda75402c (patch) | |
| tree | d10902c69ee4455f362c014a80700691b8b46fab | |
| parent | 1b657835fc0b3ea6f5a76534787d9a82cac50e75 (diff) | |
| download | emacs-2718efdd525898b3026636bd611ea16dda75402c.tar.gz emacs-2718efdd525898b3026636bd611ea16dda75402c.zip | |
(sh-mode): Set font-lock-comment-start-regexp via font-lock-defaults.
(sh-set-shell): Don't set font-lock-keywords or font-lock-syntax-table,
and don't toggle Font Lock mode if it is already on.
| -rw-r--r-- | lisp/progmodes/sh-script.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 1ae3b0a3ce8..1b014faf40d 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -647,7 +647,8 @@ with your script for an edit-interpret-debug cycle." | |||
| 647 | sh-font-lock-keywords-1 | 647 | sh-font-lock-keywords-1 |
| 648 | sh-font-lock-keywords-2) | 648 | sh-font-lock-keywords-2) |
| 649 | nil nil | 649 | nil nil |
| 650 | ((?/ . "w") (?~ . "w") (?. . "w") (?- . "w") (?_ . "w"))) | 650 | ((?/ . "w") (?~ . "w") (?. . "w") (?- . "w") (?_ . "w")) nil |
| 651 | (font-lock-comment-start-regexp . "#")) | ||
| 651 | skeleton-pair-alist '((?` _ ?`)) | 652 | skeleton-pair-alist '((?` _ ?`)) |
| 652 | skeleton-pair-filter 'sh-quoted-p | 653 | skeleton-pair-filter 'sh-quoted-p |
| 653 | skeleton-further-elements '((< '(- (min sh-indentation | 654 | skeleton-further-elements '((< '(- (min sh-indentation |
| @@ -730,8 +731,9 @@ Calls the value of `sh-set-shell-hook' if set." | |||
| 730 | no-query-flag insert-flag))) | 731 | no-query-flag insert-flag))) |
| 731 | (setq require-final-newline (sh-feature sh-require-final-newline) | 732 | (setq require-final-newline (sh-feature sh-require-final-newline) |
| 732 | ;;; local-abbrev-table (sh-feature sh-abbrevs) | 733 | ;;; local-abbrev-table (sh-feature sh-abbrevs) |
| 733 | font-lock-keywords nil ; force resetting | 734 | ;; Packages should not need to set these variables directly. sm. |
| 734 | font-lock-syntax-table nil | 735 | ; font-lock-keywords nil ; force resetting |
| 736 | ; font-lock-syntax-table nil | ||
| 735 | comment-start-skip "#+[\t ]*" | 737 | comment-start-skip "#+[\t ]*" |
| 736 | mode-line-process (format "[%s]" sh-shell) | 738 | mode-line-process (format "[%s]" sh-shell) |
| 737 | sh-shell-variables nil | 739 | sh-shell-variables nil |
| @@ -741,9 +743,10 @@ Calls the value of `sh-set-shell-hook' if set." | |||
| 741 | (while shell | 743 | (while shell |
| 742 | (sh-remember-variable (car shell)) | 744 | (sh-remember-variable (car shell)) |
| 743 | (setq shell (cdr shell))) | 745 | (setq shell (cdr shell))) |
| 744 | (and (boundp 'font-lock-mode) | 746 | ;; Packages should not need to toggle Font Lock mode. sm. |
| 745 | font-lock-mode | 747 | ; (and (boundp 'font-lock-mode) |
| 746 | (font-lock-mode (font-lock-mode 0))) | 748 | ; font-lock-mode |
| 749 | ; (font-lock-mode (font-lock-mode 0))) | ||
| 747 | (run-hooks 'sh-set-shell-hook)) | 750 | (run-hooks 'sh-set-shell-hook)) |
| 748 | 751 | ||
| 749 | 752 | ||