[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] [linux] scel add key binding in .emacs
>>>>> "s" == sh0099 <sh0099@xxxxxx> writes:
s> i like to add some keybinding to the sclang-mode
s> i came as far as that:
s> (define-key sclang-mode-map "\C-x\M-x" '(lambda ()
s> (interactive)(sclang-eval-string "1+2" 1)))
s> but when i try to add this to the .emacs file it does not work
One way is to add to the modes' 'hook to specify things to be done
sometime when they are eventually needed:
eg.
(add-hook 'sclang-mode-hook
'(lambda nil
(define-key sclang-mode-map "\C-x\M-x"
'(lambda () (interactive)(sclang-eval-string "1+2" 1)))))
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/