diff options
author | Pierre Courtieu <courtieu@lri.fr> | 2007-11-07 11:43:33 +0000 |
---|---|---|
committer | Pierre Courtieu <courtieu@lri.fr> | 2007-11-07 11:43:33 +0000 |
commit | 470bfe858d58f293fa737c22973fe8ce07e6bf71 (patch) | |
tree | 7915ecadb1e881dbd4fe167b8550a705405b4be4 /coq/coq-db.el | |
parent | 6f8ade23551add38a07a62033993f85f4efe3872 (diff) |
Menu are now correctly sorted.
Diffstat (limited to 'coq/coq-db.el')
-rw-r--r-- | coq/coq-db.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/coq/coq-db.el b/coq/coq-db.el index 9c472f91..b29c8c57 100644 --- a/coq/coq-db.el +++ b/coq/coq-db.el @@ -157,12 +157,14 @@ for DB structure." " ... " (car-safe (car-safe (nthcdr (- size 1) db))))) +(defun coq-sort-menu-entries (menu) + (sort menu '(lambda (x y) (string< (downcase (elt x 0)) (downcase (elt y 0)))))) (defun coq-build-menu-from-db (db &optional size) "Take a keyword database DB and return a list of insertion menus for them. Submenus contain SIZE entries (default 30). See `coq-syntax-db' for DB structure." - (let* ((l db) (res + (let* ((l (coq-sort-menu-entries db)) (res ()) (wdth (+ 2 (max-length-db coq-tactics-db))) (sz (or size 30)) (lgth (length l))) |