Hello, can you please help me with the following LISP code? ;(require 'rct-util) ; (defconst rct-mode-buffer-name "*rct-main*" "*internal* Name of the rct main view buffer.") ; let the user have the possibility to run his hown code (defcustom rct-mode-hook nil "Normal hook run when entering Text mode and many related modes." :type 'hook :group 'data) ; Keymap (defvar rct-mode-map (let ((map (make-sparse-keymap))) (define-key map (kbd "C-c m") (lambda() (interactive) (message "C-c m pressed"))) (define-key map (kbd "") (lambda() (interactive) (message " pressed"))) (define-key map (kbd "") (lambda() (interactive) (message " pressed"))) map ) "Keymap for `rct-mode'.") ;; h1 first header in blue (defface h1 '((t :inherit default (:background "blue") )) "Face for a header without any special flags." :group 'rct-faces) (define-derived-mode rct-mode special-mode "rct:main" "Major mode for remote connections \\{rct-main-mode-map}." (setq debug-on-error t) (use-local-map rct-mode-map) (run-hooks 'rct-mode-hook) (main-menu)) ; Main Menu (defun main-menu () "This function display the main menu of the RCT mode." (with-current-buffer (get-buffer-create rct-mode-buffer-name) (erase-buffer) (insert "\n\n\n\n" (propertize "~~ Welcome ~~" 'face 'h1) "\n\n" "Main commands" "\n\n" "\t[Q] To quit the RCT-mode" "\n\n" "Section 1" "\n\n" "\t[F2] To Start XXXX\n" "\t[F3] To Start YYYYY\n" "\n" "Section 2" "\n\n" "\t[F4] To Start ZZZZZ\n" "\n\n" ); end-of insert );end-of with-current-buffer ;);end-of let (switch-to-buffer rct-mode-buffer-name) (toggle-read-only t) );end-of main-menu ; (provide 'rct-mode) Many thanks. Pascal 2012/9/8 pascal chenevas > Hello, > > First of all I would like to say that I'm starting for a week to program > in LIsp and to use Emacs too. > I'm reading such documentation like the emacswiki, the "intoduction to > programming in Emacs Lisp". > > For a week I have planed to create a major-mode and from there I can > launch a set of programs. > My major-mode should have a main menu like mu4e.el. > > To start with coding I have used the text-mode.el and the source code of > mu4e. > > Draft of the main menu: > >
Welcome Message
> > General options > [Q] to quit > FTP > [F3] to start > IRC > [F4] to start > > Note : The Welcome message should be in blue and the text in > bold (or in a different color). > > My questions are the following: > > 1) I have tried several set of functions to define a local-map that I can > use for example F2 to run an external program and I still don't understand > why my set of "local keys" are not loaded. I get the error message: is > undefined. > 2) I cannot get working to have a set of 'face to put a text in blue and > the other one in bold. > 3) I can run external program with (shell-command "cmd") but I cannot get > Emacs "free" to do anything else I would like (this part is not included in > the source code I have attached). > > Attached to the mail you will find the source code I have written. > > Many tanks for your help. > > Pascal >