Mercurial > hg > xemacs-beta
comparison lisp/behavior.el @ 5271:2def0d83a5e3
Don't uselessly call #'nreverse, #'hash-table-key-list and friends.
2010-09-16 Aidan Kehoe <kehoea@parhasard.net>
* hash-table.el (hash-table-key-list, hash-table-value-list)
(hash-table-key-value-alist, hash-table-key-value-plist):
Remove some useless #'nreverse calls in these files; our hash
tables have no order, it's not helpful to pretend they do.
* behavior.el (read-behavior):
Do the same in this file, in some code evidently copied from
hash-table.el.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Thu, 16 Sep 2010 16:46:27 +0100 |
parents | ebb35ddea76a |
children | 308d34e9f07d |
comparison
equal
deleted
inserted
replaced
5270:3acaa0fc09be | 5271:2def0d83a5e3 |
---|---|
347 for history command, and as the value to return if the user enters the | 347 for history command, and as the value to return if the user enters the |
348 empty string." | 348 empty string." |
349 (let ((result | 349 (let ((result |
350 (completing-read | 350 (completing-read |
351 prompt | 351 prompt |
352 (let ((table (let (lis) | 352 (let (list) |
353 (maphash #'(lambda (key val) | 353 (maphash #'(lambda (key value) |
354 (push (cons key val) lis)) | 354 (push (cons (symbol-name key) value) list)) |
355 behavior-hash-table) | 355 behavior-hash-table) |
356 (nreverse lis)))) | 356 list) |
357 (mapc #'(lambda (aentry) | |
358 (setcar aentry (symbol-name (car aentry)))) | |
359 table) | |
360 table) | |
361 nil must-match initial-contents (or history 'behavior-history) | 357 nil must-match initial-contents (or history 'behavior-history) |
362 default-value))) | 358 default-value))) |
363 (if (and result (stringp result)) | 359 (if (and result (stringp result)) |
364 (intern result) | 360 (intern result) |
365 result))) | 361 result))) |