From 2718efdd525898b3026636bd611ea16dda75402c Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 10 Apr 1997 06:38:26 +0000 Subject: [PATCH] (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. --- lisp/progmodes/sh-script.el | 15 +++++++++------ 1 file 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)) -- 2.11.4.GIT