summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2017-09-26 11:00:36 -0400
committerGabriel Scherer <gabriel.scherer@gmail.com>2017-09-26 17:17:45 +0200
commit48936edfbb104ca26d988150e827e6f65e70e753 (patch)
tree417ab5bc8111446561e0958228a31abc7c815833
parent7cc4e6df0f8308460e53a25b3eaad4cf013a2f0e (diff)
downloadocaml-48936edfbb104ca26d988150e827e6f65e70e753.tar.gz
caml.el: Pass the `system` flag when defining abbrevs
Avoids problems such as tuareg#146: https://github.com/ocaml/tuareg/issues/146
-rw-r--r--emacs/caml.el13
1 files changed, 4 insertions, 9 deletions
diff --git a/emacs/caml.el b/emacs/caml.el
index 2b6645ffaa..80a4546879 100644
--- a/emacs/caml.el
+++ b/emacs/caml.el
@@ -432,15 +432,10 @@ have caml-electric-indent on, which see.")
(defvar caml-mode-abbrev-table nil
"Abbrev table used for Caml mode buffers.")
(if caml-mode-abbrev-table nil
- (setq caml-mode-abbrev-table (make-abbrev-table))
- (define-abbrev caml-mode-abbrev-table "and" "and" 'caml-abbrev-hook)
- (define-abbrev caml-mode-abbrev-table "do" "do" 'caml-abbrev-hook)
- (define-abbrev caml-mode-abbrev-table "done" "done" 'caml-abbrev-hook)
- (define-abbrev caml-mode-abbrev-table "else" "else" 'caml-abbrev-hook)
- (define-abbrev caml-mode-abbrev-table "end" "end" 'caml-abbrev-hook)
- (define-abbrev caml-mode-abbrev-table "in" "in" 'caml-abbrev-hook)
- (define-abbrev caml-mode-abbrev-table "then" "then" 'caml-abbrev-hook)
- (define-abbrev caml-mode-abbrev-table "with" "with" 'caml-abbrev-hook))
+ (define-abbrev-table 'caml-mode-abbrev-table
+ (mapcar (lambda (keyword)
+ `(,keyword ,keyword caml-abbrev-hook nil t))
+ '("and" "do" "done" "else" "end" "in" "then" "with"))))
;; Other internal variables