tomm@voodoo.UUCP (Tom Mackey) (04/28/86)
----------------------------------------------------------------------- We have been having some trouble getting things out to the net, so I am (perhaps) reposting this. If you have seen it before, my appologies... ----------------------------------------------------------------------- I have been trying to write some of my own lisp editing functions for GNU Emacs, without very much success. I am not a lisp expert, neither am I totally ignorant of lisp. If any of you lisp/emacs gurus have put together any kind of a programmers guide/manual/hint-sheet, I would like to see it. I have looked over the lisp functions in the lisp subdirectory, but most of that is far more complex than what I am trying to do. Something that would really help is see some fairly complex .emacs files. One thing that puzzles me is why the following .emacs file (actually, only a portion) will not cause the pf2 key ({esc}OQ) to be bound to my function (move-forward-word) until I explicitly load it after I enter the editor. Also, both before and after I do the {esc}x+load+.emacs sequence, both the escaped keypad "1" key ({esc}{esc}Oq) and the escaped pf2 key ({esc}{esc}OQ) -- note the cap vs lowercase "q" -- call the same function. That function is delete-edt-word, which I bound to ({esc}{esc}Oq). The GNU Emacs version I am using is 17.49, in case that makes any difference. (display-time) (defun move-forward-word () "moves one word forward, leaving point on first char of next word." (interactive) (forward-word 1) (forward-word 1) (backward-word 1)) (defun delete-edt-word () (interactive) (delete-region (point) (progn (move-forward-word) (point)))) (global-unset-key "\e\e") (global-unset-key "\eOQ") (global-set-key "\eOQ" 'move-forward-word) (global-set-key "\e\eOq" 'delete-edt-word) -------------------------------------------------------------------------- Tom Mackey Boeing Computer Services ....uw-beaver!ssc-vax!voodoo!tomm Everett, WA