Mercurial > hg > xemacs-beta
comparison lisp/games/NeXTify.el @ 0:376386a54a3c r19-14
Import from CVS: tag r19-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:45:50 +0200 |
parents | |
children | b82b59fe008d |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:376386a54a3c |
---|---|
1 (defun SeLF-insert-command (arg) | |
2 "Insert the character you TyPE. | |
3 Whichever character you TyPE to run ThIS command is inserted." | |
4 (interactive "p") | |
5 (let ((p (point)) | |
6 (case-fold-search nil)) | |
7 (self-insert-command arg) | |
8 (save-excursion | |
9 (goto-char p) | |
10 (skip-chars-backward " \t\r\n") | |
11 (if (condition-case () (forward-char -4) (error t)) | |
12 nil | |
13 (if (looking-at "\\<[A-Za-z][a-z][a-z][a-z][^A-Za-z]") | |
14 (progn | |
15 (insert (upcase (following-char))) (delete-char 1) | |
16 (forward-char 1) | |
17 (insert (upcase (following-char))) (delete-char 1) | |
18 (insert (upcase (following-char))) (delete-char 1))))))) | |
19 | |
20 (define-key text-mode-map " " 'SeLF-insert-command) | |
21 (define-key text-mode-map "," 'SeLF-insert-command) | |
22 (define-key text-mode-map "." 'SeLF-insert-command) | |
23 (define-key text-mode-map "!" 'SeLF-insert-command) | |
24 (define-key text-mode-map "-" 'SeLF-insert-command) | |
25 (define-key text-mode-map "_" 'SeLF-insert-command) | |
26 (define-key text-mode-map ";" 'SeLF-insert-command) | |
27 (define-key text-mode-map ":" 'SeLF-insert-command) |