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

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

[nongnu] externals/caml 05d89fc 061/197: added menu entries for caml-hel


From: Stefan Monnier
Subject: [nongnu] externals/caml 05d89fc 061/197: added menu entries for caml-help and caml-complete
Date: Sat, 21 Nov 2020 01:19:38 -0500 (EST)

branch: externals/caml
commit 05d89fc0bbd3da4ee73366a41263888d9712bf8c
Author: Didier Rémy <Didier.Remy@inria.fr>
Commit: Didier Rémy <Didier.Remy@inria.fr>

    added menu entries for caml-help and caml-complete
    
    
    git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5251 
f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
---
 caml-help.el | 25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/caml-help.el b/caml-help.el
index 5dda0b1..12687ab 100644
--- a/caml-help.el
+++ b/caml-help.el
@@ -208,7 +208,7 @@ When call interactively, make completion over known 
modules."
         (setq ocaml-visible-modules
               (cons (ocaml-get-or-make-module arg) (ocaml-visible-modules)))
         ))
-  (message "%S" (mapcar 'car ocaml-visible-modules)))
+  (message "%S" (mapcar 'car (ocaml-visible-modules))))
 
 (defun ocaml-close-module (arg)
   "*Close module of name ARG when ARG is a string. 
@@ -229,7 +229,7 @@ Otherwise if ARG is true, close all modules and reset to 
default. "
             (remove-if '(lambda (m) (equal (car m) arg))
                        ocaml-visible-modules))
       ))
-  (message "%S" (mapcar 'car ocaml-visible-modules)))
+  (message "%S" (mapcar 'car (ocaml-visible-modules))))
            
 
 ;; Look for identifiers around point
@@ -637,10 +637,21 @@ of using contextual values.
 
 ;; bindings
 
-(if (and (boundp 'caml-mode-map) (keymapp caml-mode-map))
-    (progn 
-      (define-key caml-mode-map [?\C-c?\C-h] 'caml-help)
-      (define-key caml-mode-map [?\C-c?\t] 'caml-complete)
-      ))
+(and
+ (boundp 'caml-mode-map)
+ (keymapp caml-mode-map)
+ (progn 
+   (define-key caml-mode-map [?\C-c?\C-h] 'caml-help)
+   (define-key caml-mode-map [?\C-c?\t] 'caml-complete)
+   (let ((map (lookup-key caml-mode-map [menu-bar caml])))
+     (and
+      (keymapp map)
+      (progn
+        (define-key map [separator-help] '("---"))
+        (define-key map [help] '("Help for identifier" . caml-help))
+        (define-key map [complete] '("Complete identifier" . caml-complete))
+        ) 
+   ))))
+
 
 (provide 'caml-help)



reply via email to

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