aboutsummaryrefslogtreecommitdiffhomepage
path: root/coq/coq-db.el
diff options
context:
space:
mode:
authorGravatar Pierre Courtieu <courtieu@lri.fr>2008-01-28 10:03:22 +0000
committerGravatar Pierre Courtieu <courtieu@lri.fr>2008-01-28 10:03:22 +0000
commit355b108aa856e3118f721c4f169bd86186ad8ce3 (patch)
tree3b93f618e53283722e5267c37cf63e0c086ee2d0 /coq/coq-db.el
parent2086154e7f462f1a73bfb6b99d179f86c39d1936 (diff)
Fixed a problem with a wrong side effect on syntax databases (when
sorting for menus).
Diffstat (limited to 'coq/coq-db.el')
-rw-r--r--coq/coq-db.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/coq/coq-db.el b/coq/coq-db.el
index d575ad09..627ec241 100644
--- a/coq/coq-db.el
+++ b/coq/coq-db.el
@@ -138,7 +138,7 @@ Used by `coq-build-menu-from-db', which you should probably use instead. See
(spaces (make-string entry-with ? ))
;;(restofmenu (coq-build-menu-from-db-internal tl (- size 1) menuwidth))
)
- (when (not e7) ; if not hidden
+ (when (not e7) ;; if not hidden
(let ((menu-entry
(vector
;; menu entry label
@@ -171,8 +171,8 @@ for DB structure."
"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 (coq-sort-menu-entries db)) (res
- ())
+ ;; sort is destructive for the list, so copy list before sorting
+ (let* ((l (coq-sort-menu-entries (copy-list db))) (res ())
(wdth (+ 2 (max-length-db db)))
(sz (or size 30)) (lgth (length l)))
(while l