summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDidier Rémy <Didier.Remy@inria.fr>2002-11-07 14:05:53 +0000
committerDidier Rémy <Didier.Remy@inria.fr>2002-11-07 14:05:53 +0000
commitfb251eceb3aa04a110937efbdce364dd6e86621c (patch)
tree1b7dd45b2f1c631571be057ad8acb23166b86195
parentb3170e3d1fd6184d07e1b0210335f96927d549b2 (diff)
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
-rw-r--r--emacs/caml-help.el25
1 files changed, 18 insertions, 7 deletions
diff --git a/emacs/caml-help.el b/emacs/caml-help.el
index 5dda0b19a..12687ab86 100644
--- a/emacs/caml-help.el
+++ b/emacs/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)