summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-04-10 06:38:26 +0000
committerRichard M. Stallman <rms@gnu.org>1997-04-10 06:38:26 +0000
commitf62ef89a53b1fa8c79d60fbaab7dced38f9822d5 (patch)
tree11816a0cfd590b7535e76dc6f81b4fcea0d896ae
parentbb2d63f5320b576efc63774c9c1956233c424e78 (diff)
downloademacs-f62ef89a53b1fa8c79d60fbaab7dced38f9822d5.tar.gz
(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.el15
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."
sh-font-lock-keywords-1
sh-font-lock-keywords-2)
nil nil
- ((?/ . "w") (?~ . "w") (?. . "w") (?- . "w") (?_ . "w")))
+ ((?/ . "w") (?~ . "w") (?. . "w") (?- . "w") (?_ . "w")) nil
+ (font-lock-comment-start-regexp . "#"))
skeleton-pair-alist '((?` _ ?`))
skeleton-pair-filter 'sh-quoted-p
skeleton-further-elements '((< '(- (min sh-indentation
@@ -730,8 +731,9 @@ Calls the value of `sh-set-shell-hook' if set."
no-query-flag insert-flag)))
(setq require-final-newline (sh-feature sh-require-final-newline)
;;; local-abbrev-table (sh-feature sh-abbrevs)
- font-lock-keywords nil ; force resetting
- font-lock-syntax-table nil
+;; Packages should not need to set these variables directly. sm.
+; font-lock-keywords nil ; force resetting
+; font-lock-syntax-table nil
comment-start-skip "#+[\t ]*"
mode-line-process (format "[%s]" sh-shell)
sh-shell-variables nil
@@ -741,9 +743,10 @@ Calls the value of `sh-set-shell-hook' if set."
(while shell
(sh-remember-variable (car shell))
(setq shell (cdr shell)))
- (and (boundp 'font-lock-mode)
- font-lock-mode
- (font-lock-mode (font-lock-mode 0)))
+;; Packages should not need to toggle Font Lock mode. sm.
+; (and (boundp 'font-lock-mode)
+; font-lock-mode
+; (font-lock-mode (font-lock-mode 0)))
(run-hooks 'sh-set-shell-hook))