# HG changeset patch # User Richard M. Stallman # Date 860654306 0 # Node ID 9f345ed0683e22762ba1ff992fc1a3ee139d48aa # Parent dc683d40dde5f9ce9c88b23d28e07d7ef61ef5a8 (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. diff -r dc683d40dde5 -r 9f345ed0683e lisp/progmodes/sh-script.el --- a/lisp/progmodes/sh-script.el Thu Apr 10 06:29:59 1997 +0000 +++ b/lisp/progmodes/sh-script.el Thu Apr 10 06:38:26 1997 +0000 @@ -647,7 +647,8 @@ 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 @@ 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 @@ (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))