| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] |
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0004429 | OCaml | OCaml general | public | 2007-10-23 21:53 | 2007-10-29 04:21 |
|
| Reporter | muelleru | |
| Assigned To | | |
| Priority | normal | Severity | feature | Reproducibility | always |
| Status | closed | Resolution | fixed | |
| Platform | | OS | | OS Version | |
| Product Version | 3.10.0 | |
| Target Version | | Fixed in Version | 3.10+dev | |
|
| Summary | 0004429: caml-font.el: make hook for font-lock a proper function |
| Description | The hook function for Emacs font-locking in caml-mode currently is a lambda expression only, which means that it cannot be autoloaded. Please consider to define it as a proper function (analog to inferior-caml-mode-font-hook).
See attached patch.
|
| Tags | No tags attached. |
|
| Attached Files | caml-font.patch [^] (1,226 bytes) 2007-10-23 21:53 [Show Content] [Hide Content]--- emacs/caml-font.el~ 2004-08-20 19:04:35.000000000 +0200
+++ emacs/caml-font.el 2007-10-23 15:35:11.547833248 +0200
@@ -109,18 +109,19 @@
caml-font-lock-keywords))
;; font-lock commands are similar for caml-mode and inferior-caml-mode
-(add-hook 'caml-mode-hook
- '(lambda ()
- (cond
- ((fboundp 'global-font-lock-mode)
- (make-local-variable 'font-lock-defaults)
- (setq font-lock-defaults
- '(caml-font-lock-keywords nil nil ((?' . "w") (?_ . "w")))))
- (t
- (setq font-lock-keywords caml-font-lock-keywords)))
- (make-local-variable 'font-lock-keywords-only)
- (setq font-lock-keywords-only t)
- (font-lock-mode 1)))
+(defun caml-mode-font-hook ()
+ (cond
+ ((fboundp 'global-font-lock-mode)
+ (make-local-variable 'font-lock-defaults)
+ (setq font-lock-defaults
+ '(caml-font-lock-keywords nil nil ((?' . "w") (?_ . "w")))))
+ (t
+ (setq font-lock-keywords caml-font-lock-keywords)))
+ (make-local-variable 'font-lock-keywords-only)
+ (setq font-lock-keywords-only t)
+ (font-lock-mode 1))
+
+(add-hook 'caml-mode-hook 'caml-mode-font-hook)
(defun inferior-caml-mode-font-hook ()
(cond
|
|