emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] externals/caml d3bc724 167/197: caml.el: Pass the `system` flag


From: Stefan Monnier
Subject: [nongnu] externals/caml d3bc724 167/197: caml.el: Pass the `system` flag when defining abbrevs
Date: Sat, 21 Nov 2020 01:20:00 -0500 (EST)

branch: externals/caml
commit d3bc7240f297fddb4bbb46c1b8817876b0406db8
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Gabriel Scherer <gabriel.scherer@gmail.com>

    caml.el: Pass the `system` flag when defining abbrevs
    
    Avoids problems such as tuareg#146:
      https://github.com/ocaml/tuareg/issues/146
---
 caml.el | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/caml.el b/caml.el
index 2b6645f..80a4546 100644
--- a/caml.el
+++ b/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
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]