Mercurial > hg > xemacs-beta
comparison lisp/simple.el @ 4680:891381effa11
Eliminate 781 funcalls at startup, simple.el
2009-08-18 Aidan Kehoe <kehoea@parhasard.net>
* simple.el (handle-pre-motion-command-current-command-is-motion):
Replace mapc + #'(lambda ...) with dolist, eliminating 781
funcalls at XEmacs startup and decreasing GC a little.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Tue, 18 Aug 2009 12:34:34 +0100 |
parents | a78d697ccd2c |
children | 64ac4337298b |
comparison
equal
deleted
inserted
replaced
4679:2c64d2bbb316 | 4680:891381effa11 |
---|---|
2094 (if (characterp a) | 2094 (if (characterp a) |
2095 (setq a (intern (char-to-string (downcase a))))) | 2095 (setq a (intern (char-to-string (downcase a))))) |
2096 (if (characterp b) | 2096 (if (characterp b) |
2097 (setq b (intern (char-to-string (downcase b))))) | 2097 (setq b (intern (char-to-string (downcase b))))) |
2098 (eq a b))) | 2098 (eq a b))) |
2099 (mapc #'(lambda (keysym) | 2099 (dolist (keysym motion-keys-for-shifted-motion) |
2100 (when (if (listp keysym) | 2100 (when (if (listp keysym) |
2101 (and (equal mods (butlast keysym)) | 2101 (and (equal mods (butlast keysym)) |
2102 (keysyms-equal key (car (last keysym)))) | 2102 (keysyms-equal key (car (last keysym)))) |
2103 (keysyms-equal key keysym)) | 2103 (keysyms-equal key keysym)) |
2104 (throw | 2104 (throw 'handle-pre-motion-command-current-command-is-motion |
2105 'handle-pre-motion-command-current-command-is-motion | 2105 t))) |
2106 t))) | |
2107 motion-keys-for-shifted-motion) | |
2108 nil))))) | 2106 nil))))) |
2109 | 2107 |
2110 (defun handle-pre-motion-command () | 2108 (defun handle-pre-motion-command () |
2111 (if (and | 2109 (if (and |
2112 (handle-pre-motion-command-current-command-is-motion) | 2110 (handle-pre-motion-command-current-command-is-motion) |