diff options
| author | Stefan Monnier | 2006-09-11 07:12:37 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2006-09-11 07:12:37 +0000 |
| commit | 7efd03c350f668efd84c57a3c5f42867fd9cb61d (patch) | |
| tree | 24a3d904a19f9444594eb6beb69bd9ea12be3ac6 | |
| parent | a8b7149d7e0b03f9fca1898592f2dd6185ccfbcd (diff) | |
| download | emacs-7efd03c350f668efd84c57a3c5f42867fd9cb61d.tar.gz emacs-7efd03c350f668efd84c57a3c5f42867fd9cb61d.zip | |
(cfengine-font-lock-syntactic-keywords): New var.
(cfengine-mode): Use it. Fix \ syntax to be like /.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/progmodes/cfengine.el | 14 |
2 files changed, 14 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ac3a50c921e..711edf8ab92 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2006-09-11 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2006-09-11 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * progmodes/cfengine.el (cfengine-font-lock-syntactic-keywords): New var. | ||
| 4 | (cfengine-mode): Use it. Fix \ syntax to be like /. | ||
| 5 | |||
| 3 | * bindings.el (mode-line-buffer-identification-keymap): | 6 | * bindings.el (mode-line-buffer-identification-keymap): |
| 4 | Move initialization into declaration. | 7 | Move initialization into declaration. |
| 5 | 8 | ||
diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el index 1b62774a72d..b70fe58b543 100644 --- a/lisp/progmodes/cfengine.el +++ b/lisp/progmodes/cfengine.el | |||
| @@ -85,6 +85,12 @@ This includes those for cfservd as well as cfagent.")) | |||
| 85 | ;; File, acl &c in group: { token ... } | 85 | ;; File, acl &c in group: { token ... } |
| 86 | ("{[ \t]*\\([^ \t\n]+\\)" 1 font-lock-constant-face))) | 86 | ("{[ \t]*\\([^ \t\n]+\\)" 1 font-lock-constant-face))) |
| 87 | 87 | ||
| 88 | (defconst cfengine-font-lock-syntactic-keywords | ||
| 89 | ;; In the main syntax-table, backslash is marked as a punctuation, because | ||
| 90 | ;; of its use in DOS-style directory separators. Here we try to recognize | ||
| 91 | ;; the cases where backslash is used as an escape inside strings. | ||
| 92 | '(("\\(\\(?:\\\\\\)+\\)\"" . "\\"))) | ||
| 93 | |||
| 88 | (defvar cfengine-imenu-expression | 94 | (defvar cfengine-imenu-expression |
| 89 | `((nil ,(concat "^[ \t]*" (eval-when-compile | 95 | `((nil ,(concat "^[ \t]*" (eval-when-compile |
| 90 | (regexp-opt cfengine-actions t)) | 96 | (regexp-opt cfengine-actions t)) |
| @@ -218,7 +224,7 @@ to the action header." | |||
| 218 | ;; variable substitution: | 224 | ;; variable substitution: |
| 219 | (modify-syntax-entry ?$ "." cfengine-mode-syntax-table) | 225 | (modify-syntax-entry ?$ "." cfengine-mode-syntax-table) |
| 220 | ;; Doze path separators: | 226 | ;; Doze path separators: |
| 221 | (modify-syntax-entry ?\\ "_" cfengine-mode-syntax-table) | 227 | (modify-syntax-entry ?\\ "." cfengine-mode-syntax-table) |
| 222 | ;; Otherwise, syntax defaults seem OK to give reasonable word | 228 | ;; Otherwise, syntax defaults seem OK to give reasonable word |
| 223 | ;; movement. | 229 | ;; movement. |
| 224 | 230 | ||
| @@ -237,7 +243,9 @@ to the action header." | |||
| 237 | ;; functions in evaluated classes to string syntax, and then obey | 243 | ;; functions in evaluated classes to string syntax, and then obey |
| 238 | ;; syntax properties. | 244 | ;; syntax properties. |
| 239 | (setq font-lock-defaults | 245 | (setq font-lock-defaults |
| 240 | '(cfengine-font-lock-keywords nil nil nil beginning-of-line)) | 246 | '(cfengine-font-lock-keywords nil nil nil beginning-of-line |
| 247 | (font-lock-syntactic-keywords | ||
| 248 | . cfengine-font-lock-syntactic-keywords))) | ||
| 241 | (setq imenu-generic-expression cfengine-imenu-expression) | 249 | (setq imenu-generic-expression cfengine-imenu-expression) |
| 242 | (set (make-local-variable 'beginning-of-defun-function) | 250 | (set (make-local-variable 'beginning-of-defun-function) |
| 243 | #'cfengine-beginning-of-defun) | 251 | #'cfengine-beginning-of-defun) |
| @@ -249,5 +257,5 @@ to the action header." | |||
| 249 | 257 | ||
| 250 | (provide 'cfengine) | 258 | (provide 'cfengine) |
| 251 | 259 | ||
| 252 | ;;; arch-tag: 6b931be2-1505-4124-afa6-9675971e26d4 | 260 | ;; arch-tag: 6b931be2-1505-4124-afa6-9675971e26d4 |
| 253 | ;;; cfengine.el ends here | 261 | ;;; cfengine.el ends here |