APPROVE COMMIT
NOTE: This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1252277232 -3600
# Node ID 02b7c71890410472b1e3acab50f4b8341a02555e
# Parent cdabd56ce1b5c2ec3669a554c173c808f953afa3
Random (minimal) performance improvements at startup.
lisp/ChangeLog addition:
2009-09-06 Aidan Kehoe <kehoea(a)parhasard.net>
* simple.el (handle-pre-motion-command-current-command-is-motion):
If KEY is a character, ascertain that once, not every iteration of
the loop.
* mule/mule-cmds.el (finish-set-language-environment):
Don't call #'string-match on a one-character string, use functions
that have bytecodes instead, since this is called so often on
startup.
diff -r cdabd56ce1b5 -r 02b7c7189041 lisp/ChangeLog
--- a/lisp/ChangeLog Sun Sep 06 19:36:02 2009 +0100
+++ b/lisp/ChangeLog Sun Sep 06 23:47:12 2009 +0100
@@ -1,3 +1,13 @@
+2009-09-06 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * simple.el (handle-pre-motion-command-current-command-is-motion):
+ If KEY is a character, ascertain that once, not every iteration of
+ the loop.
+ * mule/mule-cmds.el (finish-set-language-environment):
+ Don't call #'string-match on a one-character string, use functions
+ that have bytecodes instead, since this is called so often on
+ startup.
+
2009-08-31 Aidan Kehoe <kehoea(a)parhasard.net>
* byte-optimize.el (byte-optimize-form-code-walker):
diff -r cdabd56ce1b5 -r 02b7c7189041 lisp/mule/mule-cmds.el
--- a/lisp/mule/mule-cmds.el Sun Sep 06 19:36:02 2009 +0100
+++ b/lisp/mule/mule-cmds.el Sun Sep 06 23:47:12 2009 +0100
@@ -771,7 +771,7 @@
(let ((invalid-sequence-coding-system
(get-language-info language-name 'invalid-sequence-coding-system))
(disp-table (specifier-instance current-display-table))
- glyph string unicode-error-lookup)
+ glyph string unicode-error-lookup first-char)
(when (consp invalid-sequence-coding-system)
(setq invalid-sequence-coding-system
(car invalid-sequence-coding-system)))
@@ -788,7 +788,9 @@
(when unicode-error-lookup
(setq string (format "%c" unicode-error-lookup)))
;; Treat control characters specially:
- (when (string-match "^[\x00-\x1f\x80-\x9f]$" string)
+ (setq first-char (aref string 0))
+ (when (or (and (>= #x00 first-char) (<= first-char #x1f))
+ (and (>= #x80 first-char) (<= first-char #x9f)))
(setq string (format "^%c" (+ ?@ (aref string 0))))))
(setq glyph (make-glyph (vector 'string :data string)))
(set-glyph-face glyph 'unicode-invalid-sequence-warning-face)
diff -r cdabd56ce1b5 -r 02b7c7189041 lisp/simple.el
--- a/lisp/simple.el Sun Sep 06 19:36:02 2009 +0100
+++ b/lisp/simple.el Sun Sep 06 23:47:12 2009 +0100
@@ -2091,11 +2091,12 @@
;(princ (format "key: %s mods: %s\n" key mods)
'external-debugging-output)
(catch 'handle-pre-motion-command-current-command-is-motion
(flet ((keysyms-equal (a b)
- (if (characterp a)
- (setq a (intern (char-to-string (downcase a)))))
(if (characterp b)
(setq b (intern (char-to-string (downcase b)))))
(eq a b)))
+ (setq key (if (characterp key)
+ (intern (char-to-string (downcase key)))
+ key))
(dolist (keysym motion-keys-for-shifted-motion)
(when (if (listp keysym)
(and (equal mods (butlast keysym))
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghe, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches