]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/conf-mode.el
Merge from emacs-24; up to 2014-07-27T01:00:26Z!fgallina@gnu.org
[gnu-emacs] / lisp / textmodes / conf-mode.el
index 4e6c8bd6b05a6c51222391250d736c41c7fa379b..05e593ea70fe731c846c9591313e66e1c466b2a2 100644 (file)
@@ -1,6 +1,6 @@
-;;; conf-mode.el --- Simple major mode for editing conf/ini/properties files
+;;; conf-mode.el --- Simple major mode for editing conf/ini/properties files -*- coding: utf-8 -*-
 
-;; Copyright (C) 2004-201 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2014 Free Software Foundation, Inc.
 
 ;; Author: Daniel Pfeiffer <occitan@esperanto.org>
 ;; Keywords: conf ini windows java
@@ -23,7 +23,7 @@
 ;;; Commentary:
 ;;
 ;; This mode is designed to edit many similar varieties of Conf/Ini files and
-;; Java properties.  It started out from Aurélien Tisné's ini-mode.
+;; Java properties.  It started out from Aurélien Tisné's ini-mode.
 ;; `conf-space-keywords' were inspired by Robert Fitzgerald's any-ini-mode.
 
 
@@ -155,7 +155,7 @@ not align (only setting space according to `conf-assignment-space')."
     (modify-syntax-entry ?/  ". 124" table)
     (modify-syntax-entry ?*  ". 23b" table)
     table)
-  "Syntax table in use in Java prperties buffers.")
+  "Syntax table in use in Java properties buffers.")
 
 (defvar conf-ppd-mode-syntax-table
   (let ((table (make-syntax-table conf-mode-syntax-table)))
@@ -185,7 +185,7 @@ not align (only setting space according to `conf-assignment-space')."
      (2 'font-lock-constant-face nil t))
     ;; section { ... } (do this last because some assign ...{...)
     ("^[ \t]*\\([^=:\n]+?\\)[ \t\n]*{[^{}]*?$" 1 'font-lock-type-face prepend))
-  "Keywords to hilight in Conf mode.")
+  "Keywords to highlight in Conf mode.")
 
 (defvar conf-javaprop-font-lock-keywords
   '(;; var=val
@@ -197,7 +197,7 @@ not align (only setting space according to `conf-assignment-space')."
      (5 'font-lock-variable-name-face nil t)
      (6 'font-lock-constant-face nil t)
      (7 'font-lock-variable-name-face nil t)))
-  "Keywords to hilight in Conf Java Properties mode.")
+  "Keywords to highlight in Conf Java Properties mode.")
 
 (defvar conf-space-keywords-alist
   '(("\\`/etc/gpm/" . "key\\|name\\|foreground\\|background\\|border\\|head")
@@ -240,7 +240,7 @@ This variable is best set in the file local variables, or through
      (1 'font-lock-variable-name-face))
     ;; section { ... } (do this last because some assign ...{...)
     ("^[ \t]*\\([^:\n]+\\)[ \t\n]*{[^{}]*?$" 1 'font-lock-type-face prepend))
-  "Keywords to hilight in Conf Colon mode.")
+  "Keywords to highlight in Conf Colon mode.")
 
 (defvar conf-assignment-sign ?=
   "Sign used for assignments (char or string).")
@@ -311,8 +311,7 @@ unbalanced, but hey...)"
     (when (or (not arg) (= (prefix-numeric-value arg) 2))
       (modify-syntax-entry ?\" "." table))
     (set-syntax-table table)
-    (when font-lock-mode
-      (font-lock-fontify-buffer))))
+    (font-lock-flush)))
 
 
 (defun conf-outline-level ()
@@ -417,7 +416,7 @@ See also `conf-space-mode', `conf-colon-mode', `conf-javaprop-mode',
     (run-mode-hooks 'conf-mode-hook)))
 
 (defun conf-mode-initialize (comment &optional font-lock)
-  "Intitializations for sub-modes of conf-mode.
+  "Initializations for sub-modes of conf-mode.
 COMMENT initializes `comment-start' and `comment-start-skip'.
 The optional arg FONT-LOCK is the value for FONT-LOCK-KEYWORDS."
   (set (make-local-variable 'comment-start) comment)